# AliasProps

Construction properties for a KMS Key Alias object.

Extends: AliasProps
Used as props by: Alias

- Source: [`aws-kms/lib/alias.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-kms/lib/alias.ts#L41)

## Example

```ts
// Passing an encrypted replication bucket created in a different stack.
const app = new App();
const replicationStack = new Stack(app, 'ReplicationStack', {
  env: {
    region: 'us-west-1',
  },
});
const key = new kms.Key(replicationStack, 'ReplicationKey');
const alias = new kms.Alias(replicationStack, 'ReplicationAlias', {
  // aliasName is required
  aliasName: PhysicalName.GENERATE_IF_NEEDED,
  targetKey: key,
});
const replicationBucket = new s3.Bucket(replicationStack, 'ReplicationBucket', {
  bucketName: PhysicalName.GENERATE_IF_NEEDED,
  encryptionKey: alias,
});
```

## Properties

- `aliasName`: string (required) — 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.

- `removalPolicy`: [RemovalPolicy](/cdk/api/v2/docs/aws-cdk-lib.RemovalPolicy.html) — Policy to apply when the alias is removed from this stack.

  **Default:** The alias will be deleted

- `targetKey`: [IKey](/cdk/api/v2/docs/aws-cdk-lib.aws_kms.IKey.html) (required) — 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.
