Class: AWSCDK::EC2::CfnTransitGatewayVPCAttachmentProps

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

Overview

Properties for defining a CfnTransitGatewayVpcAttachment.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(subnet_ids:, transit_gateway_id:, vpc_id:, add_subnet_ids: nil, options: nil, remove_subnet_ids: nil, tags: nil) ⇒ CfnTransitGatewayVPCAttachmentProps

Returns a new instance of CfnTransitGatewayVPCAttachmentProps.

Parameters:

  • subnet_ids (Array<String>)

    The IDs of the subnets.

  • transit_gateway_id (String, AWSCDK::Interfaces::AWSEC2::ITransitGatewayRef)

    The ID of the transit gateway.

  • vpc_id (String)

    The ID of the VPC.

  • add_subnet_ids (Array<String>, nil) (defaults to: nil)

    The IDs of one or more subnets to add.

  • options (Object, nil) (defaults to: nil)

    The VPC attachment options.

  • remove_subnet_ids (Array<String>, nil) (defaults to: nil)

    The IDs of one or more subnets to remove.

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

    The tags for the VPC attachment.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'ec2/cfn_transit_gateway_vpc_attachment_props.rb', line 16

def initialize(subnet_ids:, transit_gateway_id:, vpc_id:, add_subnet_ids: nil, options: nil, remove_subnet_ids: nil, tags: nil)
  @subnet_ids = subnet_ids
  Jsii::Type.check_type(@subnet_ids, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "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("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "vpcId")
  @add_subnet_ids = add_subnet_ids
  Jsii::Type.check_type(@add_subnet_ids, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "addSubnetIds") unless @add_subnet_ids.nil?
  @options = options
  Jsii::Type.check_type(@options, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "options") unless @options.nil?
  @remove_subnet_ids = remove_subnet_ids
  Jsii::Type.check_type(@remove_subnet_ids, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "removeSubnetIds") unless @remove_subnet_ids.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

#add_subnet_idsArray<String>? (readonly)

The IDs of one or more subnets to add.

You can specify at most one subnet per Availability Zone.



54
55
56
# File 'ec2/cfn_transit_gateway_vpc_attachment_props.rb', line 54

def add_subnet_ids
  @add_subnet_ids
end

#optionsObject? (readonly)

The VPC attachment options.



59
60
61
# File 'ec2/cfn_transit_gateway_vpc_attachment_props.rb', line 59

def options
  @options
end

#remove_subnet_idsArray<String>? (readonly)

The IDs of one or more subnets to remove.



64
65
66
# File 'ec2/cfn_transit_gateway_vpc_attachment_props.rb', line 64

def remove_subnet_ids
  @remove_subnet_ids
end

#subnet_idsArray<String> (readonly)

The IDs of the subnets.



37
38
39
# File 'ec2/cfn_transit_gateway_vpc_attachment_props.rb', line 37

def subnet_ids
  @subnet_ids
end

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

The tags for the VPC attachment.



69
70
71
# File 'ec2/cfn_transit_gateway_vpc_attachment_props.rb', line 69

def tags
  @tags
end

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

The ID of the transit gateway.



42
43
44
# File 'ec2/cfn_transit_gateway_vpc_attachment_props.rb', line 42

def transit_gateway_id
  @transit_gateway_id
end

#vpc_idString (readonly)

The ID of the VPC.



47
48
49
# File 'ec2/cfn_transit_gateway_vpc_attachment_props.rb', line 47

def vpc_id
  @vpc_id
end

Class Method Details

.jsii_propertiesObject



71
72
73
74
75
76
77
78
79
80
81
# File 'ec2/cfn_transit_gateway_vpc_attachment_props.rb', line 71

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

Instance Method Details

#to_jsiiObject



83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'ec2/cfn_transit_gateway_vpc_attachment_props.rb', line 83

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