pydo.reserved_ips_actions.post()

Generated on 9 May 2025 from pydo version v0.11.0

Description

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

Parameters

Name Type Required Description Default Value
reserved_ip string True A reserved IP address.
body JSON or IO[bytes] False The type attribute set in the request body will specify the action that
will be taken on the reserved IP.

Request Sample

import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

req={
  "type": "unassign"
}

resp = client.reserved_ips_actions.post(reserved_ip="49.32.13.21", body=req)

More Information

See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.