Allocate an IP address

Allocate a specific IP address to a given network interface.

POST
https://api.katapult.io/core/v1/virtual_machine_network_interfaces/{virtual_machine_network_interface}/allocate_ip

If successful, this endpoint will return a 200 OK status.

Scopes

One of the following scopes are required to use this endpoint.

Arguments

The following arguments are supported for this endpoint.

Name Type Default Value

virtual_machine_network_interface Required

The network interface to allocate the IP to

Virtual Machine Network Interface Lookup None

ip_address Required

The IP address to allocate to this network interface

IP Address Lookup None

Potential Errors

The following errors may occur during this request.

Details HTTP status

invalid_ip

This IP address is not valid for this network interface.

422 Unprocessable Entity

ip_address_not_found

No IP addresses were found matching any of the criteria provided in the arguments

404 Not Found

ip_already_allocated

This IP address has already been allocated to another resource

422 Unprocessable Entity

virtual_machine_network_interface_not_found

No network interface was found matching any of the criteria provided in the arguments

404 Not Found

Returned Object

When the request is successful, you can expect an object matching the specification below to be returned.

{
    virtual_machine_network_interface: VirtualMachineNetworkInterface {
        id: String
        virtual_machine: VirtualMachine {
            id: String
            name: String
        }
        name: String
        network: Network {
            id: String
            name: String
        }
        mac_address: String
        state: String
        ip_addresses: [ IPAddress {
            id: String
            address: String
        } ]
    }
}