All Products
Search
Document Center

EventBridge:CreateConnection

Last Updated:Mar 15, 2024

Creates a connection.

Operation description

You can call this API operation to create 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 name of the connection. The name must be 2 to 127 characters in length.

connection-name
DescriptionstringNo

The description of the connection. The description can be up to 255 characters in length.

demo
NetworkParametersobjectYes

The parameters that are configured for the network.

NetworkTypestringYes

The network type. Valid values:

PublicNetwork and PrivateNetwork.

  • Note: If you set this parameter to PrivateNetwork, you must configure VpcId, VswitcheId, and SecurityGroupId.
PublicNetwork
VpcIdstringNo

The VPC. ID

eb-test/vpc-bp1symadadwnwg****
VswitcheIdstringNo

The vSwitch ID.

vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeq****
SecurityGroupIdstringNo

The ID of the security group.

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

The parameters that are configured for authentication.

AuthorizationTypestringNo

The authentication type. Valid values:

BASIC_AUTH: basic authentication.

Introduction: Basic authentication is a simple authentication scheme built into the HTTP protocol. When you use the HTTP protocol for communications, the authentication method that the HTTP server uses to authenticate user identities on the client is defined in the protocol. The request header is in the Authorization: Basic Base64-encoded string (Username:Password) format.

  1. Username and Password are required.

API_KEY_AUTH: API key authentication.

Introduction: The request header is in the Token: Token value format.

  • ApiKeyName and ApiKeyValue are required.

OAUTH_AUTH: OAuth authentication.

Introduction: OAuth2.0 is an authentication mechanism. In normal cases, a system that does not use OAuth2.0 can access the resources of the server from the client. To ensure access security, access tokens are used to authenticate users in OAuth 2.0. The client must use an access token to access protected resources. This way, OAuth 2.0 protects resources from being accessed from malicious clients and improves system security.

  • AuthorizationEndpoint, OAuthHttpParameters, and HttpMethod are required.
BASIC_AUTH
ApiKeyAuthParametersobjectNo

The parameters that are configured for API key authentication.

ApiKeyNamestringNo

The key of the API key.

Token
ApiKeyValuestringNo

The value of the API key.

adkjnakddh****
BasicAuthParametersobjectNo

The parameters that are configured for basic authentication.

PasswordstringNo

The password for basic authentication.

*******
UsernamestringNo

The username for basic authentication.

admin
OAuthParametersobjectNo

The parameters that are configured for OAuth authentication.

AuthorizationEndpointstringNo

The IP address of the authorized endpoint. The default value of a column can be up to 127 characters in length.

http://localhost:8080/oauth/token
ClientParametersobjectNo

The parameters that are configured for the client.

ClientIDstringNo

The client ID.

ClientID
ClientSecretstringNo

The AccessKey secret of the client.

Qo57Q~F249~S74GmNPA36pZJoJK4f4LY****
HttpMethodstringNo

The HTTP request method. Valid values:

  • GET
  • POST
  • HEAD
  • DELETE
  • PUT
  • PATCH
POST
OAuthHttpParametersobjectNo

The request parameters that are configured for OAuth authentication.

BodyParametersobject []No

The parameters that are configured for the request body.

IsValueSecretstringNo

Specifies whether to enable authentication.

false
KeystringNo

The key of the request body.

keyDemo
ValuestringNo

The value of the request body.

keyValue
HeaderParametersobject []No

The parameters that are configured for the request header.

IsValueSecretstringNo

Specifies whether to enable authentication.

false
KeystringNo

The key of the request header.

keyDemo
ValuestringNo

The value of the request header.

keyValue
QueryStringParametersobject []No

The parameters that are configured for the request path.

IsValueSecretstringNo

Specifies whether to enable authentication.

false
KeystringNo

The key of the request path.

keyDemo
ValuestringNo

The value of the request path.

valueDemo

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

7DA60DED-CD36-5837-B848-C01A23D2****
Messagestring

The returned message. If the request is successful, success is returned. If the request failed, an error code is returned.

success
Codestring

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

Success
Dataobject

The returned data.

ConnectionNamestring

The connection name.

connection-demo

Examples

Sample success responses

JSONformat

{
  "RequestId": "7DA60DED-CD36-5837-B848-C01A23D2****",
  "Message": "success",
  "Code": "Success",
  "Data": {
    "ConnectionName": "connection-demo"
  }
}

Error codes

HTTP status codeError codeError message
409RequestParameterExceptionRequest parameter exception

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

Change history

Change timeSummary of changesOperation
2023-09-13The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 409 change
    Added Error Codes: 500
2023-04-12The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 409
2023-04-06The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 409