調用ModifyNatGatewayAttribute介面修改NAT Gateway的屬性。
介面說明
本介面查詢的 NAT Gateway包括公網 NAT Gateway和 VPC NAT Gateway,文中出現的“NAT Gateway”不做具體的區分。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
是 |
要修改的 NAT Gateway所在的地區 ID。 您可以通過調用 DescribeRegions 介面擷取地區 ID。 |
cn-hangzhou |
| NatGatewayId |
string |
是 |
要修改的 NAT Gateway的 ID。 |
ngw-2ze0dcn4mq31qx2jc**** |
| Name |
string |
否 |
要修改的 NAT Gateway名稱。 名稱長度為 1~128 個字元,不能以 |
nat123 |
| Description |
string |
否 |
要修改的 NAT Gateway描述資訊。 描述長度為 1~128 個字元,不能以 |
Description |
| IcmpReplyEnabled |
boolean |
否 |
是否開啟 ICMP 代回。取值:
|
true |
| EipBindMode |
string |
否 |
修改 NAT Gateway的 EIP 繫結模式。取值:可以為空白,非空時只允許為 NAT,表示繫結模式為 EIP 普通模式。 說明
|
NAT |
| EnableSessionLog |
boolean |
否 |
是否開啟會話日誌,取值:
|
true |
| LogDelivery |
object |
否 |
會話日誌配置資訊。 |
|
| LogDeliveryType |
string |
否 |
會話日誌寫入類型。取值:sls,阿里雲Log Service SLS。 |
sls |
| LogDestination |
string |
否 |
會話日誌寫入地址。取值:acs:log:${regionName}:${projectOwnerAliUid}:project/${projectName}/logstore/${logstoreName} |
acs:log:cn-hangzhou:0000:project/nat_session_log_project/logstore/session_log_test |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
請求 ID。 |
||
| RequestId |
string |
請求 ID。 |
AB5F62CF-2B60-4458-A756-42C9DFE108D1 |
樣本
正常返回樣本
JSON格式
{
"RequestId": "AB5F62CF-2B60-4458-A756-42C9DFE108D1"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | UnsupportedFeature.PrivateLinkMode | The feature of %s is not supported. | 暫不支援反向訪問特性。 |
| 400 | IncorrectStatus.NATGW | NATGW status is invalid. | NAT Gateway的狀態不正確。 |
| 400 | ExclusiveParam.%sAnd%s | The param of %s and %s are mutually exclusive. | 參數 %s 和 %s 相互排斥。 |
| 400 | IncorrectStatus.NatGateway | The status of natgateway is incorrect. | NAT Gateway的狀態不正確。 |
| 400 | DependencyViolation.PrivateLinkMode | The specified resource of %s depends on %s, so the operation cannot be completed. | %s 資源依賴於 %s,因此本操作不能完成。 |
| 400 | UnsupportedFeature.IcmpReplyEnabled | The feature of IcmpReplyEnabled is not supported. | Icmp 代答使能功能修改不支援。 |
| 400 | InvalidParams.NotNull | The parameter must not be null, name or description or icmpReplyEnabled | 名稱、描述以及icmp代答使能參數不能同時為空白。 |
| 400 | InvalidParameter.Name.Malformed | The specified Name is not valid. | |
| 400 | InvalidParameter.Description.Malformed | The specified Description is not valid. | |
| 400 | UnsupportedFeature.IndirectConvertForVpcNat | The VPC NAT gateway is not support to change EIP bond type. | VPC NAT Gateway不支援修改EIP的綁定類型。 |
| 400 | UnsupportedFeature.NormalNatModifyEipBindMode | The normal NAT gateway is not support to change EIP bond type. | 普通型NAT Gateway不支援修改EIP綁定類型。 |
| 400 | OperationDenied.EipBondTypeIsAlreadyNAT | The EIP bond type is already NAT type. | EIP綁定類型已經是NAT類型。 |
| 400 | UnsupportedFeature.IndirectConvertForFwNat | The security protection enabled NAT gateway is not support change EIP bond type. | 開啟防護功能的公網NAT不支援修改EIP綁定類型。 |
| 400 | QuotaExceeded.EipNumForModifyEipBondType | The quota of %s is exceeded, binded: %s, quota: %s. | 修改EIP綁定類型時允許的EIP個數超限 |
| 400 | ResourceNotEnough.SwitchAvailableIps | The available private Ip number is not enough in your subnet. | 子網中可用的私網IP不足。 |
| 400 | UnsupportedFeature.VpcNatSecurityProtectionEnabled | The VPC NAT gateway is not supported to enable security protection. | VPC NAT Gateway不支援開啟安全防護。 |
| 400 | OperationDenied.NatGatewayStatusInvalid | The NAT gateway status is invalid. | NAT Gateway的狀態無效。 |
| 400 | OperationDenied.EipStatusInvalid | The NAT gateway has EIP in invalid status. | NAT Gateway綁定的EIP狀態無效。 |
| 400 | OperationDenied.SnatEntryStatusInvalid | The NAT gateway has SNAT entry in invalid status. | NAT Gateway配置的SNAT條目狀態無效。 |
| 400 | OperationDenied.DnatEntryStatusInvalid | The NAT gateway has DNAT entry in invalid status. | NAT Gateway配置的DNAT狀態無效。 |
| 400 | UnsupportedFeature.MutilBindedTypeNatEnableFw | The NAT with Mutil-Binded Eip bind type is not support enable firewall. | 以Mutil-Binded方式綁定EIP的NAT不允許開啟防火牆。 |
| 400 | Forbidden.FinancialLocked | The instance is locked due to outstanding payments. | 該執行個體已欠費鎖定,無法操作 |
| 400 | OperationFailed.PrivateLinkMode | The NAT gateway is not support to change PrivateLinkMode. | 當前NAT Gateway不支援修改PrivateLinkMode。 |
| 400 | IllegalParam.SessionLogDeliveryDestination | The specified Delivery Destination is illegal. | 會話日誌投遞目標參數(SessionLogDeliveryDestination)配置格式無效 |
| 400 | OperationFailed.LogDeliveryIsUnAuthorized | Operation failed because the user is not authorized to deliver NAT session log. | 操作失敗因為您未授權NAT會話日誌投遞許可權 |
| 400 | IllegalParam.SessionLogDeliveryType | The specified Delivery Type is illegal. | 會話日誌投遞目標型別參數SessionLogDeliveryType輸入不符合要求 |
| 400 | UnsupportedFeature.EnableSessionLog | The feature of EnableSessionLog is not supported. | 當前執行個體不支援開啟NAT Gateway會話日誌。 |
| 500 | OperationFailed.ConfigSessionLog | Failed to configure session log due to a temporary failure of the server. | 由於內部服務錯誤引起配置會話日誌失敗. |
| 403 | Forbidden.ModifyEipBondType | Authentication is failed for modify EIP bond type. | 不允許修改EIP綁定類型。 |
| 404 | InvalidRegionId.NotFound | The specified RegionId does not exist in our records. | |
| 404 | InvalidNatGatewayId.NotFound | The specified NatGatewayId does not exist in our records. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。