All Products
Search
Document Center

Virtual Private Cloud:AcceptVpcPeerConnection

Last Updated:Jun 10, 2026

Menerima permintaan koneksi peering VPC.

Deskripsi operasi

  • A cross-account VPC peering connection is activated only after the accepter VPC accepts the request.

  • AcceptVpcPeerConnection is an asynchronous operation. After you send a request, the system returns a RequestId while running the task in the background. Call GetVpcPeerConnectionAttribute to query the status of the VPC peering connection instance.

    • Updating indicates that the VPC peering connection is being activated.

    • Activated indicates that the VPC peering connection is activated.

  • AcceptVpcPeerConnection does not support concurrent requests for the same VPC peering connection.

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

vpc:AcceptVpcPeerConnection

create

*All Resource

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

ID koneksi peering VPC.

pcc-guzvyqlj0n6e10****

DryRun

boolean

No

Apakah akan menjalankan dry run. Nilai valid:

  • true: Mengirim permintaan tanpa menerima permintaan koneksi peering VPC. Sistem memeriksa permintaan untuk potensi masalah, termasuk nilai parameter yang hilang, sintaks permintaan yang salah, dan batas layanan. Jika permintaan gagal dalam dry run, Paket error dikembalikan. Jika pemeriksaan berhasil, kode kesalahan DryRunOperation dikembalikan.

  • false (default): Mengirim permintaan normal. Setelah pemeriksaan berhasil, kode status HTTP 2xx dikembalikan dan operasi dijalankan.

false

ClientToken

string

No

Token klien yang digunakan untuk memastikan idempotensi permintaan.

Buat token dari klien Anda untuk memastikan token tersebut unik di antara berbagai permintaan. Token klien hanya dapat berisi karakter ASCII.

Catatan

Jika Anda tidak menentukan parameter ini, sistem secara otomatis menggunakan RequestId permintaan sebagai ClientToken. RequestId setiap permintaan API mungkin berbeda.

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

ResourceGroupId

string

No

ID kelompok sumber daya.

Untuk informasi selengkapnya, lihat Apa itu kelompok sumber daya?.

rg-acfmxazb4ph6aiy****

Tag

array<object>

No

Tag.

object

No

The tags.

Key

string

No

The key of the tag. You can specify 1 to 20 tag keys. It cannot be an empty string.

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

FinanceDept

Value

string

No

The value of the tag. You can specify 1 to 20 tag values. It can be an empty string.

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

FinanceJoshua

Elemen respons

Element

Type

Description

Example

object

The request ID.

RequestId

string

The request ID.

4EC47282-1B74-4534-BD0E-403F3EE64CAF

Contoh

Respons sukses

JSONformat

{
  "RequestId": "4EC47282-1B74-4534-BD0E-403F3EE64CAF"
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 ResourceNotFound.InstanceId The specified resource of %s is not found. The specified instance is not found
400 IncorrectStatus.VpcPeer The status of %s [%s] is incorrect. The status of the peer-to-peer connection instance does not meet the requirements. In this status, the peer-to-peer connection instance cannot be received.
400 OperationFailed.CdtNotOpened The operation failed because the Cdt service is not opened. The operation failed because CDT is not activated.
400 IncorrectBusinessStatus.VpcPeer The business status of %s [%s] is incorrect. The current instance status is abnormal and the current operation is not allowed.
400 OperationFailed.NotExist.ResourceGroup The operation failed because the resource group does not exist. The operation failed because the resource group does not exist.
400 OperationFailed.CrossBorderCdtNotOpened The cross-border data transmission function of Alibaba Cloud is not enabled.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.