0.22.0 (latest) 0.21.0 0.20.0 0.19.0 0.18.0 0.17.0 0.16.2 0.15.1 0.14.1 0.13.0 0.12.2 0.11.3 0.10.0 0.9.1 0.8.3 0.7.0 0.6.1 0.5.0 0.4.0 0.3.0 0.2.1 0.1.0 Reference documentation and code samples for the KMS Inventory V1 API class Google::Cloud::Kms::V1::KeyAccessJustificationsPolicy.

A
[KeyAccessJustificationsPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-V1-KeyAccessJustificationsPolicy "Google::Cloud::Kms::V1::KeyAccessJustificationsPolicy (class)")
specifies zero or more allowed
[AccessReason](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-V1-AccessReason "Google::Cloud::Kms::V1::AccessReason (module)") values for encrypt, decrypt,
and sign operations on a [CryptoKey](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-V1-CryptoKey "Google::Cloud::Kms::V1::CryptoKey (class)") or
\[KeyAccessJustificationsPolicyConfig\][google.cloud.kms.v1.KeyAccessJustificationsPolicyConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/the%20default%20Key%20Access%20Justifications%20policy).

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #allowed_access_reasons

    def allowed_access_reasons() -> ::Array<::Google::Cloud::Kms::V1::AccessReason>

**Returns**

- (::Array\<[::Google::Cloud::Kms::V1::AccessReason](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-V1-AccessReason)\>) --- The list of allowed reasons for access to a [CryptoKey](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-V1-CryptoKey "Google::Cloud::Kms::V1::CryptoKey (class)"). Note that empty allowed_access_reasons has a different meaning depending on where this message appears. If this is under \[KeyAccessJustificationsPolicyConfig\]\[google.cloud.kms.v1.KeyAccessJustificationsPolicyConfig\], it means allow-all. If this is under [CryptoKey](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-V1-CryptoKey "Google::Cloud::Kms::V1::CryptoKey (class)"), it means deny-all.

### #allowed_access_reasons=

    def allowed_access_reasons=(value) -> ::Array<::Google::Cloud::Kms::V1::AccessReason>

**Parameter**

- **value** (::Array\<[::Google::Cloud::Kms::V1::AccessReason](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-V1-AccessReason)\>) --- The list of allowed reasons for access to a [CryptoKey](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-V1-CryptoKey "Google::Cloud::Kms::V1::CryptoKey (class)"). Note that empty allowed_access_reasons has a different meaning depending on where this message appears. If this is under \[KeyAccessJustificationsPolicyConfig\]\[google.cloud.kms.v1.KeyAccessJustificationsPolicyConfig\], it means allow-all. If this is under [CryptoKey](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-V1-CryptoKey "Google::Cloud::Kms::V1::CryptoKey (class)"), it means deny-all.
**Returns**

- (::Array\<[::Google::Cloud::Kms::V1::AccessReason](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-V1-AccessReason)\>) --- The list of allowed reasons for access to a [CryptoKey](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-V1-CryptoKey "Google::Cloud::Kms::V1::CryptoKey (class)"). Note that empty allowed_access_reasons has a different meaning depending on where this message appears. If this is under \[KeyAccessJustificationsPolicyConfig\]\[google.cloud.kms.v1.KeyAccessJustificationsPolicyConfig\], it means allow-all. If this is under [CryptoKey](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-kms-inventory-v1/latest/Google-Cloud-Kms-V1-CryptoKey "Google::Cloud::Kms::V1::CryptoKey (class)"), it means deny-all.