CnsVolumeAttachDetachSpec
Data object for specifications for volume attach/detach operations.
This structure may be used only with operations rendered under /vsan.
{
"_typeName": "string",
"volumeId": {
"_typeName": "string",
"id": "string"
},
"vm": {
"_typeName": "string",
"type": "string",
"value": "string"
},
"diskMode": "string",
"sharing": "string",
"controllerKey": 0,
"unitNumber": 0,
"backingTypeName": "string",
"volumeEncrypted": false
}
Unique identifier and datastore information for the volume.
VirtualMachine to which this volume needs to be attached to.
The disk persistence mode.
Valid modes are vim.vm.device.VirtualDiskOption.DiskMode#persistent vim.vm.device.VirtualDiskOption.DiskMode#independent_persistent vim.vm.device.VirtualDiskOption.DiskMode#independent_nonpersistent vim.vm.device.VirtualDiskOption.DiskMode#nonpersistent vim.vm.device.VirtualDiskOption.DiskMode#undoable vim.vm.device.VirtualDiskOption.DiskMode#append When unset, default mode is persistent(that also means dependant persistent to CNS) see VirtualDiskModeEnum
The sharing mode of the virtual disk.
Valid values are vim.vm.device.VirtualDisk.Sharing#sharingNone vim.vm.device.VirtualDisk.Sharing#sharingMultiWriter When unset, default value is sharingNone See VirtualDiskSharingEnum
Key of the controller the disk will connect to.
It can be unset if there is only one controller (SCSI/SATA/NVME) with the available slot in the virtual machine. If there are multiple SCSI/SATA/NVME controllers available, user must specify the controller; if there is no available controllers, a MissingController fault will be thrown.
The unit number of the disk to be attached on its controller.
If unset, the next free slot on the specified controller or on the only available controller will be assigned to the attached disk.
Specifies the file backing type for the volume.
Valid values are defined in CnsVolumeBackingTypeEnum
For dynamically provisioned volumes:
- If not provided, defaults to VirtualDiskFlatVer2BackingInfo
- If provided, the specified backing type will be used.
For statically provisioned volumes:
- This field is required. If not provided, a CnsFault will be thrown.
Indicates whether the volume is encrypted.
When set to true, the volume is encrypted and vpxd API AttachVStorageObject_Task will be called for cryptographic key handling during batch attach operations. When set to false, the volume is not encrypted and vpxd API AttachVStorageObject_Task call will be skipped. When unset, regardless of the volume encryption status, vpxd API AttachVStorageObject_Task will be called to determine the volume encryption status and perform cryptographic key handling if the volume is encrypted. Note: AttachVStorageObject_Task call might impact performance.