public sealed class AllocationPolicy.Types.PlacementPolicy : IMessage<AllocationPolicy.Types.PlacementPolicy>, IEquatable<AllocationPolicy.Types.PlacementPolicy>, IDeepCloneable<AllocationPolicy.Types.PlacementPolicy>, IBufferMessage, IMessage
Reference documentation and code samples for the Batch v1 API class AllocationPolicy.Types.PlacementPolicy.
PlacementPolicy describes a group placement policy for the VMs controlled
by this AllocationPolicy.
UNSPECIFIED vs. COLLOCATED (default UNSPECIFIED). Use COLLOCATED when you
want VMs to be located close to each other for low network latency
between the VMs. No placement policy will be generated when collocation
is UNSPECIFIED.
When specified, causes the job to fail if more than max_distance logical
switches are required between VMs. Batch uses the most compact possible
placement of VMs even when max_distance is not specified. An explicit
max_distance makes that level of compactness a strict requirement.
Not yet implemented
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eAllocationPolicy.Types.PlacementPolicy\u003c/code\u003e class in the Batch v1 API provides a way to describe group placement policies for virtual machines (VMs) managed by \u003ccode\u003eAllocationPolicy\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThis class is the child of the \u003ccode\u003eAllocationPolicy\u003c/code\u003e class, specifically it is found as part of the \u003ccode\u003eTypes\u003c/code\u003e of that parent, and it can be found in the \u003ccode\u003eGoogle.Cloud.Batch.V1\u003c/code\u003e namespace.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePlacementPolicy\u003c/code\u003e class implements several interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and inherits from the base \u003ccode\u003eobject\u003c/code\u003e class.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCollocation\u003c/code\u003e property of \u003ccode\u003ePlacementPolicy\u003c/code\u003e can be used to specify if VMs should be placed close together for reduced network latency, and the \u003ccode\u003eMaxDistance\u003c/code\u003e property can be used to set a limit on the logical distance between VMs, although it is noted that this feature is not yet fully implemented.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version available for \u003ccode\u003eAllocationPolicy.Types.PlacementPolicy\u003c/code\u003e is 2.13.0, and there is a history of versions available on the webpage spanning back to version 1.0.0.\u003c/p\u003e\n"]]],[],null,[]]