amazonka-kms-1.3.6: Amazon Key Management Service SDK.

Copyright(c) 2013-2015 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.KMS.PutKeyPolicy

Contents

Description

Attaches a policy to the specified key.

See: AWS API Reference for PutKeyPolicy.

Synopsis

Creating a Request

putKeyPolicy Source

Creates a value of PutKeyPolicy with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

Request Lenses

pkpKeyId :: Lens' PutKeyPolicy Text Source

A unique identifier for the customer master key. This value can be a globally unique identifier or the fully specified ARN to a key.

  • Key ARN Example - arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012
  • Globally Unique Key ID Example - 12345678-1234-1234-1234-123456789012

pkpPolicyName :: Lens' PutKeyPolicy Text Source

Name of the policy to be attached. Currently, the only supported name is "default".

pkpPolicy :: Lens' PutKeyPolicy Text Source

The policy to attach to the key. This is required and delegates back to the account. The key is the root of trust. The policy size limit is 32 KiB (32768 bytes).

Destructuring the Response

putKeyPolicyResponse :: PutKeyPolicyResponse Source

Creates a value of PutKeyPolicyResponse with the minimum fields required to make a request.