Send feedback
Enum LocationPolicy.TargetShape (1.82.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version latestkeyboard_arrow_down
public enum LocationPolicy . TargetShape extends Enum<LocationPolicy . TargetShape > implements ProtocolMessageEnum
Strategy for distributing VMs across zones in a region.
Protobuf enum google.cloud.compute.v1.LocationPolicy.TargetShape
Static Fields
Name
Description
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.
ANY = 64972;
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.
ANY_SINGLE_ZONE = 61100880;
ANY_SINGLE_ZONE_VALUE
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.
ANY_SINGLE_ZONE = 61100880;
ANY_VALUE
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.
ANY = 64972;
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.
BALANCED = 468409608;
BALANCED_VALUE
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.
BALANCED = 468409608;
UNDEFINED_TARGET_SHAPE
A value indicating that the enum field is not set.
UNDEFINED_TARGET_SHAPE = 0;
UNDEFINED_TARGET_SHAPE_VALUE
A value indicating that the enum field is not set.
UNDEFINED_TARGET_SHAPE = 0;
UNRECOGNIZED
Static Methods
Name
Description
forNumber(int value)
getDescriptor()
internalGetValueMap()
valueOf(Descriptors.EnumValueDescriptor desc)
valueOf(int value)
Deprecated. Use #forNumber(int) instead.
valueOf(String name)
values()
Methods
Name
Description
getDescriptorForType()
getNumber()
getValueDescriptor()
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-28 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Enum LocationPolicy.TargetShape (1.82.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.82.0 (latest)](/java/docs/reference/google-cloud-compute/latest/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.80.0](/java/docs/reference/google-cloud-compute/1.80.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.78.0](/java/docs/reference/google-cloud-compute/1.78.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.77.0](/java/docs/reference/google-cloud-compute/1.77.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.74.0](/java/docs/reference/google-cloud-compute/1.74.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.73.0](/java/docs/reference/google-cloud-compute/1.73.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.72.0](/java/docs/reference/google-cloud-compute/1.72.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.70.0](/java/docs/reference/google-cloud-compute/1.70.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.69.0](/java/docs/reference/google-cloud-compute/1.69.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.68.0](/java/docs/reference/google-cloud-compute/1.68.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.67.0](/java/docs/reference/google-cloud-compute/1.67.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.66.0](/java/docs/reference/google-cloud-compute/1.66.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.65.0](/java/docs/reference/google-cloud-compute/1.65.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.64.0](/java/docs/reference/google-cloud-compute/1.64.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.63.0](/java/docs/reference/google-cloud-compute/1.63.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.62.0](/java/docs/reference/google-cloud-compute/1.62.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.61.0](/java/docs/reference/google-cloud-compute/1.61.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.59.0](/java/docs/reference/google-cloud-compute/1.59.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.58.0](/java/docs/reference/google-cloud-compute/1.58.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.57.0](/java/docs/reference/google-cloud-compute/1.57.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.56.0](/java/docs/reference/google-cloud-compute/1.56.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.55.0](/java/docs/reference/google-cloud-compute/1.55.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.54.0](/java/docs/reference/google-cloud-compute/1.54.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.53.0](/java/docs/reference/google-cloud-compute/1.53.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.52.0](/java/docs/reference/google-cloud-compute/1.52.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.51.0](/java/docs/reference/google-cloud-compute/1.51.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.50.0](/java/docs/reference/google-cloud-compute/1.50.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.49.0](/java/docs/reference/google-cloud-compute/1.49.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.47.0](/java/docs/reference/google-cloud-compute/1.47.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.46.0](/java/docs/reference/google-cloud-compute/1.46.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.45.0](/java/docs/reference/google-cloud-compute/1.45.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.44.0](/java/docs/reference/google-cloud-compute/1.44.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.43.0](/java/docs/reference/google-cloud-compute/1.43.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.42.0](/java/docs/reference/google-cloud-compute/1.42.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.41.0](/java/docs/reference/google-cloud-compute/1.41.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.40.0](/java/docs/reference/google-cloud-compute/1.40.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.39.0](/java/docs/reference/google-cloud-compute/1.39.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.38.0](/java/docs/reference/google-cloud-compute/1.38.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.37.0](/java/docs/reference/google-cloud-compute/1.37.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.34.0](/java/docs/reference/google-cloud-compute/1.34.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.33.0](/java/docs/reference/google-cloud-compute/1.33.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.32.0](/java/docs/reference/google-cloud-compute/1.32.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.31.0](/java/docs/reference/google-cloud-compute/1.31.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.30.0](/java/docs/reference/google-cloud-compute/1.30.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.29.0](/java/docs/reference/google-cloud-compute/1.29.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.28.0](/java/docs/reference/google-cloud-compute/1.28.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.27.0](/java/docs/reference/google-cloud-compute/1.27.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.26.0](/java/docs/reference/google-cloud-compute/1.26.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.25.0](/java/docs/reference/google-cloud-compute/1.25.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.24.0](/java/docs/reference/google-cloud-compute/1.24.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.23.0](/java/docs/reference/google-cloud-compute/1.23.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.22.0](/java/docs/reference/google-cloud-compute/1.22.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.21.0](/java/docs/reference/google-cloud-compute/1.21.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.20.0](/java/docs/reference/google-cloud-compute/1.20.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.19.0](/java/docs/reference/google-cloud-compute/1.19.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.18.0](/java/docs/reference/google-cloud-compute/1.18.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.17.0](/java/docs/reference/google-cloud-compute/1.17.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.16.0](/java/docs/reference/google-cloud-compute/1.16.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.15.0](/java/docs/reference/google-cloud-compute/1.15.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.14.0](/java/docs/reference/google-cloud-compute/1.14.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.13.0](/java/docs/reference/google-cloud-compute/1.13.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.12.1](/java/docs/reference/google-cloud-compute/1.12.1/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.11.0](/java/docs/reference/google-cloud-compute/1.11.0/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.9.1](/java/docs/reference/google-cloud-compute/1.9.1/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.8.1](/java/docs/reference/google-cloud-compute/1.8.1/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.7.2](/java/docs/reference/google-cloud-compute/1.7.2/com.google.cloud.compute.v1.LocationPolicy.TargetShape)\n- [1.6.0-beta](/java/docs/reference/google-cloud-compute/1.6.0-beta/com.google.cloud.compute.v1.LocationPolicy.TargetShape) \n\n public enum LocationPolicy.TargetShape extends Enum\u003cLocationPolicy.TargetShape\u003e implements ProtocolMessageEnum\n\nStrategy for distributing VMs across zones in a region.\n\nProtobuf enum `google.cloud.compute.v1.LocationPolicy.TargetShape` \n\nImplements\n----------\n\n[ProtocolMessageEnum](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ProtocolMessageEnum.html) \n\nInherited Members\n-----------------\n\n[Enum.\\\u003cT\\\u003evalueOf(Class\\\u003cT\\\u003e,String)](https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#valueOf-java.lang.Class-java.lang.String-) \n[Enum.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#clone--) \n[Enum.compareTo(E)](https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#compareTo-E-) \n[Enum.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#equals-java.lang.Object-) \n[Enum.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#finalize--) \n[Enum.getDeclaringClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#getDeclaringClass--) \n[Enum.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#hashCode--) \n[Enum.name()](https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#name--) \n[Enum.ordinal()](https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#ordinal--) \n[Enum.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#toString--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)"]]