public sealed class ReservationAffinity : IMessage<ReservationAffinity>, IEquatable<ReservationAffinity>, IDeepCloneable<ReservationAffinity>, IBufferMessage, IMessage
Reference documentation and code samples for the Vertex AI v1beta1 API class ReservationAffinity.
A ReservationAffinity can be used to configure a Vertex AI resource (e.g., a
DeployedModel) to draw its Compute Engine resources from a Shared
Reservation, or exclusively from on-demand capacity.
Optional. Corresponds to the label key of a reservation resource. To target
a SPECIFIC_RESERVATION by name, use
compute.googleapis.com/reservation-name as the key and specify the name
of your reservation as its value.
[[["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-14 UTC."],[[["\u003cp\u003e\u003ccode\u003eReservationAffinity\u003c/code\u003e is a class within the Vertex AI v1beta1 API, used to configure resources to utilize a Shared Reservation or on-demand capacity.\u003c/p\u003e\n"],["\u003cp\u003eThe 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, for message handling, comparison, cloning, and buffering.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eReservationAffinity\u003c/code\u003e class contains properties such as \u003ccode\u003eKey\u003c/code\u003e, \u003ccode\u003eReservationAffinityType\u003c/code\u003e, \u003ccode\u003eValues\u003c/code\u003e, and \u003ccode\u003eValuesAsReservationNames\u003c/code\u003e which are used to specify the details of reservation targeting.\u003c/p\u003e\n"],["\u003cp\u003eIt is possible to make a new \u003ccode\u003eReservationAffinity\u003c/code\u003e object by using the \u003ccode\u003eReservationAffinity()\u003c/code\u003e constructor or by passing in an already made \u003ccode\u003eReservationAffinity\u003c/code\u003e object, using \u003ccode\u003eReservationAffinity(ReservationAffinity other)\u003c/code\u003e as a constructor.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eKey\u003c/code\u003e property, represented as a string, is used to reference a label key for a reservation, which can be set to \u003ccode\u003ecompute.googleapis.com/reservation-name\u003c/code\u003e to target a specific reservation by name.\u003c/p\u003e\n"]]],[],null,[]]