Membuat server IPsec dengan memanggil operasi CreateIpsecServer.
Deskripsi operasi
Sebelum Anda membuat server IPsec, Anda harus membuat gateway VPN dan mengaktifkan fitur SSL-VPN untuk gateway VPN. Untuk informasi lebih lanjut, lihat CreateVpnGateway.
Sebelum Anda membuat server IPsec, pastikan tidak ada koneksi IPsec-VPN pada gateway VPN. Untuk informasi lebih lanjut, lihat DeleteVpnConnection.
- CreateIpsecServer adalah operasi asinkron. Setelah Anda mengirim permintaan, sistem mengembalikan ID permintaan. Namun, server IPsec mungkin belum dibuat. Sistem membuat server IPsec di latar belakang. Anda dapat memanggil operasi DescribeVpnGateway untuk membuat kueri status gateway VPN guna memeriksa status pembuatan server IPsec:
Jika gateway VPN dalam status updating, server IPsec sedang dibuat.
Jika gateway VPN dalam status active, server IPsec telah dibuat.
Anda tidak dapat memanggil operasi CreateIpsecServer untuk membuat beberapa server IPsec pada gateway VPN secara bersamaan.
Coba sekarang
Test
RAM authorization
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID region tempat gateway VPN di-deploy. |
cn-hangzhou |
| VpnGatewayId |
string |
Yes |
ID gateway VPN. |
vpn-bp17lofy9fd0dnvzv**** |
| LocalSubnet |
string |
Yes |
Blok CIDR lokal, yang mengacu pada blok CIDR di sisi VPC yang perlu berkomunikasi dengan blok CIDR klien. Pisahkan beberapa blok CIDR dengan koma (,). Contoh: 192.168.1.0/24,192.168.2.0/24. |
192.168.0.0/24 |
| ClientIpPool |
string |
Yes |
Blok CIDR klien, yang mengacu pada blok CIDR tempat alamat IP dialokasikan ke kartu antarmuka jaringan virtual (NIC) klien. Catatan
Blok CIDR klien tidak boleh bertentangan dengan blok CIDR di sisi VPC. |
10.0.0.0/24 |
| IpSecServerName |
string |
No |
Nama server IPsec. Nama harus terdiri dari 1 hingga 100 karakter. |
test |
| EffectImmediately |
boolean |
No |
Menentukan apakah akan langsung berlaku. Nilai yang valid:
|
true |
| IkeConfig |
string |
No |
Konfigurasi negosiasi Fase 1:
|
{"IkeVersion":"ikev2","IkeMode":"main","IkeEncAlg":"aes","IkeAuthAlg":"sha1","IkePfs":"group2","IkeLifetime":86400} |
| IpsecConfig |
string |
No |
Konfigurasi negosiasi Fase 2:
|
{"IpsecEncAlg":"aes","IpsecAuthAlg":"sha1","IpsecPfs":"group2","IpsecLifetime":86400} |
| PskEnabled |
boolean |
No |
Menentukan apakah akan mengaktifkan autentikasi kunci pra-berbagi. Nilai true menentukan bahwa autentikasi kunci pra-berbagi diaktifkan. Catatan
Parameter ini wajib diisi. |
true |
| Psk |
string |
No |
Kunci pra-berbagi. Kunci pra-berbagi digunakan untuk autentikasi identitas antara server IPsec dan klien. Kunci harus terdiri dari 1 hingga 100 karakter. Jika Anda tidak menentukan kunci pra-berbagi, sistem secara acak menghasilkan string 16-bit sebagai kunci pra-berbagi. Anda dapat memanggil operasi ListIpsecServers untuk membuat kueri kunci pra-berbagi yang dihasilkan oleh sistem. Catatan
Kunci pra-berbagi server IPsec harus sama dengan kunci autentikasi klien. Jika tidak, server IPsec dan klien tidak dapat membuat koneksi. |
Cfd123**** |
| ClientToken |
string |
No |
Token klien yang digunakan untuk memastikan idempotensi permintaan. Anda dapat menggunakan klien untuk menghasilkan nilai tersebut, tetapi Anda harus memastikan bahwa nilainya unik di antara berbagai permintaan. ClientToken hanya boleh berisi karakter ASCII. Catatan
Jika Anda tidak mengatur parameter ini, sistem secara otomatis menggunakan RequestId dari permintaan API sebagai ClientToken. RequestId mungkin berbeda untuk setiap permintaan API. |
d7d24a21-f4ba-4454-9173-b38**** |
| DryRun |
string |
No |
Menentukan apakah hanya akan melakukan dry run, tanpa melakukan permintaan yang sebenarnya. Nilai yang valid:
|
false |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Hasil yang dikembalikan. |
||
| CreationTime |
string |
Waktu ketika server IPsec dibuat. Huruf T menunjukkan pemisah dan huruf Z menunjukkan UTC. |
2021-02-22T03:24:28Z |
| IpsecServerId |
string |
ID server IPsec. |
iss-bp1jougp8cfsbo8y9**** |
| RequestId |
string |
ID permintaan. |
690A967E-D4CD-4B69-8C78-94FE828BA10B |
| IpsecServerName |
string |
Nama server IPsec. |
test |
| VpnGatewayId |
string |
ID gateway VPN. |
vpn-bp17lofy9fd0dnvzv**** |
| RegionId |
string |
ID region tempat gateway VPN di-deploy. |
cn-hangzhou |
Contoh
Respons sukses
JSONformat
{
"CreationTime": "2021-02-22T03:24:28Z",
"IpsecServerId": "iss-bp1jougp8cfsbo8y9****",
"RequestId": "690A967E-D4CD-4B69-8C78-94FE828BA10B",
"IpsecServerName": "test",
"VpnGatewayId": "vpn-bp17lofy9fd0dnvzv****",
"RegionId": "cn-hangzhou"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | OperationUnsupported.IPsecServer | The current version of the VPN gateway does not support IPsec server. | |
| 400 | VpnGateway.SslVpnDisabled | The VPN gateway has not enabled SSL VPN. | |
| 400 | VpnGateway.Configuring | The specified service is configuring. | |
| 400 | VpnGateway.FinancialLocked | The specified service is financial locked. | |
| 400 | OperationFailed.IPsecServerExist | An IPsec server already exists in the VPN gateway. | |
| 400 | OperationUnsupported.IpsecPfs | The specified IPsec Pfs is unsupported. | |
| 400 | IllegalParam.AuthMethod | One authentication method (Psk or IDaaS) should be specified at least. | |
| 400 | IllegalParam.LocalSubnet | The specified "LocalSubnet" (%s) is invalid. | |
| 400 | IllegalParam.ClientIpPool | The specified ClientIpPool (%s) is invalid. | |
| 400 | MissingParam.IDaaSInstanceId | The input parameter IDaaSInstanceId is mandatory when enable multi-factor authentication. | |
| 400 | OperationFailed.NoRamPermission | Vpn Service has no permission to operate your IDaaS instances. | |
| 400 | ClientIpPool.NetmaskInvalid | The netmask length of client IP pool must be greater than or equal to 16 and less than or equal to 29. | |
| 400 | VpnRouteEntry.Conflict | The specified client IP pool conflicts with VPN connection or SSL server. | |
| 400 | ClientIpPool.SubnetInvalid | The specified client IP pool cannot be used. | |
| 400 | InvalidClientIpPool.Conflict | The specified client IP pool conflicts with other resources in the same VPC. | |
| 400 | OperationFailed.AddVpcRoute | It is failed to add VPC route after this operation. | |
| 400 | QuotaExceeded.VpnRouteEntry | The number of route entries to the VPN gateway in the VPC routing table has reached the quota limit. | |
| 400 | SystemBusy | The system is busy. Please try again later. | |
| 400 | EnableHaCheck.IpsecServerCidrContainsVpcRouteDest | Ipsec server client cidr contains vpc route prefix. The vpc route prefix is %s. | |
| 400 | VpnGateway.IPsecServerAndVpnConnectionConflict | The IPSec connection and IPSec server cannot be configured on the same VPN gateway at the same time. | |
| 400 | EnableHaCheck.SslVpnServerClientCidrContainsVpcRouteDest | Ssl vpn client cidr contains vpc route prefix. The vpc route prefix is %s. | |
| 403 | Forbidden | User not authorized to operate on the specified resource. | |
| 404 | InvalidVpnGatewayInstanceId.NotFound | The specified vpn gateway instance id does not exist. | |
| 404 | InvalidIDaaSInstanceId.NotFound | The specified IDaaS instance ID does not exist. | |
| 409 | OperationConflict | The operation against this instance is too frequent, please try again later. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.