Show / Hide Table of Contents

Class StringParameterProps

Properties needed to create a String SSM parameter.

Inheritance
object
StringParameterProps
Implements
IStringParameterProps
IParameterOptions
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.SSM
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class StringParameterProps : IStringParameterProps, IParameterOptions
Syntax (vb)
Public Class StringParameterProps Implements IStringParameterProps, IParameterOptions
Remarks

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.Lambda;

            IFunction func;


            var simpleParameter = new StringParameter(this, "StringParameter", new StringParameterProps {
                // the parameter name doesn't contain any '/'
                ParameterName = "parameter",
                StringValue = "SOME_VALUE",
                SimpleName = true
            });
            var nonSimpleParameter = new StringParameter(this, "StringParameter", new StringParameterProps {
                // the parameter name contains '/'
                ParameterName = $"/{func.functionName}/my/app/param",
                StringValue = "SOME_VALUE",
                SimpleName = false
            });

Synopsis

Constructors

StringParameterProps()

Properties needed to create a String SSM parameter.

Properties

AllowedPattern

A regular expression used to validate the parameter value.

DataType

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

Description

Information about the parameter that you want to add to the system.

ParameterName

The name of the parameter.

SimpleName

Indicates whether the parameter name is a simple name.

StringValue

The value of the parameter.

Tier

The tier of the string parameter.

Type

(deprecated) The type of the string parameter.

Constructors

StringParameterProps()

Properties needed to create a String SSM parameter.

public StringParameterProps()
Remarks

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.Lambda;

            IFunction func;


            var simpleParameter = new StringParameter(this, "StringParameter", new StringParameterProps {
                // the parameter name doesn't contain any '/'
                ParameterName = "parameter",
                StringValue = "SOME_VALUE",
                SimpleName = true
            });
            var nonSimpleParameter = new StringParameter(this, "StringParameter", new StringParameterProps {
                // the parameter name contains '/'
                ParameterName = $"/{func.functionName}/my/app/param",
                StringValue = "SOME_VALUE",
                SimpleName = false
            });

Properties

AllowedPattern

A regular expression used to validate the parameter value.

public string? AllowedPattern { get; set; }
Property Value

string

Remarks

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

Default: no validation is performed

DataType

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

public ParameterDataType? DataType { get; set; }
Property Value

ParameterDataType?

Remarks

Default: ParameterDataType.TEXT

Description

Information about the parameter that you want to add to the system.

public string? Description { get; set; }
Property Value

string

Remarks

Default: none

ParameterName

The name of the parameter.

public string? ParameterName { get; set; }
Property Value

string

Remarks

Default: - a name will be generated by CloudFormation

SimpleName

Indicates whether the parameter name is a simple name.

public bool? SimpleName { get; set; }
Property Value

bool?

Remarks

A parameter name without any "/" is considered a simple name. If the parameter name includes "/", setting simpleName to true might cause unintended issues such as duplicate "/" in the resulting ARN.

This is required only if parameterName is a token, which means we are unable to detect if the name is simple or "path-like" for the purpose of rendering SSM parameter ARNs.

If parameterName is not specified, simpleName must be true (or undefined) since the name generated by AWS CloudFormation is always a simple name.

Default: - auto-detect based on parameterName

StringValue

The value of the parameter.

public string StringValue { get; set; }
Property Value

string

Remarks

It may not reference another parameter and {{}} cannot be used in the value.

Tier

The tier of the string parameter.

public ParameterTier? Tier { get; set; }
Property Value

ParameterTier?

Remarks

Default: - undefined

Type

(deprecated) The type of the string parameter.

[Obsolete("- type will always be 'String'")]
public ParameterType? Type { get; set; }
Property Value

ParameterType?

Remarks

Default: ParameterType.STRING

Stability: Deprecated

Implements

IStringParameterProps
IParameterOptions
Back to top Generated by DocFX