osc compute server add-fixed-ip21

Adds a fixed IP address to a server instance, which associates that address with the server. The fixed IP address is retrieved from the network that you specify in the request.

Specify the addFixedIp action and the network ID in the request body.

Policy defaults enable only users with the administrative role or the owner of the server to perform this operation. Cloud providers can change these permissions through the policy.json file.

Normal response codes: 202

Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404)

Usage: osc compute server add-fixed-ip21 --network-id <NETWORK_ID> <ID>

Arguments:

  • <ID> — id parameter for /v2.1/servers/{id}/action API

Options:

  • --network-id <NETWORK_ID> — The network ID