Updates a connection.
Operation description
You can call this API operation to update a connection.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ConnectionName | string | Yes | The name of the connection that you want to update. 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. | The description of the connection. |
NetworkParameters | object | Yes | The parameters that are configured for the network. | |
NetworkType | string | Yes | PublicNetwork: the Internet. PrivateNetwork: virtual private cloud (VPC). Note: If you set this parameter to PrivateNetwork, you must configure VpcId, VswitcheId, and SecurityGroupId. | PublicNetwork |
VpcId | string | No | The VPC ID. | eb-test/vpc-bp1symadadwnwgmqud |
VswitcheId | string | No | The vSwitch ID. | vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeqbt2c |
SecurityGroupId | string | No | The ID of the security group. | eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9rtyb |
AuthParameters | object | No | The parameters that are configured for authentication. | |
AuthorizationType | string | No | 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.
API_KEY_AUTH: API key authentication. Introduction: The request header is in the Token : Token value format.
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 identify 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.
| BASIC_AUTH |
ApiKeyAuthParameters | object | No | The parameters for API key authentication. | |
ApiKeyName | string | No | The key of the API key. | name |
ApiKeyValue | string | No | The value of the API key. | demo |
BasicAuthParameters | object | No | The parameters that are configured for basic authentication. | |
Password | string | No | The password for basic authentication. | admin |
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 that is used to obtain the OAuth token. 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. | ClientSecret |
HttpMethod | string | No | The HTTP request method. Valid values:
| POST |
OAuthHttpParameters | object | No | The request parameters for OAuth authentication. | |
BodyParameters | object [] | No | The parameters that are configured for the request body. | |
IsValueSecret | string | No | Specifies whether to enable authentication. | false |
Key | string | No | The key of the request body. | name |
Value | string | No | The value of the request body. | demo |
HeaderParameters | object [] | No | The value of the request header. | |
IsValueSecret | string | No | Specifies whether to enable authentication. | false |
Key | string | No | The key of the request header. | name |
Value | string | No | The value of the request header. | demo |
QueryStringParameters | object [] | No | The parameters that are configured for the request path. | |
IsValueSecret | string | No | Specifies whether to enable authentication. | false |
Key | string | No | The key of the request path. | name |
Value | string | No | The value of the request path. | demo |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "8346BE8F-40F3-533D-A0B8-1359C31BD5BA",
"Message": "success",
"Code": "Success"
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
409 | RequestParameterException | Request parameter exception |
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 | see changesets | ||||||
| ||||||||
2023-04-12 | The Error code has changed | see changesets | ||||||
| ||||||||
2023-04-06 | The Error code has changed | see changesets | ||||||
|