Class CreationData
- java.lang.Object
-
- com.azure.resourcemanager.compute.models.CreationData
-
public final class CreationData extends Object
Data used when creating a disk.
-
-
Constructor Summary
Constructors Constructor Description CreationData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DiskCreateOptioncreateOption()Get the createOption property: This enumerates the possible sources of a disk's creation.ImageDiskReferencegalleryImageReference()Get the galleryImageReference property: Required if creating from a Gallery Image.ImageDiskReferenceimageReference()Get the imageReference property: Disk source information.IntegerlogicalSectorSize()Get the logicalSectorSize property: Logical sector size in bytes for Ultra disks.StringsecurityDataUri()Get the securityDataUri property: If createOption is ImportSecure, this is the URI of a blob to be imported into VM guest state.StringsourceResourceId()Get the sourceResourceId property: If createOption is Copy, this is the ARM id of the source snapshot or disk.StringsourceUniqueId()Get the sourceUniqueId property: If this field is set, this is the unique id identifying the source of this resource.StringsourceUri()Get the sourceUri property: If createOption is Import, this is the URI of a blob to be imported into a managed disk.StringstorageAccountId()Get the storageAccountId property: Required if createOption is Import.LonguploadSizeBytes()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.CreationDatawithCreateOption(DiskCreateOption createOption)Set the createOption property: This enumerates the possible sources of a disk's creation.CreationDatawithGalleryImageReference(ImageDiskReference galleryImageReference)Set the galleryImageReference property: Required if creating from a Gallery Image.CreationDatawithImageReference(ImageDiskReference imageReference)Set the imageReference property: Disk source information.CreationDatawithLogicalSectorSize(Integer logicalSectorSize)Set the logicalSectorSize property: Logical sector size in bytes for Ultra disks.CreationDatawithSecurityDataUri(String securityDataUri)Set the securityDataUri property: If createOption is ImportSecure, this is the URI of a blob to be imported into VM guest state.CreationDatawithSourceResourceId(String sourceResourceId)Set the sourceResourceId property: If createOption is Copy, this is the ARM id of the source snapshot or disk.CreationDatawithSourceUri(String sourceUri)Set the sourceUri property: If createOption is Import, this is the URI of a blob to be imported into a managed disk.CreationDatawithStorageAccountId(String storageAccountId)Set the storageAccountId property: Required if createOption is Import.CreationDatawithUploadSizeBytes(Long uploadSizeBytes)Set the uploadSizeBytes property: If createOption is Upload, this is the size of the contents of the upload including the VHD footer.
-
-
-
Method Detail
-
createOption
public DiskCreateOption createOption()
Get the createOption property: This enumerates the possible sources of a disk's creation.- Returns:
- the createOption value.
-
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.
-
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.
-
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.
-
imageReference
public ImageDiskReference imageReference()
Get the imageReference property: Disk source information.- Returns:
- the imageReference value.
-
withImageReference
public CreationData withImageReference(ImageDiskReference imageReference)
Set the imageReference property: Disk source information.- Parameters:
imageReference- the imageReference value to set.- Returns:
- the CreationData object itself.
-
galleryImageReference
public ImageDiskReference galleryImageReference()
Get the galleryImageReference property: 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.- Returns:
- the galleryImageReference value.
-
withGalleryImageReference
public CreationData withGalleryImageReference(ImageDiskReference galleryImageReference)
Set the galleryImageReference property: 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.- Parameters:
galleryImageReference- the galleryImageReference value to set.- Returns:
- the CreationData object itself.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-