Skip to main content
POST
/
elastic_ips
Python (SDK)
import latitudesh_python_sdk
from latitudesh_python_sdk import Latitudesh
import os


with Latitudesh(
    bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:

    res = latitudesh.elastic_ips.create_elastic_ip(data={
        "type": latitudesh_python_sdk.CreateElasticIPType.ELASTIC_IPS,
        "attributes": {
            "project_id": "proj_AoW6vRnwkvLn0",
            "server_id": "sv_2GmAlJ6BXlK1a",
        },
    })

    # Handle response
    print(res)
{
  "data": {
    "id": null,
    "type": "elastic_ips",
    "attributes": {
      "address": "177.54.156.7",
      "status": "configuring",
      "project": {
        "id": "proj_AoW6vRnwkvLn0",
        "name": "My Project",
        "slug": "my-project"
      }
    }
  }
}

Authorizations

Authorization
string
header
required

Body

data
object
required

Response

Accepted

data
object
meta
object