Skip to content
  • Auto
  • Light
  • Dark

List

List All Floating IPs
gpu_droplets.floating_ips.list(FloatingIPListParams**kwargs) -> metaMetaPropertiesfloating_ipslistlinksPageLinksFloatingIPListResponse
get/v2/floating_ips

To list all of the floating IPs available on your account, send a GET request to /v2/floating_ips.

Parameters
pageint
optional

Which 'page' of paginated results to return.

minimum1
per_pageint
optional

Number of items returned per page

minimum1
maximum200
Returns
FloatingIPListResponseclass
Hide ParametersShow Parameters
metatotalintMetaProperties

Information about the response itself.

floating_ipslist
optional
Optional[List[dropletDropletipstrlockedboolproject_idstrregionRegionFloatingIP]]
Hide ParametersShow Parameters
dropletDropletNullobjectDroplet
optional

The Droplet that the floating IP has been assigned to. When you query a floating IP, if it is assigned to a Droplet, the entire Droplet object will be returned. If it is not assigned, the value will be null.

Requires droplet:read scope.

Hide ParametersShow Parameters
idintbackup_idslistcreated_atdatetimediskintfeatureslistimageImagelockedboolmemoryintnamestrnetworksNetworksnext_backup_windowDropletNextBackupWindowregionRegionsizeSizesize_slugstrsnapshot_idsliststatusliteraltagslistvcpusintvolume_idslistdisk_infolistgpu_infoGPUInfokernelKernelvpc_uuidstrDroplet
DropletNulltype
Optional[object]

If the floating IP is not assigned to a Droplet, the value will be null.

ipstr
optional

The public IP address of the floating IP. It also serves as its identifier.

formatipv4
lockedbool
optional

A boolean value indicating whether or not the floating IP has pending actions preventing new ones from being submitted.

project_idstr
optional

The UUID of the project to which the reserved IP currently belongs.

Requires project:read scope.

formatuuid
regionRegion
optional

The region that the floating IP is reserved to. When you query a floating IP, the entire region object will be returned.

from do_gradientai import GradientAI

client = GradientAI()
floating_ips = client.gpu_droplets.floating_ips.list()
print(floating_ips.meta)
200 Example
{
  "meta": {
    "total": 1
  },
  "floating_ips": [
    {
      "droplet": null,
      "ip": "45.55.96.47",
      "locked": false,
      "project_id": "746c6152-2fa2-11ed-92d3-27aaa54e4988",
      "region": {
        "available": true,
        "features": [
          "private_networking",
          "backups",
          "ipv6",
          "metadata",
          "install_agent",
          "storage",
          "image_transfer"
        ],
        "name": "New York 3",
        "sizes": [
          "s-1vcpu-1gb",
          "s-1vcpu-2gb",
          "s-1vcpu-3gb",
          "s-2vcpu-2gb",
          "s-3vcpu-1gb",
          "s-2vcpu-4gb",
          "s-4vcpu-8gb",
          "s-6vcpu-16gb",
          "s-8vcpu-32gb",
          "s-12vcpu-48gb",
          "s-16vcpu-64gb",
          "s-20vcpu-96gb",
          "s-24vcpu-128gb",
          "s-32vcpu-192g"
        ],
        "slug": "nyc3"
      }
    }
  ],
  "links": {
    "pages": {
      "last": "https://api.digitalocean.com/v2/images?page=2",
      "next": "https://api.digitalocean.com/v2/images?page=2"
    }
  }
}