Class: AWSCDK::SSM::ParameterOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ssm/parameter_options.rb

Overview

Properties needed to create a new 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) ⇒ ParameterOptions

Returns a new instance of ParameterOptions.

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.



12
13
14
15
16
17
18
19
20
21
22
23
# File 'ssm/parameter_options.rb', line 12

def initialize(allowed_pattern: nil, description: nil, parameter_name: nil, simple_name: nil, tier: 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?
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)


32
33
34
# File 'ssm/parameter_options.rb', line 32

def allowed_pattern
  @allowed_pattern
end

#descriptionString? (readonly)

Note:

Default: none

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

Returns:

  • (String, nil)


37
38
39
# File 'ssm/parameter_options.rb', line 37

def description
  @description
end

#parameter_nameString? (readonly)

Note:

Default: - a name will be generated by CloudFormation

The name of the parameter.

Returns:

  • (String, nil)


42
43
44
# File 'ssm/parameter_options.rb', line 42

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)


60
61
62
# File 'ssm/parameter_options.rb', line 60

def simple_name
  @simple_name
end

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

Note:

Default: - undefined

The tier of the string parameter.

Returns:



65
66
67
# File 'ssm/parameter_options.rb', line 65

def tier
  @tier
end

Class Method Details

.jsii_propertiesObject



67
68
69
70
71
72
73
74
75
# File 'ssm/parameter_options.rb', line 67

def self.jsii_properties
  {
    :allowed_pattern => "allowedPattern",
    :description => "description",
    :parameter_name => "parameterName",
    :simple_name => "simpleName",
    :tier => "tier",
  }
end

Instance Method Details

#to_jsiiObject



77
78
79
80
81
82
83
84
85
86
87
# File 'ssm/parameter_options.rb', line 77

def to_jsii
  result = {}
  result.merge!({
    "allowedPattern" => @allowed_pattern,
    "description" => @description,
    "parameterName" => @parameter_name,
    "simpleName" => @simple_name,
    "tier" => @tier,
  })
  result.compact
end