Deleting a Load Balancer

You can delete a load balancer that you no longer need at any time. Deleting a load balancer does not modify the state of its backend virtual machines (VMs).

Deleting a Load Balancer Using Cockpit v2

Before you begin: Ensure the security groups of your backend VMs allow flows coming from another source than the load balancer.

The DNS name will be deleted.

  1. In the Load Balancers dashboard, check the box of the load balancer you want to delete.

    Multiselection is available.

    The load balancer is selected.

  2. Click IconTerminate Delete.
    A confirmation dialog box appears.

  3. In the confirmation dialog box, type "DELETE" in the text field and click Delete.
    The load balancer is deleted.

Deleting a Load Balancer Using OSC CLI

Before you begin: Ensure the security groups of your backend VMs allow flows coming from another source than the load balancer.

The DeleteLoadBalancer command deletes a specified load balancer.

Request sample
$ osc-cli api DeleteLoadBalancer --profile "default" \
    --LoadBalancerName "example-lbu"

This command contains the following attributes that you need to specify:

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • LoadBalancerName: The name of the load balancer you want to delete.

The DeleteLoadBalancer command returns the following elements:

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Deleting a Load Balancer Using oapi-cli

Before you begin: Ensure the security groups of your backend VMs allow flows coming from another source than the load balancer.

The DeleteLoadBalancer command deletes a specified load balancer.

Request sample
$ oapi-cli --profile "default" DeleteLoadBalancer \
    --LoadBalancerName "example-lbu"

This command contains the following attributes that you need to specify:

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • LoadBalancerName: The name of the load balancer you want to delete.

The DeleteLoadBalancer command returns the following elements:

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Deleting a Load Balancer Using AWS CLI

Before you begin:

  • Install and configure AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • Ensure the security groups of your backend instances allow flows coming from another source than the load balancer.

To delete a load balancer, use the delete-load-balancer command following this syntax:

Request sample
$ aws elb delete-load-balancer \
    --profile YOUR_PROFILE \
   --load-balancer-name My-load-balancer \
    --endpoint https://lbu.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • load-balancer-name: The name of the load balancer.

  • endpoint: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.

The specified load balancer is deleted.

Related Page

Corresponding API Methods

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.