Class: AWSCDK::SSM::StringParameterAttributes
- Inherits:
-
CommonStringParameterAttributes
- Object
- CommonStringParameterAttributes
- AWSCDK::SSM::StringParameterAttributes
- Defined in:
- ssm/string_parameter_attributes.rb
Overview
Attributes for parameters of various types of string.
Instance Attribute Summary collapse
-
#force_dynamic_reference ⇒ Boolean?
readonly
Use a dynamic reference as the representation in CloudFormation template level.
-
#parameter_name ⇒ String
readonly
The name of the parameter store value.
-
#simple_name ⇒ Boolean?
readonly
Indicates whether the parameter name is a simple name.
-
#type ⇒ AWSCDK::SSM::ParameterType?
readonly
deprecated
Deprecated.
- use valueType instead
-
#value_type ⇒ AWSCDK::SSM::ParameterValueType?
readonly
The type of the string parameter value.
-
#version ⇒ Numeric?
readonly
The version number of the value you wish to retrieve.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(parameter_name:, simple_name: nil, force_dynamic_reference: nil, type: nil, value_type: nil, version: nil) ⇒ StringParameterAttributes
constructor
A new instance of StringParameterAttributes.
- #to_jsii ⇒ Object
Constructor Details
#initialize(parameter_name:, simple_name: nil, force_dynamic_reference: nil, type: nil, value_type: nil, version: nil) ⇒ StringParameterAttributes
Returns a new instance of StringParameterAttributes.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'ssm/string_parameter_attributes.rb', line 15 def initialize(parameter_name:, simple_name: nil, force_dynamic_reference: nil, type: nil, value_type: nil, version: nil) @parameter_name = parameter_name Jsii::Type.check_type(@parameter_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "parameterName") @simple_name = simple_name Jsii::Type.check_type(@simple_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "simpleName") unless @simple_name.nil? @force_dynamic_reference = force_dynamic_reference Jsii::Type.check_type(@force_dynamic_reference, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "forceDynamicReference") unless @force_dynamic_reference.nil? @type = type Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3NtLlBhcmFtZXRlclR5cGUifQ==")), "type") unless @type.nil? @value_type = value_type Jsii::Type.check_type(@value_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3NtLlBhcmFtZXRlclZhbHVlVHlwZSJ9")), "valueType") unless @value_type.nil? @version = version Jsii::Type.check_type(@version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "version") unless @version.nil? end |
Instance Attribute Details
#force_dynamic_reference ⇒ Boolean? (readonly)
Default: false
Use a dynamic reference as the representation in CloudFormation template level.
By default, CDK tries to deduce an appropriate representation based on the parameter value (a CfnParameter or a dynamic reference). Use this flag to override the representation when it does not work.
61 62 63 |
# File 'ssm/string_parameter_attributes.rb', line 61 def force_dynamic_reference @force_dynamic_reference end |
#parameter_name ⇒ String (readonly)
The name of the parameter store value.
This value can be a token or a concrete string. If it is a concrete string and includes "/" it must also be prefixed with a "/" (fully-qualified).
36 37 38 |
# File 'ssm/string_parameter_attributes.rb', line 36 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.
54 55 56 |
# File 'ssm/string_parameter_attributes.rb', line 54 def simple_name @simple_name end |
#type ⇒ AWSCDK::SSM::ParameterType? (readonly)
- use valueType instead
Default: ParameterType.STRING
The type of the string parameter.
67 68 69 |
# File 'ssm/string_parameter_attributes.rb', line 67 def type @type end |
#value_type ⇒ AWSCDK::SSM::ParameterValueType? (readonly)
Default: ParameterValueType.STRING
The type of the string parameter value.
Using specific types can be helpful in catching invalid values at the start of creating or updating a stack. CloudFormation validates the values against existing values in the account.
Note - if you want to allow values from different AWS accounts, use ParameterValueType.STRING
80 81 82 |
# File 'ssm/string_parameter_attributes.rb', line 80 def value_type @value_type end |
#version ⇒ Numeric? (readonly)
Default: The latest version will be retrieved.
The version number of the value you wish to retrieve.
85 86 87 |
# File 'ssm/string_parameter_attributes.rb', line 85 def version @version end |
Class Method Details
.jsii_properties ⇒ Object
87 88 89 90 91 92 93 94 95 96 |
# File 'ssm/string_parameter_attributes.rb', line 87 def self.jsii_properties { :parameter_name => "parameterName", :simple_name => "simpleName", :force_dynamic_reference => "forceDynamicReference", :type => "type", :value_type => "valueType", :version => "version", } end |
Instance Method Details
#to_jsii ⇒ Object
98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'ssm/string_parameter_attributes.rb', line 98 def to_jsii result = {} result.merge!(super) result.merge!({ "parameterName" => @parameter_name, "simpleName" => @simple_name, "forceDynamicReference" => @force_dynamic_reference, "type" => @type, "valueType" => @value_type, "version" => @version, }) result.compact end |