Class CfnAlias
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 KMS console, in the DescribeKey operation, and in cryptographic operations , such as Decrypt and GenerateDataKey .
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.KMS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnAlias : CfnResource, IInspectable
Syntax (vb)
Public Class CfnAlias
Inherits CfnResource
Implements IInspectable
Remarks
Adding, deleting, or updating an alias can allow or deny permission to the KMS key. For details, see ABAC for AWS KMS 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.
Regions
AWS KMS CloudFormation resources are available in all AWS Regions in which AWS KMS and AWS CloudFormation are supported.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-alias.html
CloudformationResource: AWS::KMS::Alias
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.KMS;
var cfnAlias = new CfnAlias(this, "MyCfnAlias", new CfnAliasProps {
AliasName = "aliasName",
TargetKeyId = "targetKeyId"
});
Synopsis
Constructors
CfnAlias(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnAlias(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnAlias(Construct, String, ICfnAliasProps) |
Properties
AliasName | Specifies the alias name. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
TargetKeyId | Associates the alias with the specified customer managed key . The KMS key must be in the same AWS account and Region. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnAlias(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnAlias(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnAlias(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnAlias(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnAlias(Construct, String, ICfnAliasProps)
public CfnAlias(Construct scope, string id, ICfnAliasProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnAliasProps
Resource properties.
Properties
AliasName
Specifies the alias name.
public virtual string AliasName { get; set; }
Property Value
System.String
Remarks
This value must begin with alias/
followed by a name, such as alias/ExampleAlias
.
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
TargetKeyId
Associates the alias with the specified customer managed key . The KMS key must be in the same AWS account and Region.
public virtual string TargetKeyId { get; set; }
Property Value
System.String
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>