ListConnections

更新时间:
复制 MD 格式

Queries the list of connection configurations.

Operation description

Queries the list of connection configurations.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

eventbridge:ListConnections

get

*Connection

acs:eventbridge:{#regionId}:{#accountId}:connection/*

None None

Request parameters

Parameter

Type

Required

Description

Example

ConnectionNamePrefix

string

No

The name prefix of the connection configurations to query. Supports prefix matching.

connection-name

Type

string

No

Filters query results by connection type. Valid values: Http, MySQL, PostgreSQL, Elasticsearch. If left empty, connections of all types are returned.

Http

MaxResults

integer

No

The maximum number of entries to return on each page. Can be used together with NextToken to implement pagination.

  • Default value: 10

10

NextToken

string

No

When MaxResults is specified, NextToken is returned if there are more results to fetch.

  • NextToken starts from 0 by default. Default value: 0.

0

Response elements

Element

Type

Description

Example

object

RequestId

string

Common parameter. The ID of each request is unique and can be used for troubleshooting and issue locating.

E3619976-8714-5D88-BBA2-6983D798A8BB

Message

string

The returned message.

success

Code

string

The API status or POP error code. Valid values: Success: The request was successful.

Success

Data

object

The list of returned connection configurations.

Connections

array<object>

The list of returned connection configurations.

array<object>

The data structure of a returned connection configuration.

ConnectionName

string

The name of the connection configuration.

connection-name

Description

string

The description of the connection configuration.

Description of the connection configuration

Type

string

The connection type. Valid values: Http, MySQL, PostgreSQL, Elasticsearch.

Http

Parameters

any

The data source connection parameters (a JSON object). Returned only for data source type connections; empty for Http type. 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"}

Id

integer

The ID of the connection configuration.

1141093

GmtCreate

integer

The timestamp when the data source was created.

1592838994234

NetworkParameters

object

The data structure of the network configuration.

NetworkType

string

  • Public network: PublicNetwork

  • Virtual Private Cloud (VPC): PrivateNetwork

PublicNetwork

VpcId

string

The ID of the Virtual Private Cloud (VPC).

eb-test/vpc-bp1symadadwnwgmqud

VswitcheId

string

The vSwitch ID.

vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeqbt2c

SecurityGroupId

string

The security group ID.

eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9rtyb

AuthParameters

object

The authentication data structure.

AuthorizationType

string

The authentication type:

  • BASIC: BASIC_AUTH

  • API KEY: API_KEY_AUTH

  • OAUTH: OAUTH_AUTH

BASIC_AUTH

ApiKeyAuthParameters

object

The data structure of the API KEY.

ApiKeyName

string

The key of the API key.

Token

ApiKeyValue

string

The value of the API key.

asdkjnqkwejooa

BasicAuthParameters

object

The data structure of the Basic authentication.

Password

string

The password for basic authentication.

admin

Username

string

The username for basic authentication.

admin

OAuthParameters

object

The data structure of the OAuth request parameters.

AuthorizationEndpoint

string

The endpoint to which the OAuth token request is sent.

http://localhost:8080/oauth/token

HttpMethod

string

The method of the probe type. Valid values:

  • GET

  • POST

  • HEAD

POST

ClientParameters

object

The data structure of the client parameters.

ClientID

string

The client ID.

ClientID

ClientSecret

string

The client secret of the application.

ClientSecret

OAuthHttpParameters

object

The request parameters for OAuth authentication.

BodyParameters

array<object>

The list of data structures of request parameters.

object

The data structure of body request parameters.

IsValueSecret

string

Indicates whether it is used for authentication.

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 request header parameters.

object

The data structure of request header parameters.

IsValueSecret

string

Indicates whether it is used for authentication.

false

Key

string

The key of the request header parameter.

name

Value

string

The value of the request header parameter.

demo

QueryStringParameters

array<object>

The data structure of the query string parameters.

object

The entity class of the query string parameters.

IsValueSecret

string

Indicates whether it is used for authentication.

false

Key

string

The key of the query string parameter.

name

Value

string

The value of the query string parameter.

demo

NextToken

string

If there are more results to fetch, NextToken is returned.

0

Total

number

The total number of entries.

1

MaxResults

number

The page size.

10

Examples

Success response

JSON format

{
  "RequestId": "E3619976-8714-5D88-BBA2-6983D798A8BB",
  "Message": "success",
  "Code": "Success",
  "Data": {
    "Connections": [
      {
        "ConnectionName": "connection-name",
        "Description": "Description of the connection configuration",
        "Type": "Http",
        "Parameters": "{\"HostName\":\"xxx.mysql.rds.aliyuncs.com\",\"Port\":\"3306\",\"User\":\"root\",\"Password\":\"xxx\",\"DatabaseName\":\"demo_db\"}",
        "Id": 1141093,
        "GmtCreate": 1592838994234,
        "NetworkParameters": {
          "NetworkType": "PublicNetwork",
          "VpcId": "eb-test/vpc-bp1symadadwnwgmqud",
          "VswitcheId": "vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeqbt2c",
          "SecurityGroupId": "eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9rtyb"
        },
        "AuthParameters": {
          "AuthorizationType": "BASIC_AUTH",
          "ApiKeyAuthParameters": {
            "ApiKeyName": "Token",
            "ApiKeyValue": "asdkjnqkwejooa"
          },
          "BasicAuthParameters": {
            "Password": "admin",
            "Username": "admin"
          },
          "OAuthParameters": {
            "AuthorizationEndpoint": "http://localhost:8080/oauth/token",
            "HttpMethod": "POST",
            "ClientParameters": {
              "ClientID": "ClientID",
              "ClientSecret": "ClientSecret"
            },
            "OAuthHttpParameters": {
              "BodyParameters": [
                {
                  "IsValueSecret": "false",
                  "Key": "name",
                  "Value": "demo"
                }
              ],
              "HeaderParameters": [
                {
                  "IsValueSecret": "false",
                  "Key": "name",
                  "Value": "demo"
                }
              ],
              "QueryStringParameters": [
                {
                  "IsValueSecret": "false",
                  "Key": "name",
                  "Value": "demo"
                }
              ]
            }
          }
        }
      }
    ],
    "NextToken": "0",
    "Total": 1,
    "MaxResults": 10
  }
}

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.