All Products
Search
Document Center

EventBridge:ListConnections

Last Updated:Dec 04, 2024

Queries connections.

Operation description

You can call this API operation to query connections.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
eventbridge:ListConnectionsget
*Connection
acs:eventbridge:{#regionId}:{#accountId}:connection/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ConnectionNamePrefixstringNo

The key word that you specify to query connections. Connections can be queried by prefixes.

connection-name
MaxResultslongNo

The maximum number of entries to be returned in a single call. You can use this parameter and the NextToken parameter to implement paging.

  • Default value: 10.
10
NextTokenstringNo

If you set the Limit parameter and excess return values exist, this parameter is returned.

  • Default value: 0.
0

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request. This parameter is a common parameter. Each request has a unique ID. You can use the ID to troubleshoot issues.

E3619976-8714-5D88-BBA2-6983D798A8BB
Messagestring

The message returned.

success
Codestring

The HTTP status code. The value Success indicates that the request is successful.

Success
Dataobject

The returned data.

Connectionsarray<object>

The connections.

connectionsobject
ConnectionNamestring

The connection name.

connection-name
Descriptionstring

The connection description.

The description of the connection.
Idlong

The ID of the connection.

1141093
GmtCreatelong

The time when the connection was created.

1592838994234
NetworkParametersobject

The parameters that are returned for the network.

NetworkTypestring
  • PublicNetwork: the Internet.
  • PrivateNetwork: virtual private cloud (VPC).
PublicNetwork
VpcIdstring

The VPC ID.

eb-test/vpc-bp1symadadwnwgmqud
VswitcheIdstring

The vSwitch ID.

vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeqbt2c
SecurityGroupIdstring

The security group ID.

eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9rtyb
AuthParametersobject

The parameters that are returned for authentication.

AuthorizationTypestring

The authentication method. Valid values:

  • BASIC_AUTH: basic authentication.
  • API_KEY_AUTH: API key authentication.
  • OAUTH_AUTH: OAuth authentication.
BASIC_AUTH
ApiKeyAuthParametersobject

The parameters that are returned for API key authentication.

ApiKeyNamestring

The key of the API key.

Token
ApiKeyValuestring

The value of the API key.

asdkjnqkwejooa
BasicAuthParametersobject

The parameters that are returned for basic authentication.

Passwordstring

The password for basic authentication.

admin
Usernamestring

The username for basic authentication.

admin
OAuthParametersobject

The parameters that are returned for OAuth authentication.

AuthorizationEndpointstring

The endpoint that is used to obtain the OAuth token.

http://localhost:8080/oauth/token
HttpMethodstring

The HTTP request method. Valid values:

  • GET
  • POST
  • HEAD
POST
ClientParametersobject

The parameters that are returned for the client.

ClientIDstring

The client ID.

ClientID
ClientSecretstring

The AccessKey secret of the client.

ClientSecret
OAuthHttpParametersobject

The request parameters of OAuth authentication.

BodyParametersarray<object>

The parameters that are configured for the request.

bodyParametersobject
IsValueSecretstring

Indicates whether authentication is enabled.

false
Keystring

The key of the request body.

name
Valuestring

The value of the request body.

demo
HeaderParametersarray<object>

The parameters that are returned for the request header.

headerParametersobject
IsValueSecretstring

Indicates whether authentication is enabled.

false
Keystring

The key of the request header.

name
Valuestring

The value of the request header.

demo
QueryStringParametersarray<object>

The parameters that are returned for the request path.

queryStringParametersobject
IsValueSecretstring

Indicates whether authentication is enabled.

false
Keystring

The key of the request path.

name
Valuestring

The value of the request path.

demo
NextTokenstring

If excess return values exist, this parameter is returned.

0
Totalfloat

The total number of entries returned.

1
MaxResultsfloat

The number of entries returned per page.

10

Examples

Sample success responses

JSONformat

{
  "RequestId": "E3619976-8714-5D88-BBA2-6983D798A8BB",
  "Message": "success",
  "Code": "Success",
  "Data": {
    "Connections": [
      {
        "ConnectionName": "connection-name",
        "Description": "The description of the connection.",
        "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 codeError codeError message
409RequestParameterExceptionRequest parameter exception
500InternalErrorInternalError

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-09-13The Error code has changed. The response structure of the API has changedView Change Details
2023-04-06The Error code has changed. The response structure of the API has changedView Change Details