Retrieves a list of connection configurations.
Operation description
Retrieves a list of connection configurations.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
eventbridge:ListConnections |
get |
*Connection
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ConnectionNamePrefix |
string |
No |
The connection configuration name prefix used to filter results. Supports prefix matching. |
connection-name |
| Type |
string |
No |
Filters query results by connection type. Valid values: Http, MySQL, PostgreSQL, Elasticsearch, OSS_TABLES, SLS, OTS, MaxCompute, MongoDB, Redis, SQLServer, ClickHouse, Oracle, Hive, Iceberg, lakehouse. If this parameter is not specified, all types are returned. |
Http |
| MaxResults |
integer |
No |
Excludes a single connection type. Valid values are the same as those for Type. Specify a single type name. Arrays or comma-separated values are not supported. For example, specify Http to exclude HTTP connections. If this parameter is not specified or is set to an empty string, no types are excluded. If this parameter is set to the same value as Type, an empty list is returned. Pagination and total count are calculated after filtering. |
Http |
| NextToken |
string |
No |
The maximum number of entries to return per request. You can use this parameter together with NextToken to implement pagination.
|
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The API status or POP error code. Valid values: Success: The request was successful. |
Success |
| Data |
object |
The list of connection configurations. |
|
| Connections |
array<object> |
The list of connection configurations. |
|
|
array<object> |
The data structure of the connection configuration. |
||
| AuthParameters |
object |
The authentication data structure. |
|
| ApiKeyAuthParameters |
object |
The data structure of the API key. |
|
| ApiKeyName |
string |
The key name of the API key. |
Token |
| ApiKeyValue |
string |
The value of the API key. |
asdkjnqkwejooa |
| AuthorizationType |
string |
The authentication type. Valid values:
|
BASIC_AUTH |
| BasicAuthParameters |
object |
The data structure of basic authentication. |
|
| Password |
string |
The password for basic authentication. |
admin |
| Username |
string |
The username for basic authentication. |
admin |
| OAuthParameters |
object |
The data structure of OAuth request parameters. |
|
| AuthorizationEndpoint |
string |
The endpoint for obtaining the OAuth token. |
http://localhost:8080/oauth/token |
| ClientParameters |
object |
The data structure of client parameters. |
|
| ClientID |
string |
The client ID. |
ClientID |
| ClientSecret |
string |
The client secret of the application. |
ClientSecret |
| HttpMethod |
string |
The HTTP method. Valid values:
|
POST |
| OAuthHttpParameters |
object |
The request parameters for OAuth authentication. |
|
| BodyParameters |
array<object> |
The list of request parameter data structures for the body. |
|
|
object |
The data structure of a body request parameter. |
||
| IsValueSecret |
string |
Indicates whether the value is a secret. |
false |
| Key |
string |
The key of the body request parameter. |
name |
| Value |
string |
The value of the body request parameter. |
demo |
| HeaderParameters |
array<object> |
The list of header parameter data structures. |
|
|
object |
The data structure of a header parameter. |
||
| IsValueSecret |
string |
Indicates whether the value is a secret. |
false |
| Key |
string |
The key of the header parameter. |
name |
| Value |
string |
The value of the header parameter. |
demo |
| QueryStringParameters |
array<object> |
The data structure of the URI of the request path parameters. |
|
|
object |
The entity of a URI of the request path parameter. |
||
| IsValueSecret |
string |
Indicates whether the value is a secret. |
false |
| Key |
string |
The key of the URI of the request path parameter. |
name |
| Value |
string |
The value of the URI of the request path parameter. |
demo |
| ConnectionName |
string |
The name of the connection configuration. |
connection-name |
| Description |
string |
The description of the connection configuration. |
Description of the connection configuration |
| GmtCreate |
integer |
The timestamp when the data source was created. |
1592838994234 |
| Id |
integer |
The ID of the connection configuration. |
1141093 |
| NetworkParameters |
object |
The data structure of network configurations. |
|
| NetworkType |
string |
The network type. Valid values:
|
PublicNetwork |
| SecurityGroupId |
string |
The security group ID. |
eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9rtyb |
| VpcId |
string |
The VPC ID. |
eb-test/vpc-bp1symadadwnwgmqud |
| VswitcheId |
string |
The vSwitch ID. |
vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeqbt2c |
| Parameters |
any |
The data source connection parameters (JSON object). Returned only for data source type connections. This field is empty for Http type connections. For field definitions, refer to the ParamsSchema returned by GetConnectionType. |
{"HostName":"xxx.mysql.rds.aliyuncs.com","Port":"3306","User":"root","Password":"xxx","DatabaseName":"demo_db"} |
| Type |
string |
The connection type. Valid values: Http, MySQL, PostgreSQL, Elasticsearch, OSS_TABLES, SLS, OTS, MaxCompute, MongoDB, Redis, SQLServer, ClickHouse, Oracle, Hive, Iceberg, lakehouse. |
Http |
| MaxResults |
number |
The page size. |
10 |
| NextToken |
string |
If there are additional entries to return, NextToken is included in the response. |
0 |
| Total |
number |
The total number of entries. |
1 |
| Message |
string |
The returned message. |
success |
| RequestId |
string |
The common parameter. The request ID. Each request has a unique ID, which is active for troubleshooting and locating issues. |
E3619976-8714-5D88-BBA2-6983D798A8BB |
Examples
Success response
JSON format
{
"Code": "Success",
"Data": {
"Connections": [
{
"AuthParameters": {
"ApiKeyAuthParameters": {
"ApiKeyName": "Token",
"ApiKeyValue": "asdkjnqkwejooa"
},
"AuthorizationType": "BASIC_AUTH",
"BasicAuthParameters": {
"Password": "admin",
"Username": "admin"
},
"OAuthParameters": {
"AuthorizationEndpoint": "http://localhost:8080/oauth/token",
"ClientParameters": {
"ClientID": "ClientID",
"ClientSecret": "ClientSecret"
},
"HttpMethod": "POST",
"OAuthHttpParameters": {
"BodyParameters": [
{
"IsValueSecret": "false",
"Key": "name",
"Value": "demo"
}
],
"HeaderParameters": [
{
"IsValueSecret": "false",
"Key": "name",
"Value": "demo"
}
],
"QueryStringParameters": [
{
"IsValueSecret": "false",
"Key": "name",
"Value": "demo"
}
]
}
}
},
"ConnectionName": "connection-name",
"Description": "Description of the connection configuration",
"GmtCreate": 1592838994234,
"Id": 1141093,
"NetworkParameters": {
"NetworkType": "PublicNetwork",
"SecurityGroupId": "eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9rtyb",
"VpcId": "eb-test/vpc-bp1symadadwnwgmqud",
"VswitcheId": "vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeqbt2c"
},
"Parameters": "{\"HostName\":\"xxx.mysql.rds.aliyuncs.com\",\"Port\":\"3306\",\"User\":\"root\",\"Password\":\"xxx\",\"DatabaseName\":\"demo_db\"}",
"Type": "Http"
}
],
"MaxResults": 10,
"NextToken": "0",
"Total": 1
},
"Message": "success",
"RequestId": "E3619976-8714-5D88-BBA2-6983D798A8BB"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 500 | InternalError | InternalError | |
| 409 | RequestParameterException | Request parameter exception |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.