Class CfnParameter.Builder

java.lang.Object
software.amazon.awscdk.CfnParameter.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnParameter>
Enclosing class:
CfnParameter

@Stability(Stable) public static final class CfnParameter.Builder extends Object implements software.amazon.jsii.Builder<CfnParameter>
A fluent builder for CfnParameter.
  • Method Details

    • create

      @Stability(Stable) public static CfnParameter.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - The parent construct. This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of CfnParameter.Builder.
    • allowedPattern

      @Stability(Stable) public CfnParameter.Builder allowedPattern(String allowedPattern)
      A regular expression that represents the patterns to allow for String types.

      Default: - No constraints on patterns allowed for parameter.

      Parameters:
      allowedPattern - A regular expression that represents the patterns to allow for String types. This parameter is required.
      Returns:
      this
    • allowedValues

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

      Default: - No constraints on values allowed for parameter.

      Parameters:
      allowedValues - An array containing the list of values allowed for the parameter. This parameter is required.
      Returns:
      this
    • constraintDescription

      @Stability(Stable) public CfnParameter.Builder constraintDescription(String constraintDescription)
      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.

      Parameters:
      constraintDescription - A string that explains a constraint when the constraint is violated. This parameter is required.
      Returns:
      this
    • defaultValue

      @Stability(Stable) public CfnParameter.Builder defaultValue(Object defaultValue)
      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.

      Parameters:
      defaultValue - A value of the appropriate type for the template to use if no value is specified when a stack is created. This parameter is required.
      Returns:
      this
    • description

      @Stability(Stable) public CfnParameter.Builder description(String description)
      A string of up to 4000 characters that describes the parameter.

      Default: - No description for the parameter.

      Parameters:
      description - A string of up to 4000 characters that describes the parameter. This parameter is required.
      Returns:
      this
    • maxLength

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

      Default: - None.

      Parameters:
      maxLength - An integer value that determines the largest number of characters you want to allow for String types. This parameter is required.
      Returns:
      this
    • maxValue

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

      Default: - None.

      Parameters:
      maxValue - A numeric value that determines the largest numeric value you want to allow for Number types. This parameter is required.
      Returns:
      this
    • minLength

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

      Default: - None.

      Parameters:
      minLength - An integer value that determines the smallest number of characters you want to allow for String types. This parameter is required.
      Returns:
      this
    • minValue

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

      Default: - None.

      Parameters:
      minValue - A numeric value that determines the smallest numeric value you want to allow for Number types. This parameter is required.
      Returns:
      this
    • noEcho

      @Stability(Stable) public CfnParameter.Builder noEcho(Boolean noEcho)
      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 (*****).

      Default: - Parameter values are not masked.

      Parameters:
      noEcho - Whether to mask the parameter value when anyone makes a call that describes the stack. This parameter is required.
      Returns:
      this
    • type

      @Stability(Stable) public CfnParameter.Builder type(String type)
      The data type for the parameter (DataType).

      Default: String

      Parameters:
      type - The data type for the parameter (DataType). This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public CfnParameter build()
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnParameter>
      Returns:
      a newly built instance of CfnParameter.