| Modifier and Type | Method and Description |
|---|---|
Key.Builder |
alias(String alias)
(experimental) Initial alias to add to the key.
|
Key |
build() |
static Key.Builder |
create(software.constructs.Construct scope,
String id) |
Key.Builder |
description(String description)
(experimental) A description of the key.
|
Key.Builder |
enabled(Boolean enabled)
(experimental) Indicates whether the key is available for use.
|
Key.Builder |
enableKeyRotation(Boolean enableKeyRotation)
(experimental) Indicates whether AWS KMS rotates the key.
|
Key.Builder |
policy(PolicyDocument policy)
(experimental) Custom policy document to attach to the KMS key.
|
Key.Builder |
removalPolicy(RemovalPolicy removalPolicy)
(experimental) Whether the encryption key should be retained when it is removed from the Stack.
|
Key.Builder |
trustAccountIdentities(Boolean trustAccountIdentities)
(experimental) Whether the key usage can be granted by IAM policies.
|
@Stability(value=Experimental) public static Key.Builder create(software.constructs.Construct scope, String id)
scope - This parameter is required.id - This parameter is required.Key.Builder.@Stability(value=Experimental) public Key.Builder alias(String alias)
More aliases can be added later by calling addAlias.
Default: - No alias is added for the key.
alias - Initial alias to add to the key. This parameter is required.this@Stability(value=Experimental) public Key.Builder description(String description)
Use a description that helps your users decide whether the key is appropriate for a particular task.
Default: - No description.
description - A description of the key. This parameter is required.this@Stability(value=Experimental) public Key.Builder enabled(Boolean enabled)
Default: - Key is enabled.
enabled - Indicates whether the key is available for use. This parameter is required.this@Stability(value=Experimental) public Key.Builder enableKeyRotation(Boolean enableKeyRotation)
Default: false
enableKeyRotation - Indicates whether AWS KMS rotates the key. This parameter is required.this@Stability(value=Experimental) public Key.Builder policy(PolicyDocument policy)
Default: - A policy document with permissions for the account root to administer the key will be created.
policy - Custom policy document to attach to the KMS key. This parameter is required.this@Stability(value=Experimental) public Key.Builder removalPolicy(RemovalPolicy removalPolicy)
This is useful when one wants to retain access to data that was encrypted with a key that is being retired.
Default: RemovalPolicy.Retain
removalPolicy - Whether the encryption key should be retained when it is removed from the Stack. This parameter is required.this@Stability(value=Experimental) public Key.Builder trustAccountIdentities(Boolean trustAccountIdentities)
Setting this to true adds a default statement which delegates key access control completely to the identity's IAM policy (similar to how it works for other AWS resources).
Default: false
trustAccountIdentities - Whether the key usage can be granted by IAM policies. This parameter is required.thishttps://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iamCopyright © 2020. All rights reserved.