class CfnAliasPropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.KMS.Mixins.CfnAliasPropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awskms/mixins#CfnAliasPropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.kms.mixins.CfnAliasPropsMixin |
Python | aws_cdk.mixins_preview.aws_kms.mixins.CfnAliasPropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_kms » mixins » CfnAliasPropsMixin |
Implements
IMixin
Extends
Mixin
The AWS::KMS::Alias resource specifies a display name for a KMS key . You can use an alias to identify a KMS key in the AWS console, in the DescribeKey operation, and in cryptographic operations , such as Decrypt and GenerateDataKey .
Adding, deleting, or updating an alias can allow or deny permission to the KMS key. For details, see ABAC for AWS in the AWS Key Management Service Developer Guide .
Using an alias to refer to a KMS key can help you simplify key management. For example, an alias in your code can be associated with different KMS keys in different AWS Regions . For more information, see Using aliases in the AWS Key Management Service Developer Guide .
When specifying an alias, observe the following rules.
- Each alias is associated with one KMS key, but multiple aliases can be associated with the same KMS key.
- The alias and its associated KMS key must be in the same AWS account and Region.
- The alias name must be unique in the AWS account and Region. However, you can create aliases with the same name in different AWS Regions . For example, you can have an
alias/projectKeyin multiple Regions, each of which is associated with a KMS key in its Region. - Each alias name must begin with
alias/followed by a name, such asalias/exampleKey. The alias name can contain only alphanumeric characters, forward slashes (/), underscores (_), and dashes (-). Alias names cannot begin withalias/aws/. That alias name prefix is reserved for AWS managed keys .
Regions
AWS CloudFormation resources are available in all AWS Regions in which AWS and CloudFormation are supported.
See also: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-alias.html
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { mixins } from '@aws-cdk/mixins-preview';
import { mixins as kms_mixins } from '@aws-cdk/mixins-preview/aws-kms';
const cfnAliasPropsMixin = new kms_mixins.CfnAliasPropsMixin({
aliasName: 'aliasName',
targetKeyId: 'targetKeyId',
}, /* all optional props */ {
strategy: mixins.PropertyMergeStrategy.OVERRIDE,
});
Initializer
new CfnAliasPropsMixin(props: CfnAliasMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Alias Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::KMS::Alias.
Properties
| Name | Type | Description |
|---|---|---|
| props | Cfn | |
| strategy | Property | |
| static CFN_PROPERTY_KEYS | string[] |
props
Type:
Cfn
strategy
Type:
Property
static CFN_PROPERTY_KEYS
Type:
string[]
Methods
| Name | Description |
|---|---|
| apply | Apply the mixin properties to the construct. |
| supports(construct) | Check if this mixin supports the given construct. |
applyTo(construct)
public applyTo(construct: IConstruct): IConstruct
Parameters
- construct
IConstruct
Returns
Apply the mixin properties to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct.

.NET
Go
Java
Python
TypeScript