All Products
Search
Document Center

EventBridge:GetConnection

Last Updated:Mar 15, 2024

Queries the configurations of a connection.

Operation description

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

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

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.

Connectionsobject []

The queried connections.

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.

BodyParametersobject []

The information about the request body.

IsValueSecretstring

Indicates whether authentication is enabled.

false
Keystring

The key of the request body.

keyDemo
Valuestring

The value of the request body.

valueDemo
HeaderParametersobject []

The information about the request header.

IsValueSecretstring

Indicates whether authentication is enabled.

false
Keystring

The key of the request header.

keyDemo
Valuestring

The value of the request header.

keyDemo
QueryStringParametersobject []

The information about the request path.

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 changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 409 change
    Added Error Codes: 500
Output ParametersThe response structure of the API has changed.
2023-04-06The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 409
Output ParametersThe response structure of the API has changed.