Class AliasProps
Construction properties for a KMS Key Alias object.
Inheritance
System.Object
AliasProps
Implements
Namespace: Amazon.CDK.AWS.KMS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class AliasProps : Object, IAliasProps
Syntax (vb)
Public Class AliasProps
Inherits Object
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() |
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()
public AliasProps()
Properties
AliasName
The name of the alias.
public string AliasName { get; set; }
Property Value
System.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 Nullable<RemovalPolicy> RemovalPolicy { get; set; }
Property Value
System.Nullable<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
Remarks
Specify the key's globally unique identifier or Amazon Resource Name (ARN). You can't specify another alias.