Menu
Elastic Load Balancing
API Reference (API Version 2015-12-01)

ModifyTargetGroup

Modifies the health checks used when evaluating the health state of the targets in the specified target group.

To monitor the health of the targets, use DescribeTargetHealth.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

HealthCheckIntervalSeconds

The approximate amount of time, in seconds, between health checks of an individual target.

Type: Integer

Valid Range: Minimum value of 5. Maximum value of 300.

Required: No

HealthCheckPath

The ping path that is the destination for the health check request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Required: No

HealthCheckPort

The port to use to connect with the target.

Type: String

Required: No

HealthCheckProtocol

The protocol to use to connect with the target.

Type: String

Valid Values: HTTP | HTTPS

Required: No

HealthCheckTimeoutSeconds

The amount of time, in seconds, during which no response means a failed health check.

Type: Integer

Valid Range: Minimum value of 2. Maximum value of 60.

Required: No

HealthyThresholdCount

The number of consecutive health checks successes required before considering an unhealthy target healthy.

Type: Integer

Valid Range: Minimum value of 2. Maximum value of 10.

Required: No

Matcher

The HTTP codes to use when checking for a successful response from a target.

Type: Matcher object

Required: No

TargetGroupArn

The Amazon Resource Name (ARN) of the target group.

Type: String

Required: Yes

UnhealthyThresholdCount

The number of consecutive health check failures required before considering the target unhealthy.

Type: Integer

Valid Range: Minimum value of 2. Maximum value of 10.

Required: No

Response Elements

The following element is returned by the service.

TargetGroups.member.N

Information about the target group.

Type: Array of TargetGroup objects

Errors

For information about the errors that are common to all actions, see Common Errors.

TargetGroupNotFound

The specified target group does not exist.

HTTP Status Code: 400

Example

Modify the health check configuration for a target group

This example changes the configuration of the health checks used to evaluate the health of the targets for the specified target group.

Sample Request

Copy
https://elasticloadbalancing.amazonaws.com/?Action=ModifyTargetGroup &TargetGroupArn=arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-https-targets/2453ed029918f21f &HealthCheckProtocol=HTTPS &HealthCheckPort=443 &Version=2015-12-01 &AUTHPARAMS

Sample Response

Copy
<ModifyTargetGroupResponse xmlns="http://elasticloadbalancing.amazonaws.com/doc/2015-12-01/"> <ModifyTargetGroupResult> <TargetGroups> <member> <TargetGroupArn>arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-https-targets/2453ed029918f21f</TargetGroupArn> <HealthCheckTimeoutSeconds>5</HealthCheckTimeoutSeconds> <HealthCheckPort>443</HealthCheckPort> <Matcher> <HttpCode>200</HttpCode> </Matcher> <TargetGroupName>my-https-targets</TargetGroupName> <HealthCheckProtocol>HTTPS</HealthCheckProtocol> <Protocol>HTTPS</Protocol> <Port>443</Port> <HealthyThresholdCount>5</HealthyThresholdCount> <VpcId>vpc-3ac0fb5f</VpcId> <HealthCheckIntervalSeconds>30</HealthCheckIntervalSeconds> <LoadBalancerArns> <member>arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-load-balancer/50dc6c495c0c9188</member> </LoadBalancerArns> <UnhealthyThresholdCount>2</UnhealthyThresholdCount> </member> </TargetGroups> </ModifyTargetGroupResult> <ResponseMetadata> <RequestId>8525b334-f466-11e5-aa04-33bf366f62e2</RequestId> </ResponseMetadata> </ModifyTargetGroupResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: