Class: AWSCDK::ElasticLoadBalancingv2::TargetGroupBase

Inherits:
Constructs::Construct
  • Object
show all
Includes:
ITargetGroup
Defined in:
elastic_load_balancingv2/target_group_base.rb

Overview

Define the target of a load balancer.

Direct Known Subclasses

ApplicationTargetGroup, NetworkTargetGroup

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scope, id, base_props, additional_props) ⇒ TargetGroupBase

Returns a new instance of TargetGroupBase.

Parameters:



13
14
15
16
17
18
19
20
# File 'elastic_load_balancingv2/target_group_base.rb', line 13

def initialize(scope, id, base_props, additional_props)
  base_props = base_props.is_a?(Hash) ? ::AWSCDK::ElasticLoadBalancingv2::BaseTargetGroupProps.new(**base_props.transform_keys(&:to_sym)) : base_props
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope")
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  Jsii::Type.check_type(base_props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5CYXNlVGFyZ2V0R3JvdXBQcm9wcyJ9")), "baseProps")
  Jsii::Type.check_type(additional_props, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "additionalProps")
  Jsii::Object.instance_method(:initialize).bind(self).call(scope, id, base_props, additional_props)
end

Class Method Details

.jsii_overridable_methodsObject



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'elastic_load_balancingv2/target_group_base.rb', line 22

def self.jsii_overridable_methods
  {
    :node => { kind: :property, name: "node", is_optional: false },
    :default_port => { kind: :property, name: "defaultPort", is_optional: false },
    :env => { kind: :property, name: "env", is_optional: false },
    :first_load_balancer_full_name => { kind: :property, name: "firstLoadBalancerFullName", is_optional: false },
    :load_balancer_arns => { kind: :property, name: "loadBalancerArns", is_optional: false },
    :load_balancer_attached => { kind: :property, name: "loadBalancerAttached", is_optional: false },
    :load_balancer_attached_dependencies => { kind: :property, name: "loadBalancerAttachedDependencies", is_optional: false },
    :target_group_arn => { kind: :property, name: "targetGroupArn", is_optional: false },
    :target_group_full_name => { kind: :property, name: "targetGroupFullName", is_optional: false },
    :target_group_load_balancer_arns => { kind: :property, name: "targetGroupLoadBalancerArns", is_optional: false },
    :target_group_name => { kind: :property, name: "targetGroupName", is_optional: false },
    :target_group_ref => { kind: :property, name: "targetGroupRef", is_optional: false },
    :health_check => { kind: :property, name: "healthCheck", is_optional: false },
    :target_type => { kind: :property, name: "targetType", is_optional: true },
    :to_string => { kind: :method, name: "toString", is_optional: false },
    :with => { kind: :method, name: "with", is_optional: false },
    :add_load_balancer_target => { kind: :method, name: "addLoadBalancerTarget", is_optional: false },
    :configure_health_check => { kind: :method, name: "configureHealthCheck", is_optional: false },
    :set_attribute => { kind: :method, name: "setAttribute", is_optional: false },
    :validate_health_check => { kind: :method, name: "validateHealthCheck", is_optional: false },
    :validate_target_group => { kind: :method, name: "validateTargetGroup", is_optional: false },
  }
end

Instance Method Details

#add_load_balancer_target(props) ⇒ void

This method returns an undefined value.

Register the given load balancing target as part of this group.



189
190
191
192
193
# File 'elastic_load_balancingv2/target_group_base.rb', line 189

def add_load_balancer_target(props)
  props = props.is_a?(Hash) ? ::AWSCDK::ElasticLoadBalancingv2::LoadBalancerTargetProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5Mb2FkQmFsYW5jZXJUYXJnZXRQcm9wcyJ9")), "props")
  jsii_call_method("addLoadBalancerTarget", [props])
end

#configure_health_check(health_check) ⇒ void

This method returns an undefined value.

Set/replace the target group's health check.

Parameters:



199
200
201
202
203
# File 'elastic_load_balancingv2/target_group_base.rb', line 199

def configure_health_check(health_check)
  health_check = health_check.is_a?(Hash) ? ::AWSCDK::ElasticLoadBalancingv2::HealthCheck.new(**health_check.transform_keys(&:to_sym)) : health_check
  Jsii::Type.check_type(health_check, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5IZWFsdGhDaGVjayJ9")), "healthCheck")
  jsii_call_method("configureHealthCheck", [health_check])
end

#default_portNumeric

Default port configured for members of this target group.

Returns:

  • (Numeric)


58
59
60
# File 'elastic_load_balancingv2/target_group_base.rb', line 58

def default_port()
  jsii_get_property("defaultPort")
end

#envAWSCDK::Interfaces::ResourceEnvironment

The environment this resource belongs to.



65
66
67
# File 'elastic_load_balancingv2/target_group_base.rb', line 65

def env()
  jsii_get_property("env")
end

#first_load_balancer_full_nameString

Full name of first load balancer.

This identifier is emitted as a dimensions of the metrics of this target group.

Example value: app/my-load-balancer/123456789

Returns:

  • (String)


77
78
79
# File 'elastic_load_balancingv2/target_group_base.rb', line 77

def first_load_balancer_full_name()
  jsii_get_property("firstLoadBalancerFullName")
end

#health_checkAWSCDK::ElasticLoadBalancingv2::HealthCheck

Health check for the members of this target group.



140
141
142
# File 'elastic_load_balancingv2/target_group_base.rb', line 140

def health_check()
  jsii_get_property("healthCheck")
end

#health_check=(value) ⇒ Object



144
145
146
147
148
# File 'elastic_load_balancingv2/target_group_base.rb', line 144

def health_check=(value)
  value = value.is_a?(Hash) ? ::AWSCDK::ElasticLoadBalancingv2::HealthCheck.new(**value.transform_keys(&:to_sym)) : value
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5IZWFsdGhDaGVjayJ9")), "healthCheck")
  jsii_set_property("healthCheck", value)
end

#load_balancer_arnsString

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

Returns:

  • (String)


84
85
86
# File 'elastic_load_balancingv2/target_group_base.rb', line 84

def load_balancer_arns()
  jsii_get_property("loadBalancerArns")
end

#load_balancer_attachedConstructs::IDependable

List of constructs that need to be depended on to ensure the TargetGroup is associated to a load balancer.

Returns:

  • (Constructs::IDependable)


91
92
93
# File 'elastic_load_balancingv2/target_group_base.rb', line 91

def load_balancer_attached()
  jsii_get_property("loadBalancerAttached")
end

#load_balancer_attached_dependenciesConstructs::DependencyGroup

Configurable dependable with all resources that lead to load balancer attachment.

Returns:

  • (Constructs::DependencyGroup)


98
99
100
# File 'elastic_load_balancingv2/target_group_base.rb', line 98

def load_balancer_attached_dependencies()
  jsii_get_property("loadBalancerAttachedDependencies")
end

#nodeConstructs::Node

The tree node.

Returns:

  • (Constructs::Node)


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

def node()
  jsii_get_property("node")
end

#set_attribute(key, value = nil) ⇒ void

This method returns an undefined value.

Set a non-standard attribute on the target group.



211
212
213
214
215
# File 'elastic_load_balancingv2/target_group_base.rb', line 211

def set_attribute(key, value = nil)
  Jsii::Type.check_type(key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key")
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value") unless value.nil?
  jsii_call_method("setAttribute", [key, value])
end

#target_group_arnString

The ARN of the target group.

Returns:

  • (String)


105
106
107
# File 'elastic_load_balancingv2/target_group_base.rb', line 105

def target_group_arn()
  jsii_get_property("targetGroupArn")
end

#target_group_full_nameString

The full name of the target group.

Returns:

  • (String)


112
113
114
# File 'elastic_load_balancingv2/target_group_base.rb', line 112

def target_group_full_name()
  jsii_get_property("targetGroupFullName")
end

#target_group_load_balancer_arnsArray<String>

ARNs of load balancers load balancing to this TargetGroup.

Returns:

  • (Array<String>)


119
120
121
# File 'elastic_load_balancingv2/target_group_base.rb', line 119

def target_group_load_balancer_arns()
  jsii_get_property("targetGroupLoadBalancerArns")
end

#target_group_nameString

The name of the target group.

Returns:

  • (String)


126
127
128
# File 'elastic_load_balancingv2/target_group_base.rb', line 126

def target_group_name()
  jsii_get_property("targetGroupName")
end

#target_group_refAWSCDK::Interfaces::AWSElasticloadbalancingv2::TargetGroupReference

A reference to this target group.



133
134
135
# File 'elastic_load_balancingv2/target_group_base.rb', line 133

def target_group_ref()
  jsii_get_property("targetGroupRef")
end

#target_typeAWSCDK::ElasticLoadBalancingv2::TargetType?

The types of the directly registered members of this target group.



153
154
155
# File 'elastic_load_balancingv2/target_group_base.rb', line 153

def target_type()
  jsii_get_property("targetType")
end

#target_type=(value) ⇒ Object



157
158
159
160
# File 'elastic_load_balancingv2/target_group_base.rb', line 157

def target_type=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5UYXJnZXRUeXBlIn0=")), "targetType") unless value.nil?
  jsii_set_property("targetType", value)
end

#to_stringString

Returns a string representation of this construct.

Returns:

  • (String)


165
166
167
# File 'elastic_load_balancingv2/target_group_base.rb', line 165

def to_string()
  jsii_call_method("toString", [])
end

#validate_health_checkArray<String>

Returns:

  • (Array<String>)


218
219
220
# File 'elastic_load_balancingv2/target_group_base.rb', line 218

def validate_health_check()
  jsii_call_method("validateHealthCheck", [])
end

#validate_target_groupArray<String>

Returns:

  • (Array<String>)


223
224
225
# File 'elastic_load_balancingv2/target_group_base.rb', line 223

def validate_target_group()
  jsii_call_method("validateTargetGroup", [])
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. Use multiple with() calls if subsequent mixins should apply to added constructs.

Parameters:

  • mixins (Array<Constructs::IMixin>)

    The mixins to apply.

Returns:

  • (Constructs::IConstruct)

    This construct for chaining



178
179
180
181
182
183
# File 'elastic_load_balancingv2/target_group_base.rb', line 178

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