Class Alias.Builder

java.lang.Object
software.amazon.awscdk.services.kms.Alias.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<Alias>
Enclosing class:
Alias

@Stability(Stable) public static final class Alias.Builder extends Object implements software.amazon.jsii.Builder<Alias>
A fluent builder for Alias.
  • Method Details

    • create

      @Stability(Stable) public static Alias.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of Alias.Builder.
    • aliasName

      @Stability(Stable) public Alias.Builder aliasName(String aliasName)
      The name of the alias.

      The name must start with alias followed by a forward slash, such as alias/. You can't specify aliases that begin with alias/AWS. These aliases are reserved.

      Parameters:
      aliasName - The name of the alias. This parameter is required.
      Returns:
      this
    • targetKey

      @Stability(Stable) public Alias.Builder targetKey(IKey targetKey)
      The ID of the key for which you are creating the alias.

      Specify the key's globally unique identifier or Amazon Resource Name (ARN). You can't specify another alias.

      Parameters:
      targetKey - The ID of the key for which you are creating the alias. This parameter is required.
      Returns:
      this
    • removalPolicy

      @Stability(Stable) public Alias.Builder removalPolicy(RemovalPolicy removalPolicy)
      Policy to apply when the alias is removed from this stack.

      Default: - The alias will be deleted

      Parameters:
      removalPolicy - Policy to apply when the alias is removed from this stack. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public Alias build()
      Specified by:
      build in interface software.amazon.jsii.Builder<Alias>
      Returns:
      a newly built instance of Alias.