amazonka-kms-1.1.0: 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.CreateAlias

Contents

Description

Creates a display name for a customer master key. An alias can be used to identify a key and should be unique. The console enforces a one-to-one mapping between the alias and a key. An alias name can contain only alphanumeric characters, forward slashes (/), underscores (_), and dashes (-). An alias must start with the word "alias" followed by a forward slash (alias/). An alias that begins with "aws" after the forward slash (alias/aws...) is reserved by Amazon Web Services (AWS).

To associate an alias with a different key, call UpdateAlias.

Note that you cannot create or update an alias that represents a key in another account.

See: AWS API Reference for CreateAlias.

Synopsis

Creating a Request

createAlias Source

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

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

Request Lenses

caAliasName :: Lens' CreateAlias Text Source

String that contains the display name. The name must start with the word "alias" followed by a forward slash (alias/). Aliases that begin with "alias/AWS" are reserved.

caTargetKeyId :: Lens' CreateAlias Text Source

An identifier of the key for which you are creating the alias. This value cannot be another alias but can be a globally unique identifier or a 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

Destructuring the Response

createAliasResponse :: CreateAliasResponse Source

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