Floating IPs are public IP addresses that a user can acquire and use in an environment.
curl -H "MC-Api-Key: your_api_key" \
"https://cloudmc_endpoint/api/v2/services/compute-os/devel/floatingips"The above command returns a JSON structured like this:
{
"data": [
{
"id": "287a3963-983b-4602-9dea-4dff89e9dc10",
"floatingIpAddress": "10.182.56.27",
"fixedIpAddress": "10.0.0.8",
"externalNetworkId": "963b6966-d9d7-48a8-8141-f414a809dbf4"
}
],
"metadata": {
"recordCount": 1
}
}GET /services/:service_code/:environment_name/floatingips
Retrieve a list of all floating IPs in an environment.
| Attributes | |
|---|---|
idUUID |
The floating IP's id. |
floatingIpAddressstring |
The floating IP's public IP address. |
fixedIpAddressstring |
The fixed IP to which the floating IP is associated. This may be empty if the floating IP is not associated with an instance. |
externalNetworkIdUUID |
The id of the external network to which the floating IP belongs. |
curl -H "MC-Api-Key: your_api_key" \
"https://cloudmc_endpoint/api/v2/services/compute-os/devel/floatingips/287a3963-983b-4602-9dea-4dff89e9dc10"The above command returns a JSON structured like this:
{
"data": {
"id": "287a3963-983b-4602-9dea-4dff89e9dc10",
"floatingIpAddress": "10.182.56.27",
"fixedIpAddress": "10.0.0.8",
"externalNetworkId": "963b6966-d9d7-48a8-8141-f414a809dbf4"
}
}GET /services/:service_code/:environment_name/floatingips/:id
Retrieve information about a floating IP.
| Attributes | |
|---|---|
idUUID |
The floating IP's id. |
floatingIpAddressstring |
The floating IP's public IP address. |
fixedIpAddressstring |
The fixed IP to which the floating IP is associated. This may be empty if the floating IP is not associated with an instance. |
externalNetworkIdUUID |
The id of the external network to which the floating IP belongs. |
curl -X POST \
-H "MC-Api-Key: your_api_key" \
-d "request_body" \
"https://cloudmc_endpoint/api/v2/services/compute-os/devel/floatingips"Request body example:
{
"externalNetworkId": "networkId",
}POST /services/:service_code/:environment_name/floatingips
Acquire a floating IP in an environment.
| Optional | |
|---|---|
externalNetworkIdstring |
The external network id to associate the new floating ip. If there is more than one network, it will be required to specify it. |
curl -X DELETE \
-H "MC-Api-Key: your_api_key"
"https://cloudmc_endpoint/api/v2/services/compute-os/devel/floatingips/287a3963-983b-4602-9dea-4dff89e9dc10"DELETE /services/:service_code/:environment_name/floatingips/:id
Release a floating IP.