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.
example
Use a bare-bones client and the command you need to make an API call.
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.
Use a bare-bones client and the command you need to make an API call.
import { ElasticLoadBalancingV2Client, DeleteTargetGroupCommand } from "@aws-sdk/client-elastic-load-balancing-v2"; // ES Modules import // const { ElasticLoadBalancingV2Client, DeleteTargetGroupCommand } = require("@aws-sdk/client-elastic-load-balancing-v2"); // CommonJS import const client = new ElasticLoadBalancingV2Client(config); const command = new DeleteTargetGroupCommand(input); const response = await client.send(command);
DeleteTargetGroupCommandInput for command's
input
shape.DeleteTargetGroupCommandOutput for command's
response
shape.config for ElasticLoadBalancingV2Client's
config
shape.