Class Placement
java.lang.Object
com.azure.resourcemanager.compute.models.Placement
- All Implemented Interfaces:
com.azure.json.JsonSerializable<Placement>
Describes the user-defined constraints for virtual machine hardware placement.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the excludeZones property: This property supplements the 'zonePlacementPolicy' property.static PlacementfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of Placement from the JsonReader.Get the includeZones property: This property supplements the 'zonePlacementPolicy' property.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withExcludeZones(List<String> excludeZones) Set the excludeZones property: This property supplements the 'zonePlacementPolicy' property.withIncludeZones(List<String> includeZones) Set the includeZones property: This property supplements the 'zonePlacementPolicy' property.withZonePlacementPolicy(ZonePlacementPolicyType zonePlacementPolicy) Set the zonePlacementPolicy property: Specifies the policy for virtual machine's placement in availability zone.Get the zonePlacementPolicy property: Specifies the policy for virtual machine's placement in availability zone.Methods inherited from class java.lang.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
-
Placement
public Placement()Creates an instance of Placement class.
-
-
Method Details
-
zonePlacementPolicy
Get the zonePlacementPolicy property: Specifies the policy for virtual machine's placement in availability zone. Possible values are: **Any** - An availability zone will be automatically picked by system as part of virtual machine creation.- Returns:
- the zonePlacementPolicy value.
-
withZonePlacementPolicy
Set the zonePlacementPolicy property: Specifies the policy for virtual machine's placement in availability zone. Possible values are: **Any** - An availability zone will be automatically picked by system as part of virtual machine creation.- Parameters:
zonePlacementPolicy- the zonePlacementPolicy value to set.- Returns:
- the Placement object itself.
-
includeZones
Get the includeZones property: This property supplements the 'zonePlacementPolicy' property. If 'zonePlacementPolicy' is set to 'Any', 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.
-
withIncludeZones
Set the includeZones property: This property supplements the 'zonePlacementPolicy' property. If 'zonePlacementPolicy' is set to 'Any', 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.
-
excludeZones
Get the excludeZones property: This property supplements the 'zonePlacementPolicy' property. If 'zonePlacementPolicy' is set to 'Any', 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.
-
withExcludeZones
Set the excludeZones property: This property supplements the 'zonePlacementPolicy' property. If 'zonePlacementPolicy' is set to 'Any', 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.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<Placement>- Throws:
IOException
-
fromJson
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.
-