# Backup and DR Service V1 API - Class Google::Cloud::BackupDR::V1::AllocationAffinity (v1.10.0)

1.10.0 (latest) 1.9.0 1.8.0 1.7.0 1.6.0 1.5.0 1.4.1 1.3.0 1.2.0 1.1.0 1.0.1 0.5.0 0.4.0 0.3.0 0.2.1 0.1.0 Reference documentation and code samples for the Backup and DR Service V1 API class Google::Cloud::BackupDR::V1::AllocationAffinity.

Specifies the reservations that this instance can consume from.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #consume_allocation_type

    def consume_allocation_type() -> ::Google::Cloud::BackupDR::V1::AllocationAffinity::Type

**Returns**

- ([::Google::Cloud::BackupDR::V1::AllocationAffinity::Type](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-backupdr-v1/latest/Google-Cloud-BackupDR-V1-AllocationAffinity-Type)) --- Optional. Specifies the type of reservation from which this instance can consume

### #consume_allocation_type=

    def consume_allocation_type=(value) -> ::Google::Cloud::BackupDR::V1::AllocationAffinity::Type

**Parameter**

- **value** ([::Google::Cloud::BackupDR::V1::AllocationAffinity::Type](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-backupdr-v1/latest/Google-Cloud-BackupDR-V1-AllocationAffinity-Type)) --- Optional. Specifies the type of reservation from which this instance can consume
**Returns**

- ([::Google::Cloud::BackupDR::V1::AllocationAffinity::Type](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-backupdr-v1/latest/Google-Cloud-BackupDR-V1-AllocationAffinity-Type)) --- Optional. Specifies the type of reservation from which this instance can consume

### #key

    def key() -> ::String

**Returns**

- (::String) --- Optional. Corresponds to the label key of a reservation resource.

### #key=

    def key=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. Corresponds to the label key of a reservation resource.
**Returns**

- (::String) --- Optional. Corresponds to the label key of a reservation resource.

### #values

    def values() -> ::Array<::String>

**Returns**

- (::Array\<::String\>) --- Optional. Corresponds to the label values of a reservation resource.

### #values=

    def values=(value) -> ::Array<::String>

**Parameter**

- **value** (::Array\<::String\>) --- Optional. Corresponds to the label values of a reservation resource.
**Returns**

- (::Array\<::String\>) --- Optional. Corresponds to the label values of a reservation resource.