Module: AWSCDK::ElasticLoadBalancingv2::IApplicationTargetGroup

Includes:
ITargetGroup
Included in:
ApplicationTargetGroup
Defined in:
elastic_load_balancingv2/i_application_target_group.rb

Overview

A Target Group for Application Load Balancers.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.jsii_overridable_methodsObject



123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# File 'elastic_load_balancingv2/i_application_target_group.rb', line 123

def self.jsii_overridable_methods
  {
    :node => { kind: :property, name: "node", is_optional: false },
    :env => { kind: :property, name: "env", is_optional: false },
    :target_group_ref => { kind: :property, name: "targetGroupRef", is_optional: false },
    :load_balancer_arns => { kind: :property, name: "loadBalancerArns", is_optional: false },
    :load_balancer_attached => { kind: :property, name: "loadBalancerAttached", is_optional: false },
    :target_group_arn => { kind: :property, name: "targetGroupArn", is_optional: false },
    :target_group_name => { kind: :property, name: "targetGroupName", is_optional: false },
    :metrics => { kind: :property, name: "metrics", is_optional: false },
    :with => { kind: :method, name: "with", is_optional: false },
    :add_target => { kind: :method, name: "addTarget", is_optional: false },
    :register_connectable => { kind: :method, name: "registerConnectable", is_optional: false },
    :register_listener => { kind: :method, name: "registerListener", is_optional: false },
  }
end

Instance Method Details

#add_target(*targets) ⇒ void

This method returns an undefined value.

Add a load balancing target to this target group.



90
91
92
93
94
95
# File 'elastic_load_balancingv2/i_application_target_group.rb', line 90

def add_target(*targets)
  targets.each_with_index do |item, index|
    Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5JQXBwbGljYXRpb25Mb2FkQmFsYW5jZXJUYXJnZXQifQ==")), "targets[#{index}]")
  end
  jsii_call_method("addTarget", [*targets])
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.



26
27
28
# File 'elastic_load_balancingv2/i_application_target_group.rb', line 26

def env()
  jsii_get_property("env")
end

#load_balancer_arnsString

A token representing a list of ARNs of the load balancers that route traffic to this target group.

Returns:

  • (String)


40
41
42
# File 'elastic_load_balancingv2/i_application_target_group.rb', line 40

def load_balancer_arns()
  jsii_get_property("loadBalancerArns")
end

#load_balancer_attachedConstructs::IDependable

Return an object to depend on the listeners added to this target group.

Returns:

  • (Constructs::IDependable)


47
48
49
# File 'elastic_load_balancingv2/i_application_target_group.rb', line 47

def load_balancer_attached()
  jsii_get_property("loadBalancerAttached")
end

#metricsAWSCDK::ElasticLoadBalancingv2::IApplicationTargetGroupMetrics

All metrics available for this target group.



68
69
70
# File 'elastic_load_balancingv2/i_application_target_group.rb', line 68

def metrics()
  jsii_get_property("metrics")
end

#nodeConstructs::Node

The tree node.

Returns:

  • (Constructs::Node)


11
12
13
# File 'elastic_load_balancingv2/i_application_target_group.rb', line 11

def node()
  jsii_get_property("node")
end

#register_connectable(connectable, port_range = nil) ⇒ void

This method returns an undefined value.

Register a connectable as a member of this target group.

Don't call this directly. It will be called by load balancing targets.

Parameters:



104
105
106
107
108
# File 'elastic_load_balancingv2/i_application_target_group.rb', line 104

def register_connectable(connectable, port_range = nil)
  Jsii::Type.check_type(connectable, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklDb25uZWN0YWJsZSJ9")), "connectable")
  Jsii::Type.check_type(port_range, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLlBvcnQifQ==")), "portRange") unless port_range.nil?
  jsii_call_method("registerConnectable", [connectable, port_range])
end

#register_listener(listener, associating_construct = nil) ⇒ void

This method returns an undefined value.

Register a listener that is load balancing to this target group.

Don't call this directly. It will be called by listeners.

Parameters:



117
118
119
120
121
# File 'elastic_load_balancingv2/i_application_target_group.rb', line 117

def register_listener(listener, associating_construct = nil)
  Jsii::Type.check_type(listener, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5JQXBwbGljYXRpb25MaXN0ZW5lciJ9")), "listener")
  Jsii::Type.check_type(associating_construct, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklDb25zdHJ1Y3QifQ==")), "associatingConstruct") unless associating_construct.nil?
  jsii_call_method("registerListener", [listener, associating_construct])
end

#target_group_arnString

ARN of the target group.

Returns:

  • (String)


54
55
56
# File 'elastic_load_balancingv2/i_application_target_group.rb', line 54

def target_group_arn()
  jsii_get_property("targetGroupArn")
end

#target_group_nameString

The name of the target group.

Returns:

  • (String)


61
62
63
# File 'elastic_load_balancingv2/i_application_target_group.rb', line 61

def target_group_name()
  jsii_get_property("targetGroupName")
end

#target_group_refAWSCDK::Interfaces::AWSElasticloadbalancingv2::TargetGroupReference

A reference to a TargetGroup resource.



33
34
35
# File 'elastic_load_balancingv2/i_application_target_group.rb', line 33

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



79
80
81
82
83
84
# File 'elastic_load_balancingv2/i_application_target_group.rb', line 79

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