Reference documentation and code samples for the Cloud Key Management Service (KMS) V1 API class Google::Cloud::Kms::V1::KeyAccessJustificationsPolicy.
(::Array<::Google::Cloud::Kms::V1::AccessReason>) โ The list of allowed reasons for access to a
CryptoKey. Zero allowed access reasons
means all encrypt, decrypt, and sign operations for the
CryptoKey associated with this policy will
fail.
value (::Array<::Google::Cloud::Kms::V1::AccessReason>) โ The list of allowed reasons for access to a
CryptoKey. Zero allowed access reasons
means all encrypt, decrypt, and sign operations for the
CryptoKey associated with this policy will
fail.
Returns
(::Array<::Google::Cloud::Kms::V1::AccessReason>) โ The list of allowed reasons for access to a
CryptoKey. Zero allowed access reasons
means all encrypt, decrypt, and sign operations for the
CryptoKey associated with this policy will
fail.
[[["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-09-04 UTC."],[],[],null,["# Cloud Key Management Service (KMS) V1 API - Class Google::Cloud::Kms::V1::KeyAccessJustificationsPolicy (v1.7.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.7.0 (latest)](/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-KeyAccessJustificationsPolicy)\n- [1.6.0](/ruby/docs/reference/google-cloud-kms-v1/1.6.0/Google-Cloud-Kms-V1-KeyAccessJustificationsPolicy)\n- [1.5.1](/ruby/docs/reference/google-cloud-kms-v1/1.5.1/Google-Cloud-Kms-V1-KeyAccessJustificationsPolicy)\n- [1.4.0](/ruby/docs/reference/google-cloud-kms-v1/1.4.0/Google-Cloud-Kms-V1-KeyAccessJustificationsPolicy)\n- [1.3.2](/ruby/docs/reference/google-cloud-kms-v1/1.3.2/Google-Cloud-Kms-V1-KeyAccessJustificationsPolicy)\n- [1.2.1](/ruby/docs/reference/google-cloud-kms-v1/1.2.1/Google-Cloud-Kms-V1-KeyAccessJustificationsPolicy)\n- [1.1.0](/ruby/docs/reference/google-cloud-kms-v1/1.1.0/Google-Cloud-Kms-V1-KeyAccessJustificationsPolicy)\n- [1.0.2](/ruby/docs/reference/google-cloud-kms-v1/1.0.2/Google-Cloud-Kms-V1-KeyAccessJustificationsPolicy)\n- [0.27.0](/ruby/docs/reference/google-cloud-kms-v1/0.27.0/Google-Cloud-Kms-V1-KeyAccessJustificationsPolicy)\n- [0.26.0](/ruby/docs/reference/google-cloud-kms-v1/0.26.0/Google-Cloud-Kms-V1-KeyAccessJustificationsPolicy)\n- [0.25.1](/ruby/docs/reference/google-cloud-kms-v1/0.25.1/Google-Cloud-Kms-V1-KeyAccessJustificationsPolicy)\n- [0.24.3](/ruby/docs/reference/google-cloud-kms-v1/0.24.3/Google-Cloud-Kms-V1-KeyAccessJustificationsPolicy)\n- [0.23.0](/ruby/docs/reference/google-cloud-kms-v1/0.23.0/Google-Cloud-Kms-V1-KeyAccessJustificationsPolicy)\n- [0.22.1](/ruby/docs/reference/google-cloud-kms-v1/0.22.1/Google-Cloud-Kms-V1-KeyAccessJustificationsPolicy)\n- [0.21.0](/ruby/docs/reference/google-cloud-kms-v1/0.21.0/Google-Cloud-Kms-V1-KeyAccessJustificationsPolicy)\n- [0.20.0](/ruby/docs/reference/google-cloud-kms-v1/0.20.0/Google-Cloud-Kms-V1-KeyAccessJustificationsPolicy)\n- [0.19.0](/ruby/docs/reference/google-cloud-kms-v1/0.19.0/Google-Cloud-Kms-V1-KeyAccessJustificationsPolicy)\n- [0.18.1](/ruby/docs/reference/google-cloud-kms-v1/0.18.1/Google-Cloud-Kms-V1-KeyAccessJustificationsPolicy)\n- [0.17.0](/ruby/docs/reference/google-cloud-kms-v1/0.17.0/Google-Cloud-Kms-V1-KeyAccessJustificationsPolicy)\n- [0.16.0](/ruby/docs/reference/google-cloud-kms-v1/0.16.0/Google-Cloud-Kms-V1-KeyAccessJustificationsPolicy)\n- [0.15.0](/ruby/docs/reference/google-cloud-kms-v1/0.15.0/Google-Cloud-Kms-V1-KeyAccessJustificationsPolicy)\n- [0.14.0](/ruby/docs/reference/google-cloud-kms-v1/0.14.0/Google-Cloud-Kms-V1-KeyAccessJustificationsPolicy)\n- [0.13.0](/ruby/docs/reference/google-cloud-kms-v1/0.13.0/Google-Cloud-Kms-V1-KeyAccessJustificationsPolicy)\n- [0.12.0](/ruby/docs/reference/google-cloud-kms-v1/0.12.0/Google-Cloud-Kms-V1-KeyAccessJustificationsPolicy)\n- [0.11.0](/ruby/docs/reference/google-cloud-kms-v1/0.11.0/Google-Cloud-Kms-V1-KeyAccessJustificationsPolicy)\n- [0.10.2](/ruby/docs/reference/google-cloud-kms-v1/0.10.2/Google-Cloud-Kms-V1-KeyAccessJustificationsPolicy) \nReference documentation and code samples for the Cloud Key Management Service (KMS) V1 API class Google::Cloud::Kms::V1::KeyAccessJustificationsPolicy.\n\nA\n[KeyAccessJustificationsPolicy](/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-KeyAccessJustificationsPolicy \"Google::Cloud::Kms::V1::KeyAccessJustificationsPolicy (class)\")\nspecifies zero or more allowed\n[AccessReason](/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-AccessReason \"Google::Cloud::Kms::V1::AccessReason (module)\") values for encrypt, decrypt,\nand sign operations on a [CryptoKey](/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-CryptoKey \"Google::Cloud::Kms::V1::CryptoKey (class)\"). \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #allowed_access_reasons\n\n def allowed_access_reasons() -\u003e ::Array\u003c::Google::Cloud::Kms::V1::AccessReason\u003e\n\n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::Kms::V1::AccessReason](./Google-Cloud-Kms-V1-AccessReason)\\\u003e) --- The list of allowed reasons for access to a [CryptoKey](/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-CryptoKey \"Google::Cloud::Kms::V1::CryptoKey (class)\"). Zero allowed access reasons means all encrypt, decrypt, and sign operations for the [CryptoKey](/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-CryptoKey \"Google::Cloud::Kms::V1::CryptoKey (class)\") associated with this policy will fail.\n\n### #allowed_access_reasons=\n\n def allowed_access_reasons=(value) -\u003e ::Array\u003c::Google::Cloud::Kms::V1::AccessReason\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c[::Google::Cloud::Kms::V1::AccessReason](./Google-Cloud-Kms-V1-AccessReason)\\\u003e) --- The list of allowed reasons for access to a [CryptoKey](/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-CryptoKey \"Google::Cloud::Kms::V1::CryptoKey (class)\"). Zero allowed access reasons means all encrypt, decrypt, and sign operations for the [CryptoKey](/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-CryptoKey \"Google::Cloud::Kms::V1::CryptoKey (class)\") associated with this policy will fail. \n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::Kms::V1::AccessReason](./Google-Cloud-Kms-V1-AccessReason)\\\u003e) --- The list of allowed reasons for access to a [CryptoKey](/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-CryptoKey \"Google::Cloud::Kms::V1::CryptoKey (class)\"). Zero allowed access reasons means all encrypt, decrypt, and sign operations for the [CryptoKey](/ruby/docs/reference/google-cloud-kms-v1/latest/Google-Cloud-Kms-V1-CryptoKey \"Google::Cloud::Kms::V1::CryptoKey (class)\") associated with this policy will fail."]]