Skip to main content

reserved_ips

Creates, updates, deletes, gets or lists a reserved_ips resource.

Overview

Namereserved_ips
TypeResource
Iddigitalocean.reserved_ips.reserved_ips

Fields

NameDatatypeDescription
droplet``The Droplet that the reserved IP has been assigned to. When you query a reserved 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.
ipstringThe public IP address of the reserved IP. It also serves as its identifier.
lockedbooleanA boolean value indicating whether or not the reserved IP has pending actions preventing new ones from being submitted.
project_idstringThe UUID of the project to which the reserved IP currently belongs.
regionobjectThe region that the reserved IP is reserved to. When you query a reserved IP, the entire region object will be returned.

Methods

NameAccessible byRequired ParamsDescription
reserved_ips_getSELECTreserved_ipTo show information about a reserved IP, send a GET request to /v2/reserved_ips/$RESERVED_IP_ADDR.
reserved_ips_listSELECTTo list all of the reserved IPs available on your account, send a GET request to /v2/reserved_ips.
reserved_ips_createINSERTOn creation, a reserved IP must be either assigned to a Droplet or reserved to a region. To create a new reserved IP assigned to a Droplet, send a POST request to /v2/reserved_ips with the droplet_id attribute. To create a new reserved IP reserved to a region, send a POST request to /v2/reserved_ips with the region attribute. Note: In addition to the standard rate limiting, only 12 reserved IPs may be created per 60 seconds.
reserved_ips_deleteDELETEreserved_ipTo delete a reserved IP and remove it from your account, send a DELETE request to /v2/reserved_ips/$RESERVED_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 reserved IPs available on your account, send a GET request to /v2/reserved_ips.

SELECT
droplet,
ip,
locked,
project_id,
region
FROM digitalocean.reserved_ips.reserved_ips
;

INSERT example

Use the following StackQL query and manifest file to create a new reserved_ips resource.

/*+ create */
INSERT INTO digitalocean.reserved_ips.reserved_ips (
data__droplet_id
)
SELECT
'{{ droplet_id }}'
;

DELETE example

Deletes the specified reserved_ips resource.

/*+ delete */
DELETE FROM digitalocean.reserved_ips.reserved_ips
WHERE reserved_ip = '{{ reserved_ip }}';