doapi-floating-ip¶
NAME¶
doapi-floating-ip — manage DigitalOcean floating IP addresses
SYNOPSIS¶
doapi-floating-ip new [<wait options>] -D|--droplet <droplet>
doapi-floating-ip new [<wait options>] -R|--region <region>
doapi-floating-ip show [<ip> ...]
doapi-floating-ip assign [<wait options>] <ip> <droplet>
doapi-floating-ip unassign [<wait options>] <ip> ...
doapi-floating-ip act [<wait options>] [-p|--params <JSON|@file>] <type> <ip> ...
doapi-floating-ip actions [--in-progress | --last] <ip> ...
doapi-floating-ip wait [--wait-interval <seconds>] [--wait-time <seconds>] <ip> ...
doapi-floating-ip delete <ip> ...
doapi-floating-ip also takes the universal options common to all doapi commands.
Floating IPs can be specified in either dotted-quad notation (e.g.,
127.0.0.1
) or as 32-bit integers (e.g., 2130706433
).
new¶
doapi-floating-ip new [<wait options>] -D|--droplet <droplet>
doapi-floating-ip new [<wait options>] -R|--region <region>
Create a new floating IP assigned to a droplet or reserved to a region. The
new IP is output as a FloatingIP
object converted to JSON.
Options¶
In addition to the waiting options, the new subcommand takes the following:
-
-D
<droplet>
,
--droplet
<droplet>
¶ Assign the new floating IP to the specified droplet (identified by ID or name). The floating IP will also be reserved to the droplet’s region.
-
-R
<region>
,
--region
<region>
¶ Reserve the floating IP to the specified region (identified by slug).
show¶
doapi-floating-ip show [<ip> ...]
Show floating IPs. If no IPs are specified, all IPs allocated to the account
are shown. The IPs are output as a list of FloatingIP
objects converted to
JSON.
assign¶
doapi-floating-ip assign [<wait options>] <ip> <droplet>
Assign the given floating IP to a given droplet (identified by ID or name).
The Action
object thus produced is output as JSON.
The assign subcommand only takes the waiting options.
unassign¶
doapi-floating-ip unassign [<wait options>] <ip> ...
Unassign the given floating IP(s) from their droplet(s). The Action
objects
thus produced are output as a JSON list.
The unassign subcommand only takes the waiting options.
act¶
doapi-floating-ip act [<wait options>] [-p|--params <JSON|@file>] <type> <ip> ...
Perform an arbitrary action of type <type>
(assign
, unassign
, or
something otherwise not implemented here) on one or more floating IPs. The
Action
objects thus produced are output as a JSON list.
Options¶
In addition to the waiting options, the act subcommand takes the following:
-
-p
<data>
,
--params
<data>
¶ A JSON object/dictionary of parameters to the action. If
<data>
begins with “@
”, the rest of the argument (if there is any) is treated as a file from which to read the JSON; a filename of-
causes data to be read from standard input.
actions¶
doapi-floating-ip actions [--in-progress | --last] <ip> ...
List all of the actions that have ever been performed on the given floating
IP(s). The results are output as a JSON list containing a sublist of Action
objects for each IP specified on the command line, in order.
Options¶
-
--in-progress
¶
Show only the currently in-progress action on each floating IP instead of a list of all actions. If there is currently no in-progress action on an IP, show
null
.
-
--last
¶
Show only the most recent action on each floating IP instead of a list of all actions. If multiple actions on a single IP were triggered simultaneously, the choice of which to return is undefined.
wait¶
doapi-floating-ip wait [--wait-interval <seconds>] [--wait-time <seconds>] <ip> ...
Wait for the currently in-progress actions on the given floating IP(s) to
either complete or error out. The finished actions are output as a list of
Action
objects converted to JSON, with each action output (roughly) as soon
as it finishes. If there are no actions currently in progress on a given
floating IP, nothing will be output for it.
Options¶
-
--wait-interval
<seconds>
¶ How often to poll the server for the actions’ current statuses; default value: 5 seconds
-
--wait-time
<seconds>
¶ The maximum number of seconds to wait for all actions to complete. After this much time has passed since program invocation, any remaining in-progress actions will be output immediately without waiting for them to finish.
If this option is not specified, wait will wait indefinitely.