FlexProfile Class

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

Implements

public final class FlexProfile
implements JsonSerializable<FlexProfile>

Specifies the FlexProfile for a virtual machine. When set, Azure may deploy a compatible alternative VM size based on capacity and placement considerations, and the deployed size is returned in hardwareProfile.vmSize. See the properties.flexProfile description for the full usage rules, including how it interacts with hardwareProfile.vmSize.

Constructor Summary

Constructor Description
FlexProfile()

Creates an instance of FlexProfile class.

Method Summary

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

Reads an instance of FlexProfile from the JsonReader.

String preferredVMSize()

Get the preferredVMSize property: Specifies the preferred VM size, for example Standard_D4s_v5.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

FlexProfile withPreferredVMSize(String preferredVMSize)

Set the preferredVMSize property: Specifies the preferred VM size, for example Standard_D4s_v5.

Methods inherited from java.lang.Object

Constructor Details

FlexProfile

public FlexProfile()

Creates an instance of FlexProfile class.

Method Details

fromJson

public static FlexProfile fromJson(JsonReader jsonReader)

Reads an instance of FlexProfile from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of FlexProfile if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

preferredVMSize

public String preferredVMSize()

Get the preferredVMSize property: Specifies the preferred VM size, for example Standard_D4s_v5. Azure may deploy a compatible alternative size based on capacity and placement considerations. Supported VM families for FlexProfile may vary by region. The recommended way to get the list of available sizes is using these APIs: [List all available virtual machine sizes in a region](https://docs.microsoft.com/rest/api/compute/resourceskus/list), [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes).

Returns:

the preferredVMSize value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withPreferredVMSize

public FlexProfile withPreferredVMSize(String preferredVMSize)

Set the preferredVMSize property: Specifies the preferred VM size, for example Standard_D4s_v5. Azure may deploy a compatible alternative size based on capacity and placement considerations. Supported VM families for FlexProfile may vary by region. The recommended way to get the list of available sizes is using these APIs: [List all available virtual machine sizes in a region](https://docs.microsoft.com/rest/api/compute/resourceskus/list), [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes).

Parameters:

preferredVMSize - the preferredVMSize value to set.

Returns:

the FlexProfile object itself.

Applies to