
software.amazon.awscdk.services.ssm.CfnParameter Maven / Gradle / Ivy
package software.amazon.awscdk.services.ssm;
/**
* A CloudFormation `AWS::SSM::Parameter`.
*
* The AWS::SSM::Parameter
resource creates an SSM parameter in AWS Systems Manager Parameter Store.
*
*
*
* To create an SSM parameter, you must have the AWS Identity and Access Management ( IAM ) permissions ssm:PutParameter
and ssm:AddTagsToResource
. On stack creation, AWS CloudFormation adds the following three tags to the parameter: aws:cloudformation:stack-name
, aws:cloudformation:logical-id
, and aws:cloudformation:stack-id
, in addition to any custom tags you specify.
*
* To add, update, or remove tags during stack update, you must have IAM permissions for both ssm:AddTagsToResource
and ssm:RemoveTagsFromResource
. For more information, see Managing Access Using Policies in the AWS Systems Manager User Guide .
*
*
*
* For information about valid values for parameters, see Requirements and Constraints for Parameter Names in the AWS Systems Manager User Guide and PutParameter in the AWS Systems Manager API Reference .
*
* Example:
*
*
* // The code below shows an example of how to instantiate this type.
* // The values are placeholders you should change.
* import software.amazon.awscdk.services.ssm.*;
* Object tags;
* CfnParameter cfnParameter = CfnParameter.Builder.create(this, "MyCfnParameter")
* .type("type")
* .value("value")
* // the properties below are optional
* .allowedPattern("allowedPattern")
* .dataType("dataType")
* .description("description")
* .name("name")
* .policies("policies")
* .tags(tags)
* .tier("tier")
* .build();
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.72.0 (build 4b8828b)", date = "2023-01-03T16:22:32.087Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.ssm.$Module.class, fqn = "@aws-cdk/aws-ssm.CfnParameter")
public class CfnParameter extends software.amazon.awscdk.core.CfnResource implements software.amazon.awscdk.core.IInspectable {
protected CfnParameter(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected CfnParameter(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
static {
CFN_RESOURCE_TYPE_NAME = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.ssm.CfnParameter.class, "CFN_RESOURCE_TYPE_NAME", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Create a new `AWS::SSM::Parameter`.
*
* @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.Stable)
public CfnParameter(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.ssm.CfnParameterProps 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.
*
* @param inspector - tree inspector to collect and process attributes. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public void inspect(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.TreeInspector inspector) {
software.amazon.jsii.Kernel.call(this, "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.Stable)
@Override
protected @org.jetbrains.annotations.NotNull java.util.Map renderProperties(final @org.jetbrains.annotations.NotNull java.util.Map props) {
return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.call(this, "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.Stable)
public final static java.lang.String CFN_RESOURCE_TYPE_NAME;
/**
* Returns the type of the parameter.
*
* Valid values are String
or StringList
.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getAttrType() {
return software.amazon.jsii.Kernel.get(this, "attrType", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Returns the value of the parameter.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getAttrValue() {
return software.amazon.jsii.Kernel.get(this, "attrValue", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
*/
@Override
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
protected @org.jetbrains.annotations.NotNull java.util.Map getCfnProperties() {
return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.get(this, "cfnProperties", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class))));
}
/**
* Optional metadata that you assign to a resource in the form of an arbitrary set of tags (key-value pairs).
*
* Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a Systems Manager parameter to identify the type of resource to which it applies, the environment, or the type of configuration data referenced by the parameter.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.TagManager getTags() {
return software.amazon.jsii.Kernel.get(this, "tags", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.core.TagManager.class));
}
/**
* The type of parameter.
*
*
*
* AWS CloudFormation doesn't support creating a SecureString
parameter type.
*
*
*
* Allowed Values : String | StringList
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getType() {
return software.amazon.jsii.Kernel.get(this, "type", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* The type of parameter.
*
*
*
* AWS CloudFormation doesn't support creating a SecureString
parameter type.
*
*
*
* Allowed Values : String | StringList
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setType(final @org.jetbrains.annotations.NotNull java.lang.String value) {
software.amazon.jsii.Kernel.set(this, "type", java.util.Objects.requireNonNull(value, "type is required"));
}
/**
* The parameter value.
*
*
*
* If type is StringList
, the system returns a comma-separated string with no spaces between commas in the Value
field.
*
*
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getValue() {
return software.amazon.jsii.Kernel.get(this, "value", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* The parameter value.
*
*
*
* If type is StringList
, the system returns a comma-separated string with no spaces between commas in the Value
field.
*
*
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setValue(final @org.jetbrains.annotations.NotNull java.lang.String value) {
software.amazon.jsii.Kernel.set(this, "value", java.util.Objects.requireNonNull(value, "value is required"));
}
/**
* A regular expression used to validate the parameter value.
*
* For example, for String types with values restricted to numbers, you can specify the following: AllowedPattern=^\d+$
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.Nullable java.lang.String getAllowedPattern() {
return software.amazon.jsii.Kernel.get(this, "allowedPattern", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* A regular expression used to validate the parameter value.
*
* For example, for String types with values restricted to numbers, you can specify the following: AllowedPattern=^\d+$
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setAllowedPattern(final @org.jetbrains.annotations.Nullable java.lang.String value) {
software.amazon.jsii.Kernel.set(this, "allowedPattern", value);
}
/**
* The data type of the parameter, such as `text` or `aws:ec2:image` .
*
* The default is text
.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.Nullable java.lang.String getDataType() {
return software.amazon.jsii.Kernel.get(this, "dataType", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* The data type of the parameter, such as `text` or `aws:ec2:image` .
*
* The default is text
.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setDataType(final @org.jetbrains.annotations.Nullable java.lang.String value) {
software.amazon.jsii.Kernel.set(this, "dataType", value);
}
/**
* Information about the parameter.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.Nullable java.lang.String getDescription() {
return software.amazon.jsii.Kernel.get(this, "description", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Information about the parameter.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setDescription(final @org.jetbrains.annotations.Nullable java.lang.String value) {
software.amazon.jsii.Kernel.set(this, "description", value);
}
/**
* The name of the parameter.
*
*
*
* The maximum length constraint listed below includes capacity for additional system attributes that aren't part of the name. The maximum length for a parameter name, including the full length of the parameter ARN, is 1011 characters. For example, the length of the following parameter name is 65 characters, not 20 characters: arn:aws:ssm:us-east-2:111222333444:parameter/ExampleParameterName
*
*
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.Nullable java.lang.String getName() {
return software.amazon.jsii.Kernel.get(this, "name", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* The name of the parameter.
*
*
*
* The maximum length constraint listed below includes capacity for additional system attributes that aren't part of the name. The maximum length for a parameter name, including the full length of the parameter ARN, is 1011 characters. For example, the length of the following parameter name is 65 characters, not 20 characters: arn:aws:ssm:us-east-2:111222333444:parameter/ExampleParameterName
*
*
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setName(final @org.jetbrains.annotations.Nullable java.lang.String value) {
software.amazon.jsii.Kernel.set(this, "name", value);
}
/**
* Information about the policies assigned to a parameter.
*
* Assigning parameter policies in the AWS Systems Manager User Guide .
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.Nullable java.lang.String getPolicies() {
return software.amazon.jsii.Kernel.get(this, "policies", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Information about the policies assigned to a parameter.
*
* Assigning parameter policies in the AWS Systems Manager User Guide .
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setPolicies(final @org.jetbrains.annotations.Nullable java.lang.String value) {
software.amazon.jsii.Kernel.set(this, "policies", value);
}
/**
* The parameter tier.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.Nullable java.lang.String getTier() {
return software.amazon.jsii.Kernel.get(this, "tier", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* The parameter tier.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setTier(final @org.jetbrains.annotations.Nullable java.lang.String value) {
software.amazon.jsii.Kernel.set(this, "tier", value);
}
/**
* A fluent builder for {@link software.amazon.awscdk.services.ssm.CfnParameter}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.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.Stable)
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.ssm.CfnParameterProps.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.ssm.CfnParameterProps.Builder();
}
/**
* The type of parameter.
*
*
*
* AWS CloudFormation doesn't support creating a SecureString
parameter type.
*
*
*
* Allowed Values : String | StringList
*
* @return {@code this}
* @param type The type of parameter. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder type(final java.lang.String type) {
this.props.type(type);
return this;
}
/**
* The parameter value.
*
*
*
* If type is StringList
, the system returns a comma-separated string with no spaces between commas in the Value
field.
*
*
*
* @return {@code this}
* @param value The parameter value. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder value(final java.lang.String value) {
this.props.value(value);
return this;
}
/**
* A regular expression used to validate the parameter value.
*
* For example, for String types with values restricted to numbers, you can specify the following: AllowedPattern=^\d+$
*
* @return {@code this}
* @param allowedPattern A regular expression used to validate the parameter value. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder allowedPattern(final java.lang.String allowedPattern) {
this.props.allowedPattern(allowedPattern);
return this;
}
/**
* The data type of the parameter, such as `text` or `aws:ec2:image` .
*
* The default is text
.
*
* @return {@code this}
* @param dataType The data type of the parameter, such as `text` or `aws:ec2:image` . This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder dataType(final java.lang.String dataType) {
this.props.dataType(dataType);
return this;
}
/**
* Information about the parameter.
*
* @return {@code this}
* @param description Information about the parameter. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder description(final java.lang.String description) {
this.props.description(description);
return this;
}
/**
* The name of the parameter.
*
*
*
* The maximum length constraint listed below includes capacity for additional system attributes that aren't part of the name. The maximum length for a parameter name, including the full length of the parameter ARN, is 1011 characters. For example, the length of the following parameter name is 65 characters, not 20 characters: arn:aws:ssm:us-east-2:111222333444:parameter/ExampleParameterName
*
*
*
* @return {@code this}
* @param name The name of the parameter. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder name(final java.lang.String name) {
this.props.name(name);
return this;
}
/**
* Information about the policies assigned to a parameter.
*
* Assigning parameter policies in the AWS Systems Manager User Guide .
*
* @return {@code this}
* @param policies Information about the policies assigned to a parameter. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder policies(final java.lang.String policies) {
this.props.policies(policies);
return this;
}
/**
* Optional metadata that you assign to a resource in the form of an arbitrary set of tags (key-value pairs).
*
* Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a Systems Manager parameter to identify the type of resource to which it applies, the environment, or the type of configuration data referenced by the parameter.
*
* @return {@code this}
* @param tags Optional metadata that you assign to a resource in the form of an arbitrary set of tags (key-value pairs). This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder tags(final java.lang.Object tags) {
this.props.tags(tags);
return this;
}
/**
* The parameter tier.
*
* @return {@code this}
* @param tier The parameter tier. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder tier(final java.lang.String tier) {
this.props.tier(tier);
return this;
}
/**
* @returns a newly built instance of {@link software.amazon.awscdk.services.ssm.CfnParameter}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public software.amazon.awscdk.services.ssm.CfnParameter build() {
return new software.amazon.awscdk.services.ssm.CfnParameter(
this.scope,
this.id,
this.props.build()
);
}
}
}