String type
The type of action. Each rule must include exactly one of the following types of actions: forward
,
fixed-response
, or redirect
.
String targetGroupArn
The Amazon Resource Name (ARN) of the target group. Specify only when Type
is forward
.
AuthenticateOidcActionConfig authenticateOidcConfig
[HTTPS listeners] Information about an identity provider that is compliant with OpenID Connect (OIDC). Specify
only when Type
is authenticate-oidc
.
AuthenticateCognitoActionConfig authenticateCognitoConfig
[HTTPS listeners] Information for using Amazon Cognito to authenticate users. Specify only when Type
is authenticate-cognito
.
Integer order
The order for the action. This value is required for rules with multiple actions. The action with the lowest
value for order is performed first. The final action to be performed must be a forward
or a
fixed-response
action.
RedirectActionConfig redirectConfig
[Application Load Balancer] Information for creating a redirect action. Specify only when Type
is
redirect
.
FixedResponseActionConfig fixedResponseConfig
[Application Load Balancer] Information for creating an action that returns a custom HTTP response. Specify only
when Type
is fixed-response
.
String userPoolArn
The Amazon Resource Name (ARN) of the Amazon Cognito user pool.
String userPoolClientId
The ID of the Amazon Cognito user pool client.
String userPoolDomain
The domain prefix or fully-qualified domain name of the Amazon Cognito user pool.
String sessionCookieName
The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.
String scope
The set of user claims to be requested from the IdP. The default is openid
.
To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.
Long sessionTimeout
The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).
Map<K,V> authenticationRequestExtraParams
The query parameters (up to 10) to include in the redirect request to the authorization endpoint.
String onUnauthenticatedRequest
The behavior if the user is not authenticated. The following are possible values:
deny - Return an HTTP 401 Unauthorized error.
allow - Allow the request to be forwarded to the target.
authenticate - Redirect the request to the IdP authorization endpoint. This is the default value.
String issuer
The OIDC issuer identifier of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
String authorizationEndpoint
The authorization endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
String tokenEndpoint
The token endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
String userInfoEndpoint
The user info endpoint of the IdP. This must be a full URL, including the HTTPS protocol, the domain, and the path.
String clientId
The OAuth 2.0 client identifier.
String clientSecret
The OAuth 2.0 client secret. This parameter is required if you are creating a rule. If you are modifying a rule,
you can omit this parameter if you set UseExistingClientSecret
to true.
String sessionCookieName
The name of the cookie used to maintain session information. The default is AWSELBAuthSessionCookie.
String scope
The set of user claims to be requested from the IdP. The default is openid
.
To verify which scope values your IdP supports and how to separate multiple values, see the documentation for your IdP.
Long sessionTimeout
The maximum duration of the authentication session, in seconds. The default is 604800 seconds (7 days).
Map<K,V> authenticationRequestExtraParams
The query parameters (up to 10) to include in the redirect request to the authorization endpoint.
String onUnauthenticatedRequest
The behavior if the user is not authenticated. The following are possible values:
deny - Return an HTTP 401 Unauthorized error.
allow - Allow the request to be forwarded to the target.
authenticate - Redirect the request to the IdP authorization endpoint. This is the default value.
Boolean useExistingClientSecret
Indicates whether to use the existing client secret when modifying a rule. If you are creating a rule, you can omit this parameter or set it to false.
String loadBalancerArn
The Amazon Resource Name (ARN) of the load balancer.
String protocol
The protocol for connections from clients to the load balancer. For Application Load Balancers, the supported protocols are HTTP and HTTPS. For Network Load Balancers, the supported protocols are TCP and TLS.
Integer port
The port on which the load balancer is listening.
String sslPolicy
[HTTPS and TLS listeners] The security policy that defines which ciphers and protocols are supported. The default is the current predefined security policy.
List<E> certificates
[HTTPS and TLS listeners] The default SSL server certificate. You must provide exactly one certificate. Set
CertificateArn
to the certificate ARN but do not set IsDefault
.
To create a certificate list, use AddListenerCertificates.
List<E> defaultActions
The actions for the default rule. The rule must include one forward action or one or more fixed-response actions.
If the action type is forward
, you specify a target group. The protocol of the target group must be
HTTP or HTTPS for an Application Load Balancer. The protocol of the target group must be TCP or TLS for a Network
Load Balancer.
[HTTPS listeners] If the action type is authenticate-oidc
, you authenticate users through an
identity provider that is OpenID Connect (OIDC) compliant.
[HTTPS listeners] If the action type is authenticate-cognito
, you authenticate users through the
user pools supported by Amazon Cognito.
[Application Load Balancer] If the action type is redirect
, you redirect specified client requests
from one URL to another.
[Application Load Balancer] If the action type is fixed-response
, you drop specified client requests
and return a custom HTTP response.
String name
The name of the load balancer.
This name must be unique per region per account, can have a maximum of 32 characters, must contain only alphanumeric characters or hyphens, must not begin or end with a hyphen, and must not begin with "internal-".
List<E> subnets
The IDs of the public subnets. You can specify only one subnet per Availability Zone. You must specify either subnets or subnet mappings.
[Application Load Balancers] You must specify subnets from at least two Availability Zones.
[Network Load Balancers] You can specify subnets from one or more Availability Zones.
List<E> subnetMappings
The IDs of the public subnets. You can specify only one subnet per Availability Zone. You must specify either subnets or subnet mappings.
[Application Load Balancers] You must specify subnets from at least two Availability Zones. You cannot specify Elastic IP addresses for your subnets.
[Network Load Balancers] You can specify subnets from one or more Availability Zones. You can specify one Elastic IP address per subnet.
List<E> securityGroups
[Application Load Balancers] The IDs of the security groups for the load balancer.
String scheme
The nodes of an Internet-facing load balancer have public IP addresses. The DNS name of an Internet-facing load balancer is publicly resolvable to the public IP addresses of the nodes. Therefore, Internet-facing load balancers can route requests from clients over the internet.
The nodes of an internal load balancer have only private IP addresses. The DNS name of an internal load balancer is publicly resolvable to the private IP addresses of the nodes. Therefore, internal load balancers can only route requests from clients with access to the VPC for the load balancer.
The default is an Internet-facing load balancer.
List<E> tags
One or more tags to assign to the load balancer.
String type
The type of load balancer. The default is application
.
String ipAddressType
[Application Load Balancers] The type of IP addresses used by the subnets for your load balancer. The possible
values are ipv4
(for IPv4 addresses) and dualstack
(for IPv4 and IPv6 addresses).
Internal load balancers must use ipv4
.
String listenerArn
The Amazon Resource Name (ARN) of the listener.
List<E> conditions
The conditions. Each condition specifies a field name and a single value.
If the field name is host-header
, you can specify a single host name (for example, my.example.com).
A host name is case insensitive, can be up to 128 characters in length, and can contain any of the following
characters. You can include up to three wildcard characters.
A-Z, a-z, 0-9
- .
* (matches 0 or more characters)
? (matches exactly 1 character)
If the field name is path-pattern
, you can specify a single path pattern. A path pattern is
case-sensitive, can be up to 128 characters in length, and can contain any of the following characters. You can
include up to three wildcard characters.
A-Z, a-z, 0-9
_ - . $ / ~ " ' @ : +
& (using &)
* (matches 0 or more characters)
? (matches exactly 1 character)
Integer priority
The rule priority. A listener can't have multiple rules with the same priority.
List<E> actions
The actions. Each rule must include exactly one of the following types of actions: forward
,
fixed-response
, or redirect
.
If the action type is forward
, you specify a target group. The protocol of the target group must be
HTTP or HTTPS for an Application Load Balancer. The protocol of the target group must be TCP or TLS for a Network
Load Balancer.
[HTTPS listeners] If the action type is authenticate-oidc
, you authenticate users through an
identity provider that is OpenID Connect (OIDC) compliant.
[HTTPS listeners] If the action type is authenticate-cognito
, you authenticate users through the
user pools supported by Amazon Cognito.
[Application Load Balancer] If the action type is redirect
, you redirect specified client requests
from one URL to another.
[Application Load Balancer] If the action type is fixed-response
, you drop specified client requests
and return a custom HTTP response.
String name
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.
String protocol
The protocol to use for routing traffic to the targets. For Application Load Balancers, the supported protocols are HTTP and HTTPS. For Network Load Balancers, the supported protocols are TCP and TLS. If the target is a Lambda function, this parameter does not apply.
Integer port
The port on which the targets receive traffic. This port is used unless you specify a port override when registering the target. If the target is a Lambda function, this parameter does not apply.
String vpcId
The identifier of the virtual private cloud (VPC). If the target is a Lambda function, this parameter does not apply.
String healthCheckProtocol
The protocol the load balancer uses when performing health checks on targets. For Application Load Balancers, the default is HTTP. For Network Load Balancers, the default is TCP. The TCP protocol is supported for health checks only if the protocol of the target group is TCP or TLS. The TLS protocol is not supported for health checks.
String healthCheckPort
The port the load balancer uses when performing health checks on targets. The default is
traffic-port
, which is the port on which each target receives traffic from the load balancer.
Boolean healthCheckEnabled
Indicates whether health checks are enabled. If the target type is instance
or ip
, the
default is true
. If the target type is lambda
, the default is false
.
String healthCheckPath
[HTTP/HTTPS health checks] The ping path that is the destination on the targets for health checks. The default is /.
Integer healthCheckIntervalSeconds
The approximate amount of time, in seconds, between health checks of an individual target. For Application Load
Balancers, the range is 5–300 seconds. For Network Load Balancers, the supported values are 10 or 30 seconds. If
the target type is instance
or ip
, the default is 30 seconds. If the target type is
lambda
, the default is 35 seconds.
Integer healthCheckTimeoutSeconds
The amount of time, in seconds, during which no response from a target means a failed health check. For
Application Load Balancers, the range is 2–120 seconds and the default is 5 seconds if the target type is
instance
or ip
and 30 seconds if the target type is lambda
. For Network
Load Balancers, this is 10 seconds for TCP and HTTPS health checks and 6 seconds for HTTP health checks.
Integer healthyThresholdCount
The number of consecutive health checks successes required before considering an unhealthy target healthy. For Application Load Balancers, the default is 5. For Network Load Balancers, the default is 3.
Integer unhealthyThresholdCount
The number of consecutive health check failures required before considering a target unhealthy. For Application Load Balancers, the default is 2. For Network Load Balancers, this value must be the same as the healthy threshold count.
Matcher matcher
[HTTP/HTTPS health checks] The HTTP codes to use when checking for a successful response from a target.
String targetType
The type of target that you must specify when registering targets with this target group. You can't specify targets for a target group using more than one target type.
instance
- Targets are specified by instance ID. This is the default value.
ip
- Targets are specified by IP address. You can specify IP addresses from the subnets of the
virtual private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and
192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). You can't specify publicly routable IP addresses.
lambda
- The target groups contains a single Lambda function.
String listenerArn
The Amazon Resource Name (ARN) of the listener.
String loadBalancerArn
The Amazon Resource Name (ARN) of the load balancer.
String ruleArn
The Amazon Resource Name (ARN) of the rule.
String targetGroupArn
The Amazon Resource Name (ARN) of the target group.
String loadBalancerArn
The Amazon Resource Name (ARN) of the load balancer.
List<E> listenerArns
The Amazon Resource Names (ARN) of the listeners.
String marker
The marker for the next set of results. (You received this marker from a previous call.)
Integer pageSize
The maximum number of results to return with this call.
String loadBalancerArn
The Amazon Resource Name (ARN) of the load balancer.
List<E> loadBalancerArns
The Amazon Resource Names (ARN) of the load balancers. You can specify up to 20 load balancers in a single call.
List<E> names
The names of the load balancers.
String marker
The marker for the next set of results. (You received this marker from a previous call.)
Integer pageSize
The maximum number of results to return with this call.
String listenerArn
The Amazon Resource Name (ARN) of the listener.
List<E> ruleArns
The Amazon Resource Names (ARN) of the rules.
String marker
The marker for the next set of results. (You received this marker from a previous call.)
Integer pageSize
The maximum number of results to return with this call.
String targetGroupArn
The Amazon Resource Name (ARN) of the target group.
String loadBalancerArn
The Amazon Resource Name (ARN) of the load balancer.
List<E> targetGroupArns
The Amazon Resource Names (ARN) of the target groups.
List<E> names
The names of the target groups.
String marker
The marker for the next set of results. (You received this marker from a previous call.)
Integer pageSize
The maximum number of results to return with this call.
String name
The name of the limit. The possible values are:
application-load-balancers
listeners-per-application-load-balancer
listeners-per-network-load-balancer
network-load-balancers
rules-per-application-load-balancer
target-groups
targets-per-application-load-balancer
targets-per-availability-zone-per-network-load-balancer
targets-per-network-load-balancer
String max
The maximum value of the limit.
String listenerArn
The Amazon Resource Name (ARN) of the listener.
String loadBalancerArn
The Amazon Resource Name (ARN) of the load balancer.
Integer port
The port on which the load balancer is listening.
String protocol
The protocol for connections from clients to the load balancer.
List<E> certificates
The SSL server certificate. You must provide a certificate if the protocol is HTTPS or TLS.
String sslPolicy
The security policy that defines which ciphers and protocols are supported. The default is the current predefined security policy.
List<E> defaultActions
The default actions for the listener.
String loadBalancerArn
The Amazon Resource Name (ARN) of the load balancer.
String dNSName
The public DNS name of the load balancer.
String canonicalHostedZoneId
The ID of the Amazon Route 53 hosted zone associated with the load balancer.
Date createdTime
The date and time the load balancer was created.
String loadBalancerName
The name of the load balancer.
String scheme
The nodes of an Internet-facing load balancer have public IP addresses. The DNS name of an Internet-facing load balancer is publicly resolvable to the public IP addresses of the nodes. Therefore, Internet-facing load balancers can route requests from clients over the internet.
The nodes of an internal load balancer have only private IP addresses. The DNS name of an internal load balancer is publicly resolvable to the private IP addresses of the nodes. Therefore, internal load balancers can only route requests from clients with access to the VPC for the load balancer.
String vpcId
The ID of the VPC for the load balancer.
LoadBalancerState state
The state of the load balancer.
String type
The type of load balancer.
List<E> availabilityZones
The Availability Zones for the load balancer.
List<E> securityGroups
The IDs of the security groups for the load balancer.
String ipAddressType
The type of IP addresses used by the subnets for your load balancer. The possible values are ipv4
(for IPv4 addresses) and dualstack
(for IPv4 and IPv6 addresses).
String key
The name of the attribute.
The following attributes are supported by both Application Load Balancers and Network Load Balancers:
access_logs.s3.enabled
- Indicates whether access logs are enabled. The value is true
or false
. The default is false
.
access_logs.s3.bucket
- The name of the S3 bucket for the access logs. This attribute is required if
access logs are enabled. The bucket must exist in the same region as the load balancer and have a bucket policy
that grants Elastic Load Balancing permissions to write to the bucket.
access_logs.s3.prefix
- The prefix for the location in the S3 bucket for the access logs.
deletion_protection.enabled
- Indicates whether deletion protection is enabled. The value is
true
or false
. The default is false
.
The following attributes are supported by only Application Load Balancers:
idle_timeout.timeout_seconds
- The idle timeout value, in seconds. The valid range is 1-4000
seconds. The default is 60 seconds.
routing.http2.enabled
- Indicates whether HTTP/2 is enabled. The value is true
or
false
. The default is true
.
The following attributes are supported by only Network Load Balancers:
load_balancing.cross_zone.enabled
- Indicates whether cross-zone load balancing is enabled. The
value is true
or false
. The default is false
.
String value
The value of the attribute.
String httpCode
The HTTP codes.
For Application Load Balancers, you can specify values between 200 and 499, and the default value is 200. You can specify multiple values (for example, "200,202") or a range of values (for example, "200-299").
For Network Load Balancers, this is 200–399.
String listenerArn
The Amazon Resource Name (ARN) of the listener.
Integer port
The port for connections from clients to the load balancer.
String protocol
The protocol for connections from clients to the load balancer. Application Load Balancers support the HTTP and HTTPS protocols. Network Load Balancers support the TCP and TLS protocols.
String sslPolicy
[HTTPS and TLS listeners] The security policy that defines which protocols and ciphers are supported. For more information, see Security Policies in the Application Load Balancers Guide.
List<E> certificates
[HTTPS and TLS listeners] The default SSL server certificate. You must provide exactly one certificate. Set
CertificateArn
to the certificate ARN but do not set IsDefault
.
To create a certificate list, use AddListenerCertificates.
List<E> defaultActions
The actions for the default rule. The rule must include one forward action or one or more fixed-response actions.
If the action type is forward
, you specify a target group. The protocol of the target group must be
HTTP or HTTPS for an Application Load Balancer. The protocol of the target group must be TCP or TLS for a Network
Load Balancer.
[HTTPS listeners] If the action type is authenticate-oidc
, you authenticate users through an
identity provider that is OpenID Connect (OIDC) compliant.
[HTTPS listeners] If the action type is authenticate-cognito
, you authenticate users through the
user pools supported by Amazon Cognito.
[Application Load Balancer] If the action type is redirect
, you redirect specified client requests
from one URL to another.
[Application Load Balancer] If the action type is fixed-response
, you drop specified client requests
and return a custom HTTP response.
String ruleArn
The Amazon Resource Name (ARN) of the rule.
List<E> conditions
The conditions. Each condition specifies a field name and a single value.
If the field name is host-header
, you can specify a single host name (for example, my.example.com).
A host name is case insensitive, can be up to 128 characters in length, and can contain any of the following
characters. You can include up to three wildcard characters.
A-Z, a-z, 0-9
- .
* (matches 0 or more characters)
? (matches exactly 1 character)
If the field name is path-pattern
, you can specify a single path pattern. A path pattern is
case-sensitive, can be up to 128 characters in length, and can contain any of the following characters. You can
include up to three wildcard characters.
A-Z, a-z, 0-9
_ - . $ / ~ " ' @ : +
& (using &)
* (matches 0 or more characters)
? (matches exactly 1 character)
List<E> actions
The actions.
If the action type is forward
, you specify a target group. The protocol of the target group must be
HTTP or HTTPS for an Application Load Balancer. The protocol of the target group must be TCP or TLS for a Network
Load Balancer.
[HTTPS listeners] If the action type is authenticate-oidc
, you authenticate users through an
identity provider that is OpenID Connect (OIDC) compliant.
[HTTPS listeners] If the action type is authenticate-cognito
, you authenticate users through the
user pools supported by Amazon Cognito.
[Application Load Balancer] If the action type is redirect
, you redirect specified client requests
from one URL to another.
[Application Load Balancer] If the action type is fixed-response
, you drop specified client requests
and return a custom HTTP response.
String targetGroupArn
The Amazon Resource Name (ARN) of the target group.
String healthCheckProtocol
The protocol the load balancer uses when performing health checks on targets. The TCP protocol is supported for health checks only if the protocol of the target group is TCP or TLS. The TLS protocol is not supported for health checks.
If the protocol of the target group is TCP, you can't modify this setting.
String healthCheckPort
The port the load balancer uses when performing health checks on targets.
String healthCheckPath
[HTTP/HTTPS health checks] The ping path that is the destination for the health check request.
Boolean healthCheckEnabled
Indicates whether health checks are enabled.
Integer healthCheckIntervalSeconds
The approximate amount of time, in seconds, between health checks of an individual target. For Application Load Balancers, the range is 5–300 seconds. For Network Load Balancers, the supported values are 10 or 30 seconds.
If the protocol of the target group is TCP, you can't modify this setting.
Integer healthCheckTimeoutSeconds
[HTTP/HTTPS health checks] The amount of time, in seconds, during which no response means a failed health check.
If the protocol of the target group is TCP, you can't modify this setting.
Integer healthyThresholdCount
The number of consecutive health checks successes required before considering an unhealthy target healthy.
Integer unhealthyThresholdCount
The number of consecutive health check failures required before considering the target unhealthy. For Network Load Balancers, this value must be the same as the healthy threshold count.
Matcher matcher
[HTTP/HTTPS health checks] The HTTP codes to use when checking for a successful response from a target.
If the protocol of the target group is TCP, you can't modify this setting.
String protocol
The protocol. You can specify HTTP, HTTPS, or #{protocol}. You can redirect HTTP to HTTP, HTTP to HTTPS, and HTTPS to HTTPS. You cannot redirect HTTPS to HTTP.
String port
The port. You can specify a value from 1 to 65535 or #{port}.
String host
The hostname. This component is not percent-encoded. The hostname can contain #{host}.
String path
The absolute path, starting with the leading "/". This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}.
String query
The query parameters, URL-encoded when necessary, but not percent-encoded. Do not include the leading "?", as it is automatically added. You can specify any of the reserved keywords.
String statusCode
The HTTP redirect code. The redirect is either permanent (HTTP 301) or temporary (HTTP 302).
String targetGroupArn
The Amazon Resource Name (ARN) of the target group.
List<E> targets
The targets.
To register a target by instance ID, specify the instance ID. To register a target by IP address, specify the IP address. To register a Lambda function, specify the ARN of the Lambda function.
String field
The name of the field. The possible values are host-header
and path-pattern
.
List<E> values
The condition value.
If the field name is host-header
, you can specify a single host name (for example, my.example.com).
A host name is case insensitive, can be up to 128 characters in length, and can contain any of the following
characters. You can include up to three wildcard characters.
A-Z, a-z, 0-9
- .
* (matches 0 or more characters)
? (matches exactly 1 character)
If the field name is path-pattern
, you can specify a single path pattern (for example, /img/*). A
path pattern is case-sensitive, can be up to 128 characters in length, and can contain any of the following
characters. You can include up to three wildcard characters.
A-Z, a-z, 0-9
_ - . $ / ~ " ' @ : +
& (using &)
* (matches 0 or more characters)
? (matches exactly 1 character)
HostHeaderConditionConfig hostHeaderConfig
PathPatternConditionConfig pathPatternConfig
HttpHeaderConditionConfig httpHeaderConfig
QueryStringConditionConfig queryStringConfig
HttpRequestMethodConditionConfig httpRequestMethodConfig
SourceIpConditionConfig sourceIpConfig
String ipAddressType
The IP address type.
String loadBalancerArn
The Amazon Resource Name (ARN) of the load balancer.
List<E> subnets
The IDs of the public subnets. You must specify subnets from at least two Availability Zones. You can specify only one subnet per Availability Zone. You must specify either subnets or subnet mappings.
List<E> subnetMappings
The IDs of the public subnets. You must specify subnets from at least two Availability Zones. You can specify only one subnet per Availability Zone. You must specify either subnets or subnet mappings.
You cannot specify Elastic IP addresses for your subnets.
String id
The ID of the target. If the target type of the target group is instance
, specify an instance ID. If
the target type is ip
, specify an IP address. If the target type is lambda
, specify the
ARN of the Lambda function.
Integer port
The port on which the target is listening.
String availabilityZone
An Availability Zone or all
. This determines whether the target receives traffic from the load
balancer nodes in the specified Availability Zone or from all enabled Availability Zones for the load balancer.
This parameter is not supported if the target type of the target group is instance
.
If the target type is ip
and the IP address is in a subnet of the VPC for the target group, the
Availability Zone is automatically detected and this parameter is optional. If the IP address is outside the VPC,
this parameter is required.
With an Application Load Balancer, if the target type is ip
and the IP address is outside the VPC
for the target group, the only supported value is all
.
If the target type is lambda
, this parameter is optional and the only supported value is
all
.
String targetGroupArn
The Amazon Resource Name (ARN) of the target group.
String targetGroupName
The name of the target group.
String protocol
The protocol to use for routing traffic to the targets.
Integer port
The port on which the targets are listening.
String vpcId
The ID of the VPC for the targets.
String healthCheckProtocol
The protocol to use to connect with the target.
String healthCheckPort
The port to use to connect with the target.
Boolean healthCheckEnabled
Indicates whether health checks are enabled.
Integer healthCheckIntervalSeconds
The approximate amount of time, in seconds, between health checks of an individual target.
Integer healthCheckTimeoutSeconds
The amount of time, in seconds, during which no response means a failed health check.
Integer healthyThresholdCount
The number of consecutive health checks successes required before considering an unhealthy target healthy.
Integer unhealthyThresholdCount
The number of consecutive health check failures required before considering the target unhealthy.
String healthCheckPath
The destination for the health check request.
Matcher matcher
The HTTP codes to use when checking for a successful response from a target.
List<E> loadBalancerArns
The Amazon Resource Names (ARN) of the load balancers that route traffic to this target group.
String targetType
The type of target that you must specify when registering targets with this target group. The possible values are
instance
(targets are specified by instance ID) or ip
(targets are specified by IP
address).
String key
The name of the attribute.
The following attribute is supported by both Application Load Balancers and Network Load Balancers:
deregistration_delay.timeout_seconds
- The amount of time, in seconds, for Elastic Load Balancing to
wait before changing the state of a deregistering target from draining
to unused
. The
range is 0-3600 seconds. The default value is 300 seconds. If the target is a Lambda function, this attribute is
not supported.
The following attributes are supported by Application Load Balancers if the target is not a Lambda function:
slow_start.duration_seconds
- The time period, in seconds, during which a newly registered target
receives a linearly increasing share of the traffic to the target group. After this time period ends, the target
receives its full share of traffic. The range is 30-900 seconds (15 minutes). Slow start mode is disabled by
default.
stickiness.enabled
- Indicates whether sticky sessions are enabled. The value is true
or false
. The default is false
.
stickiness.type
- The type of sticky sessions. The possible value is lb_cookie
.
stickiness.lb_cookie.duration_seconds
- The time period, in seconds, during which requests from a
client should be routed to the same target. After this time period expires, the load balancer-generated cookie is
considered stale. The range is 1 second to 1 week (604800 seconds). The default value is 1 day (86400 seconds).
The following attribute is supported only if the target is a Lambda function.
lambda.multi_value_headers.enabled
- Indicates whether the request and response headers exchanged
between the load balancer and the Lambda function include arrays of values or strings. The value is
true
or false
. The default is false
. If the value is false
and the request contains a duplicate header field name or query parameter key, the load balancer uses the last
value sent by the client.
The following attribute is supported only by Network Load Balancers:
proxy_protocol_v2.enabled
- Indicates whether Proxy Protocol version 2 is enabled. The value is
true
or false
. The default is false
.
String value
The value of the attribute.
String state
The state of the target.
String reason
The reason code.
If the target state is healthy
, a reason code is not provided.
If the target state is initial
, the reason code can be one of the following values:
Elb.RegistrationInProgress
- The target is in the process of being registered with the load
balancer.
Elb.InitialHealthChecking
- The load balancer is still sending the target the minimum number of
health checks required to determine its health status.
If the target state is unhealthy
, the reason code can be one of the following values:
Target.ResponseCodeMismatch
- The health checks did not return an expected HTTP code.
Target.Timeout
- The health check requests timed out.
Target.FailedHealthChecks
- The health checks failed because the connection to the target timed out,
the target response was malformed, or the target failed the health check for an unknown reason.
Elb.InternalError
- The health checks failed due to an internal error.
If the target state is unused
, the reason code can be one of the following values:
Target.NotRegistered
- The target is not registered with the target group.
Target.NotInUse
- The target group is not used by any load balancer or the target is in an
Availability Zone that is not enabled for its load balancer.
Target.IpUnusable
- The target IP address is reserved for use by a load balancer.
Target.InvalidState
- The target is in the stopped or terminated state.
If the target state is draining
, the reason code can be the following value:
Target.DeregistrationInProgress
- The target is in the process of being deregistered and the
deregistration delay period has not expired.
If the target state is unavailable
, the reason code can be the following value:
Target.HealthCheckDisabled
- Health checks are disabled for the target group.
String description
A description of the target health that provides additional details. If the state is healthy
, a
description is not provided.
TargetDescription target
The description of the target.
String healthCheckPort
The port to use to connect with the target.
TargetHealth targetHealth
The health information for the target.
Copyright © 2019. All rights reserved.