All Products
Search
Document Center

Cloud Firewall:SwitchSecurityProxy

Last Updated:Nov 12, 2025

Enables or disables a NAT firewall.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

Lang

string

No

The language of the request and response. Valid values:

  • zh (default): Chinese

  • en: English

zh

ProxyId

string

Yes

The ID of the NAT firewall.

proxy-natbf******

Switch

string

Yes

The security protection switch. Valid values:

  • open: Enables security protection.

  • close: Disables security protection.

open

Response elements

Element

Type

Description

Example

object

RequestId

string

The ID of the request.

F1E55690-3ABA-58FA-90E3-593EF******

Examples

Success response

JSON format

{
  "RequestId": "F1E55690-3ABA-58FA-90E3-593EF******"
}

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 ErrorDBTxError A database transaction error occurred. The error message returned because an internal error has occurred in the database transaction.
400 ErrorDBSelectError A database select error occurred. The error message returned because an internal error has occurred in querying the database.
400 ErrorProxyStatusNotNormal proxy status is not normal. The current NAT instance does not have a firewall enabled.
400 ErrorDBUpdateError internal error. An error occurred while updating the database.
400 ErrorDBInsertError A database insert error occurred. An error occurred while performing an insert operation in the database.
400 ErrorRecordLog record operation log error. Update operation log error.
400 ErrorMarshalJSON An error occurred while encoding JSON. An error occurred while encoding JSON.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.