All Implemented Interfaces:
IInspectable,, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:34:06.248Z") @Stability(Stable) public class CfnAlias extends CfnResource implements IInspectable
Creates an alias , or a friendly name, for an AWS Payment Cryptography key.

You can use an alias to identify a key in the console and when you call cryptographic operations such as EncryptData or DecryptData .

You can associate the alias with any key in the same AWS Region . Each alias is associated with only one key at a time, but a key can have multiple aliases. You can't create an alias without a key. The alias must be unique in the account and AWS Region , but you can create another alias with the same name in a different AWS Region .

To change the key that's associated with the alias, call UpdateAlias . To delete the alias, call DeleteAlias . These operations don't affect the underlying key. To get the alias that you created, call ListAliases .

Cross-account use : This operation can't be used across different AWS accounts.

Related operations:


 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 CfnAlias cfnAlias = CfnAlias.Builder.create(this, "MyCfnAlias")
         // the properties below are optional

See Also:
  • Field Details


      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnAlias

      protected CfnAlias( objRef)
    • CfnAlias

      protected CfnAlias( initializationMode)
    • CfnAlias

      @Stability(Stable) public CfnAlias(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnAliasProps props)
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      renderProperties in class CfnResource
      props - This parameter is required.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      getCfnProperties in class CfnResource
    • getAliasName

      @Stability(Stable) @NotNull public String getAliasName()
      A friendly name that you can use to refer to a key.

      The value must begin with alias/ .

    • setAliasName

      @Stability(Stable) public void setAliasName(@NotNull String value)
      A friendly name that you can use to refer to a key.

      The value must begin with alias/ .

    • getKeyArn

      @Stability(Stable) @Nullable public String getKeyArn()
      The KeyARN of the key associated with the alias.
    • setKeyArn

      @Stability(Stable) public void setKeyArn(@Nullable String value)
      The KeyARN of the key associated with the alias.