All Products
Search
Document Center

Cloud Enterprise Network:ListTransitRouterVpcAttachments

Last Updated:Jun 10, 2026

Mengkueri detail tentang koneksi virtual private cloud (VPC) pada router transit Edisi Perusahaan, termasuk status koneksi, metode penagihan, dan zona, serta vSwitch dan elastic network interface (ENI) dari VPC yang terhubung.

Deskripsi operasi

You can query the VPC connections of an Enterprise Edition transit router in one of the following ways:

  • Specify the ID of an Enterprise Edition transit router to query all its VPC connections.

  • Specify the ID of a Cloud Enterprise Network (CEN) instance and the region ID of the Enterprise Edition transit router to query all its VPC connections.

  • Specify the ID of a region that contains an Enterprise Edition transit router to query all VPC connections in that region.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

cen:ListTransitRouterVpcAttachments

list

*CenInstance

acs:cen:*:{#accountId}:ceninstance/{#ceninstanceId}

TransitRouterVpcAttachment

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

TransitRouterVpcAttachment

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

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

CenId

string

No

ID Instans CEN.

cen-j3jzhw1zpau2km****

RegionId

string

No

ID Wilayah tempat router transit Edisi Perusahaan diterapkan.

Anda dapat memanggil operasi DescribeRegions untuk mengkueri daftar wilayah terbaru.

cn-hangzhou

TransitRouterAttachmentId

string

No

ID koneksi VPC.

tr-attach-nls9fzkfat8934****

TransitRouterId

string

No

ID router transit Edisi Perusahaan.

tr-bp1su1ytdxtataupl****

MaxResults

integer

No

Jumlah entri yang akan dikembalikan pada setiap halaman. Nilai default adalah 20.

20

NextToken

string

No

Token paginasi yang digunakan pada permintaan berikutnya untuk mengambil halaman hasil baru.

  • Jika ini adalah kueri pertama Anda atau tidak ada hasil lebih lanjut yang tersedia, Anda tidak perlu menentukan parameter ini.

  • Untuk kueri berikutnya, atur parameter ini ke nilai NextToken dari tanggapan sebelumnya.

FFmyTO70tTpLG6I3FmYAXGKPd****

Tag

array<object>

No

Tag.

Anda dapat menentukan hingga 20 tag.

object

No

Key

string

No

The tag key.

The tag key must be 1 to 64 characters in length, and cannot start with aliyun or acs:. It cannot contain http:// or https://.

tagtest

Value

string

No

The tag value.

The tag value can be 0 to 128 characters in length. It cannot start with aliyun or acs:, and cannot contain http:// or https://.

tagtest

VpcId

string

No

ID VPC.

vpc-bp1kbjcre9vtsebo1****

OrderType

string

No

Entitas yang membayar instans jaringan. Nilai valid:

  • PayByCenOwner: Biaya dibayar oleh akun yang memiliki Instans CEN.

  • PayByResourceOwner: Biaya dibayar oleh akun yang memiliki instans jaringan.

PayByCenOwner

Status

string

No

Status koneksi VPC. Nilai valid:

  • Attaching: Koneksi VPC sedang dibuat.

  • Attached: Koneksi VPC telah dibuat.

  • Detaching: Koneksi VPC sedang dihapus.

Attached

Elemen respons

Element

Type

Description

Example

object

The returned data.

NextToken

string

The token to retrieve the next page of results.

  • If this parameter is empty, all results have been returned.

  • If a value is returned for NextToken, it is the token to start the next query.

FFmyTO70tTpLG6I3FmYAXGKPd****

RequestId

string

The request ID.

C97FF53F-3EF8-4883-B459-60E171924B23

TotalCount

integer

The total number of entries.

1

MaxResults

integer

The number of entries to return on each page.

20

TransitRouterAttachments

array<object>

A list of VPC connections.

array<object>

CreationTime

string

The time when the VPC connection was created.

The time is in the YYYY-MM-DDThh:mmZ format and in UTC.

2021-06-15T02:14Z

Status

string

The status of the VPC connection.

  • Attached: The connection is established.

  • Attaching: The connection is being created.

  • Detaching: The connection is being deleted.

Attached

VpcId

string

The ID of the VPC.

vpc-bp1h8vbrbcgohcju5****

TransitRouterAttachmentId

string

The ID of the VPC connection.

tr-attach-nls9fzkfat8934****

TransitRouterId

string

The ID of the Enterprise Edition transit router.

tr-bp1su1ytdxtataupl****

ResourceType

string

The type of resource to which the connection is attached.

The value is always VPC, which indicates a VPC.

VPC

TransitRouterAttachmentDescription

string

The description of the VPC connection.

testdesc

VpcOwnerId

integer

The ID of the account that owns the VPC.

1250123456123456

VpcRegionId

string

The ID of the region where the VPC is deployed.

cn-hangzhou

TransitRouterAttachmentName

string

The name of the VPC connection.

testname

ZoneMappings

array<object>

The zone mappings of the VPC connection. This includes the vSwitches and elastic network interfaces (ENIs) in the associated VPC.

object

ZoneId

string

The zone ID.

cn-hangzhou-h

VSwitchId

string

The vSwitch ID.

vsw-bp1a214sbus8z3b54****

NetworkInterfaceId

string

The ID of the ENI created by the Enterprise Edition transit router in the vSwitch.

eni-bp149hmyaqegerml****

AutoPublishRouteEnabled

boolean

Specifies whether the Enterprise Edition transit router automatically advertises routes to the VPC.

  • false: Routes are not automatically advertised.

  • true: Routes are automatically advertised.

true

ChargeType

string

The billing method of the VPC connection.

The value is always POSTPAY, which indicates the pay-as-you-go billing method.

POSTPAY

Tags

array<object>

A list of tags.

object

Key

string

The tag key.

test

Value

string

The tag value.

test

OrderType

string

Specifies who pays for the network instance. Valid values:

  • PayByCenOwner: The account that owns the CEN instance pays the fees.

  • PayByResourceOwner: The account that owns the network instance pays the fees.

PayByCenOwner

ManagedService

string

The cloud service to which the resource belongs.

SAS

TransitRouterVPCAttachmentOptions

object

The feature attributes of the VPC connection. This parameter is deprecated. We recommend that you use the Options parameter instead.

string

  • ipv6Support: Indicates whether IPv6 is enabled. This setting defaults to the current IPv6 status of the VPC connection.

    • enable: IPv6 is enabled.

    • disable: IPv6 is disabled.

{ "ipv6Support": "disable" }

CenId

string

The ID of the CEN instance.

cen-j3jzhw1zpau2km****

Options

object

A collection of feature attributes.

Ipv6Support

string

是否支持 IPv6。

  • disable(默认值):否。

  • enable:是。

enable

ApplianceModeSupport

string

是否开启网元导流模式。

  • disable(默认值):否。

  • enable:是。

enable

Contoh

Respons sukses

JSONformat

{
  "NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
  "RequestId": "C97FF53F-3EF8-4883-B459-60E171924B23",
  "TotalCount": 1,
  "MaxResults": 20,
  "TransitRouterAttachments": [
    {
      "CreationTime": "2021-06-15T02:14Z",
      "Status": "Attached",
      "VpcId": "vpc-bp1h8vbrbcgohcju5****",
      "TransitRouterAttachmentId": "tr-attach-nls9fzkfat8934****",
      "TransitRouterId": "tr-bp1su1ytdxtataupl****",
      "ResourceType": "VPC",
      "TransitRouterAttachmentDescription": "testdesc",
      "VpcOwnerId": 1250123456123456,
      "VpcRegionId": "cn-hangzhou",
      "TransitRouterAttachmentName": "testname",
      "ZoneMappings": [
        {
          "ZoneId": "cn-hangzhou-h",
          "VSwitchId": "vsw-bp1a214sbus8z3b54****",
          "NetworkInterfaceId": "eni-bp149hmyaqegerml****"
        }
      ],
      "AutoPublishRouteEnabled": true,
      "ChargeType": "POSTPAY",
      "Tags": [
        {
          "Key": "test",
          "Value": "test"
        }
      ],
      "OrderType": "PayByCenOwner",
      "ManagedService": "SAS",
      "TransitRouterVPCAttachmentOptions": {
        "key": "{ \"ipv6Support\": \"disable\" }"
      },
      "CenId": "cen-j3jzhw1zpau2km****\n",
      "Options": {
        "Ipv6Support": "",
        "ApplianceModeSupport": ""
      }
    }
  ]
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 IllegalParam.NextToken The specified NextToken is invalid.
400 IllegalParam.TrInstance The specified TransitRouter is invalid.
400 IllegalParam.Region The specified Region is invalid.
400 IllegalParam.CenId The specified CenId is invalid.
400 IllegalParam.TransitRouterId The specified TransitRouterId is invalid.
400 IllegalParam.CenIdOrRegionId The specified CenId or RegionId is invalid.
400 IllegalParam.MaxResults The specified MaxResults is illegal.
400 InvalidParameter Invalid parameter.
400 Unauthorized The AccessKeyId is unauthorized.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.