Show / Hide Table of Contents

Class AliasProps

Construction properties for a KMS Key Alias object.

Inheritance
object
AliasProps
Implements
IAliasProps
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.KMS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class AliasProps : IAliasProps
Syntax (vb)
Public Class AliasProps Implements IAliasProps
Remarks

ExampleMetadata: infused

Examples
// Passing an encrypted replication bucket created in a different stack.
            var app = new App();
            var replicationStack = new Stack(app, "ReplicationStack", new StackProps {
                Env = new Environment {
                    Region = "us-west-1"
                }
            });
            var key = new Key(replicationStack, "ReplicationKey");
            var alias = new Alias(replicationStack, "ReplicationAlias", new AliasProps {
                // aliasName is required
                AliasName = PhysicalName.GENERATE_IF_NEEDED,
                TargetKey = key
            });
            var replicationBucket = new Bucket(replicationStack, "ReplicationBucket", new BucketProps {
                BucketName = PhysicalName.GENERATE_IF_NEEDED,
                EncryptionKey = alias
            });

Synopsis

Constructors

AliasProps()

Construction properties for a KMS Key Alias object.

Properties

AliasName

The name of the alias.

RemovalPolicy

Policy to apply when the alias is removed from this stack.

TargetKey

The ID of the key for which you are creating the alias.

Constructors

AliasProps()

Construction properties for a KMS Key Alias object.

public AliasProps()
Remarks

ExampleMetadata: infused

Examples
// Passing an encrypted replication bucket created in a different stack.
            var app = new App();
            var replicationStack = new Stack(app, "ReplicationStack", new StackProps {
                Env = new Environment {
                    Region = "us-west-1"
                }
            });
            var key = new Key(replicationStack, "ReplicationKey");
            var alias = new Alias(replicationStack, "ReplicationAlias", new AliasProps {
                // aliasName is required
                AliasName = PhysicalName.GENERATE_IF_NEEDED,
                TargetKey = key
            });
            var replicationBucket = new Bucket(replicationStack, "ReplicationBucket", new BucketProps {
                BucketName = PhysicalName.GENERATE_IF_NEEDED,
                EncryptionKey = alias
            });

Properties

AliasName

The name of the alias.

public string AliasName { get; set; }
Property Value

string

Remarks

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.

RemovalPolicy

Policy to apply when the alias is removed from this stack.

public RemovalPolicy? RemovalPolicy { get; set; }
Property Value

RemovalPolicy?

Remarks

Default: - The alias will be deleted

TargetKey

The ID of the key for which you are creating the alias.

public IKey TargetKey { get; set; }
Property Value

IKey

Remarks

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

Implements

IAliasProps
Back to top Generated by DocFX