Module: AWSCDK::ElasticLoadBalancingv2::INetworkLoadBalancer

Includes:
AWSCDK::EC2::IConnectable, AWSCDK::EC2::IVPCEndpointServiceLoadBalancer, ILoadBalancerV2
Included in:
NetworkLoadBalancer
Defined in:
elastic_load_balancingv2/i_network_load_balancer.rb

Overview

A network load balancer.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.jsii_overridable_methodsObject



158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# File 'elastic_load_balancingv2/i_network_load_balancer.rb', line 158

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 },
    :load_balancer_ref => { kind: :property, name: "loadBalancerRef", is_optional: false },
    :load_balancer_canonical_hosted_zone_id => { kind: :property, name: "loadBalancerCanonicalHostedZoneId", is_optional: false },
    :load_balancer_dns_name => { kind: :property, name: "loadBalancerDnsName", is_optional: false },
    :load_balancer_arn => { kind: :property, name: "loadBalancerArn", is_optional: false },
    :connections => { kind: :property, name: "connections", is_optional: false },
    :metrics => { kind: :property, name: "metrics", is_optional: false },
    :enforce_security_group_inbound_rules_on_private_link_traffic => { kind: :property, name: "enforceSecurityGroupInboundRulesOnPrivateLinkTraffic", is_optional: true },
    :ip_address_type => { kind: :property, name: "ipAddressType", is_optional: true },
    :security_groups => { kind: :property, name: "securityGroups", is_optional: true },
    :vpc => { kind: :property, name: "vpc", is_optional: true },
    :with => { kind: :method, name: "with", is_optional: false },
    :apply_removal_policy => { kind: :method, name: "applyRemovalPolicy", is_optional: false },
    :add_listener => { kind: :method, name: "addListener", is_optional: false },
  }
end

Instance Method Details

#add_listener(id, props) ⇒ AWSCDK::ElasticLoadBalancingv2::NetworkListener

Add a listener to this load balancer.

Parameters:

Returns:



151
152
153
154
155
156
# File 'elastic_load_balancingv2/i_network_load_balancer.rb', line 151

def add_listener(id, props)
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  props = props.is_a?(Hash) ? ::AWSCDK::ElasticLoadBalancingv2::BaseNetworkListenerProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5CYXNlTmV0d29ya0xpc3RlbmVyUHJvcHMifQ==")), "props")
  jsii_call_method("addListener", [id, props])
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).

Parameters:



141
142
143
144
# File 'elastic_load_balancingv2/i_network_load_balancer.rb', line 141

def apply_removal_policy(policy)
  Jsii::Type.check_type(policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "policy")
  jsii_call_method("applyRemovalPolicy", [policy])
end

#connectionsAWSCDK::EC2::Connections

The network connections associated with this resource.



74
75
76
# File 'elastic_load_balancingv2/i_network_load_balancer.rb', line 74

def connections()
  jsii_get_property("connections")
end
Note:

Default: on

Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through AWS PrivateLink.

Returns:

  • (String, nil)


89
90
91
# File 'elastic_load_balancingv2/i_network_load_balancer.rb', line 89

def enforce_security_group_inbound_rules_on_private_link_traffic()
  jsii_get_property("enforceSecurityGroupInboundRulesOnPrivateLinkTraffic")
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.



28
29
30
# File 'elastic_load_balancingv2/i_network_load_balancer.rb', line 28

def env()
  jsii_get_property("env")
end

#ip_address_typeAWSCDK::ElasticLoadBalancingv2::IPAddressType?

Note:

Default: IpAddressType.IPV4

The type of IP addresses to use.



97
98
99
# File 'elastic_load_balancingv2/i_network_load_balancer.rb', line 97

def ip_address_type()
  jsii_get_property("ipAddressType")
end

#load_balancer_arnString

The ARN of the load balancer that hosts the VPC Endpoint Service.

Returns:

  • (String)


67
68
69
# File 'elastic_load_balancingv2/i_network_load_balancer.rb', line 67

def load_balancer_arn()
  jsii_get_property("loadBalancerArn")
end

#load_balancer_canonical_hosted_zone_idString

The canonical hosted zone ID of this load balancer.

Example value: Z2P70J7EXAMPLE

Returns:

  • (String)


51
52
53
# File 'elastic_load_balancingv2/i_network_load_balancer.rb', line 51

def load_balancer_canonical_hosted_zone_id()
  jsii_get_property("loadBalancerCanonicalHostedZoneId")
end

#load_balancer_dns_nameString

The DNS name of this load balancer.

Example value: my-load-balancer-424835706.us-west-2.elb.amazonaws.com

Returns:

  • (String)


60
61
62
# File 'elastic_load_balancingv2/i_network_load_balancer.rb', line 60

def load_balancer_dns_name()
  jsii_get_property("loadBalancerDnsName")
end

#load_balancer_refAWSCDK::Interfaces::AWSElasticloadbalancingv2::LoadBalancerReference

A reference to a LoadBalancer resource.



42
43
44
# File 'elastic_load_balancingv2/i_network_load_balancer.rb', line 42

def load_balancer_ref()
  jsii_get_property("loadBalancerRef")
end

#metricsAWSCDK::ElasticLoadBalancingv2::INetworkLoadBalancerMetrics

All metrics available for this load balancer.



81
82
83
# File 'elastic_load_balancingv2/i_network_load_balancer.rb', line 81

def metrics()
  jsii_get_property("metrics")
end

#nodeConstructs::Node

The tree node.

Returns:

  • (Constructs::Node)


13
14
15
# File 'elastic_load_balancingv2/i_network_load_balancer.rb', line 13

def node()
  jsii_get_property("node")
end

#security_groupsArray<String>?

Security groups associated with this load balancer.

Returns:

  • (Array<String>, nil)


104
105
106
# File 'elastic_load_balancingv2/i_network_load_balancer.rb', line 104

def security_groups()
  jsii_get_property("securityGroups")
end

#stackAWSCDK::Stack

The stack in which this resource is defined.

Returns:



35
36
37
# File 'elastic_load_balancingv2/i_network_load_balancer.rb', line 35

def stack()
  jsii_get_property("stack")
end

#vpcAWSCDK::EC2::IVPC?

The VPC this load balancer has been created in (if available).

Returns:



111
112
113
# File 'elastic_load_balancingv2/i_network_load_balancer.rb', line 111

def vpc()
  jsii_get_property("vpc")
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



122
123
124
125
126
127
# File 'elastic_load_balancingv2/i_network_load_balancer.rb', line 122

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