Updated on 2024-11-04 GMT+08:00

Querying Supplementary Network Interfaces

Function

This API is used to query supplementary network interfaces. A maximum of 2,000 records are returned for each query.

URI

GET /v3/{project_id}/vpc/sub-network-interfaces

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

For details about how to obtain a project ID, see Obtaining a Project ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

limit

No

Integer

  • Number of records returned on each page.

  • Value range: 0 to 2000.

marker

No

String

Start resource ID of pagination query. If the parameter is left blank, only resources on the first page are queried.

id

No

Array of strings

  • ID of the supplementary network interface. Multiple IDs can be specified for filtering.

  • This parameter is used to query supplementary network interfaces.

description

No

Array of strings

  • Description about the supplementary network interface. Multiple descriptions can be specified for filtering.

  • This parameter is used to filter supplementary network interfaces by description.

vpc_id

No

Array of strings

  • VPC ID of the supplementary network interface. Multiple IDs can be specified for filtering.

  • This parameter is used to query supplementary network interfaces in one or more VPCs.

virsubnet_id

No

Array of strings

  • Virtual subnet ID of the supplementary network interface. Multiple IDs can be specified for filtering.

  • This parameter is used to query supplementary network interfaces in one or more virtual subnets.

parent_id

No

Array of strings

  • ID of the elastic network interface that the supplementary network interface is attached to. Multiple IDs can be specified for filtering.

  • This parameter is used to filter supplementary network interfaces of one or more elastic network interfaces.

private_ip_address

No

Array of strings

  • Private IPv4 address of the supplementary network interface. Multiple private IPv4 addresses can be specified for filtering.

  • This parameter is used to filter supplementary network interfaces using one or more private IPv4 addresses.

mac_address

No

Array of strings

  • MAC address of the supplementary network interface. Multiple MAC addresses can be specified for filtering.

  • This parameter is used to filter supplementary network interfaces.

enable_ip

No

Boolean

  • Whether an EIP is bound. This parameter is used to filter supplementary network interfaces based on whether an EIP is bound.

scope

No

String

  • Network border group that is used to filter supplementary network interfaces.

security_groups

No

String

  • ID of the security group associated with the supplementary network interfaces. Multiple IDs can be specified for filtering.

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

request_id

String

  • Request ID.

  • The value must be in standard UUID format.

sub_network_interfaces

Array of SubNetworkInterface objects

Supplementary network interfaces.

page_info

PageInfo object

Pagination information.

Table 4 SubNetworkInterface

Parameter

Type

Description

id

String

  • Supplementary network interface ID, which uniquely identifies the supplementary network interface.

  • The value is in UUID format with hyphens (-).

virsubnet_id

String

  • ID of the virtual subnet.

  • The value must be in standard UUID format.

private_ip_address

String

  • Private IPv4 address of the supplementary network interface.

  • The value must be within the virtual subnet. If this parameter is left blank, an IP address will be randomly assigned.

ipv6_ip_address

String

  • IPv6 address of the supplementary network interface.

mac_address

String

  • MAC address of the supplementary network interface.

  • The value is a valid MAC address assigned by the system randomly.

parent_device_id

String

  • Device ID.

  • The value must be in standard UUID format.

parent_id

String

  • ID of the elastic network interface.

  • The value must be in standard UUID format.

description

String

  • Description about the supplementary network interface.

  • The value can contain up to 255 characters and cannot contain angle brackets (< or >).

vpc_id

String

  • VPC ID of the supplementary network interface.

  • The value must be in standard UUID format.

vlan_id

Integer

  • VLAN ID of the supplementary network interface.

  • The value ranges from 1 to 4094.

  • Each supplementary network interface has a unique VLAN ID.

security_groups

Array of strings

  • Security group IDs, for example, "security_groups": ["a0608cbf-d047-4f54-8b28-cd7b59853fff"].

  • The default value is the default security group.

tags

Array of ResourceTag objects

  • Tags of the supplementary network interface.

project_id

String

  • Project ID of the supplementary network interface.

created_at

String

  • Time when the supplementary network interface was created.

  • The value is a UTC time in the format of yyyy-MM-ddTHH:mm:ssZ.

allowed_address_pairs

Array of AllowAddressPair objects

  • IP address and MAC address pairs. For details, see the AllowAddressPair table.

  • Note:

    • The IP address cannot be 0.0.0.0.

    • Configure a dedicated security group for the port if allowed_address_pairs has a CIDR block with a netmask length less than 24.

    • ip_address cannot be set to a CIDR block in a hardware SDN environment.

state

String

  • Status of the supplementary network interface.

instance_id

String

  • ID of the instance that is attached to the supplementary network interface, for example, the RDS instance ID.

instance_type

String

  • Type of the instance that is attached to the supplementary network interface, for example, an RDS instance.

scope

String

  • Public network egress information of the site where the supplementary network interface works.

security_enabled

Boolean

  • Whether the security option is enabled for the supplementary network interface. If the option is not enabled, the security group does not take effect.

Table 5 ResourceTag

Parameter

Type

Description

key

String

  • Tag key

  • Tag keys must be unique for each resource.

Minimum: 1

Maximum: 128

value

String

  • Tag value.

Maximum: 255

Table 6 AllowAddressPair

Parameter

Type

Description

ip_address

String

  • IP address.

    • You cannot set it to 0.0.0.0.

    • Configure a dedicated security group for the port if allowed_address_pairs has a CIDR block with a netmask length less than 24.

mac_address

String

  • MAC address.

Table 7 PageInfo

Parameter

Type

Description

previous_marker

String

First record on the current page.

current_count

Integer

Total number of records on the current page.

next_marker

String

Last record on the current page. This parameter does not exist if the page is the last one.

Example Requests

  • Querying supplementary network interfaces by its ID.

    GET https://{Endpoint}/v3/8c6fb137a48a428aaf9a0229dca4edb3/vpc/sub-network-interfaces?id=022b5c53-20e1-4f4b-b90c-0575a5e97412&id=056d6cb4-b436-460d-9a63-67666bf3ea9c
  • Querying supplementary network interfaces by combined filters.

    https://{Endpoint}/v3/8c6fb137a48a428aaf9a0229dca4edb3/vpc/sub-network-interfaces?virsubnet_id=3eae2c96-de45-4c41-bf2d-e4ad53a2acb4&private_ip_address=192.168.22.177&parent_id=5eb9dc59-8159-4197-88ea-f3507ad8e0a7
  • Querying supplementary network interfaces by page.

    GET https://{Endpoint}/v3/8c6fb137a48a428aaf9a0229dca4edb3/vpc/sub-network-interfaces?limit=2

Example Responses

Status code: 200

Normal response to the GET operation. For more status codes, see Status Codes.

{
  "request_id" : "e4cb9e3a-7b99-41c9-afd8-1630fe313299",
  "sub_network_interfaces" : [ {
    "id" : "2be868f2-f7c9-48db-abc0-eea0b9105b0d",
    "project_id" : "8c6fb137a48a428aaf9a0229dca4edb3",
    "virsubnet_id" : "08278e6c-61ca-46c1-9fc3-0d4f6c12f193",
    "private_ip_address" : "10.0.0.225",
    "mac_address" : "fa:16:3e:48:f8:6f",
    "parent_device_id" : "1ab01f1d-4ef7-4d83-82be-802b3aca0223",
    "security_groups" : [ "6727c950-9f01-47a2-a7aa-7d3686c4c95b" ],
    "allowed_address_pairs" : [ ],
    "vpc_id" : "63b97e6b-3598-430f-9eb8-1caf06937be8",
    "parent_id" : "637748df-2986-4350-8303-95d259580fb3",
    "vlan_id" : 2787,
    "instance_type" : "",
    "instance_id" : "",
    "tags" : [ ],
    "created_at" : "2020-05-19T01:16:25.000+00:00"
  }, {
    "id" : "55761e2d-8f72-42c0-9874-98e9885bf0fe",
    "project_id" : "8c6fb137a48a428aaf9a0229dca4edb3",
    "virsubnet_id" : "08278e6c-61ca-46c1-9fc3-0d4f6c12f193",
    "private_ip_address" : "10.0.3.55",
    "mac_address" : "fa:16:3e:c2:2c:ba",
    "parent_device_id" : "1ab01f1d-4ef7-4d83-82be-802b3aca0223",
    "security_groups" : [ "6727c950-9f01-47a2-a7aa-7d3686c4c95b" ],
    "allowed_address_pairs" : [ ],
    "vpc_id" : "63b97e6b-3598-430f-9eb8-1caf06937be8",
    "parent_id" : "637748df-2986-4350-8303-95d259580fb3",
    "vlan_id" : 799,
    "instance_type" : "",
    "instance_id" : "",
    "tags" : [ ],
    "created_at" : "2020-05-19T01:16:31.000+00:00"
  } ],
  "page_info" : {
    "next_marker" : "55761e2d-8f72-42c0-9874-98e9885bf0fe",
    "previous_marker" : "2be868f2-f7c9-48db-abc0-eea0b9105b0d",
    "current_count" : 2
  }
}

Status Codes

Status Code

Description

200

Normal response to the GET operation. For more status codes, see Status Codes.

Error Codes

See Error Codes.