Class: AWSCDK::CfnParameterProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cfn_parameter_props.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(allowed_pattern: nil, allowed_values: nil, constraint_description: nil, default: nil, description: nil, max_length: nil, max_value: nil, min_length: nil, min_value: nil, no_echo: nil, type: nil) ⇒ CfnParameterProps

Returns a new instance of CfnParameterProps.

Parameters:

  • allowed_pattern (String, nil) (defaults to: nil)

    A regular expression that represents the patterns to allow for String types.

  • allowed_values (Array<String>, nil) (defaults to: nil)

    An array containing the list of values allowed for the parameter.

  • constraint_description (String, nil) (defaults to: nil)

    A string that explains a constraint when the constraint is violated.

  • default (Object, nil) (defaults to: nil)

    A value of the appropriate type for the template to use if no value is specified when a stack is created.

  • description (String, nil) (defaults to: nil)

    A string of up to 4000 characters that describes the parameter.

  • max_length (Numeric, nil) (defaults to: nil)

    An integer value that determines the largest number of characters you want to allow for String types.

  • max_value (Numeric, nil) (defaults to: nil)

    A numeric value that determines the largest numeric value you want to allow for Number types.

  • min_length (Numeric, nil) (defaults to: nil)

    An integer value that determines the smallest number of characters you want to allow for String types.

  • min_value (Numeric, nil) (defaults to: nil)

    A numeric value that determines the smallest numeric value you want to allow for Number types.

  • no_echo (Boolean, nil) (defaults to: nil)

    Whether to mask the parameter value when anyone makes a call that describes the stack.

  • type (String, nil) (defaults to: nil)

    The data type for the parameter (DataType).



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'cfn_parameter_props.rb', line 17

def initialize(allowed_pattern: nil, allowed_values: nil, constraint_description: nil, default: nil, description: nil, max_length: nil, max_value: nil, min_length: nil, min_value: nil, no_echo: nil, type: nil)
  @allowed_pattern = allowed_pattern
  Jsii::Type.check_type(@allowed_pattern, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "allowedPattern") unless @allowed_pattern.nil?
  @allowed_values = allowed_values
  Jsii::Type.check_type(@allowed_values, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "allowedValues") unless @allowed_values.nil?
  @constraint_description = constraint_description
  Jsii::Type.check_type(@constraint_description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "constraintDescription") unless @constraint_description.nil?
  @default = default
  Jsii::Type.check_type(@default, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "default") unless @default.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @max_length = max_length
  Jsii::Type.check_type(@max_length, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxLength") unless @max_length.nil?
  @max_value = max_value
  Jsii::Type.check_type(@max_value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxValue") unless @max_value.nil?
  @min_length = min_length
  Jsii::Type.check_type(@min_length, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "minLength") unless @min_length.nil?
  @min_value = min_value
  Jsii::Type.check_type(@min_value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "minValue") unless @min_value.nil?
  @no_echo = no_echo
  Jsii::Type.check_type(@no_echo, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "noEcho") unless @no_echo.nil?
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type") unless @type.nil?
end

Instance Attribute Details

#allowed_patternString? (readonly)

Note:

Default: - No constraints on patterns allowed for parameter.

A regular expression that represents the patterns to allow for String types.

Returns:

  • (String, nil)


46
47
48
# File 'cfn_parameter_props.rb', line 46

def allowed_pattern
  @allowed_pattern
end

#allowed_valuesArray<String>? (readonly)

Note:

Default: - No constraints on values allowed for parameter.

An array containing the list of values allowed for the parameter.

Returns:

  • (Array<String>, nil)


51
52
53
# File 'cfn_parameter_props.rb', line 51

def allowed_values
  @allowed_values
end

#constraint_descriptionString? (readonly)

Note:

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

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:

Returns:

  • (String, nil)


60
61
62
# File 'cfn_parameter_props.rb', line 60

def constraint_description
  @constraint_description
end

#defaultObject? (readonly)

Note:

Default: - 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.

Returns:

  • (Object, nil)


68
69
70
# File 'cfn_parameter_props.rb', line 68

def default
  @default
end

#descriptionString? (readonly)

Note:

Default: - No description for the parameter.

A string of up to 4000 characters that describes the parameter.

Returns:

  • (String, nil)


73
74
75
# File 'cfn_parameter_props.rb', line 73

def description
  @description
end

#max_lengthNumeric? (readonly)

Note:

Default: - None.

An integer value that determines the largest number of characters you want to allow for String types.

Returns:

  • (Numeric, nil)


78
79
80
# File 'cfn_parameter_props.rb', line 78

def max_length
  @max_length
end

#max_valueNumeric? (readonly)

Note:

Default: - None.

A numeric value that determines the largest numeric value you want to allow for Number types.

Returns:

  • (Numeric, nil)


83
84
85
# File 'cfn_parameter_props.rb', line 83

def max_value
  @max_value
end

#min_lengthNumeric? (readonly)

Note:

Default: - None.

An integer value that determines the smallest number of characters you want to allow for String types.

Returns:

  • (Numeric, nil)


88
89
90
# File 'cfn_parameter_props.rb', line 88

def min_length
  @min_length
end

#min_valueNumeric? (readonly)

Note:

Default: - None.

A numeric value that determines the smallest numeric value you want to allow for Number types.

Returns:

  • (Numeric, nil)


93
94
95
# File 'cfn_parameter_props.rb', line 93

def min_value
  @min_value
end

#no_echoBoolean? (readonly)

Note:

Default: - 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 (*****).

Returns:

  • (Boolean, nil)


100
101
102
# File 'cfn_parameter_props.rb', line 100

def no_echo
  @no_echo
end

#typeString? (readonly)

Note:

Default: String

The data type for the parameter (DataType).

Returns:

  • (String, nil)


105
106
107
# File 'cfn_parameter_props.rb', line 105

def type
  @type
end

Class Method Details

.jsii_propertiesObject



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'cfn_parameter_props.rb', line 107

def self.jsii_properties
  {
    :allowed_pattern => "allowedPattern",
    :allowed_values => "allowedValues",
    :constraint_description => "constraintDescription",
    :default => "default",
    :description => "description",
    :max_length => "maxLength",
    :max_value => "maxValue",
    :min_length => "minLength",
    :min_value => "minValue",
    :no_echo => "noEcho",
    :type => "type",
  }
end

Instance Method Details

#to_jsiiObject



123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# File 'cfn_parameter_props.rb', line 123

def to_jsii
  result = {}
  result.merge!({
    "allowedPattern" => @allowed_pattern,
    "allowedValues" => @allowed_values,
    "constraintDescription" => @constraint_description,
    "default" => @default,
    "description" => @description,
    "maxLength" => @max_length,
    "maxValue" => @max_value,
    "minLength" => @min_length,
    "minValue" => @min_value,
    "noEcho" => @no_echo,
    "type" => @type,
  })
  result.compact
end