UpdateAlias Method

Updates an alias to refer to a different CMK.


public func updateAlias(aliasName: String, newKeyId: String) throws -> Void


This method updates the alias named AliasName, changing it so that it refers to the CMK specified by NewKeyId.

The value passed for the AliasName parameter must include the alias/ prefix, and must be the name of an alias in the current account and Region

The value passed for the NewKeyId parameter must be the Id or ARN of a CMK in the current account and Region. The specified CMK must be of the same type (i.e., symmetric or asymmetric) and have the same usage (i.e., encryption/decryption or signing/verification) as the CMK that the alias currently refers to.

This method will fail if the specified alias is AWS-managed (i.e., its name begins with alias/aws/). This method will also fail if the specified CMK's state is aksPendingDeletion (2), or if it is AWS-managed (see AWSManaged).

Copyright (c) 2021 /n software inc. - All rights reserved.
Cloud Keys 2020 macOS Edition - Version 20.0 [Build 7876]