reserved_ipv6
Creates, updates, deletes, gets or lists a reserved_ipv6
resource.
Overview
Name | reserved_ipv6 |
Type | Resource |
Id | digitalocean.compute.reserved_ipv6 |
Fields
The following fields are returned by SELECT
queries:
- reserved_ipv6_get
- reserved_ipv6_list
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.
Name | Datatype | Description |
---|---|---|
droplet |
| |
ip | string (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_slug | string | The region that the reserved IPv6 is reserved to. When you query a reserved IPv6,the region_slug will be returned. (example: nyc3) |
reserved_at | string (date-time) | The date and time when the reserved IPv6 was reserved. (example: 2024-11-20T11:08:30Z) |
The response will be a JSON object with a key called reserved_ipv6s
. This will be set to an array of reserved IP objects, each of which will contain the standard reserved IP attributes
Name | Datatype | Description |
---|---|---|
links | object | |
meta | object | Information about the response itself. |
reserved_ipv6s | array |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
reserved_ipv6_get | select | reserved_ipv6 | To show information about a reserved IPv6, send a GET request to /v2/reserved_ipv6/$RESERVED_IPV6 . | |
reserved_ipv6_list | select | per_page , page | To list all of the reserved IPv6s available on your account, send a GET request to /v2/reserved_ipv6 . | |
reserved_ipv6_create | insert | data__region_slug | 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. | |
reserved_ipv6_delete | delete | reserved_ipv6 | 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. | |
reserved_ipv6_actions_post | exec | reserved_ipv6 | 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 |
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.
Name | Datatype | Description |
---|---|---|
reserved_ipv6 | string (ipv6) | A reserved IPv6 address. (example: 2409:40d0:f7:1017:74b4:3a96:105e:4c6e) |
page | integer | Which 'page' of paginated results to return. (example: 1) |
per_page | integer | Number of items returned per page (example: 2) |
SELECT
examples
- reserved_ipv6_get
- reserved_ipv6_list
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;
To list all of the reserved IPv6s available on your account, send a GET request to /v2/reserved_ipv6
.
SELECT
links,
meta,
reserved_ipv6s
FROM digitalocean.compute.reserved_ipv6
WHERE per_page = '{{ per_page }}'
AND page = '{{ page }}';
INSERT
examples
- reserved_ipv6_create
- Manifest
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
;
# Description fields are for documentation purposes
- name: reserved_ipv6
props:
- name: region_slug
value: string
description: >
The slug identifier for the region the reserved IPv6 will be reserved to.
DELETE
examples
- reserved_ipv6_delete
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
- reserved_ipv6_actions_post
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;