Share via


Placement Class

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

Implements

public final class Placement
implements JsonSerializable<Placement>

Describes the user-defined constraints for resource hardware placement.

Constructor Summary

Constructor Description
Placement()

Creates an instance of Placement class.

Method Summary

Modifier and Type Method and Description
List<String> excludeZones()

Get the excludeZones property: This property supplements the 'zonePlacementPolicy' property.

static Placement fromJson(JsonReader jsonReader)

Reads an instance of Placement from the JsonReader.

List<String> includeZones()

Get the includeZones property: This property supplements the 'zonePlacementPolicy' property.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

Placement withExcludeZones(List<String> excludeZones)

Set the excludeZones property: This property supplements the 'zonePlacementPolicy' property.

Placement withIncludeZones(List<String> includeZones)

Set the includeZones property: This property supplements the 'zonePlacementPolicy' property.

Placement withZonePlacementPolicy(ZonePlacementPolicyType zonePlacementPolicy)

Set the zonePlacementPolicy property: Specifies the policy for resource's placement in availability zone.

ZonePlacementPolicyType zonePlacementPolicy()

Get the zonePlacementPolicy property: Specifies the policy for resource's placement in availability zone.

Methods inherited from java.lang.Object

Constructor Details

Placement

public Placement()

Creates an instance of Placement class.

Method Details

excludeZones

public List<String> excludeZones()

Get the excludeZones property: This property supplements the 'zonePlacementPolicy' property. If 'zonePlacementPolicy' is set to 'Any'/'Auto', availability zone selected by the system must not be present in the list of availability zones passed with 'excludeZones'. If 'excludeZones' is not provided, all availability zones in region will be considered for selection.

Returns:

the excludeZones value.

fromJson

public static Placement fromJson(JsonReader jsonReader)

Reads an instance of Placement from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

includeZones

public List<String> includeZones()

Get the includeZones property: This property supplements the 'zonePlacementPolicy' property. If 'zonePlacementPolicy' is set to 'Any'/'Auto', availability zone selected by the system must be present in the list of availability zones passed with 'includeZones'. If 'includeZones' is not provided, all availability zones in region will be considered for selection.

Returns:

the includeZones value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withExcludeZones

public Placement withExcludeZones(List<String> excludeZones)

Set the excludeZones property: This property supplements the 'zonePlacementPolicy' property. If 'zonePlacementPolicy' is set to 'Any'/'Auto', availability zone selected by the system must not be present in the list of availability zones passed with 'excludeZones'. If 'excludeZones' is not provided, all availability zones in region will be considered for selection.

Parameters:

excludeZones - the excludeZones value to set.

Returns:

the Placement object itself.

withIncludeZones

public Placement withIncludeZones(List<String> includeZones)

Set the includeZones property: This property supplements the 'zonePlacementPolicy' property. If 'zonePlacementPolicy' is set to 'Any'/'Auto', availability zone selected by the system must be present in the list of availability zones passed with 'includeZones'. If 'includeZones' is not provided, all availability zones in region will be considered for selection.

Parameters:

includeZones - the includeZones value to set.

Returns:

the Placement object itself.

withZonePlacementPolicy

public Placement withZonePlacementPolicy(ZonePlacementPolicyType zonePlacementPolicy)

Set the zonePlacementPolicy property: Specifies the policy for resource's placement in availability zone. Possible values are: **Any** (used for Virtual Machines), **Auto** (used for Virtual Machine Scale Sets) - An availability zone will be automatically picked by system as part of resource creation.

Parameters:

zonePlacementPolicy - the zonePlacementPolicy value to set.

Returns:

the Placement object itself.

zonePlacementPolicy

public ZonePlacementPolicyType zonePlacementPolicy()

Get the zonePlacementPolicy property: Specifies the policy for resource's placement in availability zone. Possible values are: **Any** (used for Virtual Machines), **Auto** (used for Virtual Machine Scale Sets) - An availability zone will be automatically picked by system as part of resource creation.

Returns:

the zonePlacementPolicy value.

Applies to