ValidateConnection
Validates a connection.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
paiworkspace:ValidateConnection |
none |
*All Resource
|
None | None |
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 information of the connection. The information is configured in key-value pairs. The keys in the configuration vary based on the connection type. For more information, see the supplementary description of request parameters for the CreateConnection operation. |
|
|
string |
No |
The configuration information of the connection. The information is configured in key-value pairs. The keys in the configuration vary based on the connection type. For more information, see the supplementary description of 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 type of the connection. You can specify a connection type that supports public network access. Valid values:
|
DashScopeConnection |
| Secrets |
object |
No |
The key-value configurations that require encryption, such as the database logon password and the key for the model connection. |
|
|
string |
No |
The connection configuration information that requires encryption, such as the database account and password, and the key for the model service. |
ZGJiZWQ2ZDY3MTMyYjJk****************NjE2NDg1NzM0YzlkZg== |
|
| ValidateType |
string |
No |
The validation type. Valid values:
|
Connectivity |
| WorkspaceId |
string |
Yes |
The workspace ID. You can obtain the workspace ID by calling the ListWorkspaces operation. |
1234 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| Status |
string |
The status of the validation result. Valid values:
|
success |
| RequestId |
string |
The request ID. |
5A14FA81-DD4E-******-6343FE44B941 |
| Message |
string |
The description of the validation result. |
The connection is reachable. |
| Code |
string |
The error code returned when the request fails. |
403 |
| Details |
object |
The details of the validation result. |
|
|
string |
The detailed information 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.