Membuat koneksi peering VPC
Deskripsi operasi
Sebelum Anda membuat koneksi peering VPC, perhatikan hal-hal berikut:
-
CreateVpcPeerConnection adalah operasi asinkron. Sistem mengembalikan ID instans btetapi koneksi IPsec belum dibuat dan menjalankan tugas di latar belakang. Panggil GetVpcPeerConnectionAttribute untuk menanyakan status tugas.
-
Jika koneksi peering VPC dalam status Creating, koneksi peering VPC sedang dibuat.
-
Jika koneksi peering VPC dalam status Activated, koneksi peering VPC telah dibuat.
-
Jika koneksi peering VPC dalam status Accepting, ini adalah koneksi lintas akun. Koneksi perlu diterima di sisi penerima.
-
-
Anda tidak dapat memanggil CreateVpcPeerConnection berulang kali dalam periode waktu yang ditentukan.
Ketika Anda membuat koneksi peering VPC, sistem 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 pemohon. |
vpc-bp1gsk7h12ew7oegk**** |
| AcceptingAliUid |
integer |
Yes |
ID akun Alibaba Cloud tempat VPC penerima berada.
Catatan
Jika penerima adalah pengguna RAM, atur AcceptingAliUid ke ID akun Alibaba Cloud yang membuat pengguna RAM 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 (_), dan tanda hubung (-). Nama harus diawali dengan huruf. |
vpcpeer |
| Description |
string |
No |
Deskripsi koneksi peering VPC. Deskripsi harus terdiri dari 2 hingga 256 karakter. Deskripsi harus diawali dengan huruf tetapi tidak dapat diawali dengan |
description |
| DryRun |
boolean |
No |
Menentukan apakah hanya melakukan dry run, tanpa melakukan permintaan yang sebenarnya. Nilai yang valid:
|
false |
| ClientToken |
string |
No |
Token klien yang digunakan untuk memastikan idempotensi permintaan. Anda dapat menggunakan klien untuk menghasilkan token, tetapi Anda harus memastikan bahwa token tersebut unik di antara permintaan yang berbeda. Token hanya boleh berisi karakter ASCII dan tidak boleh melebihi 64 karakter. Catatan
Jika Anda tidak menentukan parameter ini, sistem secara otomatis menggunakan ID permintaan sebagai token klien. ID permintaan mungkin berbeda untuk setiap permintaan. |
02fb3da4-130e-11e9-8e44-001**** |
| ResourceGroupId |
string |
No |
ID grup sumber daya. Untuk informasi lebih lanjut tentang grup sumber daya, lihat Grup sumber daya. |
rg-acfmxazb4ph6aiy**** |
| Bandwidth |
integer |
No |
Bandwidth koneksi peering VPC. Satuan: Mbit/s. Nilainya harus berupa bilangan bulat lebih besar dari 0. Sebelum Anda menentukan parameter ini, pastikan Anda membuat koneksi peering VPC antar-wilayah. |
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 paling banyak 20 kunci tag. Kunci tag tidak boleh berupa string kosong. Kunci tag dapat memiliki panjang hingga 128 karakter. Kunci tag tidak boleh diawali dengan |
FinanceDept |
| Value |
string |
No |
Nilai tag. Anda harus menentukan setidaknya satu nilai tag dan dapat menentukan paling banyak 20 nilai tag. Nilai tag dapat berupa string kosong. Nilai tag dapat memiliki panjang hingga 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.