Querying an Enhanced Datasource Connection List
Function
This API is used to query the list of created enhanced datasource connections.
URI
- URI format
- Parameter description
Table 1 URI parameter Parameter
Mandatory
Type
Description
project_id
Yes
String
Project ID, which is used for resource isolation. For details about how to obtain its value, see Obtaining a Project ID.
Table 2 query parameter description Parameter
Mandatory
Type
Description
limit
No
String
The maximum number of connections to be queried. The default value is 100. If limit is set to 0, all datasource connections are returned.
offset
No
String
The offset of the query result. The default value is 0. Note that the connections are sorted by creation time.
status
No
String
Connection status. The options are as follows:
- Active: The connection has been activated.
- DELETED: The connection has been deleted.
NOTE:The connection status is case insensitive.
name
No
String
Connection name
tags
No
String
List of tag names. The value is k=v for a single tag. Multiple tags are separated by commas (,). Example: tag1=v1,tag2=v2.
The following is an example of the URL containing the query parameter:
GET /v2.0/{project_id}/datasource/enhanced-connections?limit={limit}&offset={offset}&status={status}&name={name}
Request
None
Response
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
is_success |
No |
Boolean |
Indicates whether the request is successfully executed. Value true indicates that the request is successfully executed. |
message |
No |
String |
System prompt. If execution succeeds, the parameter setting may be left blank. |
connections |
No |
Array of Objects |
Datasource connection information list. For details, see Table 4. |
count |
No |
Integer |
Number of returned datasource connections. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
id |
No |
String |
Connection ID. Identifies the UUID of a datasource connection. |
name |
No |
String |
User-defined connection name. |
status |
No |
String |
Connection status. The options are as follows:
|
available_queue_info |
No |
Array of Objects |
For details about how to create a datasource connection for each queue, see Table 5. |
dest_vpc_id |
No |
String |
The VPC ID of the connected service. |
dest_network_id |
No |
String |
Subnet ID of the connected service. |
isPrivis |
No |
Boolean |
Whether the project permissions have been granted for the enhanced datasource connection. If the datasource connection has the permissions, the value of this field is false. Otherwise, the value is true. |
create_time |
No |
Long |
Time when a link is created. The time is converted to a UTC timestamp. |
hosts |
No |
Array of Objects |
User-defined host information. For details, see Table 4. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
peer_id |
No |
String |
ID of a datasource connection. |
status |
No |
String |
Connection status. For details about the status code, see Table 6. |
name |
No |
String |
Name of a queue. |
err_msg |
No |
String |
Detailed error message when the status is FAILED. |
update_time |
No |
Long |
Time when the available queue list was updated. |
Example Request
None
Example Response
{ "is_success": true, "message": "", "count": 1, "connections": [ { "name": "withvpc", "id": "4c693ecc-bab8-4113-a838-129cedc9a563", "available_queue_info": [ { "status": "ACTIVE", "name": "resource_mode_1", "peer_id": "d2ae6628-fa37-4e04-806d-c59c497492d1", "err_msg": "", "update_time": 1566889577861 } ], "dest_vpc_id": "22094d8f-c310-4621-913d-4c4d655d8495", "dest_network_id": "78f2562a-36e4-4b39-95b9-f5aab22e1281", "isPrivis": true, "create_time": 1566888011125, "status": "ACTIVE" } ] }
Status Codes
Table 7 describes the status code.
Error Codes
If an error occurs when this API is invoked, the system does not return the result similar to the preceding example, but returns the error code and error information. For details, see Error Code.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot