software.amazon.awscdk.services.kms.CfnKey Maven / Gradle / Ivy
Show all versions of kms Show documentation
package software.amazon.awscdk.services.kms;
/**
* A CloudFormation `AWS::KMS::Key`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html
*/
@javax.annotation.Generated(value = "jsii-pacmak/0.22.0 (build 14afdde)", date = "2020-03-16T08:55:18.282Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.kms.$Module.class, fqn = "@aws-cdk/aws-kms.CfnKey")
public class CfnKey extends software.amazon.awscdk.core.CfnResource implements software.amazon.awscdk.core.IInspectable {
protected CfnKey(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected CfnKey(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
static {
CFN_RESOURCE_TYPE_NAME = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.kms.CfnKey.class, "CFN_RESOURCE_TYPE_NAME", java.lang.String.class);
}
/**
* Create a new `AWS::KMS::Key`.
*
* @param scope - scope in which this resource is defined. This parameter is required.
* @param id - scoped id of the resource. This parameter is required.
* @param props - resource properties. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public CfnKey(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.kms.CfnKeyProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") });
}
/**
* Examines the CloudFormation resource and discloses attributes.
*
* EXPERIMENTAL
*
* @param inspector - tree inspector to collect and process attributes. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public void inspect(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.TreeInspector inspector) {
this.jsiiCall("inspect", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(inspector, "inspector is required") });
}
/**
* @param props This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
@Override
protected @org.jetbrains.annotations.NotNull java.util.Map renderProperties(final @org.jetbrains.annotations.NotNull java.util.Map props) {
return java.util.Collections.unmodifiableMap(this.jsiiCall("renderProperties", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class)), new Object[] { java.util.Objects.requireNonNull(props, "props is required") }));
}
/**
* The CloudFormation resource type name for this resource class.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public final static java.lang.String CFN_RESOURCE_TYPE_NAME;
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public @org.jetbrains.annotations.NotNull java.lang.String getAttrArn() {
return this.jsiiGet("attrArn", java.lang.String.class);
}
/**
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
protected @org.jetbrains.annotations.NotNull java.util.Map getCfnProperties() {
return java.util.Collections.unmodifiableMap(this.jsiiGet("cfnProperties", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class))));
}
/**
* `AWS::KMS::Key.Tags`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-tags
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.TagManager getTags() {
return this.jsiiGet("tags", software.amazon.awscdk.core.TagManager.class);
}
/**
* `AWS::KMS::Key.KeyPolicy`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-keypolicy
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public @org.jetbrains.annotations.NotNull java.lang.Object getKeyPolicy() {
return this.jsiiGet("keyPolicy", java.lang.Object.class);
}
/**
* `AWS::KMS::Key.KeyPolicy`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-keypolicy
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public void setKeyPolicy(final @org.jetbrains.annotations.NotNull java.lang.Object value) {
this.jsiiSet("keyPolicy", java.util.Objects.requireNonNull(value, "keyPolicy is required"));
}
/**
* `AWS::KMS::Key.Description`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-description
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public @org.jetbrains.annotations.Nullable java.lang.String getDescription() {
return this.jsiiGet("description", java.lang.String.class);
}
/**
* `AWS::KMS::Key.Description`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-description
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public void setDescription(final @org.jetbrains.annotations.Nullable java.lang.String value) {
this.jsiiSet("description", value);
}
/**
* `AWS::KMS::Key.Enabled`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-enabled
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public @org.jetbrains.annotations.Nullable java.lang.Object getEnabled() {
return this.jsiiGet("enabled", java.lang.Object.class);
}
/**
* `AWS::KMS::Key.Enabled`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-enabled
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public void setEnabled(final @org.jetbrains.annotations.Nullable java.lang.Boolean value) {
this.jsiiSet("enabled", value);
}
/**
* `AWS::KMS::Key.Enabled`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-enabled
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public void setEnabled(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.core.IResolvable value) {
this.jsiiSet("enabled", value);
}
/**
* `AWS::KMS::Key.EnableKeyRotation`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-enablekeyrotation
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public @org.jetbrains.annotations.Nullable java.lang.Object getEnableKeyRotation() {
return this.jsiiGet("enableKeyRotation", java.lang.Object.class);
}
/**
* `AWS::KMS::Key.EnableKeyRotation`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-enablekeyrotation
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public void setEnableKeyRotation(final @org.jetbrains.annotations.Nullable java.lang.Boolean value) {
this.jsiiSet("enableKeyRotation", value);
}
/**
* `AWS::KMS::Key.EnableKeyRotation`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-enablekeyrotation
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public void setEnableKeyRotation(final @org.jetbrains.annotations.Nullable software.amazon.awscdk.core.IResolvable value) {
this.jsiiSet("enableKeyRotation", value);
}
/**
* `AWS::KMS::Key.KeyUsage`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-keyusage
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public @org.jetbrains.annotations.Nullable java.lang.String getKeyUsage() {
return this.jsiiGet("keyUsage", java.lang.String.class);
}
/**
* `AWS::KMS::Key.KeyUsage`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-keyusage
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public void setKeyUsage(final @org.jetbrains.annotations.Nullable java.lang.String value) {
this.jsiiSet("keyUsage", value);
}
/**
* `AWS::KMS::Key.PendingWindowInDays`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-pendingwindowindays
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public @org.jetbrains.annotations.Nullable java.lang.Number getPendingWindowInDays() {
return this.jsiiGet("pendingWindowInDays", java.lang.Number.class);
}
/**
* `AWS::KMS::Key.PendingWindowInDays`.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-pendingwindowindays
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public void setPendingWindowInDays(final @org.jetbrains.annotations.Nullable java.lang.Number value) {
this.jsiiSet("pendingWindowInDays", value);
}
/**
* A fluent builder for {@link software.amazon.awscdk.services.kms.CfnKey}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public static final class Builder {
/**
* @return a new instance of {@link Builder}.
* @param scope - scope in which this resource is defined. This parameter is required.
* @param id - scoped id of the resource. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public static Builder create(final software.amazon.awscdk.core.Construct scope, final java.lang.String id) {
return new Builder(scope, id);
}
private final software.amazon.awscdk.core.Construct scope;
private final java.lang.String id;
private final software.amazon.awscdk.services.kms.CfnKeyProps.Builder props;
private Builder(final software.amazon.awscdk.core.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
this.props = new software.amazon.awscdk.services.kms.CfnKeyProps.Builder();
}
/**
* `AWS::KMS::Key.KeyPolicy`.
*
* @return {@code this}
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-keypolicy
* @param keyPolicy `AWS::KMS::Key.KeyPolicy`. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public Builder keyPolicy(final java.lang.Object keyPolicy) {
this.props.keyPolicy(keyPolicy);
return this;
}
/**
* `AWS::KMS::Key.Description`.
*
* @return {@code this}
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-description
* @param description `AWS::KMS::Key.Description`. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public Builder description(final java.lang.String description) {
this.props.description(description);
return this;
}
/**
* `AWS::KMS::Key.Enabled`.
*
* @return {@code this}
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-enabled
* @param enabled `AWS::KMS::Key.Enabled`. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public Builder enabled(final java.lang.Boolean enabled) {
this.props.enabled(enabled);
return this;
}
/**
* `AWS::KMS::Key.Enabled`.
*
* @return {@code this}
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-enabled
* @param enabled `AWS::KMS::Key.Enabled`. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public Builder enabled(final software.amazon.awscdk.core.IResolvable enabled) {
this.props.enabled(enabled);
return this;
}
/**
* `AWS::KMS::Key.EnableKeyRotation`.
*
* @return {@code this}
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-enablekeyrotation
* @param enableKeyRotation `AWS::KMS::Key.EnableKeyRotation`. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public Builder enableKeyRotation(final java.lang.Boolean enableKeyRotation) {
this.props.enableKeyRotation(enableKeyRotation);
return this;
}
/**
* `AWS::KMS::Key.EnableKeyRotation`.
*
* @return {@code this}
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-enablekeyrotation
* @param enableKeyRotation `AWS::KMS::Key.EnableKeyRotation`. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public Builder enableKeyRotation(final software.amazon.awscdk.core.IResolvable enableKeyRotation) {
this.props.enableKeyRotation(enableKeyRotation);
return this;
}
/**
* `AWS::KMS::Key.KeyUsage`.
*
* @return {@code this}
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-keyusage
* @param keyUsage `AWS::KMS::Key.KeyUsage`. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public Builder keyUsage(final java.lang.String keyUsage) {
this.props.keyUsage(keyUsage);
return this;
}
/**
* `AWS::KMS::Key.PendingWindowInDays`.
*
* @return {@code this}
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-pendingwindowindays
* @param pendingWindowInDays `AWS::KMS::Key.PendingWindowInDays`. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public Builder pendingWindowInDays(final java.lang.Number pendingWindowInDays) {
this.props.pendingWindowInDays(pendingWindowInDays);
return this;
}
/**
* `AWS::KMS::Key.Tags`.
*
* @return {@code this}
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kms-key.html#cfn-kms-key-tags
* @param tags `AWS::KMS::Key.Tags`. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public Builder tags(final java.util.List tags) {
this.props.tags(tags);
return this;
}
/**
* @returns a newly built instance of {@link software.amazon.awscdk.services.kms.CfnKey}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External)
public software.amazon.awscdk.services.kms.CfnKey build() {
return new software.amazon.awscdk.services.kms.CfnKey(
this.scope,
this.id,
this.props.build()
);
}
}
}