This API enables you to add a new virtual network for a tenant.
Note:
The tenant users can only add vNETs that are tied toIPoIB
vEthernets. However, if EoIB
vNET is needed the Oracle Cloud Administrator must create it in the tenancy for the tenant user to use.Method
POST
REST Resource
/vnet/
URI
https://api_endpoint/vnet/
Request Body Parameters
Parameter | Description |
---|---|
name | An unique hierarchical name for a vNET . For example, /mytenant/public/myvnet
Object names can contain only alphanumeric characters, hyphens, and periods. Object names are case-sensitive. |
vethernet | vEthernet to be associated with this vNET. For tenant user, only IPoIB vEthernet is supported. |
cidr | (Optional) Specifies the subnet Classless Inter-Domain Routing (CIDR) for vNET. Optional for IPoIB network.
Format: If |
ipranges | (Optional) IP address range for the vNET. It is a comma separated list and can have individual IP addresses or ranges using “-“ as a separator. For example, 192.0.1.10, 192.0.1.20-192.0.1.30
If no IP range is provided, the entire CIDR is used for IP addresses, that is from .1 to .254. |
description | (Optional) Description to correlate this vNET with internal tenant schema. |
global_ip_num | (Optional) Specifies the number of IP addresses to be used from the global IP pool. Not valid for EoIB network.
If the global IP pool is enabled in Oracle Compute, using this option will create a vNET by allocating a specified number of IP addresses from the global pool of IP addresses to guarantee uniqueness. This option is mutually exclusive of |
Example URI
https://api.oc.example.com/vnet/
Example Request Body
{"global_ip_num": 30, "name": "/mytenant/public/IPoIB-Test", "vethernet": "/mytenant/public/default", "description": "Testing vnet creation"}
Example Response Body
{ "status": {"total": 30, "reserved": 0, "failed_allocations": 0, "used": 0}, "account": "/mytenant/default", "infranet": false, "description": "Testing vnet creation", "uri": "http://api.oc.example.com/vnet/mytenant/public/IPoIB-Test", "eth_idx": null, "global_ip_num": 30, "ipranges": ["192.168.160.1-192.168.160.30"], "vethernet": "/mytenant/public/default", "free_ipranges": ["192.168.160.1-192.168.160.30"], "cidr": "192.168.160.0/27", "gateway": null, "name": "/mytenant/public/IPoIB-Test" }
This API enables you to delete an existing vNET entity. You cannot delete a vNET if it is used by any instance, or if there is an existing vNET Reservation associated with the vNET.
Method
DELETE
REST Resource
/vnet/name
URI
https://api_endpoint/vnet/name
URI Parameter
Parameter | Description |
---|---|
name | An unique hierarchical name for a vNET. For example, /mytenant/public/myvnet |
Example URI
https://api.oc.example.com/vnet/mytenant/public/IPoIB-service-manager
This API enables you to update information for a specific tenant vNET.
Note:
The tenant users can only update vNETs that are tied to IPoIB vEthernets.Method
PUT
REST Resource
/vnet/name
URI
https://api_endpoint/vnet/name
URI Parameter
Parameter | Description |
---|---|
name | An unique hierarchical name for a vNET . For example, /mytenant/public/myvnet
Object names can contain only alphanumeric characters, hyphens, and periods. Object names are case-sensitive. |
Request Body Parameters
Parameter | Description |
---|---|
vethernet | vEthernet to be associated with this vNET. For tenant user, only IPoIB type vEthernet is supported. |
cidr | (Optional) Specifies the subnet Classless Inter-Domain Routing (CIDR) for vNET. Optional for IPoIB type network.
Format: |
ipranges | (Optional) IP address range for the vNET. It is a comma separated list and can have individual IP addresses or ranges using “-“ as a separator. For example, 192.0.1.10, 192.0.1.20-192.0.1.30
If no IP range is provided, the entire CIDR is used for IP addresses, that is from .1 to .254. |
description | (Optional) Description to correlate this vNET with internal tenant schema. |
global_ip_num | (Optional) Specifies the number of IP addresses to be used from the global IP pool. Not valid for EoIB type network.
If the global IP pool is enabled in Oracle Compute, using this option will create a vNET by allocating a specified number of IP addresses from the global pool of IP addresses to guarantee uniqueness. This option is mutually exclusive of |
Example URI
http://api.oc.example.com/vnet/mytenant/public/IPoIB-Test
Example Request Body
{ "global_ip_num":62, "description": "Updated Desc.", "vethernet": "/mytenant/public/default", "name": "/mytenant/public/IPoIB-Test" }
Example Response Body
{ "status": {"total": 62, "reserved": 0, "failed_allocations": 0, "used": 0}, "account": "/mytenant/default", "infranet": false, "description": "Updated Desc.", "uri": "http://api.oc.example.com/vnet/mytenant/public/IPoIB-Test", "eth_idx": null, "global_ip_num": 62, "ipranges": ["192.168.160.65-192.168.160.126"], "vethernet": "/mytenant/public/default", "free_ipranges": ["192.168.160.65-192.168.160.126"], "cidr": "192.168.160.64/26", "gateway": null, "name": "/mytenant/public/IPoIB-Test" }
Note:
You can view the details of any vNET in your own tenancy, as well as vNETs you have been given access to by the Oracle Cloud Administrator.Topics:
This API enables you to discover a list of configured vNETs 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 theAccept
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
/vnet/container/
URI
https://api_endpoint/vnet/container/
URI Parameter
Parameter | Description |
---|---|
container | Hierarchical name-space for vNET. For example, /mytenant/public/ |
Example URI
https://api.oc.example.com/vnet/mytenant/public/
Example Response Body
{ "result": [ "/mytenant/public/IPoIB-instance-storage-c2", "/mytenant/public/IPoIB-ldap-internal-c2", "/mytenant/public/IPoIB-load-balancer-c2", "/mytenant/public/IPoIB-management-c2", "/mytenant/public/IPoIB-service-manager-c2" ] }
This API enables you to retrieve information for a specific vNET.
Method
GET
REST Resource
/vnet/name
URI
https://api_endpoint/vnet/name
URI Parameter
Parameter | Description |
---|---|
name | An unique hierarchical name for a vNET . For example, /mytenant/public/myvnet |
Example URI
https://api.oc.example.com/vnetaccess/mytenant/public/IPoIB-OMS-c2
Example Response Body
{ "permissions": {"object": [...]}, "vnet": "/mytenant/public/IPoIB-OMS-c2", "uri": "https://api.oc.example.com/vnetaccess/mytenant/public/IPoIB-OMS-c2", "name": "/mytenant/public/IPoIB-OMS-c2", "provider": false }
This API enables you to retrieve information for all the vNETs in a specific container.
Method
GET
REST Resource
/vnet/container/
URI
https://api_endpoint/vnet/container/
URI Parameter
Parameter | Description |
---|---|
container | Hierarchical namespace for vNET. For example, /mytenant/public/myvNET |
Example URI
https://api.oc.example.com/vnet/mytenant/public/
Example Response Body
{"result": [{ "status": {"total": 32766, "reserved": 6, "failed_allocations": 0, "used": 9}, "account": null, "infranet": true, "description": "Infrastructure vNet: mytenant/public/IPoIB-virt-admin-c2", "uri": "https://api.oc.example.com/vnet/mytenant/public/IPoIB-virt-admin-c2", "eth_idx": null, "global_ip_num": null, "ipranges": ["10.0.0.1-10.0.127.254"], "vethernet": "/mytenant/public/IPoIB-virt-admin-c2", "cidr": "10.0.0.0/17", "gateway": null, "name": "/mytenant/public/IPoIB-virt-admin-c2" }] }