Managing vNET Reservations

A vNET Reservation enables the user to reserve an IP address for an instance.

Add vNET Reservation

This API enables you to add new vNET Reservation.

Method

POST

REST Resource

/vnetreservation/

URI

https://api_endpoint/vnetreservation/

Request Body Parameters

Parameter Description
name A unique hierarchical name for vNET Reservation . For example, /mytenant/public/myvnetreservation

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

vnet vNET name from where the IP address will be reserved
ip (Optional) IP address allocated for this IP entry. By default, a random IP address will be taken from the vNET IP range. If an IP address is specified, then the API will attempt to allocate the specified address from the vNET pool.

Example URI

https://api.oc.example.com/vnetreservation/

Example Request Body

{
 "name": "/mytenant/public/vnetres-1", 
 "vnet": "/mytenant/public/IPoIB-Test"
}

Example Response Body

{
 "account": "/mytenant/default", 
 "used": false, 
 "name": "/mytenant/public/vnetres-1", 
 "ip": "192.168.160.65", 
 "uri": "http://api.oc.example.com/vnetreservation/mytenant/public/vnetres-1", 
 "quota": null, 
 "quota_reservation": null, 
 "vnet": "/mytenant/public/IPoIB-Test"
}

Delete vNET Reservation

This API enables you to delete a specific vNET Reservation.

Method

DELETE

REST Resource

/vnetreservation/name

URI

https://api_endpoint/vnetreservation/name

URI Parameter

Parameter Description
name A unique hierarchical name for the vNET Reservation. For example, /mytenant/public/myvnetreservation

Example URI

http://api.oc.example.com/vnetreservation/mytenant/public/vnetres-1

Retrieve vNET Reservation Details

You can retrieve vNET Reservation details by using the REST API.

Discover vNET Reservation

This API enables you to discover all the vNET Reservations listed in a specific container or subcontainer.

Note:

The discover API calls display the names of the objects in the specified container, not the details about the objects. To list the names of the objects, you must set the Accept header to application/oracle-compute-v3+directory+json. For all other purposes, you must set the Accept header to application/oracle-compute-v3+json.

Method

GET

REST Resource

/vnetreservation/container/

URI

https://api_endpoint/vnetreservation/container/

URI Parameter

Parameter Description
container Hierarchical name-space for vNET Reservation.

Example URI

https://api.oc.example.com/vnetreservation/mytenant/public/

Example Response Body

{"result": ["/mytenant/public/myreserve", "/mytenant/public/mysecondreserve"]}

Get vNET Reservation

This API enables you to retrieve information for a specific vNET Reservation.

Method

GET

REST Resource

/vnetreservation/name

URI

https://api_endpoint/vnetreservation/{name}

URI Parameters

Parameter Description
name A unique hierarchical name for vNET Reservation. For example, /mytenant/public/myreservation

Example URI

https://api.oc.example.com/vnetreservation/mytenant/public/myreserve

Example Response Body

 {
        "result": 
        [{
  "account": "/mytenant/default", 
  "used": false, 
  "name": "/mytenant/public/myreserve", 
  "ip": "192.168.192.17", 
  "uri": "https://api/vnetreservation/mytenant/public/myreserve", 
  "quota": null, 
  "quota_reservation": null, 
  "vnet": "/mytenant/public/vnet_1"
 }]
}

List vNET Reservations

This API enables you to retrieve information for all the vNET Reservations in a specific container.

Method

GET

REST Resource

/vnetreservation/container/

URI

https://api_endpoint/vnetreservation/container?ip=ipValue&quota=quotaValue

URI Parameters

Parameter Description
container A unique hierarchical namespace for vNET Reservation . For example, /mytenant/public/
ip=ipValue (Optional) IP address allocated for this IP entry. By default, a random IP address will be taken from the vNET pool. If specified, then the results are filtered based on the value of this parameter.
quota=quotaValue (Optional) The quota against which this reservation is created. If specified, then the results are filtered based on the value of this parameter.

Example URI

https://api.oc.example.com/vnetreservation/mytenant/public/

Example Response Body

{"result": [
 {
 "account": "/docstenant/default", 
 "used": false, 
 "name": "/docstenant/public/myreserve", 
 "ip": "192.168.192.17", 
 "uri": "https://api/vnetreservation/docstenant/public/myreserve", 
 "quota": null, 
 "quota_reservation": null, 
 "vnet": "/docstenant/public/vnet_1"}, 

{
 "account": "/docstenant/default", 
 "used": false, 
 "name": "/docstenant/public/mysecondreserve", 
 "ip": "192.168.192.18", 
 "uri": "https://api/vnetreservation/docstenant/public/mysecondreserve", 
 "quota": null, 
 "quota_reservation": null, 
 "vnet": "/docstenant/public/vnet_1"
}
]}