StorageProfile Class
- java.
lang. Object - com.
azure. resourcemanager. compute. models. StorageProfile
- com.
Implements
public final class StorageProfile
implements JsonSerializable<StorageProfile>
Specifies the storage settings for the virtual machine disks.
Constructor Summary
Constructor | Description |
---|---|
StorageProfile() |
Creates an instance of Storage |
Method Summary
Modifier and Type | Method and Description |
---|---|
List<Data |
dataDisks()
Get the data |
Disk |
diskControllerType()
Get the disk |
static
Storage |
fromJson(JsonReader jsonReader)
Reads an instance of Storage |
Image |
imageReference()
Get the image |
OSDisk |
osDisk()
Get the os |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Storage |
withDataDisks(List<DataDisk> dataDisks)
Set the data |
Storage |
withDiskControllerType(DiskControllerTypes diskControllerType)
Set the disk |
Storage |
withImageReference(ImageReference imageReference)
Set the image |
Storage |
withOsDisk(OSDisk osDisk)
Set the os |
Methods inherited from java.lang.Object
Constructor Details
StorageProfile
public StorageProfile()
Creates an instance of StorageProfile class.
Method Details
dataDisks
public List
Get the dataDisks property: Specifies the parameters that are used to add a data disk to a virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).
Returns:
diskControllerType
public DiskControllerTypes diskControllerType()
Get the diskControllerType property: Specifies the disk controller type configured for the VM. **Note:** This property will be set to the default disk controller type if not specified provided virtual machine is being created with 'hyperVGeneration' set to V2 based on the capabilities of the operating system disk and VM size from the the specified minimum api version. You need to deallocate the VM before updating its disk controller type unless you are updating the VM size in the VM configuration which implicitly deallocates and reallocates the VM. Minimum api-version: 2022-08-01.
Returns:
fromJson
public static StorageProfile fromJson(JsonReader jsonReader)
Reads an instance of StorageProfile from the JsonReader.
Parameters:
Returns:
Throws:
imageReference
public ImageReference imageReference()
Get the imageReference property: Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations.
Returns:
osDisk
public OSDisk osDisk()
Get the osDisk property: Specifies information about the operating system disk used by the virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).
Returns:
toJson
validate
public void validate()
Validates the instance.
withDataDisks
public StorageProfile withDataDisks(List
Set the dataDisks property: Specifies the parameters that are used to add a data disk to a virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).
Parameters:
Returns:
withDiskControllerType
public StorageProfile withDiskControllerType(DiskControllerTypes diskControllerType)
Set the diskControllerType property: Specifies the disk controller type configured for the VM. **Note:** This property will be set to the default disk controller type if not specified provided virtual machine is being created with 'hyperVGeneration' set to V2 based on the capabilities of the operating system disk and VM size from the the specified minimum api version. You need to deallocate the VM before updating its disk controller type unless you are updating the VM size in the VM configuration which implicitly deallocates and reallocates the VM. Minimum api-version: 2022-08-01.
Parameters:
Returns:
withImageReference
public StorageProfile withImageReference(ImageReference imageReference)
Set the imageReference property: Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations.
Parameters:
Returns:
withOsDisk
public StorageProfile withOsDisk(OSDisk osDisk)
Set the osDisk property: Specifies information about the operating system disk used by the virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).
Parameters:
Returns:
Applies to
Azure SDK for Java