Creates a connection.
Operation description
You can call this API operation to create a connection.
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
eventbridge:CreateConnection | create | *Connection acs:eventbridge:{#regionId}:{#accountId}:connection/* |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ConnectionName | string | Yes | The name of the connection. The name must be 2 to 127 characters in length. | connection-name |
Description | string | No | The description of the connection. The description can be up to 255 characters in length. | demo |
NetworkParameters | object | Yes | The parameters that are configured for the network. | |
NetworkType | string | Yes |
Note
If you set this parameter to PrivateNetwork, you must also configure VpcId, VswitchId, and SecurityGroupId.
| PublicNetwork |
VpcId | string | No | The VPC ID. | eb-test/vpc-bp1symadadwnwg**** |
VswitcheId | string | No | The vSwitch ID. | vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeq**** |
SecurityGroupId | string | No | The security group ID. | eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9**** |
AuthParameters | object | No | The parameters that are configured for authentication. | |
AuthorizationType | string | No | The authentication type. Valid values:
| BASIC_AUTH |
ApiKeyAuthParameters | object | No | The parameters that are configured for API key authentication. | |
ApiKeyName | string | No | The key of the API key. | Token |
ApiKeyValue | string | No | The value of the API key. | adkjnakddh**** |
BasicAuthParameters | object | No | The parameters that are configured for basic authentication. | |
Password | string | No | The password for basic authentication. | ******* |
Username | string | No | The username for basic authentication. | admin |
OAuthParameters | object | No | The parameters that are configured for OAuth authentication. | |
AuthorizationEndpoint | string | No | The endpoint of the authorized client. The endpoint can be up to 127 characters in length. | http://localhost:8080/oauth/token |
ClientParameters | object | No | The parameters that are configured for the client. | |
ClientID | string | No | The client ID. | ClientID |
ClientSecret | string | No | The AccessKey secret of the client. | Qo57Q~F249~S74GmNPA36pZJoJK4f4LY**** |
HttpMethod | string | No | The HTTP request method. Valid values:
| POST |
OAuthHttpParameters | object | No | The request parameters of OAuth authentication. | |
BodyParameters | array<object> | No | The parameters that are configured for the request body. | |
object | No | |||
IsValueSecret | string | No | Specifies whether to enable authentication. | false |
Key | string | No | The key of the request body. | keyDemo |
Value | string | No | The value of the request body. | keyValue |
HeaderParameters | array<object> | No | The parameters that are configured for the request header. | |
object | No | |||
IsValueSecret | string | No | Specifies whether to enable authentication. | false |
Key | string | No | The key of the request header. | keyDemo |
Value | string | No | The value of the request header. | keyValue |
QueryStringParameters | array<object> | No | The parameters that are configured for the request path. | |
object | No | |||
IsValueSecret | string | No | Specifies whether to enable authentication. | false |
Key | string | No | The key of the request path. | keyDemo |
Value | string | No | The value of the request path. | valueDemo |
Response parameters
Examples
Sample success responses
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 |
---|---|---|
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 |
500 | InternalError | InternalError |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-09-13 | The Error code has changed | View Change Details |
2023-04-12 | The Error code has changed | View Change Details |
2023-04-06 | The Error code has changed | View Change Details |