全部產品
Search
文件中心

:UpdateTransitRouterVpcAttachmentAttribute - 修改轉寄路由器下VPC串連資訊

更新時間:Dec 11, 2025

調用UpdateTransitRouterVpcAttachmentAttribute介面修改企業版轉寄路由器下VPC串連的名稱和描述資訊以及是否需要使企業版轉寄路由器自動發布路由到 VPC 執行個體。

介面說明

UpdateTransitRouterVpcAttachmentAttribute 介面屬於非同步介面,即系統會先返回一個 RequestId,但該 VPC 串連並未修改完成,系統背景修改任務仍在進行。您可以調用 ListTransitRouterVpcAttachments 介面查詢 VPC 串連的狀態。

  • 當 VPC 串連處於 Modifying 狀態時,表示 VPC 串連正在修改中,在該狀態下,您只能對 VPC 串連執行查詢操作,不能執行其他動作。

  • 當 VPC 串連處於 Attached 狀態時,表示 VPC 串連修改完成。

調試

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

調試

授權資訊

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

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

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

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

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

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

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

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

操作

存取層級

資源類型

條件關鍵字

關聯操作

cen:UpdateTransitRouterVpcAttachmentAttribute

update

*TransitRouterVpcAttachment

acs:cen:*:{#accountId}:centransitrouterattachment/{#centransitrouterattachmentId}

請求參數

名稱

類型

必填

描述

樣本值

ClientToken

string

用戶端 Token,用於保證請求的等冪性。

從您的用戶端產生一個參數值,確保不同請求間該參數值唯一。ClientToken 只支援 ASCII 字元。

說明

若您未指定,則系統自動使用 API 請求的 RequestId 作為 ClientToken 標識。每次 API 請求的 RequestId 不一樣。

02fb3da4-130e-11e9-8e44-001****

TransitRouterAttachmentId

string

VPC 串連 ID。

tr-attach-nls9fzkfat8934****

TransitRouterAttachmentName

string

VPC 串連的名稱。

名稱可以為空白或長度為 1~128 個字元,不能以 http://或 https://開頭。

testname

TransitRouterAttachmentDescription

string

VPC 串連的描述資訊。

描述可以為空白或長度為 1~256 個字元,不能以 http://或 https://開頭。

testdesc

DryRun

boolean

是否對此次請求執行預檢,包括許可權、執行個體狀態校正等。取值:

  • false(預設值):發送正常請求,通過檢查後直接修改 VPC 串連的名稱和描述資訊。

  • true:發送檢查請求,只進行校正,不會修改 VPC 串連的名稱和描述資訊。檢查項包括是否填寫了必需參數、請求格式等。如果檢查不通過,則返回對應錯誤。如果檢查通過,則返回對應請求 ID。

false

TransitRouterVPCAttachmentOptions

object

VPC 串連的功能屬性列表。

string

VPC 串連的功能屬性。

ipv6Support:是否開啟 IPv6 功能。

  • enable:開啟 IPv6 功能。

  • disable:關閉 IPv6 功能。

說明

為 VPC 串連開啟 IPv6 功能前,請確保 VPC 執行個體及其關聯的交換器執行個體已經開啟 IPv6 功能。具體操作,請參見 AllocateVpcIpv6CidrCreateVSwitchCidrReservation

ipv6Support:enable

AutoPublishRouteEnabled

boolean

是否允許企業版轉寄路由器自動發布路由到 VPC 執行個體。

  • false:否。

  • true:是。

true

返回參數

名稱

類型

描述

樣本值

object

RequestId

string

請求 ID。

7E61D334-4025-41EF-9145-FC327B35301D

樣本

正常返回樣本

JSON格式

{
  "RequestId": "7E61D334-4025-41EF-9145-FC327B35301D"
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 IncorrectStatus.TransitRouterAttachmentId TransitRouterAttachmentId status is invalid. 當前TransitRouterAttachment的狀態不支援該操作,請稍後重試。
400 InvalidTransitRouterAttachmentId.NotFound TransitRouterAttachmentId is not found. 網路連接執行個體ID不存在。
400 InvalidOperation.RegionNotSupport The operation is not supported in this region. 當前地區不支援該操作。
400 InvalidOperation.VpcAutoRoutesPublishInOtherCEN The operation is not supported because the VPC is already set autoRoutesPublish in other CEN.
400 QuotaExceeded.VpcAutoRoutesPublishPerTransitRouter The count of VPC instance which set autoRoutesPublish in transitRouter is over limit.
400 InvalidOperation.VpnAssociated The operation is not supported because the VPC is associated with VPN. 當前VPC與VPN綁定,無法開啟路由自動同步功能。
400 IllegalParam.Ipv6Support Ipv6Support is illegal. Valid Values are [enable, disable]. 請求參數Ipv6Support值非法,有效值為enable或disable。
400 OperationFailed.VSwitchNotFound The specified vswitch not found. 指定的VSwitchId不存在,請確認該VSwitch狀態是否可用或指定其他可用的VSwitch。
400 OperationFailed.VSwitchIpv6CidrNotAllocated The specified vswitch does not have IPv6 address allocated. 指定的VSwitch未開通Ipv6,請開通Ipv6後再進行該操作。
400 OperationInvalid.AttachmentReferencedIPv6RouteEntryExisted Operation is failed because there is at least one route entry(IPv6) which next hop is the specified attachment. 存在IPv6路由條目指向attachment,無法進行該操作。
400 OperationInvalid.AttachmentReferencedVpcIPv6RouteEntryExisted The specified attachment is referenced by vpc route entry(IPv6). VPC中存在IPv6路由條目指向attachment,無法支援該操作。請先到VPC清除此路由條目,再執行該操作。
400 OperationInvalid.EniReferencedIPv6RouteEntryExisted Operation is failed because there is at least one route entry(IPv6) which next hop is network interface that the specified attachment referenced. VPC中存在IPv6路由條目指向attachment相關的eni,無法支援該操作。請先清除此路由條目,再執行該操作。
400 OperationUnsupported.VpcRoutePropagationSource The operation on this VPC route propagation source is not supported. 不支援對此VPC路由傳播源的操作。
400 OperationUnsupported.TransitRouterType The specified TransitRouterType does not support the operation. 當前TransitRouter類型不支援該操作。
400 InvalidParameter Invalid parameter. 參數不合法。
400 Unauthorized The AccessKeyId is unauthorized. 帳號無許可權操作。
400 INVALID_OPERATION_RESOURCE_NOT_SUPPORT_APPLIANCE_MODE Only VPC attachment support appliance mode. 只有專用網路串連支援網元導流模式。
400 InvalidParameter.Ipv6Support The specified parameter Ipv6Support is invalid. 輸入的參數Ipv6Support不合法。
400 InvalidParameter.ApplianceModeSupport The specified parameter ApplianceModeSupport is invalid. 輸入的參數ApplianceModeSupport不合法。
400 ParamExclusive.TransitRouterVPCAttachmentOptionsAndOptions When creating or modifying a VPC attachment, the input parameter TransitRouterVPCAttachmentOptions and Options cannot be used at the same time. 建立或修改專用網路串連時,不支援同時使用入參TransitRouterVPCAttachmentOptions和Options。
400 InvalidParameter.OrderType The specified parameter OrderType is invalid. 請求參數OrderType不合法。
400 InvalidOperation.OrderTypeMustMatchGrantCrossAccount The OrderType must be the same as the OrderType in the grant cross-account record. 更新後的網路執行個體串連的付費方必須與跨帳號授權記錄的付費方一致。
400 OperationFailed.GrantCrossAccountNotExist Cross-account authorization does not exist. 跨帳號授權不存在。

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

變更歷史

更多資訊,參考變更詳情