Help Center/ DataArts Insight/ API Reference/ Data Source/ Verifying a VPC Endpoint Service and Creating a VPC Endpoint
Updated on 2025-02-25 GMT+08:00

Verifying a VPC Endpoint Service and Creating a VPC Endpoint

Function

This API is used to verify VPC endpoint services and create VPC endpoints.

URI

POST /v1/{project_id}/connections/vpc-endpoint

Table 1 URI parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

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

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Workspace-Id

Yes

String

Workspace ID. For how to obtain it, see Obtaining a Workspace ID.

X-Auth-Token

Yes

String

User token. Obtain a user token by calling IAM's "Obtaining a User Token" API. X-Subject-Token in the response header is the desired user token.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

ds_type

Yes

String

Explanation

Data source type.

For example, MySQL indicates that the type of the connected data source is MySQL. The MySQL driver package is used for query.

Constraints

N/A

Value range

The enumerated values are:

  • MySQL.
  • DWS: data source type corresponding to GaussDB(DWS).
  • PostgreSQL.
  • OpenGauss: data source type corresponding to GaussDB.
  • Doris.
  • HIVE.
  • ClickHouse.
  • API: data source type corresponding to API data.

Default value

N/A

vpc_ep_server_name

No

String

Name of a VPC endpoint service. This parameter is mandatory when the VPC endpoint service ID is left blank.

vpc_ep_server_id

No

String

ID of the VPC endpoint service. This parameter is mandatory when the VPC endpoint service name is left blank.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

id

String

ID of the connected instance.

create_date

Long

Timestamp when the connected instance is created.

create_user

String

Creator ID.

create_user_name

String

Creator name.

update_date

Integer

Timestamp when the connected instance is updated.

update_user

String

ID of the user who performs the update.

update_user_name

String

Name of the user who performs the update.

project_id

String

Project ID.

domain_id

String

User domain ID.

ds_type

String

Explanation

Data source type.

For example, MySQL indicates that the type of the connected data source is MySQL. The MySQL driver package is used for query.

Constraints

N/A

Value range

The enumerated values are:

  • MySQL.
  • DWS.
  • PostgreSQL.
  • OpenGauss: data source type corresponding to GaussDB.
  • Doris.
  • HIVE.
  • ClickHouse.
  • API: data source type corresponding to API data.

Default value

N/A

vpc_ep_server_id

String

ID of the VPC endpoint service.

vpc_ep_server_name

String

Name of a VPC endpoint service.

vpc_ep_client_id

String

VPC endpoint ID.

vpc_ep_client_status

String

VPC endpoint status. The options are:

  • accepted: The VPC endpoint has been accepted.
  • pendingAcceptance: The VPC endpoint is to be reviewed.

scene

String

Network scenario.

  • dii-app_to_data-source: VPCEP channel from DataArts Insight to the data source.

Example Request

Verify a VPC endpoint service and create a VPC endpoint.

POST /v1/{project_id}/connections/vpc-endpoint
{
  "ds_type" : "DWS",
  "vpc_ep_server_name" : "cn-xxxx-x.DII-INGEST-LB.xxxxxx-31cf-4e27-xxxx-4b71db9b82fb"
}

Example Response

Status code: 200

The VPC endpoint service is successfully verified.

{
  "create_date" : 1714962072863,
  "create_user" : "xxxxx",
  "create_user_name" : "xxxx",
  "update_date" : 1714962072863,
  "update_user" : "xxxx",
  "update_user_name" : "xxxx",
  "id" : "8a8080c08xxxxxf4bb485240001",
  "project_id" : "9c3043axxxx88643b3xxxxxx27",
  "domain_id" : "d22f8axxx428fb2260xxxxx823",
  "ds_type" : "DWS",
  "vpc_ep_server_id" : "xxxxx-31cf-4e27-xxxxx-4b71db9b82fb",
  "vpc_ep_server_name" : "cn-xxxx-x.DII-xxxx-LB.716b4ee7-xxxx-4e27-852e-xxxxxxx",
  "vpc_ep_client_id" : "xxxxxx-62be-4479-xxxxx-7379d6dafc40",
  "vpc_ep_client_status" : "accepted",
  "scene" : "dii-app_to_data-source"
}

Status Codes

Status Code

Description

200

The VPC endpoint service is successfully verified.

Error Codes

See Error Codes.