Class: AWSCDK::ElasticLoadBalancingv2::BaseTargetGroupProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
elastic_load_balancingv2/base_target_group_props.rb

Overview

Basic properties of both Application and Network Target Groups.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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.

Parameters:



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_enabledBoolean? (readonly)

Note:

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_delayAWSCDK::Duration? (readonly)

Note:

Default: 300

The amount of time for Elastic Load Balancing to wait before deregistering a target.

The range is 0-3600 seconds.

Returns:



46
47
48
# File 'elastic_load_balancingv2/base_target_group_props.rb', line 46

def deregistration_delay
  @deregistration_delay
end

#health_checkAWSCDK::ElasticLoadBalancingv2::HealthCheck? (readonly)

Note:

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_typeAWSCDK::ElasticLoadBalancingv2::TargetGroupIPAddressType? (readonly)

Note:

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_healthAWSCDK::ElasticLoadBalancingv2::TargetGroupHealth? (readonly)

Note:

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_nameString? (readonly)

Note:

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.

Returns:

  • (String, nil)


72
73
74
# File 'elastic_load_balancingv2/base_target_group_props.rb', line 72

def target_group_name
  @target_group_name
end

#target_typeAWSCDK::ElasticLoadBalancingv2::TargetType? (readonly)

Note:

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

#vpcAWSCDK::EC2::IVPC? (readonly)

Note:

Default: - undefined

The virtual private cloud (VPC).

only if TargetType is Ip or InstanceId

Returns:



88
89
90
# File 'elastic_load_balancingv2/base_target_group_props.rb', line 88

def vpc
  @vpc
end

Class Method Details

.jsii_propertiesObject



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_jsiiObject



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