Class CfnParameter
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
Remarks
For example, for String types with values restricted to numbers, you can specify the following: AllowedPattern=^\d+$
AttrType
Returns the type of the parameter.
public virtual string AttrType { get; }
Property Value
Remarks
Valid values are String
or StringList
.
CloudformationAttribute: Type
AttrValue
Returns the value of the parameter.
public virtual string AttrValue { get; }
Property Value
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
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
DataType
The data type of the parameter, such as text
or aws:ec2:image
.
public virtual string? DataType { get; set; }
Property Value
Remarks
The default is text
.
Description
Information about the parameter.
public virtual string? Description { get; set; }
Property Value
Remarks
Name
The name of the parameter.
public virtual string? Name { get; set; }
Property Value
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>
Policies
Information about the policies assigned to a parameter.
public virtual string? Policies { get; set; }
Property Value
Remarks
Assigning parameter policies in the AWS Systems Manager User Guide .
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.
Tier
The parameter tier.
public virtual string? Tier { get; set; }
Property Value
Remarks
Type
The type of parameter.
public virtual string Type { get; set; }
Property Value
Remarks
AWS CloudFormation doesn't support creating a <code>SecureString</code> parameter type.
Allowed Values : String | StringList
Value
The parameter value.
public virtual string Value { get; set; }
Property Value
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.
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>