Getting Information About Public IPs in a Region

You can get the list of public IPv4 addresses used in the Region of your account, in CIDR notation.

This can be useful, for example, if you need to filter OUTSCALE IP ranges from external providers, or for third-party applications that need to authorize the IP ranges of your OUTSCALE Cloud resources.

VMs and network interface cards (NICs) are automatically assigned a public IP when you create them. For more information, see Getting Information About Your VMs and Getting Information About Your NICs.

You can also allocate public IPs to your account, that is, public IPv4 addresses that you can associate with a VM or network interface and disassociate at any time. For more information, see About Public IPs.

A reference table is also available in the OUTSCALE Public IPs page.

Getting Information About Your Public IPs Using OSC CLI

The ReadPublicIpRanges command gets the public IPv4 addresses in CIDR notation for the Region specified in the endpoint of the request. For more information, see About Regions and Subregions.

Request sample
$ osc-cli api ReadPublicIpRanges --profile "default"

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.

  • NextPageToken: (optional) The token to request the next page of results. Each token refers to a specific page.

  • ResultsPerPage: (optional) The maximum number of logs returned in a single response (between 1 and 1000, both included). By default, 100.

The ReadPublicIpRanges command returns the following elements:

  • NextPageToken: The token to request the next page of results. Each token refers to a specific page.

  • PublicIps: The list of public IPv4 addresses used in the Region, in CIDR notation.

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "PublicIps": [
    "198.51.100.0/24",
    "203.0.113.0/24"
  ]
}

Getting Information About Your Public IPs Using oapi-cli

The ReadPublicIpRanges command gets the public IPv4 addresses in CIDR notation for the Region specified in the endpoint of the request. For more information, see About Regions and Subregions.

Request sample
$ oapi-cli --profile "default" ReadPublicIpRanges

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.

  • NextPageToken: (optional) The token to request the next page of results. Each token refers to a specific page.

  • ResultsPerPage: (optional) The maximum number of logs returned in a single response (between 1 and 1000, both included). By default, 100.

The ReadPublicIpRanges command returns the following elements:

  • NextPageToken: The token to request the next page of results. Each token refers to a specific page.

  • PublicIps: The list of public IPv4 addresses used in the Region, in CIDR notation.

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "PublicIps": [
    "198.51.100.0/24",
    "203.0.113.0/24"
  ]
}

Related Pages

Corresponding API Methods