public sealed class ReservationAffinity : IMessage<ReservationAffinity>, IEquatable<ReservationAffinity>, IDeepCloneable<ReservationAffinity>, IBufferMessage, IMessage
Specifies the reservations that this instance can consume from.
public string ConsumeReservationType { get; set; }
Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples.
Check the ConsumeReservationType enum for the list of possible values.
Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value.
Corresponds to the label values of a reservation resource. This can be either a name to a reservation in the same project or "projects/different-project/reservations/some-reservation-name" to target a shared reservation in the same zone but in a different project.
[[["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-08 UTC."],[[["\u003cp\u003eThe latest version of the \u003ccode\u003eGoogle.Cloud.Compute.V1.ReservationAffinity\u003c/code\u003e is 3.6.0, and this page provides access to documentation for versions ranging from 1.0.0 to 3.6.0.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eReservationAffinity\u003c/code\u003e is a class that specifies the reservations that a given instance can consume from, implementing interfaces such as \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\u003eThe class \u003ccode\u003eReservationAffinity\u003c/code\u003e includes properties like \u003ccode\u003eConsumeReservationType\u003c/code\u003e, \u003ccode\u003eKey\u003c/code\u003e, and \u003ccode\u003eValues\u003c/code\u003e, which are used to specify the type of reservation, the label key of a reservation resource, and the label values of the resource, respectively.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eConsumeReservationType\u003c/code\u003e property allows specifying the type of reservation that the instance can consume, with options like \u003ccode\u003eANY_RESERVATION\u003c/code\u003e, \u003ccode\u003eSPECIFIC_RESERVATION\u003c/code\u003e, and \u003ccode\u003eNO_RESERVATION\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class \u003ccode\u003eReservationAffinity\u003c/code\u003e also inherits members from the \u003ccode\u003eObject\u003c/code\u003e class, such as \u003ccode\u003eGetHashCode()\u003c/code\u003e, \u003ccode\u003eGetType()\u003c/code\u003e, \u003ccode\u003eMemberwiseClone()\u003c/code\u003e, and \u003ccode\u003eToString()\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,[]]