CreateConnection
Creates a connection configuration.
Operation description
Creates a connection configuration.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
eventbridge:CreateConnection |
create |
*Connection
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ConnectionName |
string |
Yes |
The name of the connection configuration. The length must be 2 to 127 characters. |
connection-name |
| Description |
string |
No |
The description of the connection configuration. Maximum length: 255 characters. |
demo |
| NetworkParameters |
object |
Yes |
The data structure of the network configuration. |
|
| NetworkType |
string |
Yes |
The network type. Valid values:
|
PublicNetwork |
| VpcId |
string |
No |
The ID of the VPC. |
eb-test/vpc-bp1symadadwnwg**** |
| VswitcheId |
string |
No |
The ID of the vSwitch. |
vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeq**** |
| SecurityGroupId |
string |
No |
The ID of the security group. |
eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9**** |
| Type |
string |
No |
The connection type. Valid values: MySQL, PostgreSQL, Elasticsearch, OSS_TABLES, SLS, OTS, MaxCompute, MongoDB, Redis, SQLServer, ClickHouse, Oracle, Hive, Iceberg, lakehouse, and Http. This parameter is required for data source connections. If you do not specify this parameter, the default value Http is used. The Http type is used for HTTP protocol targets such as API Destination. Hive and Iceberg are used for their respective data lakehouse data sources. The lakehouse type is used only for compatibility with existing connections. Other data source types are used for data connections in the integration marketplace. Valid values:
|
Http |
| Parameters |
any |
No |
The data source connection parameters in JSON format. This parameter is required when Type is set to a data source type, and is not required when Type is set to Http. For specific field definitions, call the GetConnectionType operation and refer to ParamsSchema in the response. |
{"HostName":"xxx.mysql.rds.aliyuncs.com","Port":"3306","User":"root","Password":"xxx","DatabaseName":"demo_db"} |
| AuthParameters |
object |
No |
The authentication data structure. |
|
| AuthorizationType |
string |
No |
The authentication type. Valid values:
|
BASIC_AUTH |
| ApiKeyAuthParameters |
object |
No |
The data structure of the API key authentication parameters. |
|
| ApiKeyName |
string |
No |
The key name of the API key. |
Token |
| ApiKeyValue |
string |
No |
The value of the API key. |
adkjnakddh**** |
| BasicAuthParameters |
object |
No |
The data structure of the basic authentication parameters. |
|
| Password |
string |
No |
The password for basic authentication. |
******* |
| Username |
string |
No |
The username for basic authentication. |
admin |
| OAuthParameters |
object |
No |
The data structure of the OAuth authentication parameters. |
|
| AuthorizationEndpoint |
string |
No |
The endpoint URL for authorization. Maximum length: 127 characters. |
http://localhost:8080/oauth/token |
| ClientParameters |
object |
No |
The data structure of the client parameters. |
|
| ClientID |
string |
No |
The ID of the client. |
ClientID |
| ClientSecret |
string |
No |
The client secret of the application. |
Qo57Q~F249~S74GmNPA36pZJoJK4f4LY**** |
| HttpMethod |
string |
No |
The HTTP method for probing. Valid values:
|
POST |
| OAuthHttpParameters |
object |
No |
The request parameters for OAuth authentication. |
|
| BodyParameters |
array<object> |
No |
The list of structures for body request parameters. |
|
|
object |
No |
The structure of a body request parameter. |
||
| IsValueSecret |
string |
No |
Specifies whether the value is a secret. |
false |
| Key |
string |
No |
The key of the body request parameter. |
keyDemo |
| Value |
string |
No |
The value of the body request parameter. |
keyValue |
| HeaderParameters |
array<object> |
No |
The list of header parameters. |
|
|
object |
No |
The data structure of a header parameter. |
||
| IsValueSecret |
string |
No |
Specifies whether the value is a secret. |
false |
| Key |
string |
No |
The key of the header parameter. |
keyDemo |
| Value |
string |
No |
The value of the header parameter. |
keyValue |
| QueryStringParameters |
array<object> |
No |
The structure of URI of the request path parameters. |
|
|
object |
No |
The structure of a URI of the request path parameter. |
||
| IsValueSecret |
string |
No |
Specifies whether the value is a secret. |
false |
| Key |
string |
No |
The key of the URI of the request path parameter. |
keyDemo |
| Value |
string |
No |
The value of the URI of the request path parameter. |
valueDemo |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
7DA60DED-CD36-5837-B848-C01A23D2**** |
| Message |
string |
The additional information. If the request is successful, success is returned. If the request fails, a specific error code is returned. |
success |
| Code |
string |
The status code or POP error code. A value of Success indicates that the request is successful. |
Success |
| Data |
object |
The returned data. |
|
| ConnectionName |
string |
The name of the connection configuration. |
connection-demo |
Examples
Success response
JSON format
{
"RequestId": "7DA60DED-CD36-5837-B848-C01A23D2****",
"Message": "success",
"Code": "Success",
"Data": {
"ConnectionName": "connection-demo"
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 500 | InternalError | InternalError | |
| 409 | RequestParameterException | Request parameter exception | |
| 409 | ConnectionAlreadyExist | The Connection already existed! | |
| 409 | ConnectionCountExceedLimit | The current count of connection, which will exceed the limit quota. | |
| 409 | BasicRequiredParameterIsEmpty | Basic required parameters are empty, the required parameters are username and password! | |
| 409 | BasicUserNameLengthExceed | Basic username length cannot exceed 127! | |
| 409 | BasicPassWordLengthExceed | Basic password length cannot exceed 127! | |
| 409 | ApiKeyRequiredParameterIsEmpty | Api Key required parameters are empty, the required parameters are apiKeyName and apiKeyValue! | |
| 409 | ApiKeyNameLengthExceed | Api key name length cannot exceed 127! | |
| 409 | ApiKeyValueLengthExceed | Api key value length cannot exceed 127! | |
| 409 | OAuthRequiredParameterIsEmpty | OAuth required parameters are empty, the required parameters are authorizationEndpoint and httpMethod! | |
| 409 | AuthorizationEndpointLengthExceed | Authorization endpoint length cannot exceed 127! | |
| 409 | ClientIDLengthExceed | ClientID length cannot exceed 127! | |
| 409 | ClientSecretLengthExceed | ClientSecret length cannot exceed 127! | |
| 409 | OauthHttpParametersEmpty | OauthHttpParameters is Empty. | |
| 409 | SecretManagerAPICreateSecretNameFailed | Create secret manager api secret name failed |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.