public sealed class AllocationPolicy.Types.LocationPolicy : IMessage<AllocationPolicy.Types.LocationPolicy>, IEquatable<AllocationPolicy.Types.LocationPolicy>, IDeepCloneable<AllocationPolicy.Types.LocationPolicy>, IBufferMessage, IMessage
public RepeatedField<string> AllowedLocations { get; }
A list of allowed location names represented by internal URLs.
Each location can be a region or a zone.
Only one region or multiple zones in one region is supported now.
For example,
["regions/us-central1"] allow VMs in any zones in region us-central1.
["zones/us-central1-a", "zones/us-central1-c"] only allow VMs
in zones us-central1-a and us-central1-c.
Mixing locations from different regions would cause errors.
For example,
["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b",
"zones/us-west1-a"] contains locations from two distinct regions:
us-central1 and us-west1. This combination will trigger an error.
[[["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-07 UTC."],[[["\u003cp\u003eThe latest version of \u003ccode\u003eAllocationPolicy.Types.LocationPolicy\u003c/code\u003e is \u003ccode\u003e1.0.0-alpha31\u003c/code\u003e, which is a sealed class implementing several interfaces including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eLocationPolicy\u003c/code\u003e inherits from \u003ccode\u003eobject\u003c/code\u003e and provides methods like \u003ccode\u003eGetHashCode()\u003c/code\u003e, \u003ccode\u003eGetType()\u003c/code\u003e, and \u003ccode\u003eToString()\u003c/code\u003e, in addition to its own members.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eLocationPolicy\u003c/code\u003e has two constructors: a default constructor \u003ccode\u003eLocationPolicy()\u003c/code\u003e and a copy constructor \u003ccode\u003eLocationPolicy(AllocationPolicy.Types.LocationPolicy other)\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eLocationPolicy\u003c/code\u003e includes two properties: \u003ccode\u003eAllowedLocations\u003c/code\u003e, a list of allowed regions or zones for virtual machines, and \u003ccode\u003eDeniedLocations\u003c/code\u003e, which is a list of restricted locations, though currently not implemented.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAllowedLocations\u003c/code\u003e and \u003ccode\u003eDeniedLocations\u003c/code\u003e properties are of type \u003ccode\u003eRepeatedField<string>\u003c/code\u003e, which allow for the management of multiple string values representing location names.\u003c/p\u003e\n"]]],[],null,[]]