• Elastic Load Balancing

elb
  1. Help Center
  2. Elastic Load Balancing
  3. API Reference
  4. Enhanced Load Balancer APIs
  5. Load Balancer
  6. Deleting a Load Balancer

Deleting a Load Balancer

Function

This API is used to delete a load balancer by its ID. When you select cascade delete, listeners, backend server groups, backend servers, health checks, forwarding policies, forwarding rules, whitelists, and tags associated with the load balancer will be deleted.

URI

DELETE /v2.0/lbaas/loadbalancers/{loadbalancer_id}

Table 1 Parameter description

Parameter

Type

Mandatory

Description

loadbalancer_id

Uuid

Yes

Specifies the load balancer ID.

cascade

Bool

No

Specifies whether cascade delete is supported.

The value can be true or false.

  • If the value is true, resources associated with the load balancer will also be deleted, including listeners, backend server groups, backend servers, health checks, forwarding policies, forwarding rules, whitelists, and tags.
  • If the value is false, only the load balancer is deleted.

Constraints

When the cascade value is false, all listeners added to the load balancer will be deleted before the load balancer is deleted.

Request

None

Response

None

Example

  • Example request 1: Deleting a load balancer and associated resources
    DELETE https://{endpoint}/v2.0/lbaas/loadbalancers/90f7c765-0bc9-47c4-8513-4cc0c264c8f8?cascade=true
  • Example response 1

    None

  • Example request 2: Deleting a load balancer
    DELETE https://{endpoint}/v2.0/lbaas/loadbalancers/90f7c765-0bc9-47c4-8513-4cc0c264c8f8
  • Example response 2

    None

Response Codes

For details, see HTTP Status Codes for Enhanced Load Balancers.