IPsec サーバを作成します。
操作説明
-
IPsec サーバを作成する前に、VPN ゲートウェイを作成し、その VPN ゲートウェイで SSL-VPN 機能を有効にする必要があります。詳細については、「CreateVpnGateway」をご参照ください。
-
IPsec サーバを作成する前に、VPN ゲートウェイに IPsec 接続が存在しないことを確認してください。詳細については、「DeleteVpnConnection」をご参照ください。
-
CreateIpsecServer は非同期操作です。リクエストを送信すると、システムはリクエスト ID を返し、タスクをバックグラウンドで実行します。タスクのステータスを確認するには、DescribeVpnGateway を呼び出してください。
VPN ゲートウェイのステータスが updating の場合、IPsec サーバが作成中です。
VPN ゲートウェイのステータスが active の場合、IPsec サーバが作成済みです。
-
指定された時間内に CreateIpsecServer を繰り返し呼び出すことはできません。
今すぐお試しください
テスト
RAM 認証
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| RegionId |
string |
必須 |
VPN ゲートウェイがデプロイされているリージョンの ID です。 |
cn-hangzhou |
| VpnGatewayId |
string |
必須 |
VPN ゲートウェイの ID です。 |
vpn-bp17lofy9fd0dnvzv**** |
| LocalSubnet |
string |
必須 |
ローカル CIDR ブロック。これは、クライアントがアクセスする仮想プライベートクラウド (VPC) の CIDR ブロックです。 複数の CIDR ブロックを指定する場合は、カンマ (,) で区切ります。例:192.168.1.0/24,192.168.2.0/24。 |
192.168.0.0/24 |
| ClientIpPool |
string |
必須 |
クライアントの仮想 NIC に割り当てる IP アドレスのクライアント CIDR ブロックです。 説明
クライアント CIDR ブロックは、VPC の CIDR ブロックと重複してはいけません。 |
10.0.0.0/24 |
| IpSecServerName |
string |
任意 |
IPsec サーバの名前です。 名前の長さは 1~100 文字である必要があります。 |
test |
| EffectImmediately |
boolean |
任意 |
接続ネゴシエーションを即時に開始するかどうかを指定します。有効値:
|
true |
| IkeConfig |
string |
任意 |
フェーズ 1 ネゴシエーションの構成です。有効値:
|
{"IkeVersion":"ikev2","IkeMode":"main","IkeEncAlg":"aes","IkeAuthAlg":"sha1","IkePfs":"group2","IkeLifetime":86400} |
| IpsecConfig |
string |
任意 |
フェーズ 2 ネゴシエーションの構成です。有効値:
|
{"IpsecEncAlg":"aes","IpsecAuthAlg":"sha1","IpsecPfs":"group2","IpsecLifetime":86400} |
| PskEnabled |
boolean |
任意 |
事前共有鍵認証を有効にするかどうかを示します。true を設定すると、事前共有鍵認証が有効になります。 説明
このパラメーターは必須です。 |
true |
| Psk |
string |
任意 |
事前共有鍵です。 IPsec-VPN サーバとクライアント間の認証に使用される事前共有鍵です。長さは 1~100 文字である必要があります。 事前共有鍵を指定しない場合、システムはランダムに 16 文字の文字列を生成して事前共有鍵として使用します。システムが生成した鍵を確認するには、ListIpsecServers を呼び出してください。 説明
IPsec サーバの事前共有鍵は、クライアント側のものと一致している必要があります。一致していない場合、IPsec サーバとクライアント間の接続は確立されません。 |
Cfd123**** |
| ClientToken |
string |
任意 |
リクエストのべき等性を保証するために使用されるクライアントトークンです。 クライアント側でトークンを生成できますが、異なるリクエスト間で一意であることを保証する必要があります。トークンには ASCII 文字のみを使用できます。 説明
このパラメーターを指定しない場合、システムは自動的に リクエスト ID を クライアントトークン として使用します。リクエスト ID は各リクエストごとに異なる場合があります。 |
d7d24a21-f4ba-4454-9173-b38**** |
| DryRun |
string |
任意 |
このリクエストを事前チェックのみ行うかどうかを指定します。有効値:
|
false |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
返された結果です。 |
||
| CreationTime |
string |
IPsec サーバが作成された時刻です。 T はデリミタとして使用されます。Z は時刻が協定世界時 (UTC) であることを示します。 |
2021-02-22T03:24:28Z |
| IpsecServerId |
string |
IPsec サーバ ID です。 |
iss-bp1jougp8cfsbo8y9**** |
| RequestId |
string |
リクエスト ID です。 |
690A967E-D4CD-4B69-8C78-94FE828BA10B |
| IpsecServerName |
string |
IPsec サーバ名です。 |
test |
| VpnGatewayId |
string |
VPN ゲートウェイの ID です。 |
vpn-bp17lofy9fd0dnvzv**** |
| RegionId |
string |
VPN ゲートウェイがデプロイされているリージョンの ID です。 |
cn-hangzhou |
例
成功レスポンス
JSONJSON
{
"CreationTime": "2021-02-22T03:24:28Z",
"IpsecServerId": "iss-bp1jougp8cfsbo8y9****",
"RequestId": "690A967E-D4CD-4B69-8C78-94FE828BA10B",
"IpsecServerName": "test",
"VpnGatewayId": "vpn-bp17lofy9fd0dnvzv****",
"RegionId": "cn-hangzhou"
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 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. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。