Membuat koneksi peering VPC
Deskripsi operasi
Sebelum membuat koneksi peering VPC, perhatikan hal-hal berikut:
-
CreateVpcPeerConnection merupakan operasi asinkron. Sistem mengembalikan instance ID, tetapi koneksi IPsec belum dibuat dan proses tersebut berjalan di latar belakang. Panggil GetVpcPeerConnectionAttribute untuk memeriksa status tugas tersebut.
-
Jika koneksi peering VPC berada dalam status Creating, koneksi tersebut sedang dalam proses pembuatan.
-
Jika koneksi peering VPC berada dalam status Activated, koneksi tersebut telah berhasil dibuat.
-
Jika koneksi peering VPC berada dalam status Accepting, ini adalah koneksi lintas akun (cross-account) yang perlu diterima oleh pihak penerima (accepter).
-
-
Anda tidak dapat memanggil CreateVpcPeerConnection secara berulang dalam periode waktu tertentu.
Saat Anda membuat koneksi peering VPC, sistem akan secara otomatis mengaktifkan Cloud Data Transfer (CDT) untuk Anda.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:CreateVpcPeerConnection |
create |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID wilayah tempat Anda ingin membuat koneksi peering VPC. Panggil operasi DescribeRegions untuk menanyakan daftar wilayah terbaru. |
cn-hangzhou |
| VpcId |
string |
Yes |
ID VPC peminta. |
vpc-bp1gsk7h12ew7oegk**** |
| AcceptingAliUid |
integer |
Yes |
ID Akun Alibaba Cloud tempat VPC penerima berada.
Catatan
Jika penerima adalah RAM user, atur AcceptingAliUid ke ID Akun Alibaba Cloud yang membuat RAM user tersebut. |
1210123456123456 |
| AcceptingRegionId |
string |
Yes |
ID wilayah VPC penerima dari koneksi peering VPC yang ingin Anda buat.
|
cn-hangzhou |
| AcceptingVpcId |
string |
Yes |
ID VPC penerima. |
vpc-bp1vzjkp2q1xgnind**** |
| Name |
string |
No |
Nama koneksi peering VPC. Nama harus terdiri dari 2 hingga 128 karakter, dan dapat berisi angka, garis bawah (_), serta tanda hubung (-). Nama harus dimulai dengan huruf. |
vpcpeer |
| Description |
string |
No |
Deskripsi koneksi peering VPC. Deskripsi harus terdiri dari 2 hingga 256 karakter. Deskripsi harus dimulai dengan huruf, tetapi tidak boleh diawali dengan |
description |
| DryRun |
boolean |
No |
Menentukan apakah hanya melakukan dry run tanpa menjalankan permintaan sebenarnya. Nilai yang valid:
|
false |
| ClientToken |
string |
No |
Token client yang digunakan untuk memastikan idempotensi permintaan. Anda dapat menggunakan client untuk menghasilkan token, tetapi Anda harus memastikan bahwa token tersebut unik di antara permintaan yang berbeda. Token hanya boleh berisi karakter ASCII dan panjangnya tidak boleh melebihi 64 karakter. Catatan
Jika Anda tidak menentukan parameter ini, sistem secara otomatis menggunakan request ID sebagai client token. Request ID mungkin berbeda untuk setiap permintaan. |
02fb3da4-130e-11e9-8e44-001**** |
| ResourceGroupId |
string |
No |
ID kelompok sumber daya. Untuk informasi selengkapnya tentang kelompok sumber daya, lihat Resource groups. |
rg-acfmxazb4ph6aiy**** |
| Bandwidth |
integer |
No |
Bandwidth koneksi peering VPC. Satuan: Mbit/s. Nilainya harus berupa bilangan bulat lebih besar dari 0. Sebelum menentukan parameter ini, pastikan Anda membuat koneksi peering VPC inter-region. |
100 |
| LinkType |
string |
No |
Tipe tautan koneksi peering VPC yang ingin Anda buat. Nilai yang valid:
Catatan
|
Gold |
| Tag |
array<object> |
No |
Tag. |
|
|
object |
No |
Tag. |
||
| Key |
string |
No |
Kunci tag. Anda harus menentukan setidaknya satu kunci tag dan maksimal 20 kunci tag. Kunci tag tidak boleh berupa string kosong. Panjang kunci tag dapat mencapai 128 karakter. Kunci tag tidak boleh diawali dengan |
FinanceDept |
| Value |
string |
No |
Nilai tag. Anda harus menentukan setidaknya satu nilai tag dan dapat menentukan maksimal 20 nilai tag. Nilai tag boleh berupa string kosong. Panjang nilai tag dapat mencapai 128 karakter. Nilai tag tidak boleh diawali dengan |
FinanceJoshua |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
ID permintaan. |
||
| RequestId |
string |
ID permintaan. |
54B48E3D-DF70-471B-AA93-08E683A1B45 |
| InstanceId |
string |
ID instans tempat koneksi peering VPC dibuat. |
pcc-lnk0m24khwvtkm**** |
Contoh
Respons sukses
JSONformat
{
"RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B45",
"InstanceId": "pcc-lnk0m24khwvtkm****"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | OperationFailed.CdtNotOpened | The operation failed because the Cdt service is not opened. | |
| 400 | OperationFailed.CrossBorderCdtNotOpened | The operation failed because the CrossBorderCdt service is not opened. | |
| 400 | IncorrectStatus.Vpc | The status of %s [%s] is incorrect. | |
| 400 | IncorrectStatus.AcceptingVpc | The status of %s [%s] is incorrect. | |
| 400 | ResourceAlreadyExist.RouterInterface | The specified resource of %s already exists. | |
| 400 | ResourceAlreadyExist.VpcPeer | The specified resource of %s already exists. | |
| 400 | OperationDenied.CloudBoxExistsInVpc | The operation is not allowed because the CloudBox device exists in vpc. | |
| 400 | OperationDenied.CloudBoxExistsInAcceptingVpc | The operation is not allowed because the CloudBox device exists in accepting vpc. | |
| 400 | QuotaExceeded.VpcPeerCountPerVpc | The quota of %s is exceeded, usage %s/%s. | |
| 400 | UnsupportedRegion | The feature of %s is not supported in the region of %s. | |
| 400 | QuotaExceeded.VpcPeerCountPerUserPerRegion | The quota of %s is exceeded, usage %s/%s. | |
| 400 | IncorrectBusinessStatus.VpcPeer | The business status of %s [%s] is incorrect. | |
| 400 | OperationFailed.NotExist.ResourceGroup | The operation failed because the resource group does not exist. | |
| 400 | OperationFailed.AcceptUserCdtNotOpened | The operation failed because the Cdt service of accept user is not opened. | |
| 400 | OperationFailed.AcceptUserCrossBorderCdtNotOpened | The operation failed because the CrossBorderCdt service of accept user is not opened. | |
| 400 | IncorrectBusinessStatus.AcceptUserVpcPeer | The business status of %s [%s] is incorrect. | |
| 400 | OperationFailed.ViolativeVpcPeer | The creation operation fails because it is not allowed to create a vpc peer instance between the originating region and the receiving region. | |
| 400 | QuotaExceeded.CrossRegionVpcPeerCountPerVpc | The quota of %s is exceeded, usage %s/%s. | |
| 400 | QuotaExceeded.IntraRegionVpcPeerCountPerVpc | The quota of %s is exceeded, usage %s/%s. | |
| 400 | OperationDenied.OperateShareResource | The operation is not allowed because of operating shared resource. | |
| 400 | IncorrectBusinessStatus.AcceptVpcPeer | The business status of peer account is incorrect. | |
| 400 | OperationFailed.InterRegionLinkTypeNotSupported | The same region not supported link type feature. | |
| 400 | OperationFailed.RegionIdNotSupportLinkType | The feature link type is not supported in the region. | |
| 400 | OperationFailed.SpecificLinkTypeNotSupported | The operation failed because the special link type of user is not opened. | |
| 400 | OperationFailed.CrossBusinessNotAllowed | Operation failed because receiver and accepter belong to different business site. | |
| 400 | OperationFailed.ChargeTypeNotSupported | Operation failed because the CDT charge type of receiver or accepter does not support the Underlay link type. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.