Skip to content
v2.274.0

StringListParameter L2 construct ​

Creates a new StringList SSM Parameter.

Example ​

ts
ssm.StringListParameter.valueForTypedListParameter(this, '/My/Public/Parameter', ssm.ParameterValueType.AWS_EC2_IMAGE_ID);
python
ssm.StringListParameter.value_for_typed_list_parameter(self, "/My/Public/Parameter", ssm.ParameterValueType.AWS_EC2_IMAGE_ID)
java
StringListParameter.valueForTypedListParameter(this, "/My/Public/Parameter", ParameterValueType.AWS_EC2_IMAGE_ID);
csharp
// Install: dotnet add package Amazon.CDK.Lib
StringListParameter.ValueForTypedListParameter(this, "/My/Public/Parameter", ParameterValueType.AWS_EC2_IMAGE_ID);
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
ssm.StringListParameter_ValueForTypedListParameter(this, jsii.String("/My/Public/Parameter"), ssm.ParameterValueType_AWS_EC2_IMAGE_ID)

Initializer ​

ts
new StringListParameter(scope: Construct, id: string, props: StringListParameterProps)
python
StringListParameter(scope: Construct, id: str, props: StringListParameterProps)
java
new StringListParameter(Construct scope, String id, StringListParameterProps props)
csharp
new StringListParameter(Construct scope, string id, StringListParameterProps props)
go
NewStringListParameter(Scope Construct, Id *string, Props StringListParameterProps)

Construct Props ​

allowedPatternoptionalstringallowed_patternoptionalstrallowedPatternoptionalStringAllowedPatternoptionalstringAllowedPatternoptional*string#
A regular expression used to validate the parameter value.

Default: no validation is performed

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

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string= none#
Information about the parameter that you want to add to the system.
parameterNameoptionalstringparameter_nameoptionalstrparameterNameoptionalStringParameterNameoptionalstringParameterNameoptional*string#
The name of the parameter.

Default: a name will be generated by CloudFormation

simpleNameoptionalbooleansimple_nameoptionalboolsimpleNameoptionalBooleanSimpleNameoptionalboolSimpleNameoptional*bool#
Indicates whether the parameter name is a simple name.

Default: auto-detect based on parameterName

notes

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.

stringListValuestring[]string_list_valuetyping.List[str]stringListValueList<String>StringListValuestring[]StringListValue*[]*stringrequired#
The values of the parameter.

It may not reference another parameter and &#123;&#123;&#125;&#125; cannot be used in the value.

tieroptionalParameterTiertieroptionalParameterTiertieroptionalParameterTierTieroptionalParameterTierTieroptionalParameterTier= undefined#
The tier of the string parameter.

Properties ​

encryptionKeymay be undefinedIKeyencryption_keymay be undefinedIKeyencryptionKeymay be undefinedIKeyEncryptionKeymay be undefinedIKeyEncryptionKeymay be undefinedIKey#
The encryption key that is used to encrypt this parameter.

Default: default master key

The environment this resource belongs to.
notes

For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.

For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.

nodeNodenodeNodenodeNodeNodeNodeNodeNoderequired#
The tree node.
parameterArnstringparameter_arnstrparameterArnStringParameterArnstringParameterArn*stringrequired#
The ARN of the SSM Parameter resource.
parameterNamestringparameter_namestrparameterNameStringParameterNamestringParameterName*stringrequired#
The name of the SSM Parameter resource.
parameterRefParameterReferenceparameter_refParameterReferenceparameterRefParameterReferenceParameterRefParameterReferenceParameterRefParameterReferencerequired#
A reference to a Parameter resource.
parameterTypestringparameter_typestrparameterTypeStringParameterTypestringParameterType*stringrequired#
The type of the SSM Parameter resource.
PROPERTY_INJECTION_IDstringproperty_injection_idstrPROPERTY_INJECTION_IDStringPROPERTY_INJECTION_IDstringPROPERTY_INJECTION_ID*stringrequiredstatic#
Uniquely identifies this class.
stackStackstackStackstackStackStackStackStackStackrequired#
The stack in which this resource is defined.
stringListValuestring[]string_list_valuetyping.List[str]stringListValueList<String>StringListValuestring[]StringListValue*[]*stringrequired#
The parameter value.

Value must not nest another parameter. Do not use {{}} in the value. Values in the array cannot contain commas (,).

Methods ​

applyCrossStackReferenceStrength(strength: ReferenceStrength): voiddef apply_cross_stack_reference_strength(self, strength: ReferenceStrength) -> Nonepublic void applyCrossStackReferenceStrength(ReferenceStrength strength)public void ApplyCrossStackReferenceStrength(ReferenceStrength strength)func ApplyCrossStackReferenceStrength(Strength ReferenceStrength)#
Override the cross-stack reference strength for this resource.
notes · 1 parameter

When set, any cross-stack reference to this resource will use the specified mechanism instead of the global default determined by the @aws-cdk/core:defaultCrossStackReferences context key. This is useful for selectively weakening specific references to avoid the "deadly embrace" problem without changing the app-wide default.

Parameters

  • strengthstrengthstrengthstrengthStrength — - The reference strength to use for this resource.
applyRemovalPolicy(policy: RemovalPolicy): voiddef apply_removal_policy(self, policy: RemovalPolicy) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy)public void ApplyRemovalPolicy(RemovalPolicy policy)func ApplyRemovalPolicy(Policy RemovalPolicy)#
Apply the given removal policy to this resource.
notes

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

fromListParameterAttributes(scope: Construct, id: string, attrs: ListParameterAttributes): IStringListParameter@staticmethod def from_list_parameter_attributes(scope: Construct, id: str, attrs: ListParameterAttributes) -> IStringListParameterpublic static IStringListParameter fromListParameterAttributes(Construct scope, String id, ListParameterAttributes attrs)public static IStringListParameter FromListParameterAttributes(Construct scope, string id, ListParameterAttributes attrs)func FromListParameterAttributes(Scope Construct, Id *string, Attrs ListParameterAttributes) IStringListParameterstatic#
Imports an external string list parameter with name and optional version.
fromStringListParameterName(scope: Construct, id: string, stringListParameterName: string): IStringListParameter@staticmethod def from_string_list_parameter_name(scope: Construct, id: str, string_list_parameter_name: str) -> IStringListParameterpublic static IStringListParameter fromStringListParameterName(Construct scope, String id, String stringListParameterName)public static IStringListParameter FromStringListParameterName(Construct scope, string id, string stringListParameterName)func FromStringListParameterName(Scope Construct, Id *string, StringListParameterName *string) IStringListParameterstatic#
Imports an external parameter of type string list.

Returns a token and should not be parsed.

grantOnKey(grantee: IGrantable, ...actions: string[]): GrantOnKeyResultdef grant_on_key(self, grantee: IGrantable, actions: str) -> GrantOnKeyResultpublic GrantOnKeyResult grantOnKey(IGrantable grantee, String actions)public GrantOnKeyResult GrantOnKey(IGrantable grantee, string actions)func GrantOnKey(Grantee IGrantable, Actions *string) GrantOnKeyResult#
Gives permissions to a grantable entity to perform actions on the encryption key.
grantRead(grantee: IGrantable): Grantdef grant_read(self, grantee: IGrantable) -> Grantpublic Grant grantRead(IGrantable grantee)public Grant GrantRead(IGrantable grantee)func GrantRead(Grantee IGrantable) Grant#
[disable-awslint:no-grants].
grantWrite(grantee: IGrantable): Grantdef grant_write(self, grantee: IGrantable) -> Grantpublic Grant grantWrite(IGrantable grantee)public Grant GrantWrite(IGrantable grantee)func GrantWrite(Grantee IGrantable) Grant#
[disable-awslint:no-grants].
isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *boolstatic#
Checks if `x` is a construct.
notes · 1 parameter · returns

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters

  • xxxxX — Any object.

Returns: true if x is an object created from a class which extends Construct.

isOwnedResource(construct: IConstruct): boolean@staticmethod def is_owned_resource(construct: IConstruct) -> boolpublic static Boolean isOwnedResource(IConstruct construct)public static bool IsOwnedResource(IConstruct construct)func IsOwnedResource(Construct IConstruct) *boolstatic#
Returns true if the construct was created by CDK, and false otherwise.
isResource(construct: IConstruct): boolean@staticmethod def is_resource(construct: IConstruct) -> boolpublic static Boolean isResource(IConstruct construct)public static bool IsResource(IConstruct construct)func IsResource(Construct IConstruct) *boolstatic#
Check whether the given construct is a Resource.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#
Returns a string representation of this construct.
valueForTypedListParameter(scope: Construct, parameterName: string, type?: ParameterValueType, version?: number): string[]@staticmethod def value_for_typed_list_parameter(scope: Construct, parameter_name: str, type: typing.Optional[ParameterValueType] = None, version: typing.Optional[int | float] = None) -> typing.List[str]public static List<String> valueForTypedListParameter(Construct scope, String parameterName, ParameterValueType type, Number version)public static string[] ValueForTypedListParameter(Construct scope, string parameterName, ParameterValueType? type = null, double? version = null)func ValueForTypedListParameter(Scope Construct, ParameterName *string, Type ParameterValueType, Version *float64) *[]*stringstatic#
Returns a token that will resolve (during deployment) to the list value of an SSM StringList parameter.
4 parameters

Parameters

  • scopescopescopescopeScope — Some scope within a stack.
  • parameterNameparameter_nameparameterNameparameterNameParameterName — The name of the SSM parameter.
  • typetypetypetypeType — the type of the SSM list parameter.
  • versionversionversionversionVersion — The parameter version (recommended in order to ensure that the value won't change during deployment).
with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#
Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.