Membuat Gateway VPN dengan memanggil operasi CreateVpnGateway.
Deskripsi operasi
-
Sebelum membuat Gateway VPN, pahami batasan Gateway VPN. Untuk informasi selengkapnya, lihat Batasan Gateway VPN.
-
Instans Gateway VPN di beberapa wilayah hanya mendukung koneksi IPsec-VPN dual-saluran data secara default. Saat Anda memanggil operasi
CreateVpnGatewayuntuk membuat instans Gateway VPN di wilayah ini, Anda harus menentukan parameter VSwitchId dan DisasterRecoveryVSwitchId selain parameter yang wajib. Untuk informasi mengenai wilayah dan zona yang mendukung koneksi IPsec-VPN dual-saluran data, lihat Meningkatkan koneksi IPsec-VPN ke mode dual-saluran data. -
CreateVpnGateway adalah operasi asinkron. Setelah Anda mengirim permintaan, sistem mengembalikan ID instans tetapi Gateway VPN belum dibuat. Tugas pembuatan masih berjalan di latar belakang. Anda dapat memanggil DescribeVpnGateway untuk mengkueri status pembuatan Gateway VPN:
Jika Gateway VPN berada dalam status provisioning, Gateway VPN sedang dibuat.
Jika Gateway VPN berada dalam status active, Gateway VPN telah dibuat.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:CreateVpnGateway |
create |
*VpnGateway
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID wilayah Gateway VPN. Anda dapat memanggil operasi DescribeRegions untuk mengkueri ID wilayah. |
cn-hangzhou |
| Name |
string |
No |
Nama Gateway VPN. Nilai default adalah ID Gateway VPN. Panjang nama harus 2 hingga 100 karakter. Tidak dapat dimulai dengan |
MYVPN |
| VpcId |
string |
Yes |
ID instans yang terhubung ke VPC tempat Gateway VPN berada. |
vpc-bp1ub1yt9cvakoelj**** |
| InstanceChargeType |
string |
No |
Metode penagihan Gateway VPN. Tetapkan nilai ke POSTPAY, yang menentukan metode penagihan pay-as-you-go. . |
Example value for the Chinese site: PREPAY. Example value for the international site: POSTPAY. |
| Period |
integer |
No |
Durasi langganan. Unit: bulan. Nilai valid: 1 hingga 9, 12, 24, dan 36. |
1 |
| AutoPay |
boolean |
No |
Apakah akan membayar Tagihan Gateway VPN secara otomatis. Nilai valid:
Catatan
Untuk berhasil membuat instans Gateway VPN, aktifkan pembayaran otomatis. Jika Anda menonaktifkan pembayaran otomatis, Anda harus membayar Tagihan secara manual untuk membuat instans Gateway VPN. |
false |
| Bandwidth |
integer |
Yes |
Spesifikasi bandwidth Gateway VPN. Unit: Mbit/s.
Catatan
Spesifikasi bandwidth maksimum yang didukung oleh Gateway VPN di beberapa wilayah adalah 500 Mbit/s. Untuk informasi selengkapnya, lihat Batasan Gateway VPN. |
5 |
| EnableIpsec |
boolean |
No |
Apakah akan mengaktifkan fitur IPsec-VPN. Nilai valid:
|
true |
| EnableSsl |
boolean |
No |
Apakah akan mengaktifkan fitur SSL-VPN. Nilai valid:
|
false |
| SslConnections |
integer |
No |
Jumlah maksimum klien yang dapat terhubung secara bersamaan. Nilai valid: 5 (default), 10, 20, 50, 100, 200, 500, dan 1000. |
5 |
| VSwitchId |
string |
No |
vSwitch yang terkait dengan instans Gateway VPN.
|
vsw-bp1j5miw2bae9s2vt**** |
| VpnType |
string |
No |
Tipe Gateway VPN. Nilai valid:
|
Normal |
| 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 klien hanya dapat berisi karakter ASCII. Catatan
Jika Anda tidak menentukan parameter ini, sistem secara otomatis menggunakan RequestId dari permintaan API sebagai ClientToken. RequestId mungkin berbeda untuk setiap permintaan API. |
02fb3da4**** |
| NetworkType |
string |
No |
Jenis jaringan Gateway VPN. Nilai valid:
|
public |
| DisasterRecoveryVSwitchId |
string |
No |
vSwitch kedua yang terkait dengan instans yang terhubung ke VPC VPN.
Untuk informasi mengenai wilayah dan zona yang mendukung koneksi IPsec-VPN dual-saluran data, lihat Meningkatkan koneksi IPsec-VPN ke mode dual-saluran data. |
vsw-p0wiz7obm0tbimu4r**** |
| ResourceGroupId |
string |
No |
ID kelompok sumber daya tempat Gateway VPN berada.
|
rg-acfmzs372yg**** |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Parameter tanggapan. |
||
| VpnGatewayId |
string |
ID instans Gateway VPN. |
vpn-uf68lxhgr7ftbqr3p**** |
| RequestId |
string |
ID permintaan. |
EB2C156A-41F8-49CC-A756-D55AFC8BFD69 |
| Name |
string |
Nama Gateway VPN. |
MYVPN |
| OrderId |
integer |
ID pesanan. Jika Anda tidak mengaktifkan pembayaran otomatis untuk Tagihan Gateway VPN, buka Biaya dan Tagihan untuk menyelesaikan pembayaran.. |
208240895400460 |
Contoh
Respons sukses
JSONformat
{
"VpnGatewayId": "vpn-uf68lxhgr7ftbqr3p****",
"RequestId": "EB2C156A-41F8-49CC-A756-D55AFC8BFD69",
"Name": "MYVPN",
"OrderId": 208240895400460
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidVpcId.NotFound | The specified VPC id does not exist in our records. | |
| 400 | InvalidName | The specified value of Name not supported. | |
| 400 | InvalidSpec.NotFound | The specified Spec does not exist in our records. | |
| 400 | InvalidPeriod | The specified period is not valid | |
| 400 | ChargeType.NotSupport | The specified charge type is not support. | |
| 400 | InventoryNotEnough | The inventory is not enough. | |
| 400 | UnnecessarySslConnection | The SSL connection is unnecessary for ssl vpn disabled. | |
| 400 | InvalidVpnEnable | Either IPsec or SSL VPN must be set enable. | |
| 400 | Resource.QuotaFull | The quota of resource is full | |
| 400 | InvalidVSwitchId.NotFound | The specified vswitchId is not found. | |
| 400 | OperationFailed.InventoryNotEnough | No enough available resource. Try another vswitch with different available zone. | |
| 400 | Forbidden.OperateShareResource | Operating shared resources is forbidden. | |
| 400 | OperationFailed.IpNotEnough | Operation failed because private ip address of the virtual switch is not enough. | |
| 400 | Forbidden.NoSLRPermission | User not authorized to create service linked role. | |
| 400 | OperationFailed.VSwitchConflict | The vswitch can't create vpn. Try another vswitch. | |
| 400 | OperationFailed.AzNotSupport | Current available zone can't create vpn. Try another vswitch with different available zone. | |
| 400 | OperationFailed.NetworkTypeNotMatch | Create NationalStandard vpn with private networkType is unsupported. | |
| 400 | OperationFailed.SslNotSupport | Enable ssl vpn with private networkType is unsupported. | Private VPN gateways do not support enabling the SSL feature. |
| 400 | Forbidden.TagKey.Duplicated | The specified tag key already exists. | The tag resource is duplicated. |
| 400 | SizeLimitExceeded.TagNum | The maximum number of tags is exceeded. | The number of tags exceeds the limit. |
| 400 | InvalidParameter.TagValue | The specified parameter TagValue is invalid. | The specified parameter TagValue is invalid. |
| 400 | InvalidParameter.TagKey | The specified parameter TagKey is invalid. | The specified parameter TagKey is invalid. |
| 400 | Duplicated.TagKey | The specified parameter TagKey is duplicated. | The specified parameter TagKey is duplicated. |
| 400 | InternalError | The request processing has failed due to some unknown error, exception or failure. | |
| 400 | InvalidVSwitchId.SecondVswitchNotSupport | The available zone of vswitch2 not supported. | The zone of the secondary vSwitch is not supported. |
| 400 | InvalidVSwitchId.FirstVswitchNotSupport | The available zone of vswitch1 not supported. | The zone of the primary vSwitch is not supported. |
| 400 | InvalidVSwitchId.VswitchIdShouldDifferent | The VSwitch ids should be different. | The primary and secondary zones cannot be the same. |
| 400 | InvalidVSwitchId.FirstVswitchIpNotEnough | The ip of vswitch1 not enough. | The number of available IP addresses in the primary vSwitch is insufficient. |
| 400 | InvalidVSwitchId.SecondVswitchIpNotEnough | The ip of vswitch2 not enough. | The number of available IP addresses in the secondary vSwitch is insufficient. |
| 400 | InvalidVSwitchId.ZoneIdShouldDifferent | Two vSwitches should belong to different Availability Zones. | The two vSwitches specified when creating a dual-tunnel VPN gateway must belong to different zones. |
| 404 | InvalidRegionId.NotFound | The specified region is not found during access authentication. | The specified region was not found during access authentication. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.