Class CreationData
java.lang.Object
com.azure.resourcemanager.compute.models.CreationData
- All Implemented Interfaces:
com.azure.json.JsonSerializable<CreationData>
public final class CreationData
extends Object
implements com.azure.json.JsonSerializable<CreationData>
Data used when creating a disk.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the createOption property: This enumerates the possible sources of a disk's creation.Get the elasticSanResourceId property: Required if createOption is CopyFromSanSnapshot.static CreationDatafromJson(com.azure.json.JsonReader jsonReader) Reads an instance of CreationData from the JsonReader.Get the galleryImageReference property: Required if creating from a Gallery Image.Get the imageReference property: Disk source information for PIR or user images.Get the logicalSectorSize property: Logical sector size in bytes for Ultra disks.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.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.Get the securityDataUri property: If createOption is ImportSecure, this is the URI of a blob to be imported into VM guest state.Get the sourceResourceId property: If createOption is Copy, this is the ARM id of the source snapshot or disk.Get the sourceUniqueId property: If this field is set, this is the unique id identifying the source of this resource.Get the sourceUri property: If createOption is Import, this is the URI of a blob to be imported into a managed disk.Get the storageAccountId property: Required if createOption is Import.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Get the uploadSizeBytes property: If createOption is Upload, this is the size of the contents of the upload including the VHD footer.voidvalidate()Validates the instance.withCreateOption(DiskCreateOption createOption) Set the createOption property: This enumerates the possible sources of a disk's creation.withElasticSanResourceId(String elasticSanResourceId) Set the elasticSanResourceId property: Required if createOption is CopyFromSanSnapshot.withGalleryImageReference(ImageDiskReference galleryImageReference) Set the galleryImageReference property: Required if creating from a Gallery Image.withImageReference(ImageDiskReference imageReference) Set the imageReference property: Disk source information for PIR or user images.withLogicalSectorSize(Integer logicalSectorSize) Set the logicalSectorSize property: Logical sector size in bytes for Ultra disks.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.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.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.withSourceResourceId(String sourceResourceId) Set the sourceResourceId property: If createOption is Copy, this is the ARM id of the source snapshot or disk.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.withStorageAccountId(String storageAccountId) Set the storageAccountId property: Required if createOption is Import.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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
CreationData
public CreationData()Creates an instance of CreationData class.
-
-
Method Details
-
createOption
Get the createOption property: This enumerates the possible sources of a disk's creation.- Returns:
- the createOption value.
-
withCreateOption
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.
-
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.
-
withStorageAccountId
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.
-
imageReference
Get the imageReference property: Disk source information for PIR or user images.- Returns:
- the imageReference value.
-
withImageReference
Set the imageReference property: Disk source information for PIR or user images.- Parameters:
imageReference- the imageReference value to set.- Returns:
- the CreationData object itself.
-
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.
-
withGalleryImageReference
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.
-
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.
-
withSourceUri
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.
-
sourceResourceId
Get the sourceResourceId property: If createOption is Copy, this is the ARM id of the source snapshot or disk.- Returns:
- the sourceResourceId value.
-
withSourceResourceId
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.
-
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.
-
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.
-
withUploadSizeBytes
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.
-
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.
-
withLogicalSectorSize
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.
-
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.
-
withSecurityDataUri
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.
-
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.
-
withPerformancePlus
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.
-
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.
-
withElasticSanResourceId
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.
-
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.
-
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.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<CreationData>- Throws:
IOException
-
fromJson
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:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the CreationData.
-