CreateForwardEntry を呼び出して DNAT エントリを追加します。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
ens:CreateForwardEntry |
create |
*すべてのリソース。
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| NatGatewayId |
string |
必須 |
NAT Gateway の ID。 |
nat-5t7nh1cfm6kxiszlttr38**** |
| ExternalIp |
string |
必須 |
パブリックネットワークアクセスを提供する EIP。 EIP は、同じ NAT Gateway の SNAT ルールによって占有されていない必要があります。DescribeNatGateways が返す IpLists.UsingStatus フィールドを確認して、EIP がアイドル状態であることを確認できます。 |
121.XXX.XXX.28 |
| ExternalPort |
string |
必須 |
ポート フォワーディング用の外部ポートまたはポート範囲。
|
22 |
| InternalIp |
string |
必須 |
DNAT エントリ経由でインターネットと通信するインスタンスの非公開 IP アドレス。 |
10.0.XXX.XXX |
| InternalPort |
string |
必須 |
ポート フォワーディング用の内部ポートまたはポート範囲。
|
22 |
| ForwardEntryName |
string |
任意 |
DNAT ルールの名前。名前の長さは 2~128 文字で、 |
test0 |
| IpProtocol |
string |
任意 |
プロトコルの種類。有効な値:
列挙値:
|
Any |
| HealthCheckPort |
integer |
任意 |
DNAT のヘルスチェックポート。ポートは内部ポート範囲内である必要があります。デフォルト値: 空。 |
80 |
| StandbyExternalIp |
string |
任意 |
パブリックネットワークアクセスを提供するスタンバイ EIP。スタンバイ EIP は NAT Gateway にバインドされている必要があります。DNAT エントリの作成後、スタンバイ EIP が効果を発揮します。 |
101.XXX.XXX.4 |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
応答のスキーマ。 |
||
| RequestId |
string |
リクエスト ID。 |
EF6D6FA4-DACA-5822-A981-81006271D263 |
| ForwardEntryId |
string |
DNAT エントリの ID。 |
fwd-5tc07cw14metghn3siv4a**** |
例
成功レスポンス
JSONJSON
{
"RequestId": "EF6D6FA4-DACA-5822-A981-81006271D263",
"ForwardEntryId": "fwd-5tc07cw14metghn3siv4a****"
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | Invalid%s | The specified parameter %s is invalid. | |
| 400 | Missing%s | You must specify the parameter %s. | |
| 400 | InvalidParameter.NatNotFound | The specified Nat is not found. | |
| 400 | InvalidParameter.ExternalIp | The specified externalIp is not found. | |
| 400 | Forbidden.ExternalIpUsedInSnat | Forbidden.ExternalIpUsedInSnat | |
| 400 | InvalidParameter.InternalIpNotFound | The input parameter internalIp that is not found. | |
| 400 | Forbidden.ExternalPort.Duplicated | The specified ExternalPort is duplicated. | |
| 400 | ForwardEntryLimitExceed | The limit of forward entry in the nat reaches. | |
| 400 | InvalidParameter.HealthCheckPort | HealthCheckPort is not in the range of InternalPort | |
| 400 | IncorrectInstanceStatus | The current status of the instance does not support this operation. | |
| 400 | SystemBusy | System is busy, please try again later. | |
| 400 | InvalidParameter.InternalIp | The specified parameter internalIp is invalid. | |
| 400 | InvalidPort.Malformed | The specified port is not a valid port. | |
| 400 | ens.interface.error | Failed to call API. | |
| 400 | NoPermission | Permission denied. | |
| 400 | InvalidParameter.%s | The specified field %s invalid. Please check it again. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。