全部產品
Search
文件中心

EventBridge:UpdateConnection

更新時間:Jun 09, 2026

更新連線配置資訊。

介面說明

用於更新連線配置。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

eventbridge:UpdateConnection

update

*Connection

acs:eventbridge:{#regionId}:{#accountId}:connection/{#ConnectionName}

請求參數

名稱

類型

必填

描述

樣本值

ConnectionName

string

要更新的連線名稱。最大長度 127 個字元。最小長度 2 個字元。

connection-name

Description

string

描述資訊。最大長度 255 個字元。

Description of the connection configuration

NetworkParameters

object

網路配置的資料結構。

NetworkType

string

  • 公網 :PublicNetwork

  • 專有網路 :PrivateNetwork

說明

選擇專有網路時,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:BASIC_AUTH。這種授權方式是瀏覽器遵守 HTTP 協定實作的基本授權方式,HTTP 協定進行通訊的過程中,HTTP 協定定義了基本認證允許 HTTP 伺服器對用戶端進行使用者身分驗證的方法。在請求標頭中加入 Authorization :Basic 空一格 Base64 加密(使用者名稱:密碼)固定格式。Username 和 Password 是必填的。

  • API KEY :API_KEY_AUTH。固定的格式在請求標頭中加入 Token :Token 值。ApiKeyName 和 ApiKeyValue 是必填的

  • OAUTH :OAUTH_AUTH。OAuth2.0 是一種授權機制,正常情況,不使用 OAuth2.0 等授權機制的系統,用戶端是可以直接存取資源伺服器的資源的,為了使用者安全存取資料,在存取中間加入了 Access Token 機制。用戶端需要攜帶 Access Token 去存取受到保護的資源。所以 OAuth2.0 確保了資源不被惡意用戶端存取,從而提高了系統的安全性。AuthorizationEndpoint、OAuthHttpParameters 和 HttpMethod 是必填的。

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

探測類型的方法。取值:

  • GET

  • POST

  • HEAD

  • DELETE

  • PUT

  • PATCH

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!

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情