DigitalOcean-public.v2-new_Reserved IPs
Create a New Reserved IP
On creation, a reserved IP must be either assigned to a Droplet or reserved to a region.
-
To create a new reserved IP assigned to a Droplet, send a POST request to /v2/reserved_ips with the droplet_id attribute.
-
To create a new reserved IP reserved to a region, send a POST request to /v2/reserved_ips with the region attribute.
post/v2/reserved_ips
Request body
Example request
{
"droplet_id": 2457247
}Response
The response will be a JSON object with a key called reserved_ip. The value of this will be an object that contains the standard attributes associated with a reserved IP. When assigning a reserved IP to a Droplet at same time as it created, the response's links object will contain links to both the Droplet and the assignment action. The latter can be used to check the status of the action.
Example response
{
"reserved_ip": {
"ip": "45.55.96.47",
"region": {
"name": "New York 3",
"slug": "nyc3",
"features": [
"private_networking",
"backups",
"ipv6",
"metadata",
"install_agent",
"storage",
"image_transfer"
],
"available": true,
"sizes": [
"s-1vcpu-1gb",
"s-1vcpu-2gb",
"s-1vcpu-3gb",
"s-2vcpu-2gb",
"s-3vcpu-1gb",
"s-2vcpu-4gb",
"s-4vcpu-8gb",
"s-6vcpu-16gb",
"s-8vcpu-32gb",
"s-12vcpu-48gb",
"s-16vcpu-64gb",
"s-20vcpu-96gb",
"s-24vcpu-128gb",
"s-32vcpu-192g"
]
},
"droplet": {
"id": 3164444,
"name": "example.com",
"memory": 1024,
"vcpus": 1,
"disk": 25,
"disk_info": [
{
"type": "local",
"size": {
"amount": 25,
"unit": "gib"
}
}
],
"status": "active",
"kernel": {
"id": 7515,
"name": "DigitalOcean GrubLoader v0.2 (20160714)",
"version": "2016.07.13-DigitalOcean_loader_Ubuntu"
},
"created_at": "2020-07-21T18:37:44Z",
"features": [
"backups",
"private_networking",
"ipv6"
],
"backup_ids": [
53893572
],
"next_backup_window": {
"start": "2019-12-04T00:00:00Z",
"end": "2019-12-04T23:00:00Z"
},
"snapshot_ids": [
67512819
],
"image": {
"id": 7555620,
"name": "Nifty New Snapshot",
"type": "snapshot",
"distribution": "Ubuntu",
"slug": "nifty1",
"public": true,
"regions": [
"nyc1",
"nyc2"
],
"created_at": "2020-05-04T22:23:02Z",
"min_disk_size": 20,
"size_gigabytes": 2.34,
"description": " ",
"tags": [
"base-image",
"prod"
],
"status": "NEW",
"error_message": " "
},
"volume_ids": [
"506f78a4-e098-11e5-ad9f-000f53306ae1"
],
"size": {
"slug": "s-1vcpu-1gb",
"memory": 1024,
"vcpus": 1,
"disk": 25,
"transfer": 1,
"price_monthly": 5,
"price_hourly": 0.00743999984115362,
"regions": [
"ams2",
"ams3",
"blr1",
"fra1",
"lon1",
"nyc1",
"nyc2",
"nyc3",
"sfo1",
"sfo2",
"sfo3",
"sgp1",
"tor1"
],
"available": true,
"description": "Basic",
"disk_info": [
{
"type": "local",
"size": {
"amount": 25,
"unit": "gib"
}
}
],
"gpu_info": {
"count": 1,
"model": "nvidia_h100",
"vram": {
"amount": 25,
"unit": "gib"
}
}
},
"size_slug": "s-1vcpu-1gb",
"networks": {
"v4": [
{
"ip_address": "104.236.32.182",
"netmask": "255.255.192.0",
"gateway": "104.236.0.1",
"type": "public"
}
],
"v6": [
{
"ip_address": "2604:a880:0:1010::18a:a001",
"netmask": 64,
"gateway": "2604:a880:0:1010::1",
"type": "public"
}
]
},
"region": {
"name": "New York 3",
"slug": "nyc3",
"features": [
"private_networking",
"backups",
"ipv6",
"metadata",
"install_agent",
"storage",
"image_transfer"
],
"available": true,
"sizes": [
"s-1vcpu-1gb",
"s-1vcpu-2gb",
"s-1vcpu-3gb",
"s-2vcpu-2gb",
"s-3vcpu-1gb",
"s-2vcpu-4gb",
"s-4vcpu-8gb",
"s-6vcpu-16gb",
"s-8vcpu-32gb",
"s-12vcpu-48gb",
"s-16vcpu-64gb",
"s-20vcpu-96gb",
"s-24vcpu-128gb",
"s-32vcpu-192g"
]
},
"tags": [
"web",
"env:prod"
],
"vpc_uuid": "760e09ef-dc84-11e8-981e-3cfdfeaae000",
"gpu_info": {
"count": 1,
"model": "nvidia_h100",
"vram": {
"amount": 25,
"unit": "gib"
}
}
},
"locked": true,
"project_id": "746c6152-2fa2-11ed-92d3-27aaa54e4988"
},
"links": {
"droplets": [
{
"id": 7515,
"rel": "create",
"href": "https://api.digitalocean.com/v2/actions/7515"
}
],
"actions": [
{
"id": 7515,
"rel": "create",
"href": "https://api.digitalocean.com/v2/actions/7515"
}
]
}
}