CreationData Class

Data used when creating a disk.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to server.

Inheritance
azure.mgmt.compute._serialization.Model
CreationData

Constructor

CreationData(*, create_option: str | _models.DiskCreateOption, storage_account_id: str | None = None, image_reference: _models.ImageDiskReference | None = None, gallery_image_reference: _models.ImageDiskReference | None = None, source_uri: str | None = None, source_resource_id: str | None = None, upload_size_bytes: int | None = None, logical_sector_size: int | None = None, security_data_uri: str | None = None, **kwargs: Any)

Keyword-Only Parameters

Name Description
create_option

This enumerates the possible sources of a disk's creation. Required. Known values are: "Empty", "Attach", "FromImage", "Import", "Copy", "Restore", "Upload", "CopyStart", "ImportSecure", "UploadPreparedSecure", and "Import".

storage_account_id
str

Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk.

image_reference

Disk source information.

gallery_image_reference

Required if creating from a Gallery Image. The id of the ImageDiskReference will be the ARM id of the shared galley image version from which to create a disk.

source_uri
str

If createOption is Import, this is the URI of a blob to be imported into a managed disk.

source_resource_id
str

If createOption is Copy, this is the ARM id of the source snapshot or disk.

upload_size_bytes
int

If createOption is Upload, this is the size of the contents of the upload including the VHD footer. This value should be between 20972032 (20 MiB + 512 bytes for the VHD footer) and 35183298347520 bytes (32 TiB + 512 bytes for the VHD footer).

logical_sector_size
int

Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. 4096 is the default.

security_data_uri
str

If createOption is ImportSecure, this is the URI of a blob to be imported into VM guest state.

Variables

Name Description
create_option

This enumerates the possible sources of a disk's creation. Required. Known values are: "Empty", "Attach", "FromImage", "Import", "Copy", "Restore", "Upload", "CopyStart", "ImportSecure", "UploadPreparedSecure", and "Import".

storage_account_id
str

Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk.

image_reference

Disk source information.

gallery_image_reference

Required if creating from a Gallery Image. The id of the ImageDiskReference will be the ARM id of the shared galley image version from which to create a disk.

source_uri
str

If createOption is Import, this is the URI of a blob to be imported into a managed disk.

source_resource_id
str

If createOption is Copy, this is the ARM id of the source snapshot or disk.

source_unique_id
str

If this field is set, this is the unique id identifying the source of this resource.

upload_size_bytes
int

If createOption is Upload, this is the size of the contents of the upload including the VHD footer. This value should be between 20972032 (20 MiB + 512 bytes for the VHD footer) and 35183298347520 bytes (32 TiB + 512 bytes for the VHD footer).

logical_sector_size
int

Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. 4096 is the default.

security_data_uri
str

If createOption is ImportSecure, this is the URI of a blob to be imported into VM guest state.