Updated on 2023-06-12 GMT+08:00

Anti-DDoS Custom Policies

Custom policies can be created to supplement the system-defined policies of Anti-DDoS. For details about the actions supported by custom policies, see Anti-DDoS Permissions and Actions.

You can create custom policies in either of the following ways:

  • Visual editor: Select cloud services, actions, resources, and request conditions. This does not require knowledge of policy syntax.
  • JSON: Edit JSON policies from scratch or based on an existing policy.

For details, see Creating a Custom Policy. The following section contains examples of common Anti-DDoS custom policies.

Anti-DDoS Custom Policy Examples

  • Example 1: Authorizing a user to query the default Anti-DDoS policy
    {
            "Version": "1.1",
            "Statement": [
                    {
                            "Effect": "Allow",
                            "Action": [
                                    "anti-ddos:defaultDefensePolicy:get"
                                                           ]
                    }
            ]
    }