Class ImageOSDisk
java.lang.Object
com.azure.resourcemanager.compute.models.ImageDisk
com.azure.resourcemanager.compute.models.ImageOSDisk
Describes an Operating System disk.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionosState()Get the osState property: The OS State.osType()Get the osType property: This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image.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.withOsState(OperatingSystemStateTypes osState) Set the osState property: The OS State.withOsType(OperatingSystemTypes osType) Set the osType property: This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image.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 com.azure.resourcemanager.compute.models.ImageDisk
blobUri, caching, diskEncryptionSet, diskSizeGB, managedDisk, snapshot, storageAccountType
-
Constructor Details
-
ImageOSDisk
public ImageOSDisk()Creates an instance of ImageOSDisk class.
-
-
Method Details
-
osType
Get the osType property: This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: **Windows,** **Linux.**.- Returns:
- the osType value.
-
withOsType
Set the osType property: This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: **Windows,** **Linux.**.- Parameters:
osType- the osType value to set.- Returns:
- the ImageOSDisk object itself.
-
osState
Get the osState property: The OS State. For managed images, use Generalized.- Returns:
- the osState value.
-
withOsState
Set the osState property: The OS State. For managed images, use Generalized.- Parameters:
osState- the osState value to set.- Returns:
- the ImageOSDisk object itself.
-
withSnapshot
Set the snapshot property: The snapshot.- Overrides:
withSnapshotin classImageDisk- Parameters:
snapshot- the snapshot value to set.- Returns:
- the ImageDisk object itself.
-
withManagedDisk
Set the managedDisk property: The managedDisk.- Overrides:
withManagedDiskin classImageDisk- Parameters:
managedDisk- the managedDisk value to set.- Returns:
- the ImageDisk object itself.
-
withBlobUri
Set the blobUri property: The Virtual Hard Disk.- Overrides:
withBlobUriin classImageDisk- Parameters:
blobUri- the blobUri value to set.- Returns:
- the ImageDisk object itself.
-
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.**.- Overrides:
withCachingin classImageDisk- Parameters:
caching- the caching value to set.- Returns:
- the ImageDisk object itself.
-
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.- Overrides:
withDiskSizeGBin classImageDisk- Parameters:
diskSizeGB- the diskSizeGB value to set.- Returns:
- the ImageDisk object itself.
-
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.- Overrides:
withStorageAccountTypein classImageDisk- Parameters:
storageAccountType- the storageAccountType value to set.- Returns:
- the ImageDisk object itself.
-
withDiskEncryptionSet
Set the diskEncryptionSet property: Specifies the customer managed disk encryption set resource id for the managed image disk.- Overrides:
withDiskEncryptionSetin classImageDisk- Parameters:
diskEncryptionSet- the diskEncryptionSet value to set.- Returns:
- the ImageDisk object itself.
-
validate
public void validate()Validates the instance.- Overrides:
validatein classImageDisk- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-