Table of Contents

Class CfnParameter

Namespace
Amazon.CDK.AWS.SSM
Assembly
Amazon.CDK.AWS.SSM.dll

A CloudFormation AWS::SSM::Parameter.

public class CfnParameter : CfnResource, IInspectable
Inheritance
CfnParameter
Implements
IInspectable

Examples

// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK.AWS.SSM;

             var tags;

             var cfnParameter = new CfnParameter(this, "MyCfnParameter", new CfnParameterProps {
                 Type = "type",
                 Value = "value",

                 // the properties below are optional
                 AllowedPattern = "allowedPattern",
                 DataType = "dataType",
                 Description = "description",
                 Name = "name",
                 Policies = "policies",
                 Tags = tags,
                 Tier = "tier"
             });

Remarks

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 <code>ssm:PutParameter</code> and <code>ssm:AddTagsToResource</code> . On stack creation, AWS CloudFormation adds the following three tags to the parameter: <code>aws:cloudformation:stack-name</code> , <code>aws:cloudformation:logical-id</code> , and <code>aws:cloudformation:stack-id</code> , 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 .

CloudformationResource: AWS::SSM::Parameter

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-parameter.html

ExampleMetadata: fixture=_generated

Constructors

CfnParameter(Construct, string, ICfnParameterProps)

Create a new AWS::SSM::Parameter.

public CfnParameter(Construct scope, string id, ICfnParameterProps props)

Parameters

scope Construct
  • scope in which this resource is defined.
id string
  • scoped id of the resource.
props ICfnParameterProps
  • resource properties.

Properties

AllowedPattern

A regular expression used to validate the parameter value.

public virtual string? AllowedPattern { get; set; }

Property Value

string

Remarks

For example, for String types with values restricted to numbers, you can specify the following: AllowedPattern=^\d+$

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-parameter.html#cfn-ssm-parameter-allowedpattern

AttrType

Returns the type of the parameter.

public virtual string AttrType { get; }

Property Value

string

Remarks

Valid values are String or StringList .

CloudformationAttribute: Type

AttrValue

Returns the value of the parameter.

public virtual string AttrValue { get; }

Property Value

string

Remarks

CloudformationAttribute: Value

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

public static string CFN_RESOURCE_TYPE_NAME { get; }

Property Value

string

CfnProperties

protected override IDictionary<string, object> CfnProperties { get; }

Property Value

IDictionary<string, object>

DataType

The data type of the parameter, such as text or aws:ec2:image .

public virtual string? DataType { get; set; }

Property Value

string

Remarks

Description

Information about the parameter.

public virtual string? Description { get; set; }

Property Value

string

Remarks

Name

The name of the parameter.

public virtual string? Name { get; set; }

Property Value

string

Remarks

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: <code>arn:aws:ssm:us-east-2:111222333444:parameter/ExampleParameterName</code>

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-parameter.html#cfn-ssm-parameter-name

Policies

Information about the policies assigned to a parameter.

public virtual string? Policies { get; set; }

Property Value

string

Remarks

Tags

Optional metadata that you assign to a resource in the form of an arbitrary set of tags (key-value pairs).

public virtual TagManager Tags { get; }

Property Value

TagManager

Remarks

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.

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-parameter.html#cfn-ssm-parameter-tags

Tier

The parameter tier.

public virtual string? Tier { get; set; }

Property Value

string

Remarks

Type

The type of parameter.

public virtual string Type { get; set; }

Property Value

string

Remarks

AWS CloudFormation doesn't support creating a <code>SecureString</code> parameter type.

Allowed Values : String | StringList

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-parameter.html#cfn-ssm-parameter-type

Value

The parameter value.

public virtual string Value { get; set; }

Property Value

string

Remarks

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

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-parameter.html#cfn-ssm-parameter-value

Methods

Inspect(TreeInspector)

Examines the CloudFormation resource and discloses attributes.

public virtual void Inspect(TreeInspector inspector)

Parameters

inspector TreeInspector
  • tree inspector to collect and process attributes.

RenderProperties(IDictionary<string, object>)

protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)

Parameters

props IDictionary<string, object>

Returns

IDictionary<string, object>