Deleting public address ranges
Public Address Ranges for VPC is only available for evaluation and testing purposes for users with special access.
You can delete public address ranges with the console, CLI, and API.
Deleting public address ranges in the console
To delete public address ranges in the IBM Cloud console, follow these steps:
- From the IBM Cloud console, Select the Navigation menu
, then click Infrastructure
> Network > Public address ranges. The Public address ranges for VPC page appears.
- Highlight the row of the address range in the table, then click Delete from the Actions menu
.
- Click Delete to confirm that you want to delete this address range from the VPC.
Deleting public address ranges from the CLI
To delete public address ranges from the command line, follow these steps:
-
Log in to your CLI environments. After you enter the password, the system prompts which account and region that you want to use:
ibmcloud login --sso
-
Enable the following feature flag:
export IBMCLOUD_IS_FEATURE_PUBLIC_ADDRESS_RANGE=true
You'll receive a notification in the command line when updates to the IBM Cloud CLI and its plug-ins are available. It's important to keep your CLI up to date to access the latest commands. To check the current version of all installed plug-ins, run
ibmcloud plugin list
. -
Run the following command:
ibmcloud is public-address-range-delete [PUBLIC_ADDRESS_RANGE1…, PUBLIC_ADDRESS_RANGE2…] [-f, --force][--output JSON] [-q, --quiet]
Where:
PUBLIC_ADDRESS_RANGE
- The ID or name of the public address range to delete.
-f, --force
- Force the operation without confirmation.
--output
- The output format, only JSON is supported. One of: JSON.
-q, --quiet
- Suppress verbose output.
Command example
Delete the public address range $par-id
:
ibmcloud is public-address-range-delete $par-id
Deleting public address ranges with the API
To delete a public address range with the API, follow these steps:
-
Set up your API environment.
-
Store the following values in variables to be used in the API command:
For example:
version
(string): The API version, in formatYYYY-MM-DD
. -
When all variables are initiated, you can delete a public address range from a specific VPC as follows:
curl -sX DELETE \ "$e/v1/public_address_ranges/$par-id?version=$dt&generation=2" \ -H "Authorization: Bearer $iam_token"