This API is used to create a virtual interface.
POST /v2.0/dcaas/virtual-interfaces
Table 1 lists the request parameter.
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
virtual_interface |
Dictionary data structure |
Yes |
Specifies the virtual_interface object. |
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
tenant_id |
String |
No |
Specifies the project ID. |
name |
String |
No |
Specifies the virtual interface name. |
description |
String |
No |
Provides supplementary information about the virtual interface. |
direct_connect_id |
String |
Yes |
Specifies the connection ID. |
vgw_ id |
String |
Yes |
Specifies the virtual gateway ID. |
type |
String |
Yes |
Specifies the virtual interface type. The value can be public or private. |
service_type |
String |
Yes |
Specifies the access service type. The value can be vpc, public service, or vpc and public service. |
vlan |
Integer |
Yes |
Specifies the VLAN used by the local gateway to communicate with the remote gateway. |
bandwidth |
Integer |
Yes |
Specifies the virtual interface bandwidth. |
local_gateway_v4_ip |
String |
Yes |
Specifies the IPv4 address of the local gateway. |
remote_gateway_v4_ip |
String |
Yes |
Specifies the IPv4 address of the remote gateway. |
route_mode |
String |
Yes |
Specifies the routing mode. The value can be static or bgp. |
bgp_asn |
Integer |
No |
Specifies the AS number of the BGP peer. |
bgp_md5 |
String |
No |
Specifies the MD5 password of the BGP peer. |
remote_ep_group_id |
String |
Yes |
Specifies the ID of the remote endpoint group that records the CIDR blocks used by the on-premises network. |
service_ep_group_id |
String |
No |
Specifies the ID of the service endpoint group that records the public service CIDR blocks. |
admin_state_up |
Boolean |
No |
Specifies the administrative status of the virtual interface. The value can be true or false. |
delete_time |
String |
No |
Specifies the time when the virtual interface is deleted. |
rate_limit |
Boolean |
No |
Specifies whether to limit the traffic rate. The value can be true or false. |
Table 3 lists the response parameter.
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
virtual_interface |
Dictionary data structure |
Yes |
Specifies the virtual_interface object. |
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
id |
String |
Yes |
Specifies the virtual interface ID. |
tenant_id |
String |
Yes |
Specifies the project ID. |
name |
String |
No |
Specifies the virtual interface name. |
description |
String |
No |
Provides supplementary information about the virtual interface. |
direct_connect_id |
String |
Yes |
Specifies the connection ID. |
vgw_ id |
String |
Yes |
Specifies the virtual gateway ID. |
type |
String |
Yes |
Specifies the virtual interface type. The value can be public or private. |
service_type |
String |
Yes |
Specifies the access service type. The value can be vpc, public service, or vpc and public service. |
vlan |
Integer |
Yes |
Specifies the VLAN used by the local gateway to communicate with the remote gateway. |
bandwidth |
Integer |
Yes |
Specifies the virtual interface bandwidth. |
local_gateway_v4_ip |
String |
Yes |
Specifies the IPv4 address of the local gateway. |
remote_gateway_v4_ip |
String |
Yes |
Specifies the IPv4 address of the remote gateway. |
route_mode |
String |
Yes |
Specifies the routing mode. The value can be static or bgp. |
bgp_asn |
Integer |
No |
Specifies the AS number of the BGP peer. |
bgp_md5 |
String |
No |
Specifies the MD5 password of the BGP peer. |
remote_ep_group_id |
String |
Yes |
Specifies the ID of the remote endpoint group that records the tenant CIDR blocks. |
service_ep_group_id |
String |
No |
Specifies the ID of the service endpoint group that records the public service CIDR blocks. |
create_time |
String |
No |
Specifies the time when the virtual interface is created. |
status |
String |
No |
Specifies the virtual interface status. The value can be ACTIVE, DOWN, BUILD, ERROR, PENDING_CREATE, PENDING_UPDATE, PENDING_DELETE, DELETED, AUTHORIZATION, or REJECTED. |
admin_state_up |
Boolean |
No |
Specifies the administrative status of the virtual interface. The value can be true or false. |
rate_limit |
Boolean |
No |
Specifies whether to limit the traffic rate. The value can be true or false. |
POST /v2.0/dcaas/virtual-interfaces
{
"virtual_interface" : {
"name" : "virtual interface1",
"direct_connect_id" : "6ecd9cf3-ca64-46c7-863f-f2eb1b9e838a",
"vgw_id" : "7ec892f3-ca64-46c7-863f-a2eb1b9e8389",
"type" : "private",
"service_type" : "vpc",
"vlan" : 100,
"bandwidth" : 10,
"local_gateway_v4_ip" : "180.1.1.1/24",
"remote_gateway_v4_ip" : "180.1.1.2/24",
"route_mode" : "static",
"remote_ep_group_id" : "78e34cf1-5468-87c7-223d-56e78b9699ef"
}
}
{
"virtual_interface" : {
"id" : "67c59cf4-1a64-46c7-763f-22eb1b9e8986",
"tenant_id" : "6fbe9263116a4b68818cf1edce16bc4f",
"name" : "virtual interface1",
"admin_state_up": true,
"description" : "",
"direct_connect_id" : "6ecd9cf3-ca64-46c7-863f-f2eb1b9e838a",
"vgw_id" : "7ec892f3-ca64-46c7-863f-a2eb1b9e8389",
"type" : "private",
"status": "PENDING_CREATE",
"bgp_md5": ""
"service_type" : "vpc",
"vlan" : 100,
"bandwidth" : 10,
"create_time": "2018-10-19 09:53:50.335431",
"bgp_asn": null,
"service_ep_group_id": null,
"delete_time": "None",
"local_gateway_v4_ip" : "180.1.1.1/24",
"remote_gateway_v4_ip" : "180.1.1.2/24",
"route_mode": "static",
"remote_ep_group_id" : "78e34cf1-5468-87c7-223d-56e78b9699ef",
"rate_limit": false,
"bfd": false,
"route-limit": null
}
}
For details, see Common Returned Values.