Compute Engine v1 API - Class ReservationAffinity (2.4.0)

public sealed class ReservationAffinity : IMessage<ReservationAffinity>, IEquatable<ReservationAffinity>, IDeepCloneable<ReservationAffinity>, IBufferMessage, IMessage

Reference documentation and code samples for the Compute Engine v1 API class ReservationAffinity.

Specifies the reservations that this instance can consume from.

Inheritance

Object > ReservationAffinity

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Constructors

ReservationAffinity()

public ReservationAffinity()

ReservationAffinity(ReservationAffinity)

public ReservationAffinity(ReservationAffinity other)
Parameter
NameDescription
otherReservationAffinity

Properties

ConsumeReservationType

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.

Property Value
TypeDescription
String

HasConsumeReservationType

public bool HasConsumeReservationType { get; }

Gets whether the "consume_reservation_type" field is set

Property Value
TypeDescription
Boolean

HasKey

public bool HasKey { get; }

Gets whether the "key" field is set

Property Value
TypeDescription
Boolean

Key

public string Key { get; set; }

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.

Property Value
TypeDescription
String

Values

public RepeatedField<string> Values { get; }

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.

Property Value
TypeDescription
RepeatedField<String>