amazonka-kms-1.0.1: 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.CreateKey

Contents

Description

Creates a customer master key. Customer master keys can be used to encrypt small amounts of data (less than 4K) directly, but they are most commonly used to encrypt or envelope data keys that are then used to encrypt customer data. For more information about data keys, see GenerateDataKey and GenerateDataKeyWithoutPlaintext.

See: AWS API Reference for CreateKey.

Synopsis

Creating a Request

createKey :: CreateKey Source

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

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

Request Lenses

ckKeyUsage :: Lens' CreateKey (Maybe KeyUsageType) Source

Specifies the intended use of the key. Currently this defaults to ENCRYPT/DECRYPT, and only symmetric encryption and decryption are supported.

ckPolicy :: Lens' CreateKey (Maybe Text) Source

Policy to be attached to the key. This is required and delegates back to the account. The key is the root of trust.

ckDescription :: Lens' CreateKey (Maybe Text) Source

Description of the key. We recommend that you choose a description that helps your customer decide whether the key is appropriate for a task.

Destructuring the Response

createKeyResponse Source

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

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

Response Lenses

ckrsKeyMetadata :: Lens' CreateKeyResponse (Maybe KeyMetadata) Source

Metadata associated with the key.

ckrsStatus :: Lens' CreateKeyResponse Int Source

The response status code.