• Elastic Load Balancing

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

Deleting a Listener

Function

This API is used to delete a specific listener. If you select cascade delete, backend servers and backend servers groups will be disassociated from the listener, and forwarding policies, forwarding rules, whitelists, and tags associated with the listener will be deleted.

URI

DELETE /v2.0/lbaas/listeners/{listener_id}

Table 1 Parameter description

Parameter

Type

Mandatory

Description

listener_id

Uuid

Yes

Specifies the listener 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 listener will also be deleted, such as forwarding policies, forwarding rules, whitelists, and tags.
  • If the value is false, only the listener is deleted.

Constraints

When the value of cascade is false, all backend server groups associated with the listener must be deleted before the listener is deleted.

Request

None

Response

None

Example

  • Example request 1: Deleting a listener and associated resources
    DELETE https://{Endpoint}/v2.0/lbaas/listeners/35cb8516-1173-4035-8dae-0dae3453f37f?cascade=true
  • Example response 1

    None

  • Example request 2: Deleting a listener
    DELETE https://{Endpoint}/v2.0/lbaas/listeners/35cb8516-1173-4035-8dae-0dae3453f37f
  • Example response 2

    None

Response Codes

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