Interface AliasProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
AliasProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:09.039Z") @Stability(Stable) public interface AliasProps extends software.amazon.jsii.JsiiSerializable
Construction properties for a KMS Key Alias object.

Example:

 // Passing an encrypted replication bucket created in a different stack.
 App app = new App();
 Stack replicationStack = Stack.Builder.create(app, "ReplicationStack")
         .env(Environment.builder()
                 .region("us-west-1")
                 .build())
         .build();
 Key key = new Key(replicationStack, "ReplicationKey");
 Alias alias = Alias.Builder.create(replicationStack, "ReplicationAlias")
         // aliasName is required
         .aliasName(PhysicalName.GENERATE_IF_NEEDED)
         .targetKey(key)
         .build();
 Bucket replicationBucket = Bucket.Builder.create(replicationStack, "ReplicationBucket")
         .bucketName(PhysicalName.GENERATE_IF_NEEDED)
         .encryptionKey(alias)
         .build();
 
  • Method Details

    • getAliasName

      @Stability(Stable) @NotNull String getAliasName()
      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.

    • getTargetKey

      @Stability(Stable) @NotNull IKey getTargetKey()
      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.

    • getRemovalPolicy

      @Stability(Stable) @Nullable default RemovalPolicy getRemovalPolicy()
      Policy to apply when the alias is removed from this stack.

      Default: - The alias will be deleted

    • builder

      @Stability(Stable) static AliasProps.Builder builder()
      Returns:
      a AliasProps.Builder of AliasProps