CnsVolumeAttachDetachSpec

CnsVolumeAttachDetachSpec
CnsVolumeAttachDetachSpec

Data object for specifications for volume attach/detach operations.

This structure may be used only with operations rendered under /vsan.

AllOf
This class requires all of the following:
JSON Example
{
    "_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
}
volumeId
Required

Unique identifier and datastore information for the volume.

vm
Required

VirtualMachine to which this volume needs to be attached to.

string
diskMode
Optional

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

string
sharing
Optional

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

integer As int32 As int32
controllerKey
Optional

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.

integer As int32 As int32
unitNumber
Optional

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.

string
backingTypeName
Optional

Specifies the file backing type for the volume.

Valid values are defined in CnsVolumeBackingTypeEnum

For dynamically provisioned volumes:

For statically provisioned volumes:

  • This field is required. If not provided, a CnsFault will be thrown.
boolean
volumeEncrypted
Optional

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.