@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-28T21:34:20.930Z") @Stability(value=Stable) 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: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();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnParameter.Builder
A fluent builder for
CfnParameter. |
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$ProxyIConstruct.Jsii$Default| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnParameter(Construct scope,
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 |
|---|---|
String |
getAllowedPattern()
A regular expression used to validate the parameter value.
|
String |
getAttrType()
Returns the type of the parameter.
|
String |
getAttrValue()
Returns the value of the parameter.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getDataType()
The data type of the parameter, such as `text` or `aws:ec2:image` .
|
String |
getDescription()
Information about the parameter.
|
String |
getName()
The name of the parameter.
|
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).
|
String |
getTier()
The parameter tier.
|
String |
getType()
The type of parameter.
|
String |
getValue()
The parameter value.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
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 as `text` or `aws:ec2:image` .
|
void |
setDescription(String value)
Information about the parameter.
|
void |
setName(String value)
The name of the parameter.
|
void |
setPolicies(String value)
Information about the policies assigned to a parameter.
|
void |
setTier(String value)
The parameter tier.
|
void |
setType(String value)
The type of parameter.
|
void |
setValue(String value)
The parameter value.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdgetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnParameter(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnParameter(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnParameter(@NotNull
Construct scope,
@NotNull
String id,
@NotNull
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.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrType()
Valid values are String or StringList .
@Stability(value=Stable) @NotNull public String getAttrValue()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull 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.
@Stability(value=Stable) @NotNull public String getType()
AWS CloudFormation doesn't support creating a
SecureStringparameter type.
Allowed Values : String | StringList
@Stability(value=Stable)
public void setType(@NotNull
String value)
AWS CloudFormation doesn't support creating a
SecureStringparameter type.
Allowed Values : String | StringList
@Stability(value=Stable) @NotNull public String getValue()
If type is
StringList, the system returns a comma-separated string with no spaces between commas in theValuefield.
@Stability(value=Stable)
public void setValue(@NotNull
String value)
If type is
StringList, the system returns a comma-separated string with no spaces between commas in theValuefield.
@Stability(value=Stable) @Nullable public String getAllowedPattern()
For example, for String types with values restricted to numbers, you can specify the following: AllowedPattern=^\d+$
@Stability(value=Stable)
public void setAllowedPattern(@Nullable
String value)
For example, for String types with values restricted to numbers, you can specify the following: AllowedPattern=^\d+$
@Stability(value=Stable) @Nullable public String getDataType()
The default is text .
@Stability(value=Stable)
public void setDataType(@Nullable
String value)
The default is text .
@Stability(value=Stable) @Nullable public String getDescription()
@Stability(value=Stable)
public void setDescription(@Nullable
String value)
@Stability(value=Stable) @Nullable public 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
@Stability(value=Stable)
public void setName(@Nullable
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
@Stability(value=Stable) @Nullable public String getPolicies()
Assigning parameter policies in the AWS Systems Manager User Guide .
@Stability(value=Stable)
public void setPolicies(@Nullable
String value)
Assigning parameter policies in the AWS Systems Manager User Guide .
@Stability(value=Stable) @Nullable public String getTier()
@Stability(value=Stable)
public void setTier(@Nullable
String value)
Copyright © 2023. All rights reserved.