Help Center/ VPC Endpoint/ API Reference/ API/ VPC Endpoint Services/ Querying details of a VPC endpoint service
Updated on 2022-12-13 GMT+08:00

Querying details of a VPC endpoint service

Function

Function This API is used to query details about a VPC endpoint service.

URI

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

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

Minimum: 1

Maximum: 64

vpc_endpoint_service_id

Yes

String

Specifies the ID of the VPC endpoint service.

Minimum: 1

Maximum: 64

Request Parameters

Table 2 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.

Minimum: 1

Maximum: 2048

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 3 Response body parameters

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. You cannot configure these cloud services, but can use them. 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.

cidr_type

String

Specifies the CIDR block type. ● public: indicates a public CIDR block. ● internal: indicates a private CIDR block. The default value is internal.

ports

Array of PortList objects

Specifies the port mappings opened by the 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.

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.

tags

Array of TagList objects

Resource tag list

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 (>).

Table 4 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 5 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 6 Error

Parameter

Type

Description

message

String

Task error description

code

String

Error code of a task exception.

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

error

Error object

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

Table 8 Error

Parameter

Type

Description

message

String

Task error description

code

String

Error code of a task exception.

Status code: 401

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: 403

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: 404

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: 405

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: 406

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: 407

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: 408

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: 409

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: 500

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: 501

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: 502

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: 503

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: 504

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.

Example Requests

GET https://{endpoint}/v1/{project_id}/vpc-endpoint-services/{vpc_endpoint_service_id}

This request is to query connections of the VPC endpoint service whose ID is 4189d3c2-8882-4871-a3c2-d380272eed88.GET https://{endpoint}/v1/{project_id}/vpc-endpoint-services/4189d3c2-8882-4871-a3c2-d380272eed88

Example Responses

Status code: 200

The server has successfully processed the request.

{
  "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"
}

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 server has not found anything matching the request URI.

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.