Class CfnParameter

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnParameter
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:23:55.704Z") @Stability(Stable) public class CfnParameter extends CfnElement
A CloudFormation parameter.

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
    Modifier and Type
    Class
    Description
    static final class 
    A fluent builder for CfnParameter.

    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

    Constructors
    Modifier
    Constructor
    Description
    protected
    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 Type
    Method
    Description
    A 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.
    The data type for the parameter (DataType).
    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.
     
    void
    A regular expression that represents the patterns to allow for String types.
    void
    An array containing the list of values allowed for the parameter.
    void
    A string that explains a constraint when the constraint is violated.
    void
    A value of the appropriate type for the template to use if no value is specified when a stack is created.
    void
    A string of up to 4000 characters that describes the parameter.
    void
    An integer value that determines the largest number of characters you want to allow for String types.
    void
    A numeric value that determines the largest numeric value you want to allow for Number types.
    void
    An integer value that determines the smallest number of characters you want to allow for String types.
    void
    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
    setType(String value)
    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

      @Stability(Stable) @NotNull public Object resolve(@NotNull IResolveContext _context)
      Parameters:
      _context - This parameter is required.
    • getValue

      @Stability(Stable) @NotNull public IResolvable getValue()
      The parameter value as a Token.
    • getValueAsList

      @Stability(Stable) @NotNull public List<String> getValueAsList()
      The parameter value, if it represents a string list.
    • getValueAsNumber

      @Stability(Stable) @NotNull public Number getValueAsNumber()
      The parameter value, if it represents a number.
    • getValueAsString

      @Stability(Stable) @NotNull public String getValueAsString()
      The parameter value, if it represents a string.
    • getDefaultValue

      @Stability(Stable) @NotNull public Object 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

      @Stability(Stable) public void setDefaultValue(@NotNull Object value)
      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

      @Stability(Stable) @NotNull public Boolean getNoEcho()
      Indicates if this parameter is configured with "NoEcho" enabled.
    • setNoEcho

      @Stability(Stable) public void setNoEcho(@NotNull Boolean value)
      Indicates if this parameter is configured with "NoEcho" enabled.
    • getType

      @Stability(Stable) @NotNull public String getType()
      The data type for the parameter (DataType).

      Default: String

    • setType

      @Stability(Stable) public void setType(@NotNull String value)
      The data type for the parameter (DataType).

      Default: String

    • getAllowedPattern

      @Stability(Stable) @Nullable public String getAllowedPattern()
      A regular expression that represents the patterns to allow for String types.

      Default: - No constraints on patterns allowed for parameter.

    • setAllowedPattern

      @Stability(Stable) public void setAllowedPattern(@Nullable String value)
      A regular expression that represents the patterns to allow for String types.

      Default: - No constraints on patterns allowed for parameter.

    • getAllowedValues

      @Stability(Stable) @Nullable public List<String> getAllowedValues()
      An array containing the list of values allowed for the parameter.

      Default: - No constraints on values allowed for parameter.

    • setAllowedValues

      @Stability(Stable) public void setAllowedValues(@Nullable List<String> value)
      An array containing the list of values allowed for the parameter.

      Default: - No constraints on values allowed for parameter.

    • getConstraintDescription

      @Stability(Stable) @Nullable public String 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

      @Stability(Stable) public void setConstraintDescription(@Nullable String value)
      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

      @Stability(Stable) @Nullable public String getDescription()
      A string of up to 4000 characters that describes the parameter.

      Default: - No description for the parameter.

    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      A string of up to 4000 characters that describes the parameter.

      Default: - No description for the parameter.

    • getMaxLength

      @Stability(Stable) @Nullable public Number getMaxLength()
      An integer value that determines the largest number of characters you want to allow for String types.

      Default: - None.

    • setMaxLength

      @Stability(Stable) public void setMaxLength(@Nullable Number value)
      An integer value that determines the largest number of characters you want to allow for String types.

      Default: - None.

    • getMaxValue

      @Stability(Stable) @Nullable public Number getMaxValue()
      A numeric value that determines the largest numeric value you want to allow for Number types.

      Default: - None.

    • setMaxValue

      @Stability(Stable) public void setMaxValue(@Nullable Number value)
      A numeric value that determines the largest numeric value you want to allow for Number types.

      Default: - None.

    • getMinLength

      @Stability(Stable) @Nullable public Number getMinLength()
      An integer value that determines the smallest number of characters you want to allow for String types.

      Default: - None.

    • setMinLength

      @Stability(Stable) public void setMinLength(@Nullable Number value)
      An integer value that determines the smallest number of characters you want to allow for String types.

      Default: - None.

    • getMinValue

      @Stability(Stable) @Nullable public Number getMinValue()
      A numeric value that determines the smallest numeric value you want to allow for Number types.

      Default: - None.

    • setMinValue

      @Stability(Stable) public void setMinValue(@Nullable Number value)
      A numeric value that determines the smallest numeric value you want to allow for Number types.

      Default: - None.