@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-31T18:36:52.084Z") public class CfnParameter extends CfnResource implements IInspectable
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
andssm:AddTagsToResource
. On stack creation, AWS CloudFormation adds the following three tags to the parameter:aws:cloudformation:stack-name
,aws:cloudformation:logical-id
, andaws: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
andssm: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();
Modifier and Type | Class and Description |
---|---|
static class |
CfnParameter.Builder
A fluent builder for
CfnParameter . |
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnParameter(Construct scope,
java.lang.String id,
CfnParameterProps props)
Create a new `AWS::SSM::Parameter`.
|
protected |
CfnParameter(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnParameter(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAllowedPattern()
A regular expression used to validate the parameter value.
|
java.lang.String |
getAttrType()
Returns the type of the parameter.
|
java.lang.String |
getAttrValue()
Returns the value of the parameter.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getDataType()
The data type of the parameter, such as `text` or `aws:ec2:image` .
|
java.lang.String |
getDescription()
Information about the parameter.
|
java.lang.String |
getName()
The name of the parameter.
|
java.lang.String |
getPolicies()
Information about the policies assigned to a parameter.
|
TagManager |
getTags()
Optional metadata that you assign to a resource in the form of an arbitrary set of tags (key-value pairs).
|
java.lang.String |
getTier()
The parameter tier.
|
java.lang.String |
getType()
The type of parameter.
|
java.lang.String |
getValue()
The parameter value.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setAllowedPattern(java.lang.String value)
A regular expression used to validate the parameter value.
|
void |
setDataType(java.lang.String value)
The data type of the parameter, such as `text` or `aws:ec2:image` .
|
void |
setDescription(java.lang.String value)
Information about the parameter.
|
void |
setName(java.lang.String value)
The name of the parameter.
|
void |
setPolicies(java.lang.String value)
Information about the policies assigned to a parameter.
|
void |
setTier(java.lang.String value)
The parameter tier.
|
void |
setType(java.lang.String value)
The type of parameter.
|
void |
setValue(java.lang.String value)
The parameter value.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnParameter(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnParameter(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnParameter(Construct scope, java.lang.String id, CfnParameterProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrType()
Valid values are String
or StringList
.
public java.lang.String getAttrValue()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
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.
public java.lang.String getType()
AWS CloudFormation doesn't support creating a
SecureString
parameter type.
Allowed Values : String | StringList
public void setType(java.lang.String value)
AWS CloudFormation doesn't support creating a
SecureString
parameter type.
Allowed Values : String | StringList
public java.lang.String getValue()
If type is
StringList
, the system returns a comma-separated string with no spaces between commas in theValue
field.
public void setValue(java.lang.String value)
If type is
StringList
, the system returns a comma-separated string with no spaces between commas in theValue
field.
public java.lang.String getAllowedPattern()
For example, for String types with values restricted to numbers, you can specify the following: AllowedPattern=^\d+$
public void setAllowedPattern(java.lang.String value)
For example, for String types with values restricted to numbers, you can specify the following: AllowedPattern=^\d+$
public java.lang.String getDataType()
The default is text
.
public void setDataType(java.lang.String value)
The default is text
.
public java.lang.String getDescription()
public void setDescription(java.lang.String value)
public java.lang.String getName()
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
public void setName(java.lang.String value)
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
public java.lang.String getPolicies()
Assigning parameter policies in the AWS Systems Manager User Guide .
public void setPolicies(java.lang.String value)
Assigning parameter policies in the AWS Systems Manager User Guide .
public java.lang.String getTier()
public void setTier(java.lang.String value)