floating_ips
Creates, updates, deletes, gets or lists a floating_ips
resource.
Overview
Name | floating_ips |
Type | Resource |
Id | digitalocean.floating_ips.floating_ips |
Fields
Name | Datatype | Description |
---|---|---|
droplet | `` | 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. |
ip | string | The public IP address of the floating IP. It also serves as its identifier. |
locked | boolean | A boolean value indicating whether or not the floating IP has pending actions preventing new ones from being submitted. |
project_id | string | The UUID of the project to which the reserved IP currently belongs. |
region | object | The region that the floating IP is reserved to. When you query a floating IP, the entire region object will be returned. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
floating_ips_get | SELECT | floating_ip | To show information about a floating IP, send a GET request to /v2/floating_ips/$FLOATING_IP_ADDR . |
floating_ips_list | SELECT |
| To list all of the floating IPs available on your account, send a GET request to /v2/floating_ips . |
floating_ips_create | INSERT |
| On creation, a floating IP must be either assigned to a Droplet or reserved to a region. To create a new floating IP assigned to a Droplet, send a POST request to /v2/floating_ips with the droplet_id attribute. To create a new floating IP reserved to a region, send a POST request to /v2/floating_ips with the region attribute. Note: In addition to the standard rate limiting, only 12 floating IPs may be created per 60 seconds. |
floating_ips_delete | DELETE | floating_ip | To delete a floating IP and remove it from your account, send a DELETE request to /v2/floating_ips/$FLOATING_IP_ADDR . A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully. |
SELECT
examples
To list all of the floating IPs available on your account, send a GET request to /v2/floating_ips
.
SELECT
droplet,
ip,
locked,
project_id,
region
FROM digitalocean.floating_ips.floating_ips
;
INSERT
example
Use the following StackQL query and manifest file to create a new floating_ips
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO digitalocean.floating_ips.floating_ips (
data__droplet_id
)
SELECT
'{{ droplet_id }}'
;
- name: floating_ips
props:
- name: droplet_id
value: integer
DELETE
example
Deletes the specified floating_ips
resource.
/*+ delete */
DELETE FROM digitalocean.floating_ips.floating_ips
WHERE floating_ip = '{{ floating_ip }}';