Module: AWSCDK::EC2::IPublicSubnet

Includes:
ISubnet
Included in:
PublicSubnet
Defined in:
ec2/i_public_subnet.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.jsii_overridable_methodsObject



120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# File 'ec2/i_public_subnet.rb', line 120

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).

Parameters:



104
105
106
107
# File 'ec2/i_public_subnet.rb', line 104

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.

Parameters:



114
115
116
117
118
# File 'ec2/i_public_subnet.rb', line 114

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_zoneString

The Availability Zone the subnet is located in.

Returns:

  • (String)


46
47
48
# File 'ec2/i_public_subnet.rb', line 46

def availability_zone()
  jsii_get_property("availabilityZone")
end

#envAWSCDK::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.



25
26
27
# File 'ec2/i_public_subnet.rb', line 25

def env()
  jsii_get_property("env")
end

#internet_connectivity_establishedConstructs::IDependable

Dependable that can be depended upon to force internet connectivity established on the VPC.

Returns:

  • (Constructs::IDependable)


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

def internet_connectivity_established()
  jsii_get_property("internetConnectivityEstablished")
end

#ipv4_cidr_blockString

The IPv4 CIDR block for this subnet.

Returns:

  • (String)


60
61
62
# File 'ec2/i_public_subnet.rb', line 60

def ipv4_cidr_block()
  jsii_get_property("ipv4CidrBlock")
end

#nodeConstructs::Node

The tree node.

Returns:

  • (Constructs::Node)


10
11
12
# File 'ec2/i_public_subnet.rb', line 10

def node()
  jsii_get_property("node")
end

#route_tableAWSCDK::EC2::IRouteTable

The route table for this subnet.



67
68
69
# File 'ec2/i_public_subnet.rb', line 67

def route_table()
  jsii_get_property("routeTable")
end

#stackAWSCDK::Stack

The stack in which this resource is defined.

Returns:



32
33
34
# File 'ec2/i_public_subnet.rb', line 32

def stack()
  jsii_get_property("stack")
end

#subnet_idString

The subnetId for this particular subnet.

Returns:

  • (String)


74
75
76
# File 'ec2/i_public_subnet.rb', line 74

def subnet_id()
  jsii_get_property("subnetId")
end

#subnet_refAWSCDK::Interfaces::AWSEC2::SubnetReference

A reference to a Subnet resource.



39
40
41
# File 'ec2/i_public_subnet.rb', line 39

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.

Parameters:

  • mixins (Array<Constructs::IMixin>)

    The mixins to apply.

Returns:

  • (Constructs::IConstruct)

    This construct for chaining



85
86
87
88
89
90
# File 'ec2/i_public_subnet.rb', line 85

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