Creates a connection configuration.
Operation description
用于创建连接配置信息。
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 name must be 2 to 127 characters in length. |
connection-name |
| Description |
string |
No |
The description of the connection configuration. The description can be up to 255 characters in length. |
demo |
| NetworkParameters |
object |
Yes |
The network configuration. |
|
| NetworkType |
string |
Yes |
Important 选择专有网络时,VpcId、VswitcheId 和 SecurityGroupId 必填。 |
PublicNetwork |
| VpcId |
string |
No |
专有网络 VPC 的 ID。 |
eb-test/vpc-bp1symadadwnwg**** |
| VswitcheId |
string |
No |
交换机 ID。 |
vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeq**** |
| SecurityGroupId |
string |
No |
安全组 ID。 |
eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9**** |
| Type |
string |
No |
The connection type. Valid values: MySQL, PostgreSQL, Elasticsearch, 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-based targets such as API destinations. Data source types are used for data connections in the integration marketplace. |
Http |
| Parameters |
any |
No |
The data source connection parameters in a JSON object. This parameter is required when Type is a data source type. This parameter is not required for the Http type. For 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 configuration. |
|
| AuthorizationType |
string |
No |
鉴权类型 :
|
BASIC_AUTH |
| ApiKeyAuthParameters |
object |
No |
API KEY 的数据结构。 |
|
| ApiKeyName |
string |
No |
Api key 的 key 值。 |
Token |
| ApiKeyValue |
string |
No |
Api key 的 value 值。 |
adkjnakddh**** |
| BasicAuthParameters |
object |
No |
Basic 鉴权的数据结构。 |
|
| Password |
string |
No |
basic 鉴权的密码。 |
******* |
| Username |
string |
No |
basic 鉴权的用户名。 |
admin |
| OAuthParameters |
object |
No |
OAuth 鉴权参数数据结构。 |
|
| AuthorizationEndpoint |
string |
No |
授权的终端节点地址。最大长度 127 个字符。 |
http://localhost:8080/oauth/token |
| ClientParameters |
object |
No |
客户参数数据结构。 |
|
| ClientID |
string |
No |
The client ID. |
ClientID |
| ClientSecret |
string |
No |
The client secret of the application. |
Qo57Q~F249~S74GmNPA36pZJoJK4f4LY**** |
| HttpMethod |
string |
No |
探测类型的方法。取值:
|
POST |
| OAuthHttpParameters |
object |
No |
Oauth 鉴权的请求参数。 |
|
| BodyParameters |
array<object> |
No |
The list of data structures for body request parameters. |
|
|
object |
No |
The data structure of a body request parameter. |
||
| IsValueSecret |
string |
No |
Whether it is used for authentication. |
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 |
Whether it is used for authentication. |
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 data structure of query string parameters. |
|
|
object |
No |
The data structure of a query string parameter. |
||
| IsValueSecret |
string |
No |
Whether it is used for authentication. |
false |
| Key |
string |
No |
The key of the query string parameter. |
keyDemo |
| Value |
string |
No |
The value of the query string parameter. |
valueDemo |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
阿里云为该请求生成的唯一标识符。 |
7DA60DED-CD36-5837-B848-C01A23D2**** |
| Message |
string |
附加信息。取值说明如下:请求正常,返回 success。 请求异常,返回具体异常错误码。 |
success |
| Code |
string |
接口状态或 POP 错误码。取值说明如下:Success:成功。 |
Success |
| Data |
object |
返回结果。 |
|
| ConnectionName |
string |
连接配置名称。 |
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.