Help Center/ Anti-DDoS/ User Guide/ Permission Management/ Anti-DDoS Custom Policies
Updated on 2024-11-29 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 using one of the following methods:

  • 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"
                                                           ]
                    }
            ]
    }