Skip to content
v2.273.0

CfnParameterProps Struct ​

Example ​

ts
const stack = new Stack();
const durToken = new CfnParameter(stack, 'MyParameter', {
  type: 'Number',
  default: 60,
});
new CustomResource(stack, 'MyCustomResource', {
  serviceToken: 'MyServiceToken',
  serviceTimeout: Duration.seconds(durToken.valueAsNumber),
});

Properties ​

allowedPatternstringallowed_patternstrallowedPatternStringAllowedPatternstringAllowedPattern*string= No constraints on patterns allow…#
A regular expression that represents the patterns to allow for String types.
default

Default: No constraints on patterns allowed for parameter.

allowedValuesstring[]allowed_valuestyping.List[str]allowedValuesList<String>AllowedValuesstring[]AllowedValues*[]*string= No constraints on values allowed…#
An array containing the list of values allowed for the parameter.
default

Default: No constraints on values allowed for parameter.

constraintDescriptionstringconstraint_descriptionstrconstraintDescriptionStringConstraintDescriptionstringConstraintDescription*string= No description with customized e…#
A string that explains a constraint when the constraint is violated.

For example, without a constraint description, a parameter that has an allowed pattern of [A-Za-z0-9]+ displays the following error message when the user specifies an invalid value:

default

Default: No description with customized error message when user specifies invalid values.

defaultanydefaultAnydefaultObjectDefaultobjectDefaultinterface{}= No default value for parameter.#
A value of the appropriate type for the template to use if no value is specified when a stack is created.

If you define constraints for the parameter, you must specify a value that adheres to those constraints.

descriptionstringdescriptionstrdescriptionStringDescriptionstringDescription*string= No description for the parameter…#
A string of up to 4000 characters that describes the parameter.
default

Default: No description for the parameter.

maxLengthnumbermax_lengthint | floatmaxLengthNumberMaxLengthdoubleMaxLength*float64= None.#
An integer value that determines the largest number of characters you want to allow for String types.
maxValuenumbermax_valueint | floatmaxValueNumberMaxValuedoubleMaxValue*float64= None.#
A numeric value that determines the largest numeric value you want to allow for Number types.
minLengthnumbermin_lengthint | floatminLengthNumberMinLengthdoubleMinLength*float64= None.#
An integer value that determines the smallest number of characters you want to allow for String types.
minValuenumbermin_valueint | floatminValueNumberMinValuedoubleMinValue*float64= None.#
A numeric value that determines the smallest numeric value you want to allow for Number types.
noEchobooleanno_echoboolnoEchoBooleanNoEchoboolNoEcho*bool= Parameter values are not masked.#
Whether to mask the parameter value when anyone makes a call that describes the stack.

If you set the value to true, the parameter value is masked with asterisks (*****).

typestringtypestrtypeStringTypestringType*string= String#
The data type for the parameter (DataType).

Used as props by ​