Class CfnParameter
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
Use the optional Parameters section to customize your templates. Parameters enable you to input custom values to your template each time you create or update a stack.
Example:
Topic myTopic = new Topic(this, "MyTopic"); CfnParameter url = new CfnParameter(this, "url-param"); myTopic.addSubscription(new UrlSubscription(url.getValueAsString()));
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
CfnParameter
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnParameter
(software.amazon.jsii.JsiiObjectRef objRef) CfnParameter
(software.constructs.Construct scope, String id) Creates a parameter construct.CfnParameter
(software.constructs.Construct scope, String id, CfnParameterProps props) Creates a parameter construct. -
Method Summary
Modifier and TypeMethodDescriptionA regular expression that represents the patterns to allow for String types.An array containing the list of values allowed for the parameter.A string that explains a constraint when the constraint is violated.A value of the appropriate type for the template to use if no value is specified when a stack is created.A string of up to 4000 characters that describes the parameter.An integer value that determines the largest number of characters you want to allow for String types.A numeric value that determines the largest numeric value you want to allow for Number types.An integer value that determines the smallest number of characters you want to allow for String types.A numeric value that determines the smallest numeric value you want to allow for Number types.Indicates if this parameter is configured with "NoEcho" enabled.getType()
The data type for the parameter (DataType).getValue()
The parameter value as a Token.The parameter value, if it represents a string list.The parameter value, if it represents a number.The parameter value, if it represents a string.resolve
(IResolveContext _context) void
setAllowedPattern
(String value) A regular expression that represents the patterns to allow for String types.void
setAllowedValues
(List<String> value) An array containing the list of values allowed for the parameter.void
setConstraintDescription
(String value) A string that explains a constraint when the constraint is violated.void
setDefaultValue
(Object value) A value of the appropriate type for the template to use if no value is specified when a stack is created.void
setDescription
(String value) A string of up to 4000 characters that describes the parameter.void
setMaxLength
(Number value) An integer value that determines the largest number of characters you want to allow for String types.void
setMaxValue
(Number value) A numeric value that determines the largest numeric value you want to allow for Number types.void
setMinLength
(Number value) An integer value that determines the smallest number of characters you want to allow for String types.void
setMinValue
(Number value) A numeric value that determines the smallest numeric value you want to allow for Number types.void
Indicates if this parameter is configured with "NoEcho" enabled.void
The data type for the parameter (DataType).Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
CfnParameter
protected CfnParameter(software.amazon.jsii.JsiiObjectRef objRef) -
CfnParameter
protected CfnParameter(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnParameter
@Stability(Stable) public CfnParameter(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnParameterProps props) Creates a parameter construct.Note that the name (logical ID) of the parameter will derive from it's
coname
and location within the stack. Therefore, it is recommended that parameters are defined at the stack level.- Parameters:
scope
- The parent construct. This parameter is required.id
- This parameter is required.props
- The parameter properties.
-
CfnParameter
@Stability(Stable) public CfnParameter(@NotNull software.constructs.Construct scope, @NotNull String id) Creates a parameter construct.Note that the name (logical ID) of the parameter will derive from it's
coname
and location within the stack. Therefore, it is recommended that parameters are defined at the stack level.- Parameters:
scope
- The parent construct. This parameter is required.id
- This parameter is required.
-
-
Method Details
-
resolve
- Parameters:
_context
- This parameter is required.
-
getValue
The parameter value as a Token. -
getValueAsList
The parameter value, if it represents a string list. -
getValueAsNumber
The parameter value, if it represents a number. -
getValueAsString
The parameter value, if it represents a string. -
getDefaultValue
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.
Default: - No default value for parameter.
-
setDefaultValue
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.
Default: - No default value for parameter.
-
getNoEcho
Indicates if this parameter is configured with "NoEcho" enabled. -
setNoEcho
Indicates if this parameter is configured with "NoEcho" enabled. -
getType
The data type for the parameter (DataType).Default: String
-
setType
The data type for the parameter (DataType).Default: String
-
getAllowedPattern
A regular expression that represents the patterns to allow for String types.Default: - No constraints on patterns allowed for parameter.
-
setAllowedPattern
A regular expression that represents the patterns to allow for String types.Default: - No constraints on patterns allowed for parameter.
-
getAllowedValues
An array containing the list of values allowed for the parameter.Default: - No constraints on values allowed for parameter.
-
setAllowedValues
An array containing the list of values allowed for the parameter.Default: - No constraints on values allowed for parameter.
-
getConstraintDescription
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: - No description with customized error message when user specifies invalid values.
-
setConstraintDescription
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: - No description with customized error message when user specifies invalid values.
-
getDescription
A string of up to 4000 characters that describes the parameter.Default: - No description for the parameter.
-
setDescription
A string of up to 4000 characters that describes the parameter.Default: - No description for the parameter.
-
getMaxLength
An integer value that determines the largest number of characters you want to allow for String types.Default: - None.
-
setMaxLength
An integer value that determines the largest number of characters you want to allow for String types.Default: - None.
-
getMaxValue
A numeric value that determines the largest numeric value you want to allow for Number types.Default: - None.
-
setMaxValue
A numeric value that determines the largest numeric value you want to allow for Number types.Default: - None.
-
getMinLength
An integer value that determines the smallest number of characters you want to allow for String types.Default: - None.
-
setMinLength
An integer value that determines the smallest number of characters you want to allow for String types.Default: - None.
-
getMinValue
A numeric value that determines the smallest numeric value you want to allow for Number types.Default: - None.
-
setMinValue
A numeric value that determines the smallest numeric value you want to allow for Number types.Default: - None.
-