Class: AWSCDK::SSM::StringParameterProps
- Inherits:
-
ParameterOptions
- Object
- ParameterOptions
- AWSCDK::SSM::StringParameterProps
- Defined in:
- ssm/string_parameter_props.rb
Overview
Properties needed to create a String SSM parameter.
Instance Attribute Summary collapse
-
#allowed_pattern ⇒ String?
readonly
A regular expression used to validate the parameter value.
-
#data_type ⇒ AWSCDK::SSM::ParameterDataType?
readonly
The data type of the parameter, such as
textoraws:ec2:image. -
#description ⇒ String?
readonly
Information about the parameter that you want to add to the system.
-
#parameter_name ⇒ String?
readonly
The name of the parameter.
-
#simple_name ⇒ Boolean?
readonly
Indicates whether the parameter name is a simple name.
-
#string_value ⇒ String
readonly
The value of the parameter.
-
#tier ⇒ AWSCDK::SSM::ParameterTier?
readonly
The tier of the string parameter.
-
#type ⇒ AWSCDK::SSM::ParameterType?
readonly
deprecated
Deprecated.
- type will always be 'String'
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(allowed_pattern: nil, description: nil, parameter_name: nil, simple_name: nil, tier: nil, string_value:, data_type: nil, type: nil) ⇒ StringParameterProps
constructor
A new instance of StringParameterProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(allowed_pattern: nil, description: nil, parameter_name: nil, simple_name: nil, tier: nil, string_value:, data_type: nil, type: nil) ⇒ StringParameterProps
Returns a new instance of StringParameterProps.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'ssm/string_parameter_props.rb', line 15 def initialize(allowed_pattern: nil, description: nil, parameter_name: nil, simple_name: nil, tier: nil, string_value:, data_type: nil, type: nil) @allowed_pattern = allowed_pattern Jsii::Type.check_type(@allowed_pattern, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "allowedPattern") unless @allowed_pattern.nil? @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @parameter_name = parameter_name Jsii::Type.check_type(@parameter_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "parameterName") unless @parameter_name.nil? @simple_name = simple_name Jsii::Type.check_type(@simple_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "simpleName") unless @simple_name.nil? @tier = tier Jsii::Type.check_type(@tier, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3NtLlBhcmFtZXRlclRpZXIifQ==")), "tier") unless @tier.nil? @string_value = string_value Jsii::Type.check_type(@string_value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stringValue") @data_type = data_type Jsii::Type.check_type(@data_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3NtLlBhcmFtZXRlckRhdGFUeXBlIn0=")), "dataType") unless @data_type.nil? @type = type Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3NtLlBhcmFtZXRlclR5cGUifQ==")), "type") unless @type.nil? end |
Instance Attribute Details
#allowed_pattern ⇒ String? (readonly)
Default: no validation is performed
A regular expression used to validate the parameter value.
For example, for String types with values restricted to
numbers, you can specify the following: ^\d+$
41 42 43 |
# File 'ssm/string_parameter_props.rb', line 41 def allowed_pattern @allowed_pattern end |
#data_type ⇒ AWSCDK::SSM::ParameterDataType? (readonly)
Default: ParameterDataType.TEXT
The data type of the parameter, such as text or aws:ec2:image.
85 86 87 |
# File 'ssm/string_parameter_props.rb', line 85 def data_type @data_type end |
#description ⇒ String? (readonly)
Default: none
Information about the parameter that you want to add to the system.
46 47 48 |
# File 'ssm/string_parameter_props.rb', line 46 def description @description end |
#parameter_name ⇒ String? (readonly)
Default: - a name will be generated by CloudFormation
The name of the parameter.
51 52 53 |
# File 'ssm/string_parameter_props.rb', line 51 def parameter_name @parameter_name end |
#simple_name ⇒ Boolean? (readonly)
Default: - auto-detect based on parameterName
Indicates whether the parameter name is a simple name.
A parameter name without any "/" is considered a simple name. If the parameter name includes "/", setting simpleName to true might cause unintended issues such as duplicate "/" in the resulting ARN.
This is required only if parameter_name is a token, which means we
are unable to detect if the name is simple or "path-like" for the purpose
of rendering SSM parameter ARNs.
If parameter_name is not specified, simple_name must be true (or
undefined) since the name generated by AWS CloudFormation is always a
simple name.
69 70 71 |
# File 'ssm/string_parameter_props.rb', line 69 def simple_name @simple_name end |
#string_value ⇒ String (readonly)
The value of the parameter.
It may not reference another parameter and {{}} cannot be used in the value.
80 81 82 |
# File 'ssm/string_parameter_props.rb', line 80 def string_value @string_value end |
#tier ⇒ AWSCDK::SSM::ParameterTier? (readonly)
Default: - undefined
The tier of the string parameter.
74 75 76 |
# File 'ssm/string_parameter_props.rb', line 74 def tier @tier end |
#type ⇒ AWSCDK::SSM::ParameterType? (readonly)
- type will always be 'String'
Default: ParameterType.STRING
The type of the string parameter.
91 92 93 |
# File 'ssm/string_parameter_props.rb', line 91 def type @type end |
Class Method Details
.jsii_properties ⇒ Object
93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'ssm/string_parameter_props.rb', line 93 def self.jsii_properties { :allowed_pattern => "allowedPattern", :description => "description", :parameter_name => "parameterName", :simple_name => "simpleName", :tier => "tier", :string_value => "stringValue", :data_type => "dataType", :type => "type", } end |
Instance Method Details
#to_jsii ⇒ Object
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'ssm/string_parameter_props.rb', line 106 def to_jsii result = {} result.merge!(super) result.merge!({ "allowedPattern" => @allowed_pattern, "description" => @description, "parameterName" => @parameter_name, "simpleName" => @simple_name, "tier" => @tier, "stringValue" => @string_value, "dataType" => @data_type, "type" => @type, }) result.compact end |