Configuration for location policy among multiple possible locations (e.g. preferences for zone selection among zones in a single region).
JSON representation |
---|
{ "locations": { string: { object ( |
Fields | |
---|---|
locations |
Location configurations mapped by location name. Currently only zone names are supported and must be represented as valid internal URLs, such as
. |
targetShape |
Strategy for distributing VMs across zones in a region. |
Location
JSON representation |
---|
{ "preference": enum ( |
Fields | |
---|---|
preference |
Preference for a given location. Set to either
or
. |
constraints |
Constraints that the caller requires on the result distribution in this zone. |
Preference
The Preference enumeration may be a subject of a future extension.
Enums | |
---|---|
PREFERENCE_UNSPECIFIED |
Default value, unused. |
DENY |
Location is prohibited. |
ALLOW |
Location is allowed for use. |
Constraints
Per-zone constraints on location policy for this zone.
JSON representation |
---|
{ "maxCount": integer } |
Fields | |
---|---|
maxCount |
Maximum number of items that are allowed to be placed in this zone. The value must be non-negative. |
TargetShape
Strategy for distributing VMs across zones in a region.
Enums | |
---|---|
ANY |
GCE picks zones for creating VM instances to fulfill the requested number of VMs within present resource constraints and to maximize utilization of unused zonal reservations. Recommended for batch workloads that do not require high availability. |
BALANCED |
GCE prioritizes acquisition of resources, scheduling VMs in zones where resources are available while distributing VMs as evenly as possible across allowed zones to minimize the impact of zonal failure. Recommended for highly available serving workloads. |
ANY_SINGLE_ZONE |
GCE always selects a single zone for all the VMs, optimizing for resource quotas, available reservations and general capacity. Recommended for batch workloads that cannot tollerate distribution over multiple zones. This the default shape in Bulk Insert and Capacity Advisor APIs. |