CreateSecurityProxy
Creates a NAT firewall.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-cloudfirewall:CreateSecurityProxy |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Lang |
string |
No |
The language of the response message. Valid values:
|
zh |
| ProxyName |
string |
Yes |
The name of the NAT firewall. The name must be 4 to 50 characters in length and can contain uppercase and lowercase letters, Chinese characters, digits, and underscores (_). It cannot start with an underscore. |
nat-firewall |
| RegionNo |
string |
Yes |
The region ID of the VPC. Note
For more information about the regions supported by Cloud Firewall, see Supported regions. |
cn-hangzhou |
| VpcId |
string |
Yes |
The instance ID of the VPC. |
vpc-uf6b5lyul0x****** |
| NatGatewayId |
string |
Yes |
The ID of the NAT gateway. |
ngw-bp1okz6k7****** |
| VswitchAuto |
string |
No |
Specifies whether to use the automatic mode for the vSwitch. Valid values:
Note
Default value: true. If VswitchAuto is set to true, VswitchCidr is required and must be a valid CIDR block. If VswitchAuto is set to false, VswitchId is required. |
true |
| VswitchId |
string |
No |
The ID of the vSwitch. This parameter is required when the manual mode is used for the vSwitch. |
vsw-bp1sqg9w****** |
| NatRouteEntryList |
array<object> |
Yes |
The architecture type of the NAT firewall. Valid values: eni (traditional ENI architecture) and gwlb (new GWLB architecture). If this parameter is omitted or left empty, the firewall is created by using the ENI architecture, and no implicit selection is performed on the server side. You can obtain the recommended architecture from the response of the DescribeNatFirewallArchitecture operation and pass it back when you create the firewall. |
gwlb |
|
object |
No |
The list of destination addresses for security protection. |
||
| NextHopId |
string |
Yes |
The next hop address of the original NAT gateway. |
ngw-bp1okz6****** |
| DestinationCidr |
string |
Yes |
The destination CIDR block of the default route. |
0.0.0.0/0 |
| NextHopType |
string |
Yes |
The network type of the next hop. Valid values: NatGateway. |
NatGateway |
| RouteTableId |
string |
Yes |
The route table to which the default route of the NAT gateway belongs. |
vtb-2ze1****** |
| FirewallSwitch |
string |
No |
The list of routes to be switched for the NAT gateway. |
close |
| StrictMode |
integer |
No |
The security protection switch. Valid values:
|
close |
| VswitchCidr |
string |
No |
Specifies whether to enable strict mode. Valid values:
|
0 |
| FirewallServiceMode |
string |
No |
The CIDR block of the vSwitch. This parameter is required when the automatic mode is used for the vSwitch. |
0.0.0.0/0 |
| FirewallServiceZones |
array |
No |
The deployment mode of the firewall service. Valid values:
|
PrimaryStandby |
|
string |
No |
A single zone ID used by the firewall service. |
cn-hangzhou-i |
|
| FwVswitchZoneId |
string |
No |
The list of zone IDs used by the firewall service. |
cn-beijing-b |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| ProxyId |
string |
The ID of the NAT firewall. |
proxy-nat97a****** |
| RequestId |
string |
The ID of the request. |
15FCCC52-1E23-57AE-B5EF-3E00A3****** |
Examples
Success response
JSON format
{
"ProxyId": "proxy-nat97a******",
"RequestId": "15FCCC52-1E23-57AE-B5EF-3E00A3******"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ErrorAliUid | Aliuid invalid. | The aliuid is invalid. |
| 400 | ErrorParamProxyNameError | proxy name invalid. | Invalid NAT firewall name. |
| 400 | ErrorRegionNoError | Region is error, please reselect | The specified region is invalid. Enter another value. |
| 400 | ErrorVpcIdError | Vpc ID invalid. | The VPC is incorrectly selected. Select another VPC. |
| 400 | ErrorDnatNotSupport | Secure proxy does not support DNAT entries. | NAT firewall does not support DNAT. |
| 400 | ErrorProxySnatIpEmpty | SNAT entry is empty. | SNAT entry is empty. |
| 400 | ErrorSnatIpQuotaExceed | The number of SNAT IP exceeds the specification. | The number of NAT Gateway EIPs exceeds the specifications supported by a single NAT firewall. |
| 400 | ErrorDBSelectError | A database select error occurred. | The error message returned because an internal error has occurred in querying the database. |
| 400 | ErrorDefaultRouteConflicts | Default route conflicts. | A default route already exists in the routing table bound to the selected switch. |
| 400 | ErrorUserCredentials | User credentials failed. | Unauthorized, not accessible, please first authorize firewall permissions. |
| 400 | ErrorVpcOpenApi | vpc open api failed | Failed to call the VPC API. |
| 400 | ErrorVswitchNotFound | vswitch not found | The vSwitch does not exist. Select another vSwitch. |
| 400 | ErrorParamNatRouteEntryError | Route entry invalid, check NatRouteEntryList. | |
| 400 | ErrorProxyRouteEntryConflicts | Proxy custom route table Nat Gateway and Attachment route entry conflict. | The custom route table of the NAT gateway has a route entry with the next hop of NatGateway and Attachment. |
| 400 | ErrorVswitchNoAvailableCidr | No available CIDR to create a vswitch. | There is no free CIDR block in the VPC to create a VSwitch. |
| 400 | ErrorCidrFormat | Network segment CIDR format error, please select again | The format of the specified CIDR block is invalid. Enter another value. |
| 400 | ErrorInternal | internal error | An internal error occurred. |
| 400 | ErrorVswitchCidrNotInVpc | Vswitch CIDR address not in vpc. | The CIDR block address of the switch does not belong to the current VPC. |
| 400 | ErrorVswitchRouteConflict | vswitch route conflict. | The entered VSwitch CIDR block conflicts with the existing VSwitch CIDR block. |
| 400 | ErrorVswitchCidrIpNumNotEnough | No enough private proxy IP in vswitch cidr. | The firewall switch does not have enough private IP addresses. |
| 400 | ErrorRouteEntryNotFound | route entry not found. | route entry not found. |
| 400 | ErrorUserNotFound | User not found | The user does not exist. |
| 400 | ErrorProxyVpcNotSupportAdvFeature | This vpc advanced feature is not supported. | The VPC contains ECS instances that do not support advanced features of VPC. |
| 400 | ErrorDBInsertError | A database insert error occurred. | An error occurred while performing an insert operation in the database. |
| 400 | ErrorProxyNumQuotaTop | Proxy num reaches maximum. | Insufficient quota. |
| 400 | ErrorProxyClusterNotAvailable | Can not find available cluster for nat firewall. | Failed to assign cluster for nat firewall. |
| 400 | ErrorDBTxError | A database transaction error occurred. | The error message returned because an internal error has occurred in the database transaction. |
| 400 | ErrorRecordLog | record operation log error. | Update operation log error. |
| 400 | ErrorBandwidthPenalty | Cloud Firewall bandwidth is being overused. | Cloud Firewall bandwidth is being overused. |
| 400 | ErrorGeneralInstanceSpecFull | Cloud Firewall instance specifications are full. | Cloud Firewall instance specifications are full. |
| 400 | ErrorNatVpnRouteEntryQuotaLimit | The number of VPN routes has reached the quota. | VPN route arrival specification limit |
| 400 | ErrorVpcRouteTableQuotaLimit | The number of VPC routing tables has reached the specification limit. | The number of VPC route tables reaches the maximum specification |
| 400 | ErrorNatCustomRouteEntryDifferent | The custom route entries in the routing tables are inconsistent. | The custom route entries in the routing tables are inconsistent. |
| 400 | ErrorSnatEntryQuotaExceed | SNAT entry quota exceeded. | The number of SNAT entries reaches the specification limit |
| 400 | ErrorFirewallZoneId | Firewall zone error. | Firewall zone selection error |
| 400 | ErrorParameters | Error Parameters | The parameter is invalid. |
| 400 | ErrorZoneIdInvalid | The specified zone id is invalid. | |
| 400 | ErrorNatEipNotBind | NAT gateway does not bind NAT EIP. | The NAT gateway is not associated with a NAT EIP. |
| 400 | ErrorProxyExist | firewall already exist. | Firewall already exists. |
| 400 | ErrorNatIpsInitConfigInvalid | The initial IPS configuration of the nat firewall is invalid |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.