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:PutParameterandssm: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:AddTagsToResourceandssm: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 ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnParameter(Construct scope, String id, CfnParameterProps props) Create a newAWS::SSM::Parameter.protectedCfnParameter(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnParameter(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 astextoraws: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.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetAllowedPattern(String value) A regular expression used to validate the parameter value.voidsetDataType(String value) The data type of the parameter, such astextoraws:ec2:image.voidsetDescription(String value) Information about the parameter.voidThe name of the parameter.voidsetPolicies(String value) Information about the policies assigned to a parameter.voidThe parameter tier.voidThe type of parameter.voidThe 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, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
inspectin 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrType
Returns the type of the parameter.Valid values are
StringorStringList. -
getAttrValue
Returns the value of the parameter. -
getCfnProperties
- Overrides:
getCfnPropertiesin 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
SecureStringparameter type.Allowed Values : String | StringList
-
setType
The type of parameter.AWS CloudFormation doesn't support creating a
SecureStringparameter 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 theValuefield. -
setValue
The parameter value.If type is
StringList, the system returns a comma-separated string with no spaces between commas in theValuefield. -
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 astextoraws:ec2:image.The default is
text. -
setDataType
The data type of the parameter, such astextoraws: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.
-