IBM Cloud Docs
Viewing public address ranges

Viewing public address ranges

Public Address Ranges for VPC is only available for evaluation and testing purposes for users with special access.

You can view public address ranges with the console, CLI, and API.

Viewing public address ranges in the console

To view public address ranges in the IBM Cloud console, select the Navigation Menu menu icon, then click Infrastructure > Network > Public address ranges.

The Public address ranges for VPC page shows the following information:

  • Name: The name of the public address range object.
  • Status: States whether the address range is bound or unbound to the specified VPC.
  • Lifecycle state: States whether the binding or unbinding of the address range is successful, and if it is stable or not.
  • IP range: The range of IP addresses included in the address range.
  • Zone: States the zone that the address range is bound to (if applicable).
  • Virtual Private Cloud: States the VPC that the address range is bound to in the previous zone (if applicable).

Viewing public address ranges from the CLI

To view public address ranges from the command line, follow these steps:

  1. Set up your CLI environment.

  2. 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
    
  3. 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.

  4. Run the following command:

    ibmcloud is public-address-range PUBLIC_ADDRESS_RANGE [--output JSON] [-q, --quiet] 
    

    Where:

    PUBLIC_ADDRESS_RANGE
    The ID or name of the public address range to delete.
    --output
    The output format, only JSON is supported. One of: JSON.
    -q, --quiet
    Suppress verbose output.

Command examples

View the public address range $par-id:

ibmcloud is public-address-range $par-id

View all public address ranges:

ibmcloud is public address ranges

Viewing public address ranges with the API

To view public address ranges with the API, follow these steps:

  1. Set up your API environment.

  2. Store the following values in variables to use in the API command:

    For example: version (string): The API version, in format YYYY-MM-DD.

  3. When all variables are initiated, do one of the following:

    • View all public address ranges for an account:

      curl -sX GET \
               "$e/v1/public_address_ranges?version=$dt&generation=2" \
               -H "Authorization: Bearer $iam_token"
      
    • View a specific public address range:

      curl -sX GET \
               "$e/v1/public_address_ranges/$par-id?version=$dt&generation=2" \
               -H "Authorization: Bearer $iam_token"
      

Related links