Class: AWSCDK::Elasticache::CfnSubnetGroupProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
elasticache/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(description:, subnet_ids:, cache_subnet_group_name: nil, tags: nil) ⇒ CfnSubnetGroupProps

Returns a new instance of CfnSubnetGroupProps.

Parameters:

  • description (String)

    The description for the cache subnet group.

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

    The EC2 subnet IDs for the cache subnet group.

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

    The name for the cache subnet group. This value is stored as a lowercase string.

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

    A tag that can be added to an ElastiCache subnet group.



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

def initialize(description:, subnet_ids:, cache_subnet_group_name: nil, tags: nil)
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description")
  @subnet_ids = subnet_ids
  Jsii::Type.check_type(@subnet_ids, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InVuaW9uIjp7InR5cGVzIjpbeyJwcmltaXRpdmUiOiJzdHJpbmcifSx7ImZxbiI6ImF3cy1jZGstbGliLmludGVyZmFjZXMuYXdzX2VjMi5JU3VibmV0UmVmIn1dfX0sImtpbmQiOiJhcnJheSJ9fQ==")), "subnetIds")
  @cache_subnet_group_name = cache_subnet_group_name
  Jsii::Type.check_type(@cache_subnet_group_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cacheSubnetGroupName") unless @cache_subnet_group_name.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

#cache_subnet_group_nameString? (readonly)

The name for the cache subnet group. This value is stored as a lowercase string.

Constraints: Must contain no more than 255 alphanumeric characters or hyphens.

Example: mysubnetgroup



42
43
44
# File 'elasticache/cfn_subnet_group_props.rb', line 42

def cache_subnet_group_name
  @cache_subnet_group_name
end

#descriptionString (readonly)

The description for the cache subnet group.



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

def description
  @description
end

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

The EC2 subnet IDs for the cache subnet group.



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

def subnet_ids
  @subnet_ids
end

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

A tag that can be added to an ElastiCache subnet group.

Tags are composed of a Key/Value pair. You can use tags to categorize and track all your subnet groups. A tag with a null Value is permitted.



49
50
51
# File 'elasticache/cfn_subnet_group_props.rb', line 49

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



51
52
53
54
55
56
57
58
# File 'elasticache/cfn_subnet_group_props.rb', line 51

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

Instance Method Details

#to_jsiiObject



60
61
62
63
64
65
66
67
68
69
# File 'elasticache/cfn_subnet_group_props.rb', line 60

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