All Products
Search
Document Center

:CreateSecurityProxy

Last Updated:Sep 02, 2024

Creates a NAT firewall.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
yundun-cloudfirewall:CreateSecurityProxyget
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
LangstringNo

The language of the content within the response. Valid values:

  • zh (default): Chinese
  • en: English
zh
ProxyNamestringYes

The name of the NAT firewall. The name must be 4 to 50 characters in length, and can contain letters, digits, and underscores (_). However, it cannot start with an underscore.

nat-idmp-fir
RegionNostringYes

The region ID of the virtual private cloud (VPC).

Note For more information about Cloud Firewall supported regions, see Supported regions.
cn-hangzhou
VpcIdstringYes

The ID of the VPC.

vpc-uf6b5lyul0xfgv74i01ph
NatGatewayIdstringYes

The ID of the NAT gateway.

ngw-bp1okz6k7s4n4mnk5f1g3
VswitchAutostringNo

The mode of the vSwitch that you want to use. Valid values:

  • true: automatic
  • false: manual
true
VswitchIdstringNo

The ID of the vSwitch. This parameter is required if you set the VswitchAuto parameter to true.

vsw-bp1sqg9wms9w9y1uxcs1x
NatRouteEntryListarray<object>Yes

The routes to be switched to the NAT gateway.

objectYes
NextHopIdstringYes

The next hop of the original NAT gateway.

ngw-bp1okz6k7s4n4mnk5f1g3
DestinationCidrstringYes

The destination CIDR block of the default route.

0.0.0.0/0
NextHopTypestringYes

The network type of the next hop. Set the value to NatGateway.

NatGateway
RouteTableIdstringYes

The route table to which the default route of the NAT gateway belongs.

vtb-2ze13wrgz7wsu9yiqeffg
FirewallSwitchstringNo

The status of the NAT firewall. Valid values:

  • open: enabled
  • close: disabled
close
StrictModeintegerNo

Specifies whether to enable the strict mode. Valid values:

  • 1: yes
  • 0: no
0
VswitchCidrstringNo

The CIDR block of the vSwitch.

0.0.0.0/0

Response parameters

ParameterTypeDescriptionExample
object
ProxyIdstring

The ID of the NAT firewall.

proxy-nat97ac4d7cc3834a5daf40
RequestIdstring

The request ID.

15FCCC52-1E23-57AE-B5EF-3E00A3DC3CAB

Examples

Sample success responses

JSONformat

{
  "ProxyId": "proxy-nat97ac4d7cc3834a5daf40",
  "RequestId": "15FCCC52-1E23-57AE-B5EF-3E00A3DC3CAB"
}

Error codes

HTTP status codeError codeError messageDescription
400ErrorAliUidAliuid invalid.The aliuid is invalid.
400ErrorParamProxyNameErrorproxy name invalid.Invalid NAT firewall name.
400ErrorRegionNoErrorRegion is error, please reselectThe specified region is invalid. Enter another value.
400ErrorVpcIdErrorVpc ID invalid.The VPC is incorrectly selected. Select another VPC.
400ErrorDnatNotSupportSecure proxy does not support DNAT entries.NAT firewall does not support DNAT.
400ErrorProxySnatIpEmptySNAT entry is empty.SNAT entry is empty.
400ErrorSnatIpQuotaExceedThe number of SNAT IP exceeds the specification.The number of NAT Gateway EIPs exceeds the specifications supported by a single NAT firewall.
400ErrorDBSelectErrorA database select error occurred.The error message returned because an internal error has occurred in querying the database.
400ErrorDefaultRouteConflictsDefault route conflicts.A default route already exists in the routing table bound to the selected switch.
400ErrorUserCredentialsUser credentials failed.Unauthorized, not accessible, please first authorize firewall permissions.
400ErrorVpcOpenApivpc open api failedFailed to call the VPC API.
400ErrorVswitchNotFoundvswitch not foundThe vSwitch does not exist. Select another vSwitch.
400ErrorProxyRouteEntryConflictsProxy 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.
400ErrorVswitchNoAvailableCidrNo available CIDR to create a vswitch.There is no free CIDR block in the VPC to create a VSwitch.
400ErrorCidrFormatNetwork segment CIDR format error, please select againThe format of the specified CIDR block is invalid. Enter another value.
400ErrorInternalinternal errorAn internal error occurred.
400ErrorVswitchCidrNotInVpcVswitch CIDR address not in vpc.The CIDR block address of the switch does not belong to the current VPC.
400ErrorVswitchRouteConflictvswitch route conflict.The entered VSwitch CIDR block conflicts with the existing VSwitch CIDR block.
400ErrorVswitchCidrIpNumNotEnoughNo enough private proxy IP in vswitch cidr.The firewall switch does not have enough private IP addresses.
400ErrorRouteEntryNotFoundroute entry not found.The route entry does not exist.
400ErrorUserNotFoundUser not foundThe user does not exist.
400ErrorProxyVpcNotSupportAdvFeatureThis vpc advanced feature is not supported.The VPC contains ECS instances that do not support advanced features of VPC.
400ErrorDBInsertErrorA database insert error occurred.An error occurred while performing an insert operation in the database.
400ErrorProxyNumQuotaTopProxy num reaches maximum.Insufficient quota.
400ErrorProxyClusterNotAvailableCan not find available cluster for nat firewall.Failed to assign cluster for nat firewall.
400ErrorDBTxErrorA database transaction error occurred.The error message returned because an internal error has occurred in the database transaction.
400ErrorRecordLogrecord operation log error.Update operation log error.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-08-08API Description Update. The Error code has changedView Change Details