# Data Object - CnsVolumeCreateSpec(vim.cns.VolumeCreateSpec)

Parameter to
  CnsCreateVolume
Extends
  DynamicData
See also
  CnsBackingObjectDetails, CnsBaseCreateSpec, CnsVolumeMetadata, CnsVolumeSource, Datastore, VirtualMachineProfileSpec
Since
  vSAN API vSAN 6.7U3

## Data Object Description

Specification for a container volume creation.

Properties

Name | Type | Description
--- | --- | ---
backingObjectDetails | CnsBackingObjectDetails | Additional details for the backing object for this volume. The details would be specific to the type of the volume. E.g. a block volume can have details like ID of existing disk that should back the volume. See CnsBackingObjectDetails and its child-classes, specific to volume type, for more.
createSpec* | CnsBaseCreateSpec | Volume type specific requirements for the volume. Since vSAN API 7.0
datastores* | ManagedObjectReference[] to a Datastore[] | Datastores to be considered for volume placement. For block volume type: If backing disk is not specified in backingObjectDetails, then this is a mandatory field. In case of multiple placement candidate datastores, the server would select one datastore (subject to change) based on various factors like available free space. If an existing backing disk has been specified in backingObjectDetails, then this datastores array should not be set. For file volume type: If backing file volume is not specified in backingObjectDetails, then this is a mandatory field. In case of multiple placement candidate datastores, the server would select one datastore (subject to change) based on various factors like available free space. If an existing backing disk has been specified in backingObjectDetails, then this datastores array should not be set.
metadata* | CnsVolumeMetadata | Metadata for the container volume.
name | xsd:string | Name of the volume. Name size is limited to 80 bytes. CNS will not try to enforce uniqueness for volume name. Different container orchestrator clusters can create volumes with the same name. Uniqueness within a container orchestrator cluster, if needed, should be enforced by the cluster orchestrator.
profile* | VirtualMachineProfileSpec[] | Storage Profile for the container volume. ProfileSpec size is limited to 1. See VirtualMachineProfileSpec and its child-classes. If DefinedProfileSpec is specified, then the volume is created on the most free datastore compatible with the given storage policy. If DefaultProfileSpec or EmptyProfileSpec is specified, then the volume is created on the most free datastore with that profile spec. While creating a block volume with an existing disk, the policy would be applied to the existing disk no matter the disk is attached to VM or detached. While creating a file volume with an existing file share, this field will be ignored.
volumeSource* | CnsVolumeSource | Specification for the source of the volume creation. If set to null, a new empty volume is created. Since vSAN API 7.0
volumeType | xsd:string | Type of the volume. See CnsVolumeType.
Properties inherited from DynamicData
None

*Need not be set
Show WSDL type definition
<complexType xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vsan="urn:vsan" name="CnsVolumeCreateSpec"> <complexContent> <extension base="vsan:DynamicData"> <sequence> <element name="name" type="xsd:string"/> <element name="volumeType" type="xsd:string"/> <element name="datastores" type="vsan:ManagedObjectReference" minOccurs="0" maxOccurs="unbounded"/> <element name="metadata" type="vsan:CnsVolumeMetadata" minOccurs="0"/> <element name="backingObjectDetails" type="vsan:CnsBackingObjectDetails"/> <element name="profile" type="vsan:VirtualMachineProfileSpec" minOccurs="0" maxOccurs="unbounded"/> <element name="createSpec" type="vsan:CnsBaseCreateSpec" minOccurs="0"/> <element name="volumeSource" type="vsan:CnsVolumeSource" minOccurs="0"/> </sequence> </extension> </complexContent> </complexType>