Class: AWSCDK::ElasticLoadBalancingv2::TargetGroupBase
- Inherits:
-
Constructs::Construct
- Object
- Constructs::Construct
- AWSCDK::ElasticLoadBalancingv2::TargetGroupBase
- Includes:
- ITargetGroup
- Defined in:
- elastic_load_balancingv2/target_group_base.rb
Overview
Define the target of a load balancer.
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
-
#add_load_balancer_target(props) ⇒ void
Register the given load balancing target as part of this group.
-
#configure_health_check(health_check) ⇒ void
Set/replace the target group's health check.
-
#default_port ⇒ Numeric
Default port configured for members of this target group.
-
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
The environment this resource belongs to.
-
#first_load_balancer_full_name ⇒ String
Full name of first load balancer.
-
#health_check ⇒ AWSCDK::ElasticLoadBalancingv2::HealthCheck
Health check for the members of this target group.
- #health_check=(value) ⇒ Object
-
#initialize(scope, id, base_props, additional_props) ⇒ TargetGroupBase
constructor
A new instance of TargetGroupBase.
-
#load_balancer_arns ⇒ String
A token representing a list of ARNs of the load balancers that route traffic to this target group.
-
#load_balancer_attached ⇒ Constructs::IDependable
List of constructs that need to be depended on to ensure the TargetGroup is associated to a load balancer.
-
#load_balancer_attached_dependencies ⇒ Constructs::DependencyGroup
Configurable dependable with all resources that lead to load balancer attachment.
-
#node ⇒ Constructs::Node
The tree node.
-
#set_attribute(key, value = nil) ⇒ void
Set a non-standard attribute on the target group.
-
#target_group_arn ⇒ String
The ARN of the target group.
-
#target_group_full_name ⇒ String
The full name of the target group.
-
#target_group_load_balancer_arns ⇒ Array<String>
ARNs of load balancers load balancing to this TargetGroup.
-
#target_group_name ⇒ String
The name of the target group.
-
#target_group_ref ⇒ AWSCDK::Interfaces::AWSElasticloadbalancingv2::TargetGroupReference
A reference to this target group.
-
#target_type ⇒ AWSCDK::ElasticLoadBalancingv2::TargetType?
The types of the directly registered members of this target group.
- #target_type=(value) ⇒ Object
-
#to_string ⇒ String
Returns a string representation of this construct.
- #validate_health_check ⇒ Array<String>
- #validate_target_group ⇒ Array<String>
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Constructor Details
#initialize(scope, id, base_props, additional_props) ⇒ TargetGroupBase
Returns a new instance of TargetGroupBase.
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_methods ⇒ Object
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.
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_port ⇒ Numeric
Default port configured for members of this target group.
58 59 60 |
# File 'elastic_load_balancingv2/target_group_base.rb', line 58 def default_port() jsii_get_property("defaultPort") end |
#env ⇒ AWSCDK::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_name ⇒ String
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
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_check ⇒ AWSCDK::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_arns ⇒ String
A token representing a list of ARNs of the load balancers that route traffic to this target group.
84 85 86 |
# File 'elastic_load_balancingv2/target_group_base.rb', line 84 def load_balancer_arns() jsii_get_property("loadBalancerArns") end |
#load_balancer_attached ⇒ Constructs::IDependable
List of constructs that need to be depended on to ensure the TargetGroup is associated to a load balancer.
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_dependencies ⇒ Constructs::DependencyGroup
Configurable dependable with all resources that lead to load balancer attachment.
98 99 100 |
# File 'elastic_load_balancingv2/target_group_base.rb', line 98 def load_balancer_attached_dependencies() jsii_get_property("loadBalancerAttachedDependencies") end |
#node ⇒ Constructs::Node
The tree 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_arn ⇒ String
The ARN of the target group.
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_name ⇒ String
The full name of the target group.
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_arns ⇒ Array<String>
ARNs of load balancers load balancing to this TargetGroup.
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_name ⇒ String
The name of the target group.
126 127 128 |
# File 'elastic_load_balancingv2/target_group_base.rb', line 126 def target_group_name() jsii_get_property("targetGroupName") end |
#target_group_ref ⇒ AWSCDK::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_type ⇒ AWSCDK::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_string ⇒ String
Returns a string representation of this construct.
165 166 167 |
# File 'elastic_load_balancingv2/target_group_base.rb', line 165 def to_string() jsii_call_method("toString", []) end |
#validate_health_check ⇒ 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_group ⇒ 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.
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 |