Skip to main content

reserved_ipv6

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

Overview

Namereserved_ipv6
TypeResource
Iddigitalocean.compute.reserved_ipv6

Fields

The following fields are returned by SELECT queries:

The response will be a JSON object with key reserved_ipv6. The value of this will be an object that contains the standard attributes associated with a reserved IPv6.

NameDatatypeDescription
droplet
ipstring (ipv6)The public IP address of the reserved IPv6. It also serves as its identifier. (example: 2409:40d0:f7:1017:74b4:3a96:105e:4c6e)
region_slugstringThe region that the reserved IPv6 is reserved to. When you query a reserved IPv6,the region_slug will be returned. (example: nyc3)
reserved_atstring (date-time)The date and time when the reserved IPv6 was reserved. (example: 2024-11-20T11:08:30Z)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
reserved_ipv6_getselectreserved_ipv6To show information about a reserved IPv6, send a GET request to /v2/reserved_ipv6/$RESERVED_IPV6.
reserved_ipv6_listselectper_page, pageTo list all of the reserved IPv6s available on your account, send a GET request to /v2/reserved_ipv6.
reserved_ipv6_createinsertdata__region_slugOn creation, a reserved IPv6 must be reserved to a region.
* To create a new reserved IPv6 reserved to a region, send a POST request to
/v2/reserved_ipv6 with the region_slug attribute.
reserved_ipv6_deletedeletereserved_ipv6To delete a reserved IP and remove it from your account, send a DELETE request
to /v2/reserved_ipv6/$RESERVED_IPV6.

A successful request will receive a 204 status code with no body in response.
This indicates that the request was processed successfully.
reserved_ipv6_actions_postexecreserved_ipv6To initiate an action on a reserved IPv6 send a POST request to
/v2/reserved_ipv6/$RESERVED_IPV6/actions. In the JSON body to the request,
set the type attribute to on of the supported action types:

| Action | Details
|------------|--------
| assign | Assigns a reserved IPv6 to a Droplet
| unassign | Unassign a reserved IPv6 from a Droplet

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
reserved_ipv6string (ipv6)A reserved IPv6 address. (example: 2409:40d0:f7:1017:74b4:3a96:105e:4c6e)
pageintegerWhich 'page' of paginated results to return. (example: 1)
per_pageintegerNumber of items returned per page (example: 2)

SELECT examples

To show information about a reserved IPv6, send a GET request to /v2/reserved_ipv6/$RESERVED_IPV6.

SELECT
droplet,
ip,
region_slug,
reserved_at
FROM digitalocean.compute.reserved_ipv6
WHERE reserved_ipv6 = '{{ reserved_ipv6 }}' -- required;

INSERT examples

On creation, a reserved IPv6 must be reserved to a region.
* To create a new reserved IPv6 reserved to a region, send a POST request to
/v2/reserved_ipv6 with the region_slug attribute.

INSERT INTO digitalocean.compute.reserved_ipv6 (
data__region_slug
)
SELECT
'{{ region_slug }}' --required
RETURNING
reserved_ipv6
;

DELETE examples

To delete a reserved IP and remove it from your account, send a DELETE request
to /v2/reserved_ipv6/$RESERVED_IPV6.

A successful request will receive a 204 status code with no body in response.
This indicates that the request was processed successfully.

DELETE FROM digitalocean.compute.reserved_ipv6
WHERE reserved_ipv6 = '{{ reserved_ipv6 }}' --required;

Lifecycle Methods

To initiate an action on a reserved IPv6 send a POST request to
/v2/reserved_ipv6/$RESERVED_IPV6/actions. In the JSON body to the request,
set the type attribute to on of the supported action types:

| Action | Details
|------------|--------
| assign | Assigns a reserved IPv6 to a Droplet
| unassign | Unassign a reserved IPv6 from a Droplet

EXEC digitalocean.compute.reserved_ipv6.reserved_ipv6_actions_post 
@reserved_ipv6='{{ reserved_ipv6 }}' --required;