FloatingIP (do.floating_ip)¶
Floating IP dict’s represent a publicly-accessible static IP addresses that can be mapped to one of your Droplets. They can be used to create highly available setups or other configurations requiring movable addresses.
Floating IPs are bound to a specific region.
Data Structures¶
Floating IP¶
- ip - string - The public IP address of the Floating IP. It also serves as its identifier.
- region - dict - The region that the Floating IP is reserved to. When you query a Floating IP, the entire region dict will be returned.
- droplet - dict - The Droplet that the Floating IP has been assigned to. When you query a Floating IP, if it is assigned to a Droplet, the entire Droplet dict will be returned. If it is not assigned, the value will be null.
Create a new Floating IP assigned to a Droplet or Region¶
-
do.floating_ip.
create
(droplet_id=None, region=None)¶
- droplet_id - int - The ID of Droplet that the Floating IP will be assigned to.
- region - string - The slug identifier for the region the Floating IP will be reserved to.
Returns:
- A Floating IP data structure
Related:
Retrieve an existing Floating IP¶
-
do.floating_ip.
info
(ip)¶
- ip - string - The public IP address of the Floating IP.
Returns:
- A Floating IP data structure
Related:
Delete a Floating IP¶
-
do.floating_ip.
destroy
(ip)¶
- ip - string - The public IP address of the Floating IP.
Returns:
- None. A DOBOTOException is thrown if an issue is encountered.
Related:
Assign a Floating IP to a Droplet¶
-
do.floating_ip.
assign
(ip, droplet_id, wait=False, poll=5, timeout=300)¶
- ip - string - The public IP address of the Floating IP.
- droplet_id - int - The ID of Droplet that the Floating IP will be assigned to.
- wait - boolean - Whether to wait until the droplet is ready
- poll - number - Number of seconds between checks (min 1 sec)
- timeout - number - How many seconds before giving up
Returns:
- An Action data structure
Related:
Unassign a Floating IP¶
-
do.floating_ip.
unassign
(ip, wait=False, poll=5, timeout=300)¶
- ip - string - The public IP address of the Floating IP.
- wait - boolean - Whether to wait until the droplet is ready
- poll - number - Number of seconds between checks (min 1 sec)
- timeout - number - How many seconds before giving up
Returns:
- An Action data structure
Related:
List all actions for a Floating IP¶
-
do.floating_ip.
action_list
(ip)¶
- ip - string - The public IP address of the Floating IP.
- wait - boolean - Whether to wait until the droplet is ready
- poll - number - Number of seconds between checks (min 1 sec)
- timeout - number - How many seconds before giving up
Returns:
- A list of Action data structures
Related: