ElasticLoadBalancingv2 / Client / delete_target_group

delete_target_group#

ElasticLoadBalancingv2.Client.delete_target_group(**kwargs)#

Deletes the specified target group.

You can delete a target group if it is not referenced by any actions. Deleting a target group also deletes any associated health checks. Deleting a target group does not affect its registered targets. For example, any EC2 instances continue to run until you stop or terminate them.

See also: AWS API Documentation

Request Syntax

response = client.delete_target_group(
    TargetGroupArn='string'
)
Parameters:

TargetGroupArn (string) –

[REQUIRED]

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

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

Exceptions

Examples

This example deletes the specified target group.

response = client.delete_target_group(
    TargetGroupArn='arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}