All Products
Search
Document Center

Express Connect:CreateExpressConnectRouterAssociation

Last Updated:Jun 10, 2026

Mengaitkan Express Connect Router (ECR) dengan virtual private cloud (VPC) atau Router transit (TR).

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

expressconnectrouter:CreateExpressConnectRouterAssociation

create

*ExpressConnectRouter

acs:expressconnectrouter::{#accountId}:expressconnectrouter/{#EcrId}

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

EcrId

string

Yes

ID instans Express Connect Router.

ecr-mezk2idmsd0vx2****

AssociationRegionId

string

Yes

Wilayah instans jaringan yang dikaitkan.

cn-hangzhou

TransitRouterOwnerId

integer

No

ID akun Alibaba Cloud (akun utama) yang memiliki instans Router transit. Jika tidak ditentukan, ID akun Alibaba Cloud saat ini digunakan.

Catatan

Parameter ini wajib diisi ketika instans jaringan yang dikaitkan milik akun Alibaba Cloud yang berbeda.

189159362009****

TransitRouterId

string

No

ID instans Router transit.

tr-2ze4i71c6be454e2l****

CenId

string

No

ID instans Cloud Enterprise Network (CEN).

cen-of3o1the3i4gwb****

VpcOwnerId

integer

No

ID akun Alibaba Cloud (akun utama) yang memiliki instans VPC. Jika tidak ditentukan, ID akun Alibaba Cloud saat ini digunakan.

Catatan

Parameter ini wajib diisi ketika instans jaringan yang dikaitkan milik akun Alibaba Cloud yang berbeda.

132193271328****

VpcId

string

No

ID instans VPC.

vpc-bp1h37fchc6jmfyln****

AllowedPrefixes

array

No

Entri rute awalan yang diizinkan untuk diiklankan dari Express Connect Router ke Pusat data lokal Anda.

string

No

An allowed prefix route in CIDR format.

192.0.20.0/24

CreateAttachment

boolean

No

Apakah akan secara otomatis membuat attachment yang sesuai pada Router transit saat asosiasi dibuat. Nilai valid:

  • true: Attachment dibuat secara otomatis pada Router transit.

  • false: Attachment tidak dibuat. Anda harus membuat attachment pada Router transit secara manual.

true

DryRun

boolean

No

Apakah akan menjalankan dry run. Nilai valid:

  • true: Menjalankan dry run untuk memeriksa potensi masalah, seperti parameter yang hilang atau nilai yang tidak valid. Jika permintaan lolos pemeriksaan, kode kesalahan DryRunOperation dikembalikan. Tidak ada Sumber daya yang dibuat atau diubah.

  • false (default): Mengirim permintaan normal. Jika permintaan lolos pemeriksaan, sistem membuat asosiasi.

false

ClientToken

string

No

Token klien yang digunakan untuk memastikan idempotensi permintaan.

Anda dapat menggunakan Klien untuk membuat token, tetapi Anda harus memastikan bahwa token tersebut unik di seluruh permintaan yang berbeda. Token hanya boleh berisi karakter ASCII.

Catatan

Jika Anda tidak menentukan parameter ini, sistem menggunakan RequestId dari permintaan sebagai ClientToken. RequestId dari setiap permintaan API bersifat unik.

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

AllowedPrefixesMode

string

No

Mode pengiklanan untuk entri rute awalan yang Anda tentukan di parameter AllowedPrefixes. Nilai valid:

  • MatchMode: Mode pencocokan. Hanya entri rute awalan yang ditentukan di AllowedPrefixes yang diiklankan ke Pusat data lokal Anda. Entri rute yang lebih spesifik yang sebelumnya diiklankan akan ditarik.

  • IncrementalMode: Mode inkremental. Entri rute awalan yang ditentukan di AllowedPrefixes diiklankan ke Pusat data lokal Anda. Entri rute yang lebih spesifik yang ada dan berada dalam awalan yang ditentukan akan ditarik. Entri rute lebih spesifik lainnya yang berada di luar awalan yang ditentukan tetap diiklankan.

MatchMode

Description

string

No

Deskripsi asosiasi. Deskripsi harus memiliki panjang 0 hingga 128 karakter.

test

Tag

array<object>

No

object

No

Key

string

No

Value

string

No

Elemen respons

Element

Type

Description

Example

object

RpcResponse

RequestId

string

The request ID.

05130E79-588D-5C40-A718-C4863A59****

Success

boolean

Indicates whether the request was successful. Valid values:

  • True: The request was successful.

  • False: The request failed.

True

Code

string

The response code. A value of 200 indicates that the request succeeded. For more information, see error codes.

200

Message

string

The response message.

OK

HttpStatusCode

integer

The HTTP status code.

200

DynamicCode

string

The dynamic error code.

IllegalParamFormat.EcrId

DynamicMessage

string

The dynamic error message that replaces the %s placeholder in the ErrMessage parameter.

Catatan

If the ErrMessage parameter returns The Value of Input Parameter %s is not valid and the DynamicMessage parameter returns DtsJobId, it means the specified DtsJobId request parameter is invalid.

The param format of EcrId **** is illegal.

AccessDeniedDetail

string

Details about the access denial.

Authentication is failed for ****

AssociationId

string

The ID of the association between the Express Connect Router and the transit router or VPC.

ecr-assoc-9p2qxx5phpca2m****

Contoh

Respons sukses

JSONformat

{
  "RequestId": "05130E79-588D-5C40-A718-C4863A59****",
  "Success": true,
  "Code": "200",
  "Message": "OK",
  "HttpStatusCode": 200,
  "DynamicCode": "IllegalParamFormat.EcrId\n",
  "DynamicMessage": "The param format of EcrId **** is illegal.\n",
  "AccessDeniedDetail": "Authentication is failed for ****\n",
  "AssociationId": "ecr-assoc-9p2qxx5phpca2m****"
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 IncorrectStatus.Ecr Ecr Status does not allow current operation. The status of the express connect gateway instance does not allow the current operation. Currently, other operations are being performed or the express connect gateway instance is being deleted. Please try again later.
400 OperationDenied.ForceDeleting The current instance is being deleted. Your current operation is rejected and the leased line gateway instance is being forcibly deleted. Please try again later.
400 UnsupportedRegion Feature not supported in specified region. The specified region does not support the leased line gateway function.
400 QuotaExceeded.VpcCountPerEcr The number of VPC bound to the ECR exceeds the quota. The number of VPCs that can be bound to a dedicated gateway instance has reached the quota limit. Please contact your business manager to apply for a larger quota.
400 QuotaExceeded.TrCountPerEcr The number of TR bound to the ECR exceeds the quota. The number of TRs that can be bound to a dedicated gateway instance has reached the quota limit. Please contact your business manager to apply for a larger quota.
400 IllegalParamFormat.AllowedPrefixes The prefix parameter format is invalid. Procedure. The format of the specified prefix route segment is incorrect.
400 OperationDenied.NotGrantedByNodeOwner The node owner is not authorized. Your current operation is rejected, and the leased line gateway product is not authorized.
400 OperationFailed.CdtNotOpened The Cdt function is disabled. The current operation fails, and the Alibaba Cloud data transmission function is not enabled.
400 OperationFailed.CdtCrossBoarderNotOpened The Cdt cross-border transmission function is disabled. The current operation fails. The cross-border data transmission function of Alibaba Cloud is not enabled.
400 OperationFailed.CrossBorderNotAllowed There is no qualification for creating cross-border links. The operation failed. The current enterprise does not have the permission to create cross-border links. Please contact your business manager to add this permission.
400 ResourceNotFound.CenId CenId not found. Cen instance does not exist
400 ResourceNotFound.TrId TRId not found. TR instance does not exist
400 Conflict.ASNOfVBR ASN already used by other VBR. The current VBR BgpGroup localAsn is inconsistent with the ECR asn. Adjust the consistency and rebind.
400 MissingParam.%s The param of %s is missing. The request parameters are not specified. Please check the corresponding parameters and try again.
400 IllegalParamFormat.%s The param format of %s is illegal. Illegal parameter format
400 IllegalParamFormat.CenId The format of the entered Cen instance ID is incorrect. The format of the currently entered Cen instance ID is incorrect
400 OperationDenied.CrossBidAssociating Cross-border binding of resources is subject to compliance constraints. Your current binding resources involve cross-Chinese site resources and overseas site resources. Due to compliance constraints, please contact your business manager for communication and handling.
400 ExclusiveParam.TransitRouterIdAndVpcId A private network instance cannot be bound to a forwarding router instance at the same time. The VPC instance and the forwarding router instance cannot be bound at the same time, please select one of the instances to bind after adjustment.
400 IllegalParamSize.AllowedPrefixes The number of prefix routes exceeded the quota. The number of prefix routes you have entered exceeds the quota. Please apply for expansion.
400 OperationDenied.CrossAccountAttaching If the forwarding router is bound to another account, perform this operation on the same account. The current operation is rejected. When you bind another account to the forwarding router, you need to do this operation under this account.
400 OperationDenied.AttachmentInCurrentRegionExisted Only one forwarding router can be bound to an area. The current operation is rejected. The leased line gateway instance can only bind one forwarding router in the same region.
400 Conflict.Lock There are other unfinished operations. You currently have other unfinished operations, please try again later
400 OperationFailed.CallingVpcYaochi The system is abnormal. Please try again later. The operation failed and the system is abnormal. Please try again later. If the retry still fails, please contact your business manager for help.
400 ResourceAlreadyExist.TransitRouterId The specified resource of transit router already exists. The specified TR resource has been associated with the leased line gateway ECR. Check and try again.
400 ResourceAlreadyExist.VpcId The specified resource of VpcId already exists. The specified VPC resource has been associated with the leased line gateway ECR. Please check and try again.
400 Conflict.AllowedPrefixes The allowed route prefixes [%s] is conflict. The currently configured AllowedPrefixes already exists. Please confirm and submit it again.
400 UnsupportedFeature.JumboFrame The region where the sub-instance is located does not support the jumbo frame feature and cannot be attached to the express connect router.
400 InternalErrorTemp The request processing has failed due to some unknown error. The request processing has failed due to some unknown error.
404 ResourceNotFound.EcrId EcrId not found. ECR instance does not exist

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.