CreationData Class

  • java.lang.Object
    • com.azure.resourcemanager.compute.models.CreationData

Implements

public final class CreationData
implements JsonSerializable<CreationData>

Data used when creating a disk.

Constructor Summary

Constructor Description
CreationData()

Creates an instance of CreationData class.

Method Summary

Modifier and Type Method and Description
DiskCreateOption createOption()

Get the createOption property: This enumerates the possible sources of a disk's creation.

String elasticSanResourceId()

Get the elasticSanResourceId property: Required if createOption is CopyFromSanSnapshot.

static CreationData fromJson(JsonReader jsonReader)

Reads an instance of CreationData from the JsonReader.

ImageDiskReference galleryImageReference()

Get the galleryImageReference property: Required if creating from a Gallery Image.

ImageDiskReference imageReference()

Get the imageReference property: Disk source information for PIR or user images.

Integer logicalSectorSize()

Get the logicalSectorSize property: Logical sector size in bytes for Ultra disks.

Boolean performancePlus()

Get the performancePlus property: Set this flag to true to get a boost on the performance target of the disk deployed, see here on the respective performance target.

ProvisionedBandwidthCopyOption provisionedBandwidthCopySpeed()

Get the provisionedBandwidthCopySpeed property: If this field is set on a snapshot and createOption is CopyStart, the snapshot will be copied at a quicker speed.

String securityDataUri()

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

String sourceResourceId()

Get the sourceResourceId property: If createOption is Copy, this is the ARM id of the source snapshot or disk.

String sourceUniqueId()

Get the sourceUniqueId property: If this field is set, this is the unique id identifying the source of this resource.

String sourceUri()

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

String storageAccountId()

Get the storageAccountId property: Required if createOption is Import.

JsonWriter toJson(JsonWriter jsonWriter)
Long uploadSizeBytes()

Get the uploadSizeBytes property: If createOption is Upload, this is the size of the contents of the upload including the VHD footer.

void validate()

Validates the instance.

CreationData withCreateOption(DiskCreateOption createOption)

Set the createOption property: This enumerates the possible sources of a disk's creation.

CreationData withElasticSanResourceId(String elasticSanResourceId)

Set the elasticSanResourceId property: Required if createOption is CopyFromSanSnapshot.

CreationData withGalleryImageReference(ImageDiskReference galleryImageReference)

Set the galleryImageReference property: Required if creating from a Gallery Image.

CreationData withImageReference(ImageDiskReference imageReference)

Set the imageReference property: Disk source information for PIR or user images.

CreationData withLogicalSectorSize(Integer logicalSectorSize)

Set the logicalSectorSize property: Logical sector size in bytes for Ultra disks.

CreationData withPerformancePlus(Boolean performancePlus)

Set the performancePlus property: Set this flag to true to get a boost on the performance target of the disk deployed, see here on the respective performance target.

CreationData withProvisionedBandwidthCopySpeed(ProvisionedBandwidthCopyOption provisionedBandwidthCopySpeed)

Set the provisionedBandwidthCopySpeed property: If this field is set on a snapshot and createOption is CopyStart, the snapshot will be copied at a quicker speed.

CreationData withSecurityDataUri(String securityDataUri)

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

CreationData withSourceResourceId(String sourceResourceId)

Set the sourceResourceId property: If createOption is Copy, this is the ARM id of the source snapshot or disk.

CreationData withSourceUri(String sourceUri)

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

CreationData withStorageAccountId(String storageAccountId)

Set the storageAccountId property: Required if createOption is Import.

CreationData withUploadSizeBytes(Long uploadSizeBytes)

Set the uploadSizeBytes property: If createOption is Upload, this is the size of the contents of the upload including the VHD footer.

Methods inherited from java.lang.Object

Constructor Details

CreationData

public CreationData()

Creates an instance of CreationData class.

Method Details

createOption

public DiskCreateOption createOption()

Get the createOption property: This enumerates the possible sources of a disk's creation.

Returns:

the createOption value.

elasticSanResourceId

public String elasticSanResourceId()

Get the elasticSanResourceId property: Required if createOption is CopyFromSanSnapshot. This is the ARM id of the source elastic san volume snapshot.

Returns:

the elasticSanResourceId value.

fromJson

public static CreationData fromJson(JsonReader jsonReader)

Reads an instance of CreationData from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of CreationData if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

galleryImageReference

public ImageDiskReference galleryImageReference()

Get the galleryImageReference property: Required if creating from a Gallery Image. The id/sharedGalleryImageId/communityGalleryImageId of the ImageDiskReference will be the ARM id of the shared galley image version from which to create a disk.

Returns:

the galleryImageReference value.

imageReference

public ImageDiskReference imageReference()

Get the imageReference property: Disk source information for PIR or user images.

Returns:

the imageReference value.

logicalSectorSize

public Integer logicalSectorSize()

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

Returns:

the logicalSectorSize value.

performancePlus

public Boolean performancePlus()

Get the performancePlus property: Set this flag to true to get a boost on the performance target of the disk deployed, see here on the respective performance target. This flag can only be set on disk creation time and cannot be disabled after enabled.

Returns:

the performancePlus value.

provisionedBandwidthCopySpeed

public ProvisionedBandwidthCopyOption provisionedBandwidthCopySpeed()

Get the provisionedBandwidthCopySpeed property: If this field is set on a snapshot and createOption is CopyStart, the snapshot will be copied at a quicker speed.

Returns:

the provisionedBandwidthCopySpeed value.

securityDataUri

public String securityDataUri()

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

Returns:

the securityDataUri value.

sourceResourceId

public String sourceResourceId()

Get the sourceResourceId property: If createOption is Copy, this is the ARM id of the source snapshot or disk.

Returns:

the sourceResourceId value.

sourceUniqueId

public String sourceUniqueId()

Get the sourceUniqueId property: If this field is set, this is the unique id identifying the source of this resource.

Returns:

the sourceUniqueId value.

sourceUri

public String sourceUri()

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

Returns:

the sourceUri value.

storageAccountId

public String storageAccountId()

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

Returns:

the storageAccountId value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

uploadSizeBytes

public Long uploadSizeBytes()

Get the uploadSizeBytes property: 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).

Returns:

the uploadSizeBytes value.

validate

public void validate()

Validates the instance.

withCreateOption

public CreationData withCreateOption(DiskCreateOption createOption)

Set the createOption property: This enumerates the possible sources of a disk's creation.

Parameters:

createOption - the createOption value to set.

Returns:

the CreationData object itself.

withElasticSanResourceId

public CreationData withElasticSanResourceId(String elasticSanResourceId)

Set the elasticSanResourceId property: Required if createOption is CopyFromSanSnapshot. This is the ARM id of the source elastic san volume snapshot.

Parameters:

elasticSanResourceId - the elasticSanResourceId value to set.

Returns:

the CreationData object itself.

withGalleryImageReference

public CreationData withGalleryImageReference(ImageDiskReference galleryImageReference)

Set the galleryImageReference property: Required if creating from a Gallery Image. The id/sharedGalleryImageId/communityGalleryImageId of the ImageDiskReference will be the ARM id of the shared galley image version from which to create a disk.

Parameters:

galleryImageReference - the galleryImageReference value to set.

Returns:

the CreationData object itself.

withImageReference

public CreationData withImageReference(ImageDiskReference imageReference)

Set the imageReference property: Disk source information for PIR or user images.

Parameters:

imageReference - the imageReference value to set.

Returns:

the CreationData object itself.

withLogicalSectorSize

public CreationData withLogicalSectorSize(Integer logicalSectorSize)

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

Parameters:

logicalSectorSize - the logicalSectorSize value to set.

Returns:

the CreationData object itself.

withPerformancePlus

public CreationData withPerformancePlus(Boolean performancePlus)

Set the performancePlus property: Set this flag to true to get a boost on the performance target of the disk deployed, see here on the respective performance target. This flag can only be set on disk creation time and cannot be disabled after enabled.

Parameters:

performancePlus - the performancePlus value to set.

Returns:

the CreationData object itself.

withProvisionedBandwidthCopySpeed

public CreationData withProvisionedBandwidthCopySpeed(ProvisionedBandwidthCopyOption provisionedBandwidthCopySpeed)

Set the provisionedBandwidthCopySpeed property: If this field is set on a snapshot and createOption is CopyStart, the snapshot will be copied at a quicker speed.

Parameters:

provisionedBandwidthCopySpeed - the provisionedBandwidthCopySpeed value to set.

Returns:

the CreationData object itself.

withSecurityDataUri

public CreationData withSecurityDataUri(String securityDataUri)

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

Parameters:

securityDataUri - the securityDataUri value to set.

Returns:

the CreationData object itself.

withSourceResourceId

public CreationData withSourceResourceId(String sourceResourceId)

Set the sourceResourceId property: If createOption is Copy, this is the ARM id of the source snapshot or disk.

Parameters:

sourceResourceId - the sourceResourceId value to set.

Returns:

the CreationData object itself.

withSourceUri

public CreationData withSourceUri(String sourceUri)

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

Parameters:

sourceUri - the sourceUri value to set.

Returns:

the CreationData object itself.

withStorageAccountId

public CreationData withStorageAccountId(String storageAccountId)

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

Parameters:

storageAccountId - the storageAccountId value to set.

Returns:

the CreationData object itself.

withUploadSizeBytes

public CreationData withUploadSizeBytes(Long uploadSizeBytes)

Set the uploadSizeBytes property: 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).

Parameters:

uploadSizeBytes - the uploadSizeBytes value to set.

Returns:

the CreationData object itself.

Applies to