Deleting a Listener Rule

You can delete a listener rule that you no longer need.

This action deletes the pattern of the specified rule, as well as the list of backend virtual machines (VMs) registered with it. Once deleted, it is no longer used to redirect incoming traffic between a load balancer and its backend VMs.

To modify the pattern of a listener rule, see Modifying a Listener Rule. To delete VMs, see Terminating VMs.

To modify the list of backend VMs for a listener rule, you need to delete the rule and create a new one.

Deleting a Listener Rule Using OSC CLI

The DeleteListenerRule command deletes a listener rule.
The previously active rule is disabled after deletion.

Request sample
$ osc-cli api DeleteListenerRule --profile "default" \
    --ListenerRuleName "example-listener-rule"

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.

  • ListenerRuleName: The name of the rule you want to delete.

The DeleteListenerRule 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 Listener Rule Using oapi-cli

The DeleteListenerRule command deletes a listener rule.
The previously active rule is disabled after deletion.

Request sample
$ oapi-cli --profile "default" DeleteListenerRule \
    --ListenerRuleName "example-listener-rule"

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.

  • ListenerRuleName: The name of the rule you want to delete.

The DeleteListenerRule 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"
  }
}

Related Pages

Corresponding API Methods