Module: AWSCDK::EC2::ISubnet
- Includes:
- IResource, Interfaces::AWSEC2::ISubnetRef
- Included in:
- IPrivateSubnet, IPublicSubnet, Subnet
- Defined in:
- ec2/i_subnet.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#apply_removal_policy(policy) ⇒ void
Apply the given removal policy to this resource.
-
#associate_network_acl(id, acl) ⇒ void
Associate a Network ACL with this subnet.
-
#availability_zone ⇒ String
The Availability Zone the subnet is located in.
-
#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.
-
#ipv4_cidr_block ⇒ String
The IPv4 CIDR block for this subnet.
-
#node ⇒ Constructs::Node
The tree node.
-
#route_table ⇒ AWSCDK::EC2::IRouteTable
The route table for this subnet.
-
#stack ⇒ AWSCDK::Stack
The stack in which this resource is defined.
-
#subnet_id ⇒ String
The subnetId for this particular subnet.
-
#subnet_ref ⇒ AWSCDK::Interfaces::AWSEC2::SubnetReference
A reference to a Subnet resource.
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Class Method Details
.jsii_overridable_methods ⇒ Object
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'ec2/i_subnet.rb', line 121 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 }, :subnet_ref => { kind: :property, name: "subnetRef", is_optional: false }, :availability_zone => { kind: :property, name: "availabilityZone", is_optional: false }, :internet_connectivity_established => { kind: :property, name: "internetConnectivityEstablished", is_optional: false }, :ipv4_cidr_block => { kind: :property, name: "ipv4CidrBlock", is_optional: false }, :route_table => { kind: :property, name: "routeTable", is_optional: false }, :subnet_id => { kind: :property, name: "subnetId", is_optional: false }, :with => { kind: :method, name: "with", is_optional: false }, :apply_removal_policy => { kind: :method, name: "applyRemovalPolicy", is_optional: false }, :associate_network_acl => { kind: :method, name: "associateNetworkAcl", is_optional: false }, } end |
Instance Method Details
#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).
105 106 107 108 |
# File 'ec2/i_subnet.rb', line 105 def apply_removal_policy(policy) Jsii::Type.check_type(policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "policy") jsii_call_method("applyRemovalPolicy", [policy]) end |
#associate_network_acl(id, acl) ⇒ void
This method returns an undefined value.
Associate a Network ACL with this subnet.
115 116 117 118 119 |
# File 'ec2/i_subnet.rb', line 115 def associate_network_acl(id, acl) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Type.check_type(acl, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklOZXR3b3JrQWNsIn0=")), "acl") jsii_call_method("associateNetworkAcl", [id, acl]) end |
#availability_zone ⇒ String
The Availability Zone the subnet is located in.
47 48 49 |
# File 'ec2/i_subnet.rb', line 47 def availability_zone() jsii_get_property("availabilityZone") 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/i_subnet.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/i_subnet.rb', line 54 def internet_connectivity_established() jsii_get_property("internetConnectivityEstablished") end |
#ipv4_cidr_block ⇒ String
The IPv4 CIDR block for this subnet.
61 62 63 |
# File 'ec2/i_subnet.rb', line 61 def ipv4_cidr_block() jsii_get_property("ipv4CidrBlock") end |
#node ⇒ Constructs::Node
The tree node.
11 12 13 |
# File 'ec2/i_subnet.rb', line 11 def node() jsii_get_property("node") end |
#route_table ⇒ AWSCDK::EC2::IRouteTable
The route table for this subnet.
68 69 70 |
# File 'ec2/i_subnet.rb', line 68 def route_table() jsii_get_property("routeTable") end |
#stack ⇒ AWSCDK::Stack
The stack in which this resource is defined.
33 34 35 |
# File 'ec2/i_subnet.rb', line 33 def stack() jsii_get_property("stack") end |
#subnet_id ⇒ String
The subnetId for this particular subnet.
75 76 77 |
# File 'ec2/i_subnet.rb', line 75 def subnet_id() jsii_get_property("subnetId") end |
#subnet_ref ⇒ AWSCDK::Interfaces::AWSEC2::SubnetReference
A reference to a Subnet resource.
40 41 42 |
# File 'ec2/i_subnet.rb', line 40 def subnet_ref() jsii_get_property("subnetRef") 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.
86 87 88 89 90 91 |
# File 'ec2/i_subnet.rb', line 86 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 |