ImageOSDisk Class
- java.
lang. Object - com.
azure. resourcemanager. compute. models. ImageDisk - com.
azure. resourcemanager. compute. models. ImageOSDisk
- com.
- com.
public final class ImageOSDisk
extends ImageDisk
Describes an Operating System disk.
Constructor Summary
Constructor | Description |
---|---|
ImageOSDisk() |
Creates an instance of Image |
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Image |
fromJson(JsonReader jsonReader)
Reads an instance of Image |
Operating |
osState()
Get the os |
Operating |
osType()
Get the os |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Image |
withBlobUri(String blobUri)
Set the blob |
Image |
withCaching(CachingTypes caching)
Set the caching property: Specifies the caching requirements. |
Image |
withDiskEncryptionSet(DiskEncryptionSetParameters diskEncryptionSet)
Set the disk |
Image |
withDiskSizeGB(Integer diskSizeGB)
Set the disk |
Image |
withManagedDisk(SubResource managedDisk)
Set the managed |
Image |
withOsState(OperatingSystemStateTypes osState)
Set the os |
Image |
withOsType(OperatingSystemTypes osType)
Set the os |
Image |
withSnapshot(SubResource snapshot)
Set the snapshot property: The snapshot. |
Image |
withStorageAccountType(StorageAccountTypes storageAccountType)
Set the storage |
Methods inherited from ImageDisk
Methods inherited from java.lang.Object
Constructor Details
ImageOSDisk
public ImageOSDisk()
Creates an instance of ImageOSDisk class.
Method Details
fromJson
public static ImageOSDisk fromJson(JsonReader jsonReader)
Reads an instance of ImageOSDisk from the JsonReader.
Parameters:
Returns:
Throws:
osState
public OperatingSystemStateTypes osState()
Get the osState property: The OS State. For managed images, use Generalized.
Returns:
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:
toJson
public JsonWriter toJson(JsonWriter jsonWriter)
Overrides:
ImageOSDisk.toJson(JsonWriter jsonWriter)Parameters:
Throws:
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:
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:
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:
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:
withManagedDisk
public ImageOSDisk withManagedDisk(SubResource managedDisk)
Set the managedDisk property: The managedDisk.
Overrides:
ImageOSDisk.withManagedDisk(SubResource managedDisk)Parameters:
withOsState
public ImageOSDisk withOsState(OperatingSystemStateTypes osState)
Set the osState property: The OS State. For managed images, use Generalized.
Parameters:
Returns:
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:
Returns:
withSnapshot
public ImageOSDisk withSnapshot(SubResource snapshot)
Set the snapshot property: The snapshot.
Overrides:
ImageOSDisk.withSnapshot(SubResource snapshot)Parameters:
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:
Applies to
Azure SDK for Java