Class ImageDisk
java.lang.Object
com.azure.resourcemanager.compute.models.ImageDisk
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ImageDisk>
- Direct Known Subclasses:
ImageDataDisk, ImageOSDisk
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionblobUri()Get the blobUri property: The Virtual Hard Disk.caching()Get the caching property: Specifies the caching requirements.Get the diskEncryptionSet property: Specifies the customer managed disk encryption set resource id for the managed image disk.Get the diskSizeGB property: Specifies the size of empty data disks in gigabytes.static ImageDiskfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ImageDisk from the JsonReader.com.azure.core.management.SubResourceGet the managedDisk property: The managedDisk.com.azure.core.management.SubResourcesnapshot()Get the snapshot property: The snapshot.Get the storageAccountType property: Specifies the storage account type for the managed disk.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withBlobUri(String blobUri) Set the blobUri property: The Virtual Hard Disk.withCaching(CachingTypes caching) Set the caching property: Specifies the caching requirements.withDiskEncryptionSet(DiskEncryptionSetParameters diskEncryptionSet) Set the diskEncryptionSet property: Specifies the customer managed disk encryption set resource id for the managed image disk.withDiskSizeGB(Integer diskSizeGB) Set the diskSizeGB property: Specifies the size of empty data disks in gigabytes.withManagedDisk(com.azure.core.management.SubResource managedDisk) Set the managedDisk property: The managedDisk.withSnapshot(com.azure.core.management.SubResource snapshot) Set the snapshot property: The snapshot.withStorageAccountType(StorageAccountTypes storageAccountType) Set the storageAccountType property: Specifies the storage account type for the managed disk.Methods inherited from class 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
-
ImageDisk
public ImageDisk()Creates an instance of ImageDisk class.
-
-
Method Details
-
snapshot
public com.azure.core.management.SubResource snapshot()Get the snapshot property: The snapshot.- Returns:
- the snapshot value.
-
withSnapshot
Set the snapshot property: The snapshot.- Parameters:
snapshot- the snapshot value to set.- Returns:
- the ImageDisk object itself.
-
managedDisk
public com.azure.core.management.SubResource managedDisk()Get the managedDisk property: The managedDisk.- Returns:
- the managedDisk value.
-
withManagedDisk
Set the managedDisk property: The managedDisk.- Parameters:
managedDisk- the managedDisk value to set.- Returns:
- the ImageDisk object itself.
-
blobUri
Get the blobUri property: The Virtual Hard Disk.- Returns:
- the blobUri value.
-
withBlobUri
-
caching
Get the caching property: Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.**.- Returns:
- the caching value.
-
withCaching
Set the caching property: Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.**.- Parameters:
caching- the caching value to set.- Returns:
- the ImageDisk object itself.
-
diskSizeGB
Get the diskSizeGB property: Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.- Returns:
- the diskSizeGB value.
-
withDiskSizeGB
Set the diskSizeGB property: Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.- Parameters:
diskSizeGB- the diskSizeGB value to set.- Returns:
- the ImageDisk object itself.
-
storageAccountType
Get the storageAccountType property: Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.- Returns:
- the storageAccountType value.
-
withStorageAccountType
Set the storageAccountType property: Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.- Parameters:
storageAccountType- the storageAccountType value to set.- Returns:
- the ImageDisk object itself.
-
diskEncryptionSet
Get the diskEncryptionSet property: Specifies the customer managed disk encryption set resource id for the managed image disk.- Returns:
- the diskEncryptionSet value.
-
withDiskEncryptionSet
Set the diskEncryptionSet property: Specifies the customer managed disk encryption set resource id for the managed image disk.- Parameters:
diskEncryptionSet- the diskEncryptionSet value to set.- Returns:
- the ImageDisk 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<ImageDisk>- Throws:
IOException
-
fromJson
Reads an instance of ImageDisk from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ImageDisk if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the ImageDisk.
-