Class: AWSCDK::SSM::CfnParameterProps

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

Overview

Properties for defining a CfnParameter.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, value:, allowed_pattern: nil, data_type: nil, description: nil, name: nil, policies: nil, tags: nil, tier: nil) ⇒ CfnParameterProps

Returns a new instance of CfnParameterProps.

Parameters:

  • type (String)

    The type of parameter.

  • value (String)

    The parameter value.

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

    A regular expression used to validate the parameter value.

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

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

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

    Information about the parameter.

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

    The name of the parameter.

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

    Information about the policies assigned to a parameter.

  • tags (Hash{String => String}, nil) (defaults to: nil)

    Optional metadata that you assign to a resource in the form of an arbitrary set of tags (key-value pairs).

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

    The parameter tier.



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

def initialize(type:, value:, allowed_pattern: nil, data_type: nil, description: nil, name: nil, policies: nil, tags: nil, tier: nil)
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type")
  @value = value
  Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value")
  @allowed_pattern = allowed_pattern
  Jsii::Type.check_type(@allowed_pattern, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "allowedPattern") unless @allowed_pattern.nil?
  @data_type = data_type
  Jsii::Type.check_type(@data_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dataType") unless @data_type.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
  @policies = policies
  Jsii::Type.check_type(@policies, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "policies") unless @policies.nil?
  @tags = tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil?
  @tier = tier
  Jsii::Type.check_type(@tier, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tier") unless @tier.nil?
end

Instance Attribute Details

#allowed_patternString? (readonly)

A regular expression used to validate the parameter value.

For example, for String types with values restricted to numbers, you can specify the following: AllowedPattern=^\d+$



59
60
61
# File 'ssm/cfn_parameter_props.rb', line 59

def allowed_pattern
  @allowed_pattern
end

#data_typeString? (readonly)

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

The default is text .



66
67
68
# File 'ssm/cfn_parameter_props.rb', line 66

def data_type
  @data_type
end

#descriptionString? (readonly)

Information about the parameter.



71
72
73
# File 'ssm/cfn_parameter_props.rb', line 71

def description
  @description
end

#nameString? (readonly)

The name of the parameter.

The reported maximum length of 2048 characters for a parameter name includes 1037 characters that are reserved for internal use by Systems Manager . The maximum length for a parameter name that you specify is 1011 characters.

This count of 1011 characters includes the characters in the ARN that precede the name you specify. This ARN length will vary depending on your partition and Region. For example, the following 45 characters count toward the 1011 character maximum for a parameter created in the US East (Ohio) Region: arn:aws:ssm:us-east-2:111122223333:parameter/ .



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

def name
  @name
end

#policiesString? (readonly)

Information about the policies assigned to a parameter.

Assigning parameter policies in the AWS Systems Manager User Guide .



87
88
89
# File 'ssm/cfn_parameter_props.rb', line 87

def policies
  @policies
end

#tagsHash{String => String}? (readonly)

Optional metadata that you assign to a resource in the form of an arbitrary set of tags (key-value pairs).

Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a Systems Manager parameter to identify the type of resource to which it applies, the environment, or the type of configuration data referenced by the parameter.



94
95
96
# File 'ssm/cfn_parameter_props.rb', line 94

def tags
  @tags
end

#tierString? (readonly)

The parameter tier.



99
100
101
# File 'ssm/cfn_parameter_props.rb', line 99

def tier
  @tier
end

#typeString (readonly)

The type of parameter.

Parameters of type SecureString are not supported by AWS CloudFormation .



45
46
47
# File 'ssm/cfn_parameter_props.rb', line 45

def type
  @type
end

#valueString (readonly)

The parameter value.

If type is StringList , the system returns a comma-separated string with no spaces between commas in the Value field.



52
53
54
# File 'ssm/cfn_parameter_props.rb', line 52

def value
  @value
end

Class Method Details

.jsii_propertiesObject



101
102
103
104
105
106
107
108
109
110
111
112
113
# File 'ssm/cfn_parameter_props.rb', line 101

def self.jsii_properties
  {
    :type => "type",
    :value => "value",
    :allowed_pattern => "allowedPattern",
    :data_type => "dataType",
    :description => "description",
    :name => "name",
    :policies => "policies",
    :tags => "tags",
    :tier => "tier",
  }
end

Instance Method Details

#to_jsiiObject



115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# File 'ssm/cfn_parameter_props.rb', line 115

def to_jsii
  result = {}
  result.merge!({
    "type" => @type,
    "value" => @value,
    "allowedPattern" => @allowed_pattern,
    "dataType" => @data_type,
    "description" => @description,
    "name" => @name,
    "policies" => @policies,
    "tags" => @tags,
    "tier" => @tier,
  })
  result.compact
end