/v1/floating-ipsCreate floating IP
Allocate a new floating IP from an external network
Header Parameters
X-Region
stringrequiredheader
Region code to query resources from. Required for all resource operations.
Example: "sao1"
Request Body
requiredContent-Type: application/json
description
stringoptionalport_id
string<uuid>optionalPort to associate with
fixed_ip_address
stringoptionalFixed IP to associate with (if port has multiple IPs)
dns_domain
stringoptionaldns_name
stringoptionaltags
arrayoptionalResponses
Floating IP allocated
Content-Type: application/json
floating_ip
objectoptionalInvalid request parameters
Content-Type: application/json
error
objectrequiredAuthentication required or token invalid
Content-Type: application/json
error
objectrequiredInsufficient permissions
Content-Type: application/json
error
objectrequiredExternal network not found
Content-Type: application/json
error
objectrequiredNo floating IPs available or IP already in use
Content-Type: application/json
error
objectrequiredInternal server error
Content-Type: application/json
error
objectrequiredcurl -X POST "https://api.spo1.mycloud.com/v1/floating-ips" \-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \-H "Content-Type: application/json" \-d '{"description": "string","port_id": "550e8400-e29b-41d4-a716-446655440000","fixed_ip_address": "string","dns_domain": "string","dns_name": "string","tags": ["web","frontend"]}'
Response
Floating IP allocated
{"floating_ip": {"id": "550e8400-e29b-41d4-a716-446655440000","crn": "crn:spo1:network:floating-ip:550e8400-e29b-41d4-a716-446655440000","description": "string","floating_ip_address": "203.0.113.10","status": "ACTIVE","port_id": "550e8400-e29b-41d4-a716-446655440000","fixed_ip_address": "string","router_id": "550e8400-e29b-41d4-a716-446655440000","dns_domain": "string","dns_name": "string","tags": ["web","frontend"],"created_at": "2024-01-15T10:30:00Z","updated_at": "2024-01-15T10:30:00Z"}}