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

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

Network.AWS.KMS.UpdateAlias

Contents

Description

Associates an existing alias with a different customer master key (CMK). Each CMK can have multiple aliases, but the aliases must be unique within the account and region. You cannot perform this operation on an alias in a different AWS account.

This operation works only on existing aliases. To change the alias of a CMK to a new value, use CreateAlias to create a new alias and DeleteAlias to delete the old alias.

Because an alias is not a property of a CMK, you can create, update, and delete the aliases of a CMK without affecting the CMK. Also, aliases do not appear in the response from the DescribeKey operation. To get the aliases of all CMKs in the account, use the ListAliases operation.

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 ). The alias name can contain only alphanumeric characters, forward slashes (/), underscores (_), and dashes (-). Alias names cannot begin with aws@ ; that alias name prefix is reserved by Amazon Web Services (AWS).

Synopsis

Creating a Request

updateAlias #

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

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

  • uaAliasName - String that contains the name of the alias to be modified. The name must start with the word "alias" followed by a forward slash (alias). Aliases that begin with "aliasaws" are reserved.
  • uaTargetKeyId - Unique identifier of the customer master key to be mapped to the alias. Specify the key ID or the Amazon Resource Name (ARN) of the CMK. For example: * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey . To verify that the alias is mapped to the correct CMK, use ListAliases .

data UpdateAlias #

See: updateAlias smart constructor.

Instances

Eq UpdateAlias # 
Data UpdateAlias # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UpdateAlias -> c UpdateAlias #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UpdateAlias #

toConstr :: UpdateAlias -> Constr #

dataTypeOf :: UpdateAlias -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c UpdateAlias) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UpdateAlias) #

gmapT :: (forall b. Data b => b -> b) -> UpdateAlias -> UpdateAlias #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UpdateAlias -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UpdateAlias -> r #

gmapQ :: (forall d. Data d => d -> u) -> UpdateAlias -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UpdateAlias -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UpdateAlias -> m UpdateAlias #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UpdateAlias -> m UpdateAlias #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UpdateAlias -> m UpdateAlias #

Read UpdateAlias # 
Show UpdateAlias # 
Generic UpdateAlias # 

Associated Types

type Rep UpdateAlias :: * -> * #

Hashable UpdateAlias # 
ToJSON UpdateAlias # 
NFData UpdateAlias # 

Methods

rnf :: UpdateAlias -> () #

AWSRequest UpdateAlias # 
ToHeaders UpdateAlias # 

Methods

toHeaders :: UpdateAlias -> [Header] #

ToPath UpdateAlias # 
ToQuery UpdateAlias # 
type Rep UpdateAlias # 
type Rep UpdateAlias = D1 * (MetaData "UpdateAlias" "Network.AWS.KMS.UpdateAlias" "amazonka-kms-1.6.0-1x3YFaSKSJTDyirX3XbKEX" False) (C1 * (MetaCons "UpdateAlias'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_uaAliasName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "_uaTargetKeyId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text))))
type Rs UpdateAlias # 

Request Lenses

uaAliasName :: Lens' UpdateAlias Text #

String that contains the name of the alias to be modified. The name must start with the word "alias" followed by a forward slash (alias). Aliases that begin with "aliasaws" are reserved.

uaTargetKeyId :: Lens' UpdateAlias Text #

Unique identifier of the customer master key to be mapped to the alias. Specify the key ID or the Amazon Resource Name (ARN) of the CMK. For example: * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey . To verify that the alias is mapped to the correct CMK, use ListAliases .

Destructuring the Response

updateAliasResponse :: UpdateAliasResponse #

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

data UpdateAliasResponse #

See: updateAliasResponse smart constructor.

Instances

Eq UpdateAliasResponse # 
Data UpdateAliasResponse # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UpdateAliasResponse -> c UpdateAliasResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UpdateAliasResponse #

toConstr :: UpdateAliasResponse -> Constr #

dataTypeOf :: UpdateAliasResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c UpdateAliasResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UpdateAliasResponse) #

gmapT :: (forall b. Data b => b -> b) -> UpdateAliasResponse -> UpdateAliasResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UpdateAliasResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UpdateAliasResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> UpdateAliasResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UpdateAliasResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UpdateAliasResponse -> m UpdateAliasResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UpdateAliasResponse -> m UpdateAliasResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UpdateAliasResponse -> m UpdateAliasResponse #

Read UpdateAliasResponse # 
Show UpdateAliasResponse # 
Generic UpdateAliasResponse # 
NFData UpdateAliasResponse # 

Methods

rnf :: UpdateAliasResponse -> () #

type Rep UpdateAliasResponse # 
type Rep UpdateAliasResponse = D1 * (MetaData "UpdateAliasResponse" "Network.AWS.KMS.UpdateAlias" "amazonka-kms-1.6.0-1x3YFaSKSJTDyirX3XbKEX" False) (C1 * (MetaCons "UpdateAliasResponse'" PrefixI False) (U1 *))