Module: AWSCDK::EC2::IVPC
Class Method Summary collapse
Instance Method Summary collapse
-
#add_client_vpn_endpoint(id, options) ⇒ AWSCDK::EC2::ClientVpnEndpoint
Adds a new client VPN endpoint to this VPC.
-
#add_flow_log(id, options = nil) ⇒ AWSCDK::EC2::FlowLog
Adds a new Flow Log to this VPC.
-
#add_gateway_endpoint(id, options) ⇒ AWSCDK::EC2::GatewayVPCEndpoint
Adds a new gateway endpoint to this VPC.
-
#add_interface_endpoint(id, options) ⇒ AWSCDK::EC2::InterfaceVPCEndpoint
Adds a new interface endpoint to this VPC.
-
#add_vpn_connection(id, options) ⇒ AWSCDK::EC2::VpnConnection
Adds a new VPN connection to this VPC.
-
#apply_removal_policy(policy) ⇒ void
Apply the given removal policy to this resource.
-
#availability_zones ⇒ Array<String>
AZs for this VPC.
-
#enable_vpn_gateway(options) ⇒ void
Adds a VPN Gateway to this VPC.
-
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
The environment this resource belongs to.
-
#internet_connectivity_established ⇒ Constructs::IDependable
Dependable that can be depended upon to force internet connectivity established on the VPC.
-
#isolated_subnets ⇒ Array<AWSCDK::EC2::ISubnet>
List of isolated subnets in this VPC.
-
#node ⇒ Constructs::Node
The tree node.
-
#private_subnets ⇒ Array<AWSCDK::EC2::ISubnet>
List of private subnets in this VPC.
-
#public_subnets ⇒ Array<AWSCDK::EC2::ISubnet>
List of public subnets in this VPC.
-
#select_subnets(selection = nil) ⇒ AWSCDK::EC2::SelectedSubnets
Return information on the subnets appropriate for the given selection strategy.
-
#stack ⇒ AWSCDK::Stack
The stack in which this resource is defined.
-
#vpc_arn ⇒ String
ARN for this VPC.
-
#vpc_cidr_block ⇒ String
CIDR range for this VPC.
-
#vpc_id ⇒ String
Identifier for this VPC.
-
#vpc_ref ⇒ AWSCDK::Interfaces::AWSEC2::VPCReference
A reference to a VPC resource.
-
#vpn_gateway_id ⇒ String?
Identifier for the VPN gateway.
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Class Method Details
.jsii_overridable_methods ⇒ Object
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
# File 'ec2/ivpc.rb', line 221 def self.jsii_overridable_methods { :node => { kind: :property, name: "node", is_optional: false }, :env => { kind: :property, name: "env", is_optional: false }, :stack => { kind: :property, name: "stack", is_optional: false }, :vpc_ref => { kind: :property, name: "vpcRef", is_optional: false }, :availability_zones => { kind: :property, name: "availabilityZones", is_optional: false }, :internet_connectivity_established => { kind: :property, name: "internetConnectivityEstablished", is_optional: false }, :isolated_subnets => { kind: :property, name: "isolatedSubnets", is_optional: false }, :private_subnets => { kind: :property, name: "privateSubnets", is_optional: false }, :public_subnets => { kind: :property, name: "publicSubnets", is_optional: false }, :vpc_arn => { kind: :property, name: "vpcArn", is_optional: false }, :vpc_cidr_block => { kind: :property, name: "vpcCidrBlock", is_optional: false }, :vpc_id => { kind: :property, name: "vpcId", is_optional: false }, :vpn_gateway_id => { kind: :property, name: "vpnGatewayId", is_optional: true }, :with => { kind: :method, name: "with", is_optional: false }, :apply_removal_policy => { kind: :method, name: "applyRemovalPolicy", is_optional: false }, :add_client_vpn_endpoint => { kind: :method, name: "addClientVpnEndpoint", is_optional: false }, :add_flow_log => { kind: :method, name: "addFlowLog", is_optional: false }, :add_gateway_endpoint => { kind: :method, name: "addGatewayEndpoint", is_optional: false }, :add_interface_endpoint => { kind: :method, name: "addInterfaceEndpoint", is_optional: false }, :add_vpn_connection => { kind: :method, name: "addVpnConnection", is_optional: false }, :enable_vpn_gateway => { kind: :method, name: "enableVpnGateway", is_optional: false }, :select_subnets => { kind: :method, name: "selectSubnets", is_optional: false }, } end |
Instance Method Details
#add_client_vpn_endpoint(id, options) ⇒ AWSCDK::EC2::ClientVpnEndpoint
Adds a new client VPN endpoint to this VPC.
143 144 145 146 147 148 |
# File 'ec2/ivpc.rb', line 143 def add_client_vpn_endpoint(id, ) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") = .is_a?(Hash) ? ::AWSCDK::EC2::ClientVpnEndpointOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkNsaWVudFZwbkVuZHBvaW50T3B0aW9ucyJ9")), "options") jsii_call_method("addClientVpnEndpoint", [id, ]) end |
#add_flow_log(id, options = nil) ⇒ AWSCDK::EC2::FlowLog
Adds a new Flow Log to this VPC.
155 156 157 158 159 160 |
# File 'ec2/ivpc.rb', line 155 def add_flow_log(id, = nil) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") = .is_a?(Hash) ? ::AWSCDK::EC2::FlowLogOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkZsb3dMb2dPcHRpb25zIn0=")), "options") unless .nil? jsii_call_method("addFlowLog", [id, ]) end |
#add_gateway_endpoint(id, options) ⇒ AWSCDK::EC2::GatewayVPCEndpoint
Adds a new gateway endpoint to this VPC.
167 168 169 170 171 172 |
# File 'ec2/ivpc.rb', line 167 def add_gateway_endpoint(id, ) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") = .is_a?(Hash) ? ::AWSCDK::EC2::GatewayVPCEndpointOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkdhdGV3YXlWcGNFbmRwb2ludE9wdGlvbnMifQ==")), "options") jsii_call_method("addGatewayEndpoint", [id, ]) end |
#add_interface_endpoint(id, options) ⇒ AWSCDK::EC2::InterfaceVPCEndpoint
Adds a new interface endpoint to this VPC.
179 180 181 182 183 184 |
# File 'ec2/ivpc.rb', line 179 def add_interface_endpoint(id, ) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") = .is_a?(Hash) ? ::AWSCDK::EC2::InterfaceVPCEndpointOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkludGVyZmFjZVZwY0VuZHBvaW50T3B0aW9ucyJ9")), "options") jsii_call_method("addInterfaceEndpoint", [id, ]) end |
#add_vpn_connection(id, options) ⇒ AWSCDK::EC2::VpnConnection
Adds a new VPN connection to this VPC.
191 192 193 194 195 196 |
# File 'ec2/ivpc.rb', line 191 def add_vpn_connection(id, ) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") = .is_a?(Hash) ? ::AWSCDK::EC2::VpnConnectionOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLlZwbkNvbm5lY3Rpb25PcHRpb25zIn0=")), "options") jsii_call_method("addVpnConnection", [id, ]) end |
#apply_removal_policy(policy) ⇒ void
This method returns an undefined value.
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN).
133 134 135 136 |
# File 'ec2/ivpc.rb', line 133 def apply_removal_policy(policy) Jsii::Type.check_type(policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "policy") jsii_call_method("applyRemovalPolicy", [policy]) end |
#availability_zones ⇒ Array<String>
AZs for this VPC.
47 48 49 |
# File 'ec2/ivpc.rb', line 47 def availability_zones() jsii_get_property("availabilityZones") end |
#enable_vpn_gateway(options) ⇒ void
This method returns an undefined value.
Adds a VPN Gateway to this VPC.
202 203 204 205 206 |
# File 'ec2/ivpc.rb', line 202 def enable_vpn_gateway() = .is_a?(Hash) ? ::AWSCDK::EC2::EnableVpnGatewayOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLkVuYWJsZVZwbkdhdGV3YXlPcHRpb25zIn0=")), "options") jsii_call_method("enableVpnGateway", []) end |
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed in a Stack (those created by
creating new class instances like new Role(), new Bucket(), etc.), this
is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like
Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be
different than the stack they were imported into.
26 27 28 |
# File 'ec2/ivpc.rb', line 26 def env() jsii_get_property("env") end |
#internet_connectivity_established ⇒ Constructs::IDependable
Dependable that can be depended upon to force internet connectivity established on the VPC.
54 55 56 |
# File 'ec2/ivpc.rb', line 54 def internet_connectivity_established() jsii_get_property("internetConnectivityEstablished") end |
#isolated_subnets ⇒ Array<AWSCDK::EC2::ISubnet>
List of isolated subnets in this VPC.
61 62 63 |
# File 'ec2/ivpc.rb', line 61 def isolated_subnets() jsii_get_property("isolatedSubnets") end |
#node ⇒ Constructs::Node
The tree node.
11 12 13 |
# File 'ec2/ivpc.rb', line 11 def node() jsii_get_property("node") end |
#private_subnets ⇒ Array<AWSCDK::EC2::ISubnet>
List of private subnets in this VPC.
68 69 70 |
# File 'ec2/ivpc.rb', line 68 def private_subnets() jsii_get_property("privateSubnets") end |
#public_subnets ⇒ Array<AWSCDK::EC2::ISubnet>
List of public subnets in this VPC.
75 76 77 |
# File 'ec2/ivpc.rb', line 75 def public_subnets() jsii_get_property("publicSubnets") end |
#select_subnets(selection = nil) ⇒ AWSCDK::EC2::SelectedSubnets
Return information on the subnets appropriate for the given selection strategy.
Requires that at least one subnet is matched, throws a descriptive error message otherwise.
215 216 217 218 219 |
# File 'ec2/ivpc.rb', line 215 def select_subnets(selection = nil) selection = selection.is_a?(Hash) ? ::AWSCDK::EC2::SubnetSelection.new(**selection.transform_keys(&:to_sym)) : selection Jsii::Type.check_type(selection, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLlN1Ym5ldFNlbGVjdGlvbiJ9")), "selection") unless selection.nil? jsii_call_method("selectSubnets", [selection]) end |
#stack ⇒ AWSCDK::Stack
The stack in which this resource is defined.
33 34 35 |
# File 'ec2/ivpc.rb', line 33 def stack() jsii_get_property("stack") end |
#vpc_arn ⇒ String
ARN for this VPC.
82 83 84 |
# File 'ec2/ivpc.rb', line 82 def vpc_arn() jsii_get_property("vpcArn") end |
#vpc_cidr_block ⇒ String
CIDR range for this VPC.
89 90 91 |
# File 'ec2/ivpc.rb', line 89 def vpc_cidr_block() jsii_get_property("vpcCidrBlock") end |
#vpc_id ⇒ String
Identifier for this VPC.
96 97 98 |
# File 'ec2/ivpc.rb', line 96 def vpc_id() jsii_get_property("vpcId") end |
#vpc_ref ⇒ AWSCDK::Interfaces::AWSEC2::VPCReference
A reference to a VPC resource.
40 41 42 |
# File 'ec2/ivpc.rb', line 40 def vpc_ref() jsii_get_property("vpcRef") end |
#vpn_gateway_id ⇒ String?
Identifier for the VPN gateway.
103 104 105 |
# File 'ec2/ivpc.rb', line 103 def vpn_gateway_id() jsii_get_property("vpnGatewayId") end |
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited.
114 115 116 117 118 119 |
# File 'ec2/ivpc.rb', line 114 def with(*mixins) mixins.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]") end jsii_call_method("with", [*mixins]) end |