Class CfnParameter

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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:37.784Z") @Stability(Stable) public class CfnParameter extends CfnResource implements IInspectable
A CloudFormation 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 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.*;
 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();
 
  • 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 Construct scope, @NotNull String id, @NotNull CfnParameterProps props)
      Create a new AWS::SSM::Parameter.

      Parameters:
      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.
  • 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()
      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

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

      AWS CloudFormation doesn't support creating a SecureString parameter type.

      Allowed Values : String | StringList

    • setType

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

      AWS CloudFormation doesn't support creating a SecureString parameter type.

      Allowed Values : String | StringList

    • getValue

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

      If type is StringList , the system returns a comma-separated string with no spaces between commas in the Value field.

    • setValue

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

      If type is StringList , the system returns a comma-separated string with no spaces between commas in the Value field.

    • getAllowedPattern

      @Stability(Stable) @Nullable public String 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

      @Stability(Stable) public void setAllowedPattern(@Nullable String value)
      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

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

      The default is text .

    • setDataType

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

      The default is text .

    • 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.

      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

      @Stability(Stable) public void setName(@Nullable String value)
      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

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

      Assigning parameter policies in the AWS Systems Manager User Guide .

    • setPolicies

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

      Assigning parameter policies in the AWS Systems Manager User Guide .

    • getTier

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

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