Create an IP Reservation

post

/ip/reservation/

Creates an IP reservation. After creating an IP reservation, you can associate it with an instance by using the HTTP request, POST /ipassociation/ (Create an IP Association).

Required Role: To complete this task, you must have the Compute_Operations role. If this role isn't assigned to you or you're not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud My Services. See Modifying User Roles in Managing and Monitoring Oracle Cloud.

Request

Supported Media Types
Header Parameters
Body ()
The request body contains details of the IP reservation that you want to create.
Root Schema : IPReservation-post-request
Type: object
The request body contains details of the IP reservation that you want to create.
Show Source
  • The three-part name of the object (/Compute-identity_domain/user/object).

    If you don't specify a name for this object, then the name is generated automatically.

    Object names can contain only alphanumeric characters, hyphens, underscores, and periods. Object names are case-sensitive.

  • /oracle/public/ippool

    Pool of public IP addresses

  • Set this to true. true indicates that the IP reservation has a persistent public IP address. You can associate either a temporary or a persistent public IP address with an instance when you create the instance.

    Temporary public IP addresses are assigned dynamically from a pool of public IP addresses. When you associate a temporary public IP address with an instance, if the instance is restarted or is deleted and created again later, its public IP address might change.

  • tags
    A comma-separated list of strings which helps you to identify IP reservations.
Nested Schema : tags
Type: array
A comma-separated list of strings which helps you to identify IP reservations.
Show Source

Response

Supported Media Types

201 Response

Created. See Status Codes for information about other possible HTTP status codes.
Headers
Body ()
Root Schema : IPReservation-response
Type: object
Show Source
  • Shows the default account for your identity domain.
  • Public IP address.

    An IP reservation is a public IP address that you can attach to a Compute Classic instance that requires access to or from the Internet.

  • The three-part name of the object (/Compute-identity_domain/user/object).

  • /oracle/public/ippool

    Pool of public IP addresses

  • true indicates that the IP reservation has a persistent public IP address. You can associate either a temporary or a persistent public IP address with an instance when you create the instance.

    Temporary public IP addresses are assigned dynamically from a pool of public IP addresses. When you associate a temporary public IP address with an instance, if the instance is restarted or is deleted and created again later, its public IP address might change.

  • Not used
  • tags
    A comma-separated list of strings which helps you to identify IP reservation.
  • Uniform Resource Identifier
  • true indicates that the IP reservation is associated with an instance.
Nested Schema : tags
Type: array
A comma-separated list of strings which helps you to identify IP reservation.
Show Source

Examples

cURL Command

The following example shows how to create an IP reservation by submitting a POST request on the REST resource using cURL. For more information about cURL, see Use cURL.

Enter the command on a single line. Line breaks are used in this example for readability.

curl -i -X POST
     -H "Cookie: $COMPUTE_COOKIE"
     -H "Content-Type: application/oracle-compute-v3+json"
     -H "Accept: application/oracle-compute-v3+json"
     -d "@requestbody.json"
        https://api-z999.compute.us0.oraclecloud.com/ip/reservation/
  • COMPUTE_COOKIE is the name of the variable in which you stored the authentication cookie earlier. For information about retrieving the authentication cookie and storing it in a variable, see Authentication.

  • api-z999.compute.us0.oraclecloud.com is an example REST endpoint URL. Change this value to the REST endpoint URL of your Compute Classic site. For information about finding out REST endpoint URL for your site, see Send Requests.

Example of Request Body

The following shows an example of the request body content in the requestbody.json file.

{
  "parentpool": "/oracle/public/ippool",
  "permanent": true,
  "name": null
}

Example of Response Body

The following example shows the response body in JSON format.

{
  "account": "/Compute-acme/default",
  "used": false,
  "name": "/Compute-acme/jack.jones@example.com/c7588bef-dab7-4b0d-adb4-648ba462c2c1",
  "tags": [],
  "ip": "129.144.53.38",
  "uri": "https://api-z999.compute.us0.oraclecloud.com/ip/reservation/Compute-acme/jack.jones@example.com/c7588bef-dab7-4b0d-adb4-648ba462c2c1",
  "quota": null,
  "parentpool": "/oracle/public/ippool",
  "permanent": true
}