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
. The bulkInsert operation doesn't create instances in an AI zone, even if an AI zone is available in the specified region. For example, if you set a DENY preference for us-central1-a, Compute Engine will consider us-central1-b and us-central1-c for instance creation, but not us-central1-ai1a. Also, you can't use the locations[] configuration to allow instance creation in an AI zone. To include an AI zone in bulkInsert operations, use the locationPolicy.zones[] field. |
targetShape |
Strategy for distributing VMs across zones in a region. |
zones[] |
The bulkInsert operation applies any preferences set in the locations field to the specific zones listed in the zones field if the same zones are specified in both fields. Available from all |
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. |
ZoneConfiguration
| JSON representation |
|---|
{ "zone": string } |
| Fields | |
|---|---|
zone |
The URL of the zone. The zone must exist in the region where the request is called. Zones must be represented as valid partial URLs, such as
. Available from all |