Class: AWSCDK::MemoryDB::CfnSubnetGroupProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
memory_db/cfn_subnet_group_props.rb

Overview

Properties for defining a CfnSubnetGroup.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(subnet_group_name:, subnet_ids:, description: nil, tags: nil) ⇒ CfnSubnetGroupProps

Returns a new instance of CfnSubnetGroupProps.

Parameters:

  • subnet_group_name (String)

    The name of the subnet group to be used for the cluster .

  • subnet_ids (Array<String, AWSCDK::Interfaces::AWSEC2::ISubnetRef>)

    A list of Amazon VPC subnet IDs for the subnet group.

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

    A description of the subnet group.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    An array of key-value pairs to apply to this resource.



13
14
15
16
17
18
19
20
21
22
# File 'memory_db/cfn_subnet_group_props.rb', line 13

def initialize(subnet_group_name:, subnet_ids:, description: nil, tags: nil)
  @subnet_group_name = subnet_group_name
  Jsii::Type.check_type(@subnet_group_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "subnetGroupName")
  @subnet_ids = subnet_ids
  Jsii::Type.check_type(@subnet_ids, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InVuaW9uIjp7InR5cGVzIjpbeyJwcmltaXRpdmUiOiJzdHJpbmcifSx7ImZxbiI6ImF3cy1jZGstbGliLmludGVyZmFjZXMuYXdzX2VjMi5JU3VibmV0UmVmIn1dfX0sImtpbmQiOiJhcnJheSJ9fQ==")), "subnetIds")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#descriptionString? (readonly)

A description of the subnet group.



38
39
40
# File 'memory_db/cfn_subnet_group_props.rb', line 38

def description
  @description
end

#subnet_group_nameString (readonly)

The name of the subnet group to be used for the cluster .



28
29
30
# File 'memory_db/cfn_subnet_group_props.rb', line 28

def subnet_group_name
  @subnet_group_name
end

#subnet_idsArray<String, AWSCDK::Interfaces::AWSEC2::ISubnetRef> (readonly)

A list of Amazon VPC subnet IDs for the subnet group.



33
34
35
# File 'memory_db/cfn_subnet_group_props.rb', line 33

def subnet_ids
  @subnet_ids
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

An array of key-value pairs to apply to this resource.

For more information, see Tag .



45
46
47
# File 'memory_db/cfn_subnet_group_props.rb', line 45

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



47
48
49
50
51
52
53
54
# File 'memory_db/cfn_subnet_group_props.rb', line 47

def self.jsii_properties
  {
    :subnet_group_name => "subnetGroupName",
    :subnet_ids => "subnetIds",
    :description => "description",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



56
57
58
59
60
61
62
63
64
65
# File 'memory_db/cfn_subnet_group_props.rb', line 56

def to_jsii
  result = {}
  result.merge!({
    "subnetGroupName" => @subnet_group_name,
    "subnetIds" => @subnet_ids,
    "description" => @description,
    "tags" => @tags,
  })
  result.compact
end