Queries the configuration information of a single connection.
Operation description
Queries the configuration information of a single connection.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
eventbridge:GetConnection |
get |
*Connection
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ConnectionName |
string |
Yes |
The name of the connection. |
connection-name |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The returned request ID. |
34AD682D-5B91-5773-8132-AA38C130**** |
| Message |
string |
The information returned by the API request. |
success |
| Code |
string |
The API status or POP error code. Valid values: Success: The request was successful. |
Success |
| HttpCode |
integer |
The HTTP status code. |
200 |
| Data |
object |
The returned result. |
|
| Connections |
array<object> |
The list of connection configuration information. |
|
|
array<object> |
The data structure of the connection configuration information. |
||
| ConnectionName |
string |
The name of the connection configuration. |
demo |
| Id |
integer |
The data source ID. |
5668 |
| Description |
string |
The description of the connection configuration. |
demo |
| Type |
string |
The connection type. Valid values: Http, MySQL, PostgreSQL, Elasticsearch. |
Http |
| Parameters |
any |
The data source connection parameters (JSON object). This parameter is returned only for data source type connections, and is empty for the Http type. For field definitions, refer to ParamsSchema returned by GetConnectionType. |
{"HostName":"xxx.mysql.rds.aliyuncs.com","Port":"3306","User":"root","Password":"xxx","DatabaseName":"demo_db"} |
| GmtCreate |
integer |
The creation time. |
1669648905 |
| NetworkParameters |
object |
The data structure of the network configuration. |
|
| NetworkType |
string |
|
PublicNetwork |
| VpcId |
string |
The ID of the virtual private cloud (VPC). |
eb-test/vpc-bp1symadadwnwg**** |
| VswitcheId |
string |
The vSwitch ID. |
vsw-bp1iu4x7aeradadown****,vsw-bp193sqmadadlaszpeq**** |
| SecurityGroupId |
string |
The security group ID. |
eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9**** |
| AuthParameters |
object |
The data structure of the authorization. |
|
| AuthorizationType |
string |
The authorization type. Valid values:
|
BASIC_AUTH |
| ApiKeyAuthParameters |
object |
The data structure of the API key. |
|
| ApiKeyName |
string |
The key of the API key. |
key |
| ApiKeyValue |
string |
The value of the API key. |
value |
| BasicAuthParameters |
object |
The data structure of basic authentication. |
|
| Password |
string |
The password for basic authentication. |
******** |
| Username |
string |
The username for basic authentication. |
admin |
| OAuthParameters |
object |
The data structure of the OAuth request parameters. |
|
| AuthorizationEndpoint |
string |
The endpoint for OAuth to obtain the token. |
http://localhost:8080/oauth/token |
| HttpMethod |
string |
The HTTP request method. Valid values:
|
POST |
| ClientParameters |
object |
The data structure of the client parameters. |
|
| ClientID |
string |
The client ID. |
ClientID |
| ClientSecret |
string |
The client secret of the application. |
Qo57Q~F249~S74GmNPA36pZJoJK4f4**** |
| OAuthHttpParameters |
object |
The request parameters for OAuth authentication. |
|
| BodyParameters |
array<object> |
The list of request parameter data structures. |
|
|
object |
The list of request parameter data structures. |
||
| IsValueSecret |
string |
Specifies whether it is used for authentication. |
false |
| Key |
string |
The key of the body request parameter. |
keyDemo |
| Value |
string |
The value of the body request parameter. |
valueDemo |
| HeaderParameters |
array<object> |
The list of request header parameters. |
|
|
object |
The list of request header parameters. |
||
| IsValueSecret |
string |
Specifies whether it is used for authentication. |
false |
| Key |
string |
The key of the request header parameter. |
keyDemo |
| Value |
string |
The value of the request header parameter. |
keyDemo |
| QueryStringParameters |
array<object> |
The data structure of the request path parameters. |
|
|
object |
The data structure of the request path parameters. |
||
| IsValueSecret |
string |
Specifies whether it is used for authentication. |
false |
| Key |
string |
The key of the request path parameter. |
keyDemo |
| Value |
string |
The value of the request path parameter. |
valueDemo |
Examples
Success response
JSON format
{
"RequestId": "34AD682D-5B91-5773-8132-AA38C130****",
"Message": "success",
"Code": "Success",
"HttpCode": 200,
"Data": {
"Connections": [
{
"ConnectionName": "demo",
"Id": 5668,
"Description": "demo",
"Type": "Http",
"Parameters": "{\"HostName\":\"xxx.mysql.rds.aliyuncs.com\",\"Port\":\"3306\",\"User\":\"root\",\"Password\":\"xxx\",\"DatabaseName\":\"demo_db\"}",
"GmtCreate": 1669648905,
"NetworkParameters": {
"NetworkType": "PublicNetwork",
"VpcId": "eb-test/vpc-bp1symadadwnwg****",
"VswitcheId": "vsw-bp1iu4x7aeradadown****,vsw-bp193sqmadadlaszpeq****",
"SecurityGroupId": "eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9****"
},
"AuthParameters": {
"AuthorizationType": "BASIC_AUTH",
"ApiKeyAuthParameters": {
"ApiKeyName": "key",
"ApiKeyValue": "value"
},
"BasicAuthParameters": {
"Password": "********",
"Username": "admin"
},
"OAuthParameters": {
"AuthorizationEndpoint": "http://localhost:8080/oauth/token",
"HttpMethod": "POST",
"ClientParameters": {
"ClientID": "ClientID",
"ClientSecret": "Qo57Q~F249~S74GmNPA36pZJoJK4f4****"
},
"OAuthHttpParameters": {
"BodyParameters": [
{
"IsValueSecret": "false",
"Key": "keyDemo",
"Value": "valueDemo"
}
],
"HeaderParameters": [
{
"IsValueSecret": "false",
"Key": "keyDemo",
"Value": "keyDemo"
}
],
"QueryStringParameters": [
{
"IsValueSecret": "false",
"Key": "keyDemo",
"Value": "valueDemo"
}
]
}
}
}
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 500 | InternalError | InternalError | |
| 409 | RequestParameterException | Request parameter exception | |
| 409 | ConnectionNotExist | The Connection name not existed! |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.