Class VMSizeProperties
java.lang.Object
com.azure.resourcemanager.compute.models.VMSizeProperties
- All Implemented Interfaces:
com.azure.json.JsonSerializable<VMSizeProperties>
public final class VMSizeProperties
extends Object
implements com.azure.json.JsonSerializable<VMSizeProperties>
Specifies VM Size Property settings on the virtual machine.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic VMSizePropertiesfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of VMSizeProperties from the JsonReader.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.Get the vCpusAvailable property: Specifies the number of vCPUs available for the VM.Get the vCpusPerCore property: Specifies the vCPU to physical core ratio.withVCpusAvailable(Integer vCpusAvailable) Set the vCpusAvailable property: Specifies the number of vCPUs available for the VM.withVCpusPerCore(Integer vCpusPerCore) Set the vCpusPerCore property: Specifies the vCPU to physical core ratio.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
VMSizeProperties
public VMSizeProperties()Creates an instance of VMSizeProperties class.
-
-
Method Details
-
vCpusAvailable
Get the vCpusAvailable property: Specifies the number of vCPUs available for the VM. When this property is not specified in the request body the default behavior is to set it to the value of vCPUs available for that VM size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list).- Returns:
- the vCpusAvailable value.
-
withVCpusAvailable
Set the vCpusAvailable property: Specifies the number of vCPUs available for the VM. When this property is not specified in the request body the default behavior is to set it to the value of vCPUs available for that VM size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list).- Parameters:
vCpusAvailable- the vCpusAvailable value to set.- Returns:
- the VMSizeProperties object itself.
-
vCpusPerCore
Get the vCpusPerCore property: Specifies the vCPU to physical core ratio. When this property is not specified in the request body the default behavior is set to the value of vCPUsPerCore for the VM Size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list). **Setting this property to 1 also means that hyper-threading is disabled.**.- Returns:
- the vCpusPerCore value.
-
withVCpusPerCore
Set the vCpusPerCore property: Specifies the vCPU to physical core ratio. When this property is not specified in the request body the default behavior is set to the value of vCPUsPerCore for the VM Size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list). **Setting this property to 1 also means that hyper-threading is disabled.**.- Parameters:
vCpusPerCore- the vCpusPerCore value to set.- Returns:
- the VMSizeProperties object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<VMSizeProperties>- Throws:
IOException
-
fromJson
Reads an instance of VMSizeProperties from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of VMSizeProperties 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 VMSizeProperties.
-