Create Data Sets
Creates a new data set. if you do not have all of the privileges described as follows: - The resource VirtualMachine referenced by the parameter vm requires VirtualMachine.DataSets.DataSetCreate.
Request
URLURL
Path Parameters
Path Parameters
Identifier of the virtual machine. The parameter must be an identifier for the resource type: VirtualMachine.
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Request Body
Specification of the data set to be created.
{
"description": "string",
"guest": "NONE",
"host": "NONE",
"name": "string"
}
A description of how the data set is used by its creator. This field can contain up to 1024 bytes.
Possible Entry access modes.
NONE : No access is allowed for data set Entries.
READ_ONLY : Only read access is allowed for data set Entries.
READ_WRITE : Full read, write and delete access is allowed on data set Entries.
Possible values are: NONE , READ_ONLY , READ_WRITE
Possible Entry access modes.
NONE : No access is allowed for data set Entries.
READ_ONLY : Only read access is allowed for data set Entries.
READ_WRITE : Full read, write and delete access is allowed on data set Entries.
Possible values are: NONE , READ_ONLY , READ_WRITE
The name of the data set. It is recommended that this value take the form “com.company.project” to avoid conflict with other uses.
If set, the data set is considered a property of the virtual machine, and is not included in a snapshot operation or when the virtual machine is cloned. When a virtual machine is reverted to a snapshot, any data set with {@link #omitFromSnapshotAndClone) set will be destroyed. Any data set with DataSets.CreateSpec.omit-from-snapshot-and-clone unset will be restored to the state when the snapshot was created. If unset, the data set is not copied when a virtual machine is cloned or a snapshot is taken.
Authentication
Response
Response BodyResponse Body
The identifier of the new data set. The result will be an identifier for the resource type: com.vmware.vcenter.vm.DataSet.
Errors
com.vmware.vapi.std.errors.already_exists : if the data set with the same name already exists. | com.vmware.vapi.std.errors.invalid_argument : if the specification is incorrect. | com.vmware.vapi.std.errors.not_allowed_in_current_state : if the virtual machine is in a state that doesn’t allow modifications, for example suspended. | com.vmware.vapi.std.errors.unsupported : if the virtual hardware version of the virtual machine does not support DataSets if the ESXi host version does not support DataSets
com.vmware.vapi.std.errors.unauthorized : if the user doesn’t have the required privileges.
com.vmware.vapi.std.errors.error : if the system reports an error while responding to the request. | com.vmware.vapi.std.errors.unable_to_allocate_resource : if the new data set requires more resources than are available.
com.vmware.vapi.std.errors.service_unavailable : if the system is unable to communicate with a service to complete the request.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
PowerCLI Client SDK Example
PowerCLI Client SDK All Parameters Example
cURL Command
Vendor Extensions
x-vmw-doc-operation: create