Class CfnParameter

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.89.0 (build 2f74b3e)", date="2023-10-26T00:56:14.080Z") @Stability(Stable) public class CfnParameter extends CfnResource implements IInspectable, ITaggable
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.*;
 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(Map.of(
                 "tagsKey", "tags"))
         .tier("tier")
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String 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 software.constructs.Construct scope, @NotNull String id, @NotNull CfnParameterProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrType

      @Stability(Stable) @NotNull public String getAttrType()
      Returns the type of the parameter.

      Valid values are String or StringList .

    • getAttrValue

      @Stability(Stable) @NotNull public String getAttrValue()
      Returns the value of the parameter.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getType

      @Stability(Stable) @NotNull public String getType()
      The type of parameter.
    • setType

      @Stability(Stable) public void setType(@NotNull String value)
      The type of parameter.
    • getValue

      @Stability(Stable) @NotNull public String getValue()
      The parameter value.
    • setValue

      @Stability(Stable) public void setValue(@NotNull String value)
      The parameter value.
    • getAllowedPattern

      @Stability(Stable) @Nullable public String getAllowedPattern()
      A regular expression used to validate the parameter value.
    • setAllowedPattern

      @Stability(Stable) public void setAllowedPattern(@Nullable String value)
      A regular expression used to validate the parameter value.
    • getDataType

      @Stability(Stable) @Nullable public String getDataType()
      The data type of the parameter, such as text or aws:ec2:image .
    • setDataType

      @Stability(Stable) public void setDataType(@Nullable String value)
      The data type of the parameter, such as text or aws:ec2:image .
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      Information about the parameter.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      Information about the parameter.
    • getName

      @Stability(Stable) @Nullable public String getName()
      The name of the parameter.
    • setName

      @Stability(Stable) public void setName(@Nullable String value)
      The name of the parameter.
    • getPolicies

      @Stability(Stable) @Nullable public String getPolicies()
      Information about the policies assigned to a parameter.
    • setPolicies

      @Stability(Stable) public void setPolicies(@Nullable String value)
      Information about the policies assigned to a parameter.
    • getTagsRaw

      @Stability(Stable) @Nullable public Map<String,String> getTagsRaw()
      Optional metadata that you assign to a resource in the form of an arbitrary set of tags (key-value pairs).
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable Map<String,String> value)
      Optional metadata that you assign to a resource in the form of an arbitrary set of tags (key-value pairs).
    • getTier

      @Stability(Stable) @Nullable public String getTier()
      The parameter tier.
    • setTier

      @Stability(Stable) public void setTier(@Nullable String value)
      The parameter tier.