Turns on a firewall switch.

Description

You can call the PutEnableFwSwitch operation to turn on a firewall switch. After you turn on a firewall switch, traffic passes through Cloud Firewall.

Limits

You can call this operation up to 10 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes PutEnableFwSwitch

The operation that you want to perform.

Set the value to PutEnableFwSwitch.

SourceIp String No 192.0.X.X

The source IP address of the request.

Lang String No zh

The natural language of the request and response. Valid values:

  • zh: Chinese
  • en: English
IpaddrList.N RepeatList No ["192.0.X.X","192.0.X.X"]

The list of IP addresses.

Note You must specify at least one of the IpaddrList, RegionList, ResourceTypeList parameters.
RegionList.N RepeatList No ["cn-hangzhou","cn-shanghai"]

The list of regions.

Note You must specify at least one of the IpaddrList, RegionList, ResourceTypeList parameters.
ResourceTypeList.N RepeatList No ["EcsPublicIp","NatEip"]

The list of asset types.

Valid values:

  • BastionHostIP: the IP address of a bastion host
  • EcsEIP: the elastic IP address (EIP) of an Elastic Compute Service (ECS) instance
  • EcsPublicIP: the public IP address of an ECS instance
  • EIP
  • EniEIP: the EIP of an elastic network interface (ENI)
  • NatEIP: the EIP of a Network Address Translation (NAT) gateway
  • SlbEIP: the EIP of a Server Load Balancer (SLB) instance
  • SlbPublicIP: the public IP address of an SLB instance
  • NatPublicIP: the public IP address of a NAT gateway
  • HAVIP: a high-availability virtual IP address (HAVIP)
Note You must specify at least one of the IpaddrList, RegionList, ResourceTypeList parameters.

Response parameters

Parameter Type Example Description
RequestId String B2841452-CB8D-4F7D-B247-38E1CF7334F8

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=PutEnableFwSwitch&IpaddrList=["1.2.X.X","5.6.X.X."]
&<Common request parameters>

Sample success responses

XML format

<PutEnableFwSwitchResponse>
  <RequestId>B2841452-CB8D-4F7D-B247-38E1CF7334F8</RequestId>
</PutEnableFwSwitchResponse>

JSON format

{
    "RequestId":"B2841452-CB8D-4F7D-B247-38E1CF7334F8"
}