Authorizations
Path Parameters
The IP Address ID
Query Parameters
The region
and server
are provided as extra attributes that are lazy loaded. To request it, just set extra_fields[ip_addresses]=region,server
in the query string.
from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.ip_addresses.get(ip_id="ip_059EqY7kOQj8p")
# Handle response
print(res)
{
"id": "<string>",
"attributes": {
"address": "<string>",
"cidr": "<string>",
"family": "IPv4",
"gateway": "<string>",
"netmask": "<string>",
"type": "Public",
"public": true,
"management": true,
"project": {
"id": "<string>",
"name": "<string>"
},
"region": {
"id": "<string>",
"name": "<string>",
"location": {
"id": "<string>",
"name": "<string>",
"slug": "<string>"
}
},
"available": true,
"assignment": {
"server_id": "<string>",
"hostname": "<string>",
"assigned_at": "<string>"
}
}
}
Retrieve an IP Address
from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.ip_addresses.get(ip_id="ip_059EqY7kOQj8p")
# Handle response
print(res)
{
"id": "<string>",
"attributes": {
"address": "<string>",
"cidr": "<string>",
"family": "IPv4",
"gateway": "<string>",
"netmask": "<string>",
"type": "Public",
"public": true,
"management": true,
"project": {
"id": "<string>",
"name": "<string>"
},
"region": {
"id": "<string>",
"name": "<string>",
"location": {
"id": "<string>",
"name": "<string>",
"slug": "<string>"
}
},
"available": true,
"assignment": {
"server_id": "<string>",
"hostname": "<string>",
"assigned_at": "<string>"
}
}
}
The IP Address ID
The region
and server
are provided as extra attributes that are lazy loaded. To request it, just set extra_fields[ip_addresses]=region,server
in the query string.
Was this page helpful?