すべてのプロダクト
Search
ドキュメントセンター

Cloud Enterprise Network:UpdateTransitRouterVpcAttachmentZones

最終更新日:Jun 10, 2026

仮想非公開クラウド (VPC) 接続に関連付けられているゾーンと vSwitch を変更します。

操作説明

  • When you add a zone and a vSwitch for a VPC connection, make sure that the vSwitch has at least one idle IP address. When you modify the zones and vSwitches of a VPC connection, the Enterprise Edition transit router creates an elastic network interface (ENI) in the vSwitch. The ENI occupies one IP address in the vSwitch. The ENI forwards traffic between the VPC and the Enterprise Edition transit router.

  • UpdateTransitRouterVpcAttachmentZones is an asynchronous operation. After you send a request, the system returns a request ID and runs the task in the background. You can call the ListTransitRouterVpcAttachments operation to query the status of a VPC connection.

    • If a VPC connection is in the Modifying state, the VPC connection is being modified. You can query the VPC connection but cannot perform other operations.

    • If a VPC connection is in the Attached state, the VPC connection is modified.

今すぐお試しください

この API を OpenAPI Explorer でお試しください。手作業による署名は必要ありません。呼び出しに成功すると、入力したパラメーターに基づき、資格情報が組み込まれた SDK コードが自動的に生成されます。このコードをダウンロードしてローカルで使用できます。

テスト

RAM 認証

下表に、この API を呼び出すために必要な認証情報を示します。認証情報は、RAM (Resource Access Management) ポリシーを使用して定義できます。以下で各列名について説明します。

  • アクション:特定のリソースに対して実行可能な操作。ポリシー構文ではAction要素として指定します。

  • API:アクションを具体的に実行するための API。

  • アクセスレベル:各 API に対して事前定義されているアクセスの種類。有効な値:create、list、get、update、delete。

  • リソースタイプ:アクションが作用するリソースの種類。リソースレベルでの権限をサポートするかどうかを示すことができます。ポリシーの有効性を確保するため、アクションの対象として適切なリソースを指定してください。

    • リソースレベルの権限を持つ API の場合、必要なリソースタイプはアスタリスク (*) でマークされます。ポリシーのResource要素で対応する ARN を指定してください。

    • リソースレベルの権限を持たない API の場合、「すべてのリソース」と表示され、ポリシーのResource要素でアスタリスク (*) でマークされます。

  • 条件キー:サービスによって定義された条件のキー。このキーにより、きめ細やかなアクセス制御が可能になります。この制御は、アクション単体に適用することも、特定のリソースに対するアクションに適用することもできます。Alibaba Cloud は、サービス固有の条件キーに加えて、すべての RAM 統合サービスに適用可能な一連の共通条件キーを提供しています。

  • 依存アクション:ある特定のアクションを実行するために、前提として実行が必要となる他のアクション。依存アクションの権限も RAM ユーザーまたは RAM ロールに付与する必要があります。

アクション

アクセスレベル

リソースタイプ

条件キー

依存アクション

cen:UpdateTransitRouterVpcAttachmentZones

update

*TransitRouterVpcAttachment

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

なし なし

リクエストパラメーター

パラメーター

必須 / 任意

説明

ClientToken

string

任意

リクエストのべき等性を確保するために使用されるクライアントトークン。

クライアントを使用してトークンを生成できますが、異なるリクエスト間でトークンが一意であることを確認する必要があります。トークンには ASCII 文字のみを使用できます。

説明

このパラメーターを設定しない場合、ClientToken は RequestId の値に設定されます。各 API リクエストの RequestId の値は異なる場合があります。

123e4567-e89b-12d3-a456-42665544****

DryRun

boolean

任意

ドライランを実行するかどうかを指定します。有効な値:

  • true: ドライランを実行します。システムは必須パラメーター、リクエスト構文、および使用制限をチェックします。リクエストがドライランに失敗した場合、エラーメッセージが返されます。リクエストがドライランに合格した場合、DryRunOperation エラーコードが返されます。

  • false (デフォルト): ドライランを実行し、リクエストを送信します。

false

TransitRouterAttachmentId

string

必須

VPC 接続の ID。

tr-attach-9bbqyygouv4cpn****

AddZoneMappings

array<object>

任意

VPC 接続に追加するゾーンと vSwitch。

object

任意

The ID of the vSwitch that you want to add to the VPC connection.

You can specify at most 10 vSwitches in each call.

VSwitchId

string

任意

The ID of the vSwitch that you want to add to the VPC connection.

You can specify at most 10 vSwitches in each call.

  • If the VPC connection belongs to the current Alibaba Cloud account, you can call the DescribeVSwitches operation to query the IDs of the vSwitches and zones of the VPC.

  • If the VPC connection belongs to another Alibaba Cloud account, you can call the ListGrantVSwitchesToCen operation to query the IDs of the vSwitches and zones of the VPC.

vsw-wz988dda8ldm4uvmx****

ZoneId

string

任意

The ID of the zone where the vSwitch that you want to add to the VPC connection is deployed.

You can specify at most 10 vSwitches in each call.

cn-hangzhou-h

RemoveZoneMappings

array<object>

任意

VPC 接続から削除するゾーンと vSwitch。

object

任意

The zones and vSwitches that you want to remove from the VPC connection.

You can specify at most 10 pairs of zones and vSwitches in each call.

VSwitchId

string

任意

The ID of the vSwitch that you want to remove from the VPC connection.

You can remove at most 10 vSwitches from a VPC in each call.

vsw-wz9f5izl6wshndmta****

ZoneId

string

任意

The ID of the zone where the vSwitch that you want to remove from the VPC connection is deployed.

cn-hangzhou-i

レスポンスフィールド

フィールド

説明

object

The response.

RequestId

string

The ID of the request.

595AE52F-49FF-5788-A677-0DD1467941A1

成功レスポンス

JSONJSON

{
  "RequestId": "595AE52F-49FF-5788-A677-0DD1467941A1"
}

エラーコード

HTTP ステータスコード

エラーコード

エラーメッセージ

説明

400 IllegalParam.ZoneId The specified ZoneId is illegal.
400 IncorrectStatus.TransitRouterAttachment The status of TransitRouterAttachment is incorrect.
400 IllegalParam.VSwitchId VSwitchId is illegal.
400 InvalidTransitRouterAttachmentId.NotFound TransitRouterAttachmentId is not found.
400 OperationUnsupported.ServiceMode The specified TransitRouter does not support the operation.
400 IllegalParam.AddOrRemoveZoneMappings The specified AddZoneMappings or RemoveZoneMappings are illegal.
400 IncorrectStatus.Vpc The resource is not in a valid state for the attachment operation.
400 OperationDenied.RouteEntryOnEni Operation is failed because there is at least one route entry which next hop is the specified eni.
400 IncorrectStatus.VpcRouteEntry The resource is not in a valid state for the attachment operation.
400 IncorrectStatus.VpcSwitch The resource is not in a valid state for the attachment operation.
400 OperationUnsupported.TransitRouterType The specified TransitRouterType does not support the operation.
400 InsufficientIpAddr.vsw Insufficient available IP addresses in the vSwitch.
400 OperationFailed.VSwitchIpv6CidrNotAllocated The specified vswitch does not have IPv6 address allocated.
400 InvalidTransitRouterMode.NeedUpgrade TransitRouter need to upgrade.
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.
400 InvalidParameter Invalid parameter.
400 Unauthorized The AccessKeyId is unauthorized.
404 IllegalParam.ZoneId The specified ZoneId is illegal.
404 InvalidVSwitchId.NotFound The specified VSwitchId is not found.
409 IncorrectStatus.VpcSwitch The resource is not in a valid state for the attachment operation.

完全なリストについては、「エラーコード」をご参照ください。

変更履歴

完全なリストについては、「変更履歴」をご参照ください。