你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

VMSizeProperties Class

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

Implements

public final class VMSizeProperties
implements JsonSerializable<VMSizeProperties>

Specifies VM Size Property settings on the virtual machine.

Constructor Summary

Constructor Description
VMSizeProperties()

Creates an instance of VMSizeProperties class.

Method Summary

Modifier and Type Method and Description
static VMSizeProperties fromJson(JsonReader jsonReader)

Reads an instance of VMSizeProperties from the JsonReader.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

Integer vCpusAvailable()

Get the vCpusAvailable property: Specifies the number of vCPUs available for the VM.

Integer vCpusPerCore()

Get the vCpusPerCore property: Specifies the vCPU to physical core ratio.

VMSizeProperties withVCpusAvailable(Integer vCpusAvailable)

Set the vCpusAvailable property: Specifies the number of vCPUs available for the VM.

VMSizeProperties withVCpusPerCore(Integer vCpusPerCore)

Set the vCpusPerCore property: Specifies the vCPU to physical core ratio.

Methods inherited from java.lang.Object

Constructor Details

VMSizeProperties

public VMSizeProperties()

Creates an instance of VMSizeProperties class.

Method Details

fromJson

public static VMSizeProperties fromJson(JsonReader jsonReader)

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.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

vCpusAvailable

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

vCpusPerCore

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

withVCpusAvailable

public VMSizeProperties withVCpusAvailable(Integer vCpusAvailable)

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.

withVCpusPerCore

public VMSizeProperties withVCpusPerCore(Integer vCpusPerCore)

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.

Applies to