• Direct Connect

dc
  1. Help Center
  2. Direct Connect
  3. API Reference
  4. API
  5. Virtual Interface
  6. Querying a Virtual Interface List

Querying a Virtual Interface List

Function

This API is used to query a virtual interface list.

URI

GET /v2.0/dcaas/virtual-interfaces

Request

Table 1 lists the request parameter.

Table 1 Request parameter

Parameter

Type

Mandatory

Description

fields

String

No

Specifies the parameters expected to be returned.

If you do not specify it, all parameters will be returned.

Response

Table 2 lists the response parameter.

Table 2 Response parameter

Parameter

Type

Description

virtual_interfaces

List data structure

Specifies the virtual interface list.

Description of field virtual_interfaces

Parameter

Type

Description

id

String

Specifies the virtual interface ID.

tenant_id

String

Specifies the project ID.

name

String

Specifies the virtual interface name.

description

String

Provides supplementary information about the virtual interface.

direct_connect_id

String

Specifies the connection ID.

vgw_ id

String

Specifies the virtual gateway ID.

type

String

Specifies the interface type. The value can be public or private.

service_type

String

Specifies the access service type. The value can be vpc, public service, or vpc and public service.

vlan

Integer

Specifies the VLAN used by the local gateway to communicate with the remote gateway.

bandwidth

Integer

Specifies the virtual interface bandwidth.

local_gateway_v4_ip

String

Specifies the IPv4 address of the local gateway.

remote_gateway_v4_ip

String

Specifies the IPv4 address of the remote gateway.

route_mode

String

Specifies the routing mode. The value can be static or bgp.

bgp_asn

Integer

Specifies the AS number of the BGP peer.

bgp_md5

String

Specifies the MD5 password of the BGP peer.

remote_ep_group_id

String

Specifies the ID of the remote endpoint group that records the tenant CIDRs.

service_ep_group_id

String

Specifies the ID of the service endpoint group that records the public service CIDRs.

create_time

String

Specifies the time when the virtual interface is created.

delete_time

String

Specifies the time when the virtual interface is deleted.

status

String

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

Specifies the administrative state of the virtual interface.

The value can be true or false.

rate_limit

Boalean

Specifies whether to limit the traffic rate. The value can be true or false.

Examples

  • Example request
    1. All parameters are returned:
    GET /v2.0/dcaas/virtual-interfaces
    1. Filtered parameters are returned (for example, the filter is ID):
    GET /v2.0/dcaas/virtual-interfaces?id=67c59cf4-1a64-46c7-763f-22eb1b9e8986
  • Example response
    {
        "virtual_interfaces" : [{
            "id" : "67c59cf4-1a64-46c7-763f-22eb1b9e8986",  
            "tenant_id" : "6fbe9263116a4b68818cf1edce16bc4f",
            "name" : "virtual interface1",
            "description" : "",
            "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"
        }]
    }

Returned Value

For details, see section Common Returned Values.