UpdateConnection - 更新连接配置信息
更新连接配置信息。
接口说明
用于更新连接配置。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
eventbridge:UpdateConnection |
update |
*Connection
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| ConnectionName |
string |
是 |
要更新的连接名称。最大长度 127 个字符。最小长度 2 个字符。 |
connection-name |
| Description |
string |
否 |
描述信息。最大长度 255 个字符。 |
Description of the connection configuration |
| NetworkParameters |
object |
是 |
网络配置的数据结构。 |
|
| NetworkType |
string |
是 |
说明
选择专有网络时,VpcId、VswitcheId 和 SecurityGroupId 必填。 |
PublicNetwork |
| VpcId |
string |
否 |
专有网络 VPC 的 ID。 |
eb-test/vpc-bp1symadadwnwgmqud |
| VswitcheId |
string |
否 |
交换机 ID。 |
vsw-bp1iu4x7aeradadown1og8,vsw-bp193sqmadadlaszpeqbt2c |
| SecurityGroupId |
string |
否 |
安全组 ID。 |
eb-167adad548759-security_grop/sg-bp1addad26peuh9qh9rtyb |
| Type |
string |
否 |
连接类型。可选值:MySQL、PostgreSQL、Elasticsearch、Http |
Http |
| Parameters |
any |
否 |
数据源连接参数(JSON 对象)。具体字段定义请调用 GetConnectionType 接口,参考返回结果中的 ParamsSchema |
{"HostName":"xxx.mysql.rds.aliyuncs.com","Port":"3306","User":"root","Password":"xxx","DatabaseName":"demo_db"} |
| AuthParameters |
object |
否 |
鉴权数据结构。 |
|
| AuthorizationType |
string |
否 |
鉴权类型 :
|
BASIC_AUTH |
| ApiKeyAuthParameters |
object |
否 |
API Key 鉴权的数据结构。 |
|
| ApiKeyName |
string |
否 |
API Key 的 key 值。 |
name |
| ApiKeyValue |
string |
否 |
API Value 的 value 值。 |
demo |
| BasicAuthParameters |
object |
否 |
Basic 鉴权的数据结构。 |
|
| Password |
string |
否 |
basic 鉴权的密码。 |
admin |
| Username |
string |
否 |
basic 鉴权的用户名。 |
admin |
| OAuthParameters |
object |
否 |
OAuth 鉴权参数数据结构。 |
|
| AuthorizationEndpoint |
string |
否 |
OAuth 获取 token 的请求地址。最大长度 127 个字符。 |
http://localhost:8080/oauth/token |
| ClientParameters |
object |
否 |
客户参数数据结构。 |
|
| ClientID |
string |
否 |
客户端的 ID。 |
ClientID |
| ClientSecret |
string |
否 |
应用的客户端密钥 secret。 |
ClientSecret |
| HttpMethod |
string |
否 |
探测类型的方法。取值:
|
POST |
| OAuthHttpParameters |
object |
否 |
OAuth 鉴权的请求参数。 |
|
| BodyParameters |
array<object> |
否 |
请求参数的数据结构列表。 |
|
|
object |
否 |
body 请求参数的数据结构。 |
||
| IsValueSecret |
string |
否 |
是否是鉴权。 |
false |
| Key |
string |
否 |
body 请求参数的 key。 |
name |
| Value |
string |
否 |
body 请求参数的 value。 |
demo |
| HeaderParameters |
array<object> |
否 |
请求头的参数列表。 |
|
|
object |
否 |
请求头的参数数据结构。 |
||
| IsValueSecret |
string |
否 |
是否是鉴权。 |
false |
| Key |
string |
否 |
请求头参数 key。 |
name |
| Value |
string |
否 |
请求头参数 value。 |
demo |
| QueryStringParameters |
array<object> |
否 |
请求路径参数的数据结构。 |
|
|
object |
否 |
请求路径参数的数据结构。 |
||
| IsValueSecret |
string |
否 |
是否是鉴权。 |
false |
| Key |
string |
否 |
请求路径参数 key。 |
name |
| Value |
string |
否 |
请求路径参数 value。 |
demo |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
本次请求的 ID。 |
8346BE8F-40F3-533D-A0B8-1359C31BD5BA |
| Message |
string |
返回信息。 |
success |
| Code |
string |
接口状态或 POP 错误码。取值说明如下:200:成功。 |
200 |
示例
正常返回示例
JSON格式
{
"RequestId": "8346BE8F-40F3-533D-A0B8-1359C31BD5BA",
"Message": "success",
"Code": "200"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 500 | InternalError | InternalError | |
| 409 | RequestParameterException | Request parameter exception | |
| 409 | ConnectionNotExist | The Connection not existed! | |
| 409 | SecretManagerAPIDeleteSecretFailed | Delete secret manager api secret failed! | |
| 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! | |
| 409 | SecretManagerAPIGetSecretValueFailed | Get secret manager api secret value failed! |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。