All Products
Search
Document Center

EventBridge:GetConnection

Last Updated:Dec 04, 2024

Queries the configurations of a connection.

Operation description

You can call this API operation to query the configurations of a connection.

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:GetConnectionget
*Connection
acs:eventbridge:{#regionId}:{#accountId}:connection/{#ConnectionName}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ConnectionNamestringYes

The connection name.

connection-name

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The returned request ID.

34AD682D-5B91-5773-8132-AA38C130****
Messagestring

The returned message.

success
Codestring

The returned response code. The value Success indicates that the request is successful.

Success
HttpCodeinteger

The HTTP status code.

200
Dataobject

The returned data.

Connectionsarray<object>

The queried connections.

connectionsobject
ConnectionNamestring

The connection name.

demo
Idlong

The data source ID.

5668
Descriptionstring

The connection description.

demo
GmtCreatelong

The time when the connection was created.

1669648905
NetworkParametersobject

The information about the network.

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

The VPC ID.

eb-test/vpc-bp1symadadwnwg****
VswitcheIdstring

The vSwitch ID.

vsw-bp1iu4x7aeradadown****,vsw-bp193sqmadadlaszpeq****
SecurityGroupIdstring

The security group ID.

eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9****
AuthParametersobject

The authentication methods.

AuthorizationTypestring

The authentication method. Valid values:

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

The information about API key authentication.

ApiKeyNamestring

The key of the API key.

key
ApiKeyValuestring

The value of the API key.

value
BasicAuthParametersobject

The information about basic authentication.

Passwordstring

The password of basic authentication.

********
Usernamestring

The username of basic authentication.

admin
OAuthParametersobject

The information about 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 information about the client.

ClientIDstring

The client ID.

ClientID
ClientSecretstring

The AccessKey secret of the client.

Qo57Q~F249~S74GmNPA36pZJoJK4f****
OAuthHttpParametersobject

The request parameters of OAuth authentication.

BodyParametersarray<object>

The information about the request body.

bodyParametersobject
IsValueSecretstring

Indicates whether authentication is enabled.

false
Keystring

The key of the request body.

keyDemo
Valuestring

The value of the request body.

valueDemo
HeaderParametersarray<object>

The information about the request header.

headerParametersobject
IsValueSecretstring

Indicates whether authentication is enabled.

false
Keystring

The key of the request header.

keyDemo
Valuestring

The value of the request header.

keyDemo
QueryStringParametersarray<object>

The information about the request path.

queryStringParametersobject
IsValueSecretstring

Indicates whether authentication is enabled.

false
Keystring

The key of the request path.

keyDemo
Valuestring

The value of the request path.

valueDemo

Examples

Sample success responses

JSONformat

{
  "RequestId": "34AD682D-5B91-5773-8132-AA38C130****",
  "Message": "success",
  "Code": "Success",
  "HttpCode": 200,
  "Data": {
    "Connections": [
      {
        "ConnectionName": "demo",
        "Id": 5668,
        "Description": "demo",
        "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~S74GmNPA36pZJoJK4f****"
            },
            "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 codeError codeError message
409RequestParameterExceptionRequest parameter exception
409ConnectionNotExistThe Connection name not existed!
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