You can reserve an IP address from the available tenant networks in a tenant. The reserved IP address can be a public or private IP address that you want to assign to an instance. The specified IP address must not be in use by an existing instance, and must be within the IP range of the vNet.
Use the following command to reserve an IP address in a network associated with a tenant:
oracle-compute add vnetreservation name vnet --ip
If you did not specify the IP address in the command, then an IP address from the set of available IP addresses assigned to the vnet is automatically reserved.
For more information, see CLI Reference for Oracle Compute Cloud Service.
To reserve an IP address using the API, use the POST https://api.oc.example.com/vnetreservation/
method.
For more information, see REST API Reference for Oracle Compute Cloud Service.