def create_or_update_kv2(self, path, data, cas=None, mount_path='<STR_LIT>'):
params = {<EOL>'<STR_LIT>': {},<EOL>'<STR_LIT:data>': data<EOL>}<EOL>if cas is not None:<EOL><INDENT>params['<STR_LIT>']['<STR_LIT>'] = cas<EOL><DEDENT>write_path = '<STR_LIT>'.format(mount_path, path)<EOL>return self.write(write_path, **params)<EOL>
Create or update some data in a key/value version 2 secret engine.

:raises CasError:
    Raises an error if the ``cas`` value, when provided, doesn't match
    Vault's version for the key.