ImageOSDisk Class

public final class ImageOSDisk
extends ImageDisk

Describes an Operating System disk.

Constructor Summary

Constructor Description
ImageOSDisk()

Creates an instance of ImageOSDisk class.

Method Summary

Modifier and Type Method and Description
OperatingSystemStateTypes osState()

Get the osState property: The OS State.

OperatingSystemTypes 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.

void validate()

Validates the instance.

ImageOSDisk withBlobUri(String blobUri)

Set the blobUri property: The Virtual Hard Disk.

ImageOSDisk withCaching(CachingTypes caching)

Set the caching property: Specifies the caching requirements.

ImageOSDisk withDiskEncryptionSet(DiskEncryptionSetParameters diskEncryptionSet)

Set the diskEncryptionSet property: Specifies the customer managed disk encryption set resource id for the managed image disk.

ImageOSDisk withDiskSizeGB(Integer diskSizeGB)

Set the diskSizeGB property: Specifies the size of empty data disks in gigabytes.

ImageOSDisk withManagedDisk(SubResource managedDisk)

Set the managedDisk property: The managedDisk.

ImageOSDisk withOsState(OperatingSystemStateTypes osState)

Set the osState property: The OS State.

ImageOSDisk 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.

ImageOSDisk withSnapshot(SubResource snapshot)

Set the snapshot property: The snapshot.

ImageOSDisk withStorageAccountType(StorageAccountTypes storageAccountType)

Set the storageAccountType property: Specifies the storage account type for the managed disk.

Methods inherited from ImageDisk

Methods inherited from java.lang.Object

Constructor Details

ImageOSDisk

public ImageOSDisk()

Creates an instance of ImageOSDisk class.

Method Details

osState

public OperatingSystemStateTypes osState()

Get the osState property: The OS State. For managed images, use Generalized.

Returns:

the osState value.

osType

public OperatingSystemTypes 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.

validate

public void validate()

Validates the instance.

Overrides:

ImageOSDisk.validate()

withBlobUri

public ImageOSDisk withBlobUri(String blobUri)

Set the blobUri property: The Virtual Hard Disk.

Overrides:

ImageOSDisk.withBlobUri(String blobUri)

Parameters:

blobUri

withCaching

public ImageOSDisk withCaching(CachingTypes caching)

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:

ImageOSDisk.withCaching(CachingTypes caching)

Parameters:

caching

withDiskEncryptionSet

public ImageOSDisk withDiskEncryptionSet(DiskEncryptionSetParameters diskEncryptionSet)

Set the diskEncryptionSet property: Specifies the customer managed disk encryption set resource id for the managed image disk.

Overrides:

ImageOSDisk.withDiskEncryptionSet(DiskEncryptionSetParameters diskEncryptionSet)

Parameters:

diskEncryptionSet

withDiskSizeGB

public ImageOSDisk withDiskSizeGB(Integer diskSizeGB)

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:

ImageOSDisk.withDiskSizeGB(Integer diskSizeGB)

Parameters:

diskSizeGB

withManagedDisk

public ImageOSDisk withManagedDisk(SubResource managedDisk)

Set the managedDisk property: The managedDisk.

Overrides:

ImageOSDisk.withManagedDisk(SubResource managedDisk)

Parameters:

managedDisk

withOsState

public ImageOSDisk withOsState(OperatingSystemStateTypes osState)

Set the osState property: The OS State. For managed images, use Generalized.

Parameters:

osState - the osState value to set.

Returns:

the ImageOSDisk object itself.

withOsType

public ImageOSDisk 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. Possible values are: **Windows,** **Linux.**.

Parameters:

osType - the osType value to set.

Returns:

the ImageOSDisk object itself.

withSnapshot

public ImageOSDisk withSnapshot(SubResource snapshot)

Set the snapshot property: The snapshot.

Overrides:

ImageOSDisk.withSnapshot(SubResource snapshot)

Parameters:

snapshot

withStorageAccountType

public ImageOSDisk withStorageAccountType(StorageAccountTypes storageAccountType)

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:

ImageOSDisk.withStorageAccountType(StorageAccountTypes storageAccountType)

Parameters:

storageAccountType

Applies to