All Products
Search
Document Center

EventBridge:UpdateConnection

Last Updated:Dec 04, 2024

Updates a connection.

Operation description

You can call this API operation to update a connection.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
eventbridge:UpdateConnectionupdate
*Connection
acs:eventbridge:{#regionId}:{#accountId}:connection/{#ConnectionName}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ConnectionNamestringYes

The name of the connection that you want to update. 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.

The description of the connection.
NetworkParametersobjectYes

The parameters that are configured for the network.

NetworkTypestringYes
  • PublicNetwork: the Internet.
  • PrivateNetwork: virtual private cloud (VPC).
Note If you set this parameter to PrivateNetwork, you must also configure VpcId, VswitchId, and SecurityGroupId.
PublicNetwork
VpcIdstringNo

The VPC ID.

eb-test/vpc-bp1symadadwnwgmqud
VswitcheIdstringNo

The vSwitch ID.

vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeqbt2c
SecurityGroupIdstringNo

The security group ID.

eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9rtyb
AuthParametersobjectNo

The parameters that are configured for authentication.

AuthorizationTypestringNo

The authentication type. Valid values:

  • BASIC: basic authentication. 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. If you use this authentication method, you must configure Username and Password.
  • API_KEY_AUTH: API key authentication. The request header is in the Token: Token value format. If you use this authentication method, you must configure ApiKeyName and ApiKeyValue.
  • OAUTH_AUTH: OAuth authentication. 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. If you use this authentication method, you must configure AuthorizationEndpoint, OAuthHttpParameters, and HttpMethod.
BASIC_AUTH
ApiKeyAuthParametersobjectNo

The parameters configured for API key authentication.

ApiKeyNamestringNo

The key of the API key.

name
ApiKeyValuestringNo

The value of the API key.

demo
BasicAuthParametersobjectNo

The parameters that are configured for basic authentication.

PasswordstringNo

The password for basic authentication.

admin
UsernamestringNo

The username for basic authentication.

admin
OAuthParametersobjectNo

The parameters that are configured for OAuth authentication.

AuthorizationEndpointstringNo

The endpoint that is used to obtain the OAuth token. The endpoint 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.

ClientSecret
HttpMethodstringNo

The HTTP request method. Valid values:

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

The request parameters of OAuth authentication.

BodyParametersarray<object>No

The parameters that are configured for the request.

objectNo
IsValueSecretstringNo

Specifies whether to enable authentication.

false
KeystringNo

The key of the request body.

name
ValuestringNo

The value of the request body.

demo
HeaderParametersarray<object>No

The parameters that are configured for the request header.

objectNo
IsValueSecretstringNo

Specifies whether to enable authentication.

false
KeystringNo

The key of the request header.

name
ValuestringNo

The value of the request header.

demo
QueryStringParametersarray<object>No

The parameters that are configured for the request path.

objectNo
IsValueSecretstringNo

Specifies whether to enable authentication.

false
KeystringNo

The key of the request path.

name
ValuestringNo

The value of the request path.

demo

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

8346BE8F-40F3-533D-A0B8-1359C31BD5BA
Messagestring

The returned message.

success
Codestring

The response code. The value Success indicates that the request was successful.

Success

Examples

Sample success responses

JSONformat

{
  "RequestId": "8346BE8F-40F3-533D-A0B8-1359C31BD5BA",
  "Message": "success",
  "Code": "Success"
}

Error codes

HTTP status codeError codeError message
409RequestParameterExceptionRequest parameter exception
409ConnectionNotExistThe Connection not existed!
409SecretManagerAPIDeleteSecretFailedDelete secret manager api secret failed!
409BasicRequiredParameterIsEmptyBasic required parameters are empty, the required parameters are username and password!
409BasicUserNameLengthExceedBasic username length cannot exceed 127!
409BasicPassWordLengthExceedBasic password length cannot exceed 127!
409ApiKeyRequiredParameterIsEmptyApi Key required parameters are empty, the required parameters are apiKeyName and apiKeyValue!
409ApiKeyNameLengthExceedApi key name length cannot exceed 127!
409ApiKeyValueLengthExceedApi key value length cannot exceed 127!
409OAuthRequiredParameterIsEmptyOAuth required parameters are empty, the required parameters are authorizationEndpoint and httpMethod!
409AuthorizationEndpointLengthExceedAuthorization endpoint length cannot exceed 127!
409ClientIDLengthExceedClientID length cannot exceed 127!
409ClientSecretLengthExceedClientSecret length cannot exceed 127!
409OauthHttpParametersEmptyOauthHttpParameters is Empty.
409SecretManagerAPICreateSecretNameFailedCreate secret manager api secret name failed!
409SecretManagerAPIGetSecretValueFailedGet secret manager api secret value failed!
500InternalErrorInternalError

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

Change history

Change timeSummary of changesOperation
2023-09-13The Error code has changedView Change Details
2023-04-12The Error code has changedView Change Details
2023-04-06The Error code has changedView Change Details