Class: AWSCDK::SSM::StringParameterProps

Inherits:
ParameterOptions
  • Object
show all
Defined in:
ssm/string_parameter_props.rb

Overview

Properties needed to create a String SSM parameter.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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.

Parameters:

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

    A regular expression used to validate the parameter value.

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

    Information about the parameter that you want to add to the system.

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

    The name of the parameter.

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

    Indicates whether the parameter name is a simple name.

  • tier (AWSCDK::SSM::ParameterTier, nil) (defaults to: nil)

    The tier of the string parameter.

  • string_value (String)

    The value of the parameter.

  • data_type (AWSCDK::SSM::ParameterDataType, nil) (defaults to: nil)

    The data type of the parameter, such as text or aws:ec2:image.

  • type (AWSCDK::SSM::ParameterType, nil) (defaults to: nil)

    The type of the string parameter.



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_patternString? (readonly)

Note:

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+$

Returns:

  • (String, nil)


41
42
43
# File 'ssm/string_parameter_props.rb', line 41

def allowed_pattern
  @allowed_pattern
end

#data_typeAWSCDK::SSM::ParameterDataType? (readonly)

Note:

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

#descriptionString? (readonly)

Note:

Default: none

Information about the parameter that you want to add to the system.

Returns:

  • (String, nil)


46
47
48
# File 'ssm/string_parameter_props.rb', line 46

def description
  @description
end

#parameter_nameString? (readonly)

Note:

Default: - a name will be generated by CloudFormation

The name of the parameter.

Returns:

  • (String, nil)


51
52
53
# File 'ssm/string_parameter_props.rb', line 51

def parameter_name
  @parameter_name
end

#simple_nameBoolean? (readonly)

Note:

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.

Returns:

  • (Boolean, nil)


69
70
71
# File 'ssm/string_parameter_props.rb', line 69

def simple_name
  @simple_name
end

#string_valueString (readonly)

The value of the parameter.

It may not reference another parameter and {{}} cannot be used in the value.

Returns:

  • (String)


80
81
82
# File 'ssm/string_parameter_props.rb', line 80

def string_value
  @string_value
end

#tierAWSCDK::SSM::ParameterTier? (readonly)

Note:

Default: - undefined

The tier of the string parameter.

Returns:



74
75
76
# File 'ssm/string_parameter_props.rb', line 74

def tier
  @tier
end

#typeAWSCDK::SSM::ParameterType? (readonly)

Deprecated.
  • type will always be 'String'
Note:

Default: ParameterType.STRING

The type of the string parameter.

Returns:



91
92
93
# File 'ssm/string_parameter_props.rb', line 91

def type
  @type
end

Class Method Details

.jsii_propertiesObject



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_jsiiObject



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