Class: AWSCDK::EC2::CfnTransitGatewayAttachmentProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ec2/cfn_transit_gateway_attachment_props.rb

Overview

Properties for defining a CfnTransitGatewayAttachment.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(subnet_ids:, transit_gateway_id:, vpc_id:, options: nil, tags: nil) ⇒ CfnTransitGatewayAttachmentProps

Returns a new instance of CfnTransitGatewayAttachmentProps.

Parameters:



14
15
16
17
18
19
20
21
22
23
24
25
# File 'ec2/cfn_transit_gateway_attachment_props.rb', line 14

def initialize(subnet_ids:, transit_gateway_id:, vpc_id:, options: nil, tags: nil)
  @subnet_ids = subnet_ids
  Jsii::Type.check_type(@subnet_ids, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InVuaW9uIjp7InR5cGVzIjpbeyJwcmltaXRpdmUiOiJzdHJpbmcifSx7ImZxbiI6ImF3cy1jZGstbGliLmludGVyZmFjZXMuYXdzX2VjMi5JU3VibmV0UmVmIn1dfX0sImtpbmQiOiJhcnJheSJ9fQ==")), "subnetIds")
  @transit_gateway_id = transit_gateway_id
  Jsii::Type.check_type(@transit_gateway_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19lYzIuSVRyYW5zaXRHYXRld2F5UmVmIn1dfX0=")), "transitGatewayId")
  @vpc_id = vpc_id
  Jsii::Type.check_type(@vpc_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19lYzIuSVZQQ1JlZiJ9XX19")), "vpcId")
  @options = options
  Jsii::Type.check_type(@options, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "options") unless @options.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

#optionsObject? (readonly)

The VPC attachment options.



48
49
50
# File 'ec2/cfn_transit_gateway_attachment_props.rb', line 48

def options
  @options
end

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

The IDs of one or more subnets.

You can specify only one subnet per Availability Zone. You must specify at least one subnet, but we recommend that you specify two subnets for better availability. The transit gateway uses one IP address from each specified subnet.



33
34
35
# File 'ec2/cfn_transit_gateway_attachment_props.rb', line 33

def subnet_ids
  @subnet_ids
end

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

The tags for the attachment.



53
54
55
# File 'ec2/cfn_transit_gateway_attachment_props.rb', line 53

def tags
  @tags
end

#transit_gateway_idString, AWSCDK::Interfaces::AWSEC2::ITransitGatewayRef (readonly)

The ID of the transit gateway.



38
39
40
# File 'ec2/cfn_transit_gateway_attachment_props.rb', line 38

def transit_gateway_id
  @transit_gateway_id
end

#vpc_idString, AWSCDK::Interfaces::AWSEC2::IVPCRef (readonly)

The ID of the VPC.



43
44
45
# File 'ec2/cfn_transit_gateway_attachment_props.rb', line 43

def vpc_id
  @vpc_id
end

Class Method Details

.jsii_propertiesObject



55
56
57
58
59
60
61
62
63
# File 'ec2/cfn_transit_gateway_attachment_props.rb', line 55

def self.jsii_properties
  {
    :subnet_ids => "subnetIds",
    :transit_gateway_id => "transitGatewayId",
    :vpc_id => "vpcId",
    :options => "options",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



65
66
67
68
69
70
71
72
73
74
75
# File 'ec2/cfn_transit_gateway_attachment_props.rb', line 65

def to_jsii
  result = {}
  result.merge!({
    "subnetIds" => @subnet_ids,
    "transitGatewayId" => @transit_gateway_id,
    "vpcId" => @vpc_id,
    "options" => @options,
    "tags" => @tags,
  })
  result.compact
end