Validates a connection.
Try it now
Test
RAM authorization
Request syntax
POST /api/v1/connections/validate HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| Configs |
object |
No |
The configuration of the connection, specified as key-value pairs. The configuration keys vary by connection type. For more information, see the supplementary information about the request parameters of the CreateConnection operation. |
|
|
string |
No |
The configuration of the connection, specified as key-value pairs. The configuration keys vary by connection type. For more information, see the supplementary information about the request parameters. |
https://dashscope.aliyuncs.com/compatible-mode/v1 |
|
| ConnectionId |
string |
No |
The connection ID. For more information about how to obtain the connection ID, see ListConnections. |
conn-x2wz5zvvbyf2420fi9 |
| ConnectionType |
string |
No |
The connection type. Only connection types that support public network access are available. Valid values:
|
DashScopeConnection |
| Secrets |
object |
No |
The key-value pairs to encrypt, such as a database logon password or a model connection key. |
|
|
string |
No |
The connection configuration to encrypt, such as database credentials or a model service key. |
ZGJiZWQ2ZDY3MTMyYjJk****************NjE2NDg1NzM0YzlkZg== |
|
| ValidateType |
string |
No |
The validation type. Set the value to:
|
Connectivity |
| WorkspaceId |
string |
Yes |
The workspace ID. For more information about how to obtain the workspace ID, see ListWorkspaces. |
1234 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| Status |
string |
The validation status.
|
success |
| RequestId |
string |
The request ID. |
5A14FA81-DD4E-******-6343FE44B941 |
| Message |
string |
A description of the validation result. |
The connection is reachable. |
| Code |
string |
The error code returned if the request fails. |
403 |
| Details |
object |
The details of the validation result. |
|
|
string |
Details of the validation result. For example, `LatencyMs` indicates the test latency in milliseconds. |
100 |
Examples
Success response
JSON format
{
"Status": "success",
"RequestId": "5A14FA81-DD4E-******-6343FE44B941",
"Message": "The connection is reachable.",
"Code": "403",
"Details": {
"key": "100"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.