Class CfnParameter
- All Implemented Interfaces:
IConstruct
,IDependable
,IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
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
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();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionCfnParameter
(Construct scope, String id, CfnParameterProps props) Create a newAWS::SSM::Parameter
.protected
CfnParameter
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnParameter
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionA regular expression used to validate the parameter value.Returns the type of the parameter.Returns the value of the parameter.The data type of the parameter, such astext
oraws:ec2:image
.Information about the parameter.getName()
The name of the parameter.Information about the policies assigned to a parameter.getTags()
Optional metadata that you assign to a resource in the form of an arbitrary set of tags (key-value pairs).getTier()
The parameter tier.getType()
The type of parameter.getValue()
The parameter value.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setAllowedPattern
(String value) A regular expression used to validate the parameter value.void
setDataType
(String value) The data type of the parameter, such astext
oraws:ec2:image
.void
setDescription
(String value) Information about the parameter.void
The name of the parameter.void
setPolicies
(String value) Information about the policies assigned to a parameter.void
The parameter tier.void
The type of parameter.void
The parameter value.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnParameter
protected CfnParameter(software.amazon.jsii.JsiiObjectRef objRef) -
CfnParameter
protected CfnParameter(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnParameter
@Stability(Stable) public CfnParameter(@NotNull Construct scope, @NotNull String id, @NotNull CfnParameterProps props) Create a newAWS::SSM::Parameter
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
props
-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrType
Returns the type of the parameter.Valid values are
String
orStringList
. -
getAttrValue
Returns the value of the parameter. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
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.
-
getType
The type of parameter.AWS CloudFormation doesn't support creating a
SecureString
parameter type.Allowed Values : String | StringList
-
setType
The type of parameter.AWS CloudFormation doesn't support creating a
SecureString
parameter type.Allowed Values : String | StringList
-
getValue
The parameter value.If type is
StringList
, the system returns a comma-separated string with no spaces between commas in theValue
field. -
setValue
The parameter value.If type is
StringList
, the system returns a comma-separated string with no spaces between commas in theValue
field. -
getAllowedPattern
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+$
-
setAllowedPattern
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+$
-
getDataType
The data type of the parameter, such astext
oraws:ec2:image
.The default is
text
. -
setDataType
The data type of the parameter, such astext
oraws:ec2:image
.The default is
text
. -
getDescription
Information about the parameter. -
setDescription
Information about the parameter. -
getName
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
-
setName
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
-
getPolicies
Information about the policies assigned to a parameter.Assigning parameter policies in the AWS Systems Manager User Guide .
-
setPolicies
Information about the policies assigned to a parameter.Assigning parameter policies in the AWS Systems Manager User Guide .
-
getTier
The parameter tier. -
setTier
The parameter tier.
-