ImageDisk Class

  • java.lang.Object
    • com.azure.resourcemanager.compute.models.ImageDisk

Implements

public class ImageDisk
implements JsonSerializable<ImageDisk>

Describes a image disk.

Constructor Summary

Constructor Description
ImageDisk()

Creates an instance of ImageDisk class.

Method Summary

Modifier and Type Method and Description
String blobUri()

Get the blobUri property: The Virtual Hard Disk.

CachingTypes caching()

Get the caching property: Specifies the caching requirements.

DiskEncryptionSetParameters diskEncryptionSet()

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

Integer diskSizeGB()

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

static ImageDisk fromJson(JsonReader jsonReader)

Reads an instance of ImageDisk from the JsonReader.

SubResource managedDisk()

Get the managedDisk property: The managedDisk.

SubResource snapshot()

Get the snapshot property: The snapshot.

StorageAccountTypes storageAccountType()

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

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ImageDisk withBlobUri(String blobUri)

Set the blobUri property: The Virtual Hard Disk.

ImageDisk withCaching(CachingTypes caching)

Set the caching property: Specifies the caching requirements.

ImageDisk withDiskEncryptionSet(DiskEncryptionSetParameters diskEncryptionSet)

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

ImageDisk withDiskSizeGB(Integer diskSizeGB)

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

ImageDisk withManagedDisk(SubResource managedDisk)

Set the managedDisk property: The managedDisk.

ImageDisk withSnapshot(SubResource snapshot)

Set the snapshot property: The snapshot.

ImageDisk withStorageAccountType(StorageAccountTypes storageAccountType)

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

Methods inherited from java.lang.Object

Constructor Details

ImageDisk

public ImageDisk()

Creates an instance of ImageDisk class.

Method Details

blobUri

public String blobUri()

Get the blobUri property: The Virtual Hard Disk.

Returns:

the blobUri value.

caching

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

diskEncryptionSet

public DiskEncryptionSetParameters diskEncryptionSet()

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

Returns:

the diskEncryptionSet value.

diskSizeGB

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

fromJson

public static ImageDisk fromJson(JsonReader jsonReader)

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.

managedDisk

public SubResource managedDisk()

Get the managedDisk property: The managedDisk.

Returns:

the managedDisk value.

snapshot

public SubResource snapshot()

Get the snapshot property: The snapshot.

Returns:

the snapshot value.

storageAccountType

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

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withBlobUri

public ImageDisk withBlobUri(String blobUri)

Set the blobUri property: The Virtual Hard Disk.

Parameters:

blobUri - the blobUri value to set.

Returns:

the ImageDisk object itself.

withCaching

public ImageDisk 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.**.

Parameters:

caching - the caching value to set.

Returns:

the ImageDisk object itself.

withDiskEncryptionSet

public ImageDisk withDiskEncryptionSet(DiskEncryptionSetParameters diskEncryptionSet)

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.

withDiskSizeGB

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

Parameters:

diskSizeGB - the diskSizeGB value to set.

Returns:

the ImageDisk object itself.

withManagedDisk

public ImageDisk withManagedDisk(SubResource managedDisk)

Set the managedDisk property: The managedDisk.

Parameters:

managedDisk - the managedDisk value to set.

Returns:

the ImageDisk object itself.

withSnapshot

public ImageDisk withSnapshot(SubResource snapshot)

Set the snapshot property: The snapshot.

Parameters:

snapshot - the snapshot value to set.

Returns:

the ImageDisk object itself.

withStorageAccountType

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

Parameters:

storageAccountType - the storageAccountType value to set.

Returns:

the ImageDisk object itself.

Applies to