Class: AWSCDK::ElasticLoadBalancingv2::BaseTargetGroupProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ElasticLoadBalancingv2::BaseTargetGroupProps
- Defined in:
- elastic_load_balancingv2/base_target_group_props.rb
Overview
Basic properties of both Application and Network Target Groups.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#cross_zone_enabled ⇒ Boolean?
readonly
Indicates whether cross zone load balancing is enabled.
-
#deregistration_delay ⇒ AWSCDK::Duration?
readonly
The amount of time for Elastic Load Balancing to wait before deregistering a target.
-
#health_check ⇒ AWSCDK::ElasticLoadBalancingv2::HealthCheck?
readonly
Health check configuration.
-
#ip_address_type ⇒ AWSCDK::ElasticLoadBalancingv2::TargetGroupIPAddressType?
readonly
The type of IP addresses of the targets registered with the target group.
-
#target_group_health ⇒ AWSCDK::ElasticLoadBalancingv2::TargetGroupHealth?
readonly
Configuring target group health.
-
#target_group_name ⇒ String?
readonly
The name of the target group.
-
#target_type ⇒ AWSCDK::ElasticLoadBalancingv2::TargetType?
readonly
The type of targets registered to this TargetGroup, either IP or Instance.
-
#vpc ⇒ AWSCDK::EC2::IVPC?
readonly
The virtual private cloud (VPC).
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cross_zone_enabled: nil, deregistration_delay: nil, health_check: nil, ip_address_type: nil, target_group_health: nil, target_group_name: nil, target_type: nil, vpc: nil) ⇒ BaseTargetGroupProps
constructor
A new instance of BaseTargetGroupProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(cross_zone_enabled: nil, deregistration_delay: nil, health_check: nil, ip_address_type: nil, target_group_health: nil, target_group_name: nil, target_type: nil, vpc: nil) ⇒ BaseTargetGroupProps
Returns a new instance of BaseTargetGroupProps.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'elastic_load_balancingv2/base_target_group_props.rb', line 15 def initialize(cross_zone_enabled: nil, deregistration_delay: nil, health_check: nil, ip_address_type: nil, target_group_health: nil, target_group_name: nil, target_type: nil, vpc: nil) @cross_zone_enabled = cross_zone_enabled Jsii::Type.check_type(@cross_zone_enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "crossZoneEnabled") unless @cross_zone_enabled.nil? @deregistration_delay = deregistration_delay Jsii::Type.check_type(@deregistration_delay, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "deregistrationDelay") unless @deregistration_delay.nil? @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") unless @health_check.nil? @ip_address_type = ip_address_type Jsii::Type.check_type(@ip_address_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5UYXJnZXRHcm91cElwQWRkcmVzc1R5cGUifQ==")), "ipAddressType") unless @ip_address_type.nil? @target_group_health = target_group_health.is_a?(Hash) ? ::AWSCDK::ElasticLoadBalancingv2::TargetGroupHealth.new(**target_group_health.transform_keys(&:to_sym)) : target_group_health Jsii::Type.check_type(@target_group_health, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5UYXJnZXRHcm91cEhlYWx0aCJ9")), "targetGroupHealth") unless @target_group_health.nil? @target_group_name = target_group_name Jsii::Type.check_type(@target_group_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "targetGroupName") unless @target_group_name.nil? @target_type = target_type Jsii::Type.check_type(@target_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWxhc3RpY2xvYWRiYWxhbmNpbmd2Mi5UYXJnZXRUeXBlIn0=")), "targetType") unless @target_type.nil? @vpc = vpc Jsii::Type.check_type(@vpc, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklWcGMifQ==")), "vpc") unless @vpc.nil? end |
Instance Attribute Details
#cross_zone_enabled ⇒ Boolean? (readonly)
Default: - use load balancer configuration
Indicates whether cross zone load balancing is enabled.
39 40 41 |
# File 'elastic_load_balancingv2/base_target_group_props.rb', line 39 def cross_zone_enabled @cross_zone_enabled end |
#deregistration_delay ⇒ AWSCDK::Duration? (readonly)
Default: 300
The amount of time for Elastic Load Balancing to wait before deregistering a target.
The range is 0-3600 seconds.
46 47 48 |
# File 'elastic_load_balancingv2/base_target_group_props.rb', line 46 def deregistration_delay @deregistration_delay end |
#health_check ⇒ AWSCDK::ElasticLoadBalancingv2::HealthCheck? (readonly)
Default: - The default value for each property in this configuration varies depending on the target.
Health check configuration.
52 53 54 |
# File 'elastic_load_balancingv2/base_target_group_props.rb', line 52 def health_check @health_check end |
#ip_address_type ⇒ AWSCDK::ElasticLoadBalancingv2::TargetGroupIPAddressType? (readonly)
Default: undefined - ELB defaults to IPv4
The type of IP addresses of the targets registered with the target group.
57 58 59 |
# File 'elastic_load_balancingv2/base_target_group_props.rb', line 57 def ip_address_type @ip_address_type end |
#target_group_health ⇒ AWSCDK::ElasticLoadBalancingv2::TargetGroupHealth? (readonly)
Default: - use default configuration
Configuring target group health.
63 64 65 |
# File 'elastic_load_balancingv2/base_target_group_props.rb', line 63 def target_group_health @target_group_health end |
#target_group_name ⇒ String? (readonly)
Default: - Automatically generated.
The name of the target group.
This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, and must not begin or end with a hyphen.
72 73 74 |
# File 'elastic_load_balancingv2/base_target_group_props.rb', line 72 def target_group_name @target_group_name end |
#target_type ⇒ AWSCDK::ElasticLoadBalancingv2::TargetType? (readonly)
Default: - Determined automatically.
The type of targets registered to this TargetGroup, either IP or Instance.
All targets registered into the group must be of this type. If you register targets to the TargetGroup in the CDK app, the TargetType is determined automatically.
81 82 83 |
# File 'elastic_load_balancingv2/base_target_group_props.rb', line 81 def target_type @target_type end |
#vpc ⇒ AWSCDK::EC2::IVPC? (readonly)
Default: - undefined
The virtual private cloud (VPC).
only if TargetType is Ip or InstanceId
88 89 90 |
# File 'elastic_load_balancingv2/base_target_group_props.rb', line 88 def vpc @vpc end |
Class Method Details
.jsii_properties ⇒ Object
90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'elastic_load_balancingv2/base_target_group_props.rb', line 90 def self.jsii_properties { :cross_zone_enabled => "crossZoneEnabled", :deregistration_delay => "deregistrationDelay", :health_check => "healthCheck", :ip_address_type => "ipAddressType", :target_group_health => "targetGroupHealth", :target_group_name => "targetGroupName", :target_type => "targetType", :vpc => "vpc", } end |
Instance Method Details
#to_jsii ⇒ Object
103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'elastic_load_balancingv2/base_target_group_props.rb', line 103 def to_jsii result = {} result.merge!({ "crossZoneEnabled" => @cross_zone_enabled, "deregistrationDelay" => @deregistration_delay, "healthCheck" => @health_check, "ipAddressType" => @ip_address_type, "targetGroupHealth" => @target_group_health, "targetGroupName" => @target_group_name, "targetType" => @target_type, "vpc" => @vpc, }) result.compact end |