Condividi tramite


ZoneAllocationPolicy Class

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

Implements

public final class ZoneAllocationPolicy
implements JsonSerializable<ZoneAllocationPolicy>

The configuration parameters for zone allocation of a virtual machine scale set.

Constructor Summary

Constructor Description
ZoneAllocationPolicy()

Creates an instance of ZoneAllocationPolicy class.

Method Summary

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

Reads an instance of ZoneAllocationPolicy from the JsonReader.

MaxInstancePercentPerZonePolicy maxInstancePercentPerZonePolicy()

Get the maxInstancePercentPerZonePolicy property: The configuration parameters used to limit the number of virtual machines per availability zone in the virtual machine scale set.

Integer maxZoneCount()

Get the maxZoneCount property: The maximum number of availability zones to use if the ZonePlacementPolicy is 'Auto'.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ZoneAllocationPolicy withMaxInstancePercentPerZonePolicy(MaxInstancePercentPerZonePolicy maxInstancePercentPerZonePolicy)

Set the maxInstancePercentPerZonePolicy property: The configuration parameters used to limit the number of virtual machines per availability zone in the virtual machine scale set.

ZoneAllocationPolicy withMaxZoneCount(Integer maxZoneCount)

Set the maxZoneCount property: The maximum number of availability zones to use if the ZonePlacementPolicy is 'Auto'.

Methods inherited from java.lang.Object

Constructor Details

ZoneAllocationPolicy

public ZoneAllocationPolicy()

Creates an instance of ZoneAllocationPolicy class.

Method Details

fromJson

public static ZoneAllocationPolicy fromJson(JsonReader jsonReader)

Reads an instance of ZoneAllocationPolicy from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ZoneAllocationPolicy 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 ZoneAllocationPolicy.

maxInstancePercentPerZonePolicy

public MaxInstancePercentPerZonePolicy maxInstancePercentPerZonePolicy()

Get the maxInstancePercentPerZonePolicy property: The configuration parameters used to limit the number of virtual machines per availability zone in the virtual machine scale set.

Returns:

the maxInstancePercentPerZonePolicy value.

maxZoneCount

public Integer maxZoneCount()

Get the maxZoneCount property: The maximum number of availability zones to use if the ZonePlacementPolicy is 'Auto'. If not specified, all availability zones will be used.

Returns:

the maxZoneCount value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withMaxInstancePercentPerZonePolicy

public ZoneAllocationPolicy withMaxInstancePercentPerZonePolicy(MaxInstancePercentPerZonePolicy maxInstancePercentPerZonePolicy)

Set the maxInstancePercentPerZonePolicy property: The configuration parameters used to limit the number of virtual machines per availability zone in the virtual machine scale set.

Parameters:

maxInstancePercentPerZonePolicy - the maxInstancePercentPerZonePolicy value to set.

Returns:

the ZoneAllocationPolicy object itself.

withMaxZoneCount

public ZoneAllocationPolicy withMaxZoneCount(Integer maxZoneCount)

Set the maxZoneCount property: The maximum number of availability zones to use if the ZonePlacementPolicy is 'Auto'. If not specified, all availability zones will be used.

Parameters:

maxZoneCount - the maxZoneCount value to set.

Returns:

the ZoneAllocationPolicy object itself.

Applies to