Skip to main content

reserved_ip_actions

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

Overview

Namereserved_ip_actions
TypeResource
Iddigitalocean.compute.reserved_ip_actions

Fields

The following fields are returned by SELECT queries:

The response will be an object with a key called action. The value of this will be an object that contains the standard reserved IP action attributes.

NameDatatypeDescription
actionobject

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
reserved_ips_actions_getselectreserved_ip, action_idTo retrieve the status of a reserved IP action, send a GET request to /v2/reserved_ips/$RESERVED_IP/actions/$ACTION_ID.
reserved_ips_actions_listselectreserved_ipTo retrieve all actions that have been executed on a reserved IP, send a GET request to /v2/reserved_ips/$RESERVED_IP/actions.
reserved_ips_actions_postexecreserved_ipTo initiate an action on a reserved IP send a POST request to
/v2/reserved_ips/$RESERVED_IP/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 IP to a Droplet
| unassign | Unassign a reserved IP 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
action_idintegerA unique numeric ID that can be used to identify and reference an action. (example: 36804636)
reserved_ipstring (ipv4)A reserved IP address. (example: 45.55.96.47)

SELECT examples

To retrieve the status of a reserved IP action, send a GET request to /v2/reserved_ips/$RESERVED_IP/actions/$ACTION_ID.

SELECT
action
FROM digitalocean.compute.reserved_ip_actions
WHERE reserved_ip = '{{ reserved_ip }}' -- required
AND action_id = '{{ action_id }}' -- required;

Lifecycle Methods

To initiate an action on a reserved IP send a POST request to
/v2/reserved_ips/$RESERVED_IP/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 IP to a Droplet
| unassign | Unassign a reserved IP from a Droplet

EXEC digitalocean.compute.reserved_ip_actions.reserved_ips_actions_post 
@reserved_ip='{{ reserved_ip }}' --required;