Help Center> VPC Endpoint> API Reference> API> VPC Endpoint Services> Querying VPC endpoint services
Updated on 2022-12-13 GMT+08:00

Querying VPC endpoint services

Function

Function This API is used to query VPC endpoint services.

URI

GET /v1/{project_id}/vpc-endpoint-services

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

endpoint_service_name

No

String

Specifies the name of the VPC endpoint service. The name is not case-sensitive and supports fuzzy match.

Minimum: 1

Maximum: 128

id

No

String

Specifies the unique ID of the VPC endpoint service.

status

No

String

Specifies the status of the VPC endpoint service. ● creating: The VPC endpoint service is being created. ● available: The VPC endpoint service can be connected. ● failed: The VPC endpoint service fails to be created. ● deleting: The VPC endpoint service is being deleted.

sort_key

No

String

Specifies the sorting field of the VPC endpoint services, which can be: ● create_at: VPC endpoint services are sorted by creation time. ● update_at: VPC endpoint services are sorted by update time. The default field is create_at.

Default: create_at

sort_dir

No

String

Specifies the sorting method of VPC endpoint services, which can be: ● desc: VPC endpoint services are sorted in descending order. ● asc: VPC endpoint services are sorted in ascending order. The default method is desc.

Default: desc

limit

No

Integer

Specifies the maximum number of VPC endpoint services displayed on each page. The value ranges from 0 to 1000 and is generally 10, 20, or 50. The default number is 10.

Minimum: 1

Maximum: 1000

Default: 10

offset

No

Integer

Specifies the offset. All VPC endpoint services after this offset will be queried. The offset must be an integer greater than 0 but less than the number of VPC endpoint services.

Minimum: 0

public_border_group

No

String

Specifies the VPC endpoint service that matches the edge attribute in the filtering result.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Specifies the user token. It can be obtained by calling the IAM API. The value of X-Subject-Token in the response header is the user token.

Content-Type

Yes

String

Specifies the MIME type of the request body. Default value application/json is recommended. For APIs used to upload objects or images, the MIME type varies depending on the flow type.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

endpoint_services

Array of ServiceList objects

VPC endpoint service list

total_count

Integer

Specifies the total number of VPC endpoint services that meet the search criteria. The number is not affected by the limit or offset parameter.

Table 5 ServiceList

Parameter

Type

Description

id

String

Specifies the unique ID of the VPC endpoint service.

port_id

String

Specifies the ID of the backend resource of the VPC endpoint service. The ID is in the universally unique identifier (UUID) format. The options are as follows: ● Load balancer: Specifies the port ID of the private IP address of the shared load balancer. ● Virtual machine: Specifies the NIC ID of the ECS IP address. ● Virtual IP address: Specifies the NIC ID of the physical server where the virtual resource is located.

vip_port_id

String

Specifies the ID of the virtual NIC to which the virtual IP address is bound. This parameter is returned only when port_id is set to VIP.

service_name

String

Specifies the name of the VPC endpoint service.

Minimum: 0

Maximum: 16

server_type

String

Specifies the resource type. ● VM: indicates a cloud server. ● VIP: indicates a virtual IP address. ● LB: indicates a shared load balancer.

vpc_id

String

Specifies the ID of the VPC to which the backend resource of the VPC endpoint service belongs.

approval_enabled

Boolean

Specifies whether approval is required. ● false: No approval is required. The created VPC endpoint is in the accepted state by default. ● true: Approval is required. The created VPC endpoint is in the pendingAcceptance state, and can be used only after being approved by the user of the VPC endpoint service.

status

String

Specifies the status of the VPC endpoint service. ● creating: The VPC endpoint service is being created. ● available: The VPC endpoint service can be connected. ● failed: The VPC endpoint service fails to be created. ● deleting: The VPC endpoint service is being deleted.

service_type

String

Specifies the type of the VPC endpoint service. There are two types of VPC endpoint services: interface and gateway. ● gateway: VPC endpoint services of this type are configured by O&M personnel. You can use them directly without creating them by yourselves. ● interface: Cloud services configured by O&M personnel and private services created by yourselves are included. Cloud services configured by O&M personnel do not need to be created. You can use it directly. You can create a VPC endpoint for accessing gateway and interface VPC endpoint services.

created_at

String

Specifies the creation time of the VPC endpoint service. The applied UTC time format is YYYY-MMDDTHH:MM:SSZ.

updated_at

String

Specifies the update time of the VPC endpoint service. The applied UTC time format is YYYY-MMDDTHH:MM:SSZ.

project_id

String

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

domain_id

String

Domain ID

ports

Array of PortList objects

Specifies the port mappings opened by the VPC endpoint service. Duplicate port mappings are not allowed in the same VPC endpoint service. If multiple VPC endpoint services share one port ID,the combinations of server ports and protocols for all port mappings between VPC endpoint services must be unique.

tags

Array of TagList objects

Resource tag list

connection_count

Integer

Specifies the number of VPC endpoints that are in the Creating or Accepted status.

tcp_proxy

String

Specifies whether the client information, such as IP address, port number, and marker_id, is transmitted to the server. The following methods are supported: ● TCP TOA: transmits the client information inserted in the tcp option field to the server. Note: TCP TOA is supported only when the backend resource type is Object Storage Service (OBS). ● Proxy Protocol: transmits the client information inserted in the tcp payload field to the server. tcp_proxy is available only when the server can parse fields tcp option and tcp payload. The values are as follows: ● close: indicates that the proxy protocol is disabled. ● toa_open: indicates that tcp_toa is enabled. ● proxy_open: indicates that proxy_protocol is enabled. ● open: indicates that both tcp_toa and proxy_protocol are enabled. The default value is close.

error

Array of Error objects

Specifies the error message returned when a task submission exception occurs.

description

String

Specifies the description field. The value can contain characters such as letters and digits, but cannot contain less than signs (<) and great than signs (>).

public_border_group

String

Specifies the information about Public Border Group of the pool corresponding to the VPC endpoint service.

Table 6 PortList

Parameter

Type

Description

client_port

Integer

Specifies the port to be accessed by a VPC endpoint. This port is provided by the VPC endpoint, allowing you to access the VPC endpoint service. Supported range: 1 to 65535.

Minimum: 1

Maximum: 65535

server_port

Integer

Specifies the port for accessing the VPC endpoint service. This port is associated with backend resources to provide VPC endpoint services. Supported range: 1 to 65535

Minimum: 1

Maximum: 65535

protocol

String

Port mapping protocol. TCP is supported.

Default: TCP

Table 7 TagList

Parameter

Type

Description

key

String

Specifies the tag key. A tag key contains a maximum of 36 Unicode characters. It cannot be left blank. It cannot contain equal signs (=), asterisks (*), less than signs (<), greater than signs (>), backslashes (), commas (,), vertical bars (|), and slashes (/), and the first and last characters cannot be spaces.

Minimum: 1

Maximum: 36

value

String

Specifies the tag key. A tag value contains a maximum of 43 Unicode characters and can be an empty string. It cannot contain equal signs (=), asterisks (*), less than signs(<), greater than signs (>), backslashes (), commas (,), vertical bars (|), and slashes (/), and the first and last characters cannot be spaces.

Minimum: 1

Maximum: 43

Table 8 Error

Parameter

Type

Description

message

String

Task error description

code

String

Error code of a task exception.

Status code: 400

Table 9 Response body parameters

Parameter

Type

Description

error

Error object

Specifies the error message returned when a task submission exception occurs.

Table 10 Error

Parameter

Type

Description

message

String

Task error description

code

String

Error code of a task exception.

Status code: 401

Table 11 Response body parameters

Parameter

Type

Description

error

Error object

Specifies the error message returned when a task submission exception occurs.

Table 12 Error

Parameter

Type

Description

message

String

Task error description

code

String

Error code of a task exception.

Status code: 403

Table 13 Response body parameters

Parameter

Type

Description

error

Error object

Specifies the error message returned when a task submission exception occurs.

Table 14 Error

Parameter

Type

Description

message

String

Task error description

code

String

Error code of a task exception.

Status code: 404

Table 15 Response body parameters

Parameter

Type

Description

error

Error object

Specifies the error message returned when a task submission exception occurs.

Table 16 Error

Parameter

Type

Description

message

String

Task error description

code

String

Error code of a task exception.

Status code: 405

Table 17 Response body parameters

Parameter

Type

Description

error

Error object

Specifies the error message returned when a task submission exception occurs.

Table 18 Error

Parameter

Type

Description

message

String

Task error description

code

String

Error code of a task exception.

Status code: 406

Table 19 Response body parameters

Parameter

Type

Description

error

Error object

Specifies the error message returned when a task submission exception occurs.

Table 20 Error

Parameter

Type

Description

message

String

Task error description

code

String

Error code of a task exception.

Status code: 407

Table 21 Response body parameters

Parameter

Type

Description

error

Error object

Specifies the error message returned when a task submission exception occurs.

Table 22 Error

Parameter

Type

Description

message

String

Task error description

code

String

Error code of a task exception.

Status code: 408

Table 23 Response body parameters

Parameter

Type

Description

error

Error object

Specifies the error message returned when a task submission exception occurs.

Table 24 Error

Parameter

Type

Description

message

String

Task error description

code

String

Error code of a task exception.

Status code: 409

Table 25 Response body parameters

Parameter

Type

Description

error

Error object

Specifies the error message returned when a task submission exception occurs.

Table 26 Error

Parameter

Type

Description

message

String

Task error description

code

String

Error code of a task exception.

Status code: 500

Table 27 Response body parameters

Parameter

Type

Description

error

Error object

Specifies the error message returned when a task submission exception occurs.

Table 28 Error

Parameter

Type

Description

message

String

Task error description

code

String

Error code of a task exception.

Status code: 501

Table 29 Response body parameters

Parameter

Type

Description

error

Error object

Specifies the error message returned when a task submission exception occurs.

Table 30 Error

Parameter

Type

Description

message

String

Task error description

code

String

Error code of a task exception.

Status code: 502

Table 31 Response body parameters

Parameter

Type

Description

error

Error object

Specifies the error message returned when a task submission exception occurs.

Table 32 Error

Parameter

Type

Description

message

String

Task error description

code

String

Error code of a task exception.

Status code: 503

Table 33 Response body parameters

Parameter

Type

Description

error

Error object

Specifies the error message returned when a task submission exception occurs.

Table 34 Error

Parameter

Type

Description

message

String

Task error description

code

String

Error code of a task exception.

Status code: 504

Table 35 Response body parameters

Parameter

Type

Description

error

Error object

Specifies the error message returned when a task submission exception occurs.

Table 36 Error

Parameter

Type

Description

message

String

Task error description

code

String

Error code of a task exception.

Example Requests

GET https://{endpoint}/v1/{project_id}/vpc-endpoint-services?endpoint_service_name={endpoint_service_name}&id={id}&sort_key={sort_key}&sort_dir={sort_dir}&limit={limit}&offset={offset}&status={status}

Example Responses

Status code: 200

The server has successfully processed the request.

{
  "endpoint_services" : [ {
    "id" : "4189d3c2-8882-4871-a3c2-d380272eed83",
    "port_id" : "4189d3c2-8882-4871-a3c2-d380272eed88",
    "vpc_id" : "4189d3c2-8882-4871-a3c2-d380272eed80",
    "status" : "available",
    "approval_enabled" : false,
    "service_name" : "test123",
    "server_type" : "VM",
    "service_type" : "interface",
    "ports" : [ {
      "client_port" : "8080",
      "server_port" : "80",
      "protocol" : "TCP"
    }, {
      "client_port" : "8081",
      "server_port" : "80",
      "protocol" : "TCP"
    } ],
    "project_id" : "6e9dfd51d1124e8d8498dce894923a0d",
    "created_at" : "2022-04-14T09:35:47Z",
    "updated_at" : "2022-04-14T09:36:47Z",
    "public_border_group" : "br-iaas-odin1raa"
  } ],
  "total_count" : 100
}

Status Codes

Status Code

Description

200

The server has successfully processed the request.

400

The request could not be understood by the server due to malformed syntax.

401

The requested page requires a user name and password.

403

The server understood the request, but is refusing to fulfill it.

404

The requested page was not found.

405

The method specified in the request line is not allowed for the resource identified by the request URI.

406

The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request.

407

The client must first authenticate itself with the proxy.

408

The client did not produce a request within the time that the server was prepared to wait.

409

The request could not be completed due to a conflict with the current state of the resource.

500

Failed to complete the request. Service abnormality.

501

Failed to complete the request. The server does not support the requested function.

502

Failed to complete the request. because the server has received an invalid response.

503

Failed to complete the request. because the system is unavailable.

504

Gateway Timeout

Error Codes

See Error Codes.