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 v1alpha 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"]],[["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\u003eThis document provides reference information for the \u003ccode\u003eAllocationPolicy.Types.PlacementPolicy\u003c/code\u003e class within the Google Cloud Batch v1alpha API, detailing its structure and usage.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePlacementPolicy\u003c/code\u003e class is designed to describe the group placement policy for virtual machines (VMs) controlled by an \u003ccode\u003eAllocationPolicy\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt 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 \u003ccode\u003eobject\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class includes properties like \u003ccode\u003eCollocation\u003c/code\u003e to specify VM proximity and \u003ccode\u003eMaxDistance\u003c/code\u003e to define the maximum allowed logical switches between VMs, though the latter is not yet implemented.\u003c/p\u003e\n"],["\u003cp\u003eThere are two constructors available to instantiate a \u003ccode\u003ePlacementPolicy\u003c/code\u003e object, either as a new instance or from an existing \u003ccode\u003ePlacementPolicy\u003c/code\u003e object.\u003c/p\u003e\n"]]],[],null,[]]