Updated on 2024-06-21 GMT+08:00

Cloud Native Anti-DDoS Basic (Anti-DDoS)

The Service Control Policies (SCPs) in the Organizations service can use these authorization elements to set access control policies.

SCPs do not actually grant any permissions to a principal. They only set the permission boundary for the principal. When SCPs are attached to a member account or an organizational unit (OU), they do not directly grant permissions to that member account or OU. Instead, the SCPs just determine what permissions are available for that member account or the member accounts under that OU.

This section describes the elements used by Organizations SCPs. The elements include actions, resources, and conditions.

For details about how to use these elements to create a custom SCP, see Creating an SCP.

Actions

Actions are specific operations that are allowed or denied in an SCP.

  • The Access Level column describes how the action is classified (List, Read, or Write). This classification helps you understand the level of access that an action grants when you use it in a policy.
  • The Resource Type column indicates whether the action supports resource-level permissions.
    • You can use a wildcard (*) to indicate all resource types. If this column is empty (-), the action does not support resource-level permissions and you must specify all resources ("*") in your SCP policy statements.
    • If this column includes a resource type, you must specify a URN for the Resource element in your identity policy statements.
    • Required resources are marked with asterisks (*) in the table.

    For details about resource types defined by Anti-DDoS, see Resources.

  • The Condition Key column includes keys that you can specify in the Condition element of a SCP policy statement.
    • If the Resource Type column has values for an action, the condition key only takes effect only for the listed resource types.
    • If the Resource Type column is empty (-) for an action, the condition key takes effect for all resources that action supports.
    • If the Condition Key column is empty (-) for an action, the action does not support any condition keys.

    For details about condition keys defined by Anti-DDoS, see Conditions.

The following table lists the actions that you can define in SCP statements for Anti-DDoS.

Table 1 Actions supported by Anti-DDoS

Action

Description

Access Level

Resource Type (*: Required)

Condition Key

anti-ddos:task:list

Grant permission to query Anti-DDoS tasks.

list

-

-

anti-ddos:quota:list

Grant permission to query quotas.

list

-

-

anti-ddos:optionalDefensePolicy:list

Grant permission to query Anti-DDoS protection specifications.

list

-

-

anti-ddos:logConfig:update

Grant permission to update LTS configurations.

write

-

-

anti-ddos:logConfig:get

Grant permission to query LTS configurations.

read

-

-

anti-ddos:ip:updateDefensePolicy

Grant permission to update Anti-DDoS.

write

ip *

  • g:ResourceTag/<tag-key>
  • g:EnterpriseProjectId

anti-ddos:ip:untagResource

Grant permission to delete tags in batches.

write

ip *

  • g:ResourceTag/<tag-key>
  • g:EnterpriseProjectId

anti-ddos:ip:tagResource

Grant permission to add tags in batches.

write

ip *

  • g:ResourceTag/<tag-key>
  • g:EnterpriseProjectId

anti-ddos:ip:listTagsForResource

Grant permission to query resource tags.

list

ip *

-

anti-ddos:ip:listDefenseStatuses

Grant permission to query EIP protection statuses.

list

ip *

-

anti-ddos:ip:getWeeklyReport

Grant permission to query weekly protection statistics.

read

ip *

  • g:ResourceTag/<tag-key>
  • g:EnterpriseProjectId

anti-ddos:ip:getDefenseStatus

Grant permission to query the protection status of an EIP.

read

ip *

  • g:ResourceTag/<tag-key>
  • g:EnterpriseProjectId

anti-ddos:ip:getDefensePolicy

Grant permission to query Anti-DDoS.

read

ip *

  • g:ResourceTag/<tag-key>
  • g:EnterpriseProjectId

anti-ddos:ip:getDailyTrafficReport

Grant permission to query protected traffic of an EIP.

read

ip *

  • g:ResourceTag/<tag-key>
  • g:EnterpriseProjectId

anti-ddos:ip:getDailyEventReport

Grant permission to query abnormal events of an EIP.

read

ip *

  • g:ResourceTag/<tag-key>
  • g:EnterpriseProjectId

anti-ddos:ip:enableDefensePolicy

Grant permission to enable Anti-DDoS.

write

ip *

  • g:ResourceTag/<tag-key>
  • g:EnterpriseProjectId

anti-ddos:defaultDefensePolicy:get

Grant permission to query default Anti-DDoS protection policies.

read

-

-

anti-ddos:defaultDefensePolicy:delete

Grant permission to delete default Anti-DDoS protection policies.

write

-

-

anti-ddos:defaultDefensePolicy:create

Grant permission to configure default Anti-DDoS protection policies.

write

-

-

anti-ddos:alertConfig:update

Grant permission to update alarm configurations.

write

-

-

anti-ddos:alertConfig:get

Grant permission to query alarm configurations.

read

-

-

An Anti-DDoS API usually corresponds to one or more actions. Table 2 lists the supported actions and dependencies.

Table 2 Actions and dependencies supported by Anti-DDoS APIs

API

Action

Dependency

GET /v1/{project_id}/query-task-status

anti-ddos:task:list

-

GET /v1/{project_id}/antiddos/quotas

anti-ddos:quota:list

-

GET /v1/{project_id}/antiddos/query-config-list

anti-ddos:optionalDefensePolicy:list

-

PUT /v1/{project_id}/antiddos/lts-config

anti-ddos:logConfig:update

-

GET /v1/{project_id}/antiddos/lts-config

anti-ddos:logConfig:get

-

PUT /v1/{project_id}/antiddos/{floating_ip_id}

anti-ddos:ip:updateDefensePolicy

-

DELETE /v1/{project_id}/antiddos-ip/{resource_id}/tags/delete

anti-ddos:ip:untagResource

-

POST /v1/{project_id}/antiddos-ip/{resource_id}/tags/create

anti-ddos:ip:tagResource

-

GET /v1/{project_id}/antiddos-ip/{resource_id}/tags

anti-ddos:ip:listTagsForResource

-

GET /v1/{project_id}/antiddos-ip/tags

anti-ddos:ip:listTagsForResource

-

GET /v1/{project_id}/antiddos

anti-ddos:ip:listDefenseStatuses

-

POST /v1/{project_id}/antiddos-ip/resource-instances/count

anti-ddos:ip:listDefenseStatuses

-

POST /v1/{project_id}/antiddos-ip/resource-instances/filter

anti-ddos:ip:listDefenseStatuses

-

GET /v1/{project_id}/antiddos/weekly

anti-ddos:ip:getWeeklyReport

-

GET /v1/{project_id}/antiddos/weekly-export

anti-ddos:ip:getWeeklyReport

-

GET /v1/{project_id}/antiddos/{floating_ip_id}/status

anti-ddos:ip:getDefenseStatus

-

GET /v1/{project_id}/antiddos/{floating_ip_id}

anti-ddos:ip:getDefensePolicy

-

GET /v1/{project_id}/antiddos/queryIsEnabledResult/query

anti-ddos:ip:getDefensePolicy

-

GET /v1/{project_id}/antiddos/{floating_ip_id}/daily

anti-ddos:ip:getDailyTrafficReport

-

GET /v1/{project_id}/antiddos/{floating_ip_id}/daily-export

anti-ddos:ip:getDailyTrafficReport

-

GET /v1/{project_id}/antiddos/{floating_ip_id}/logs

anti-ddos:ip:getDailyEventReport

-

POST /v1/{project_id}/antiddos/{floating_ip_id}

anti-ddos:ip:enableDefensePolicy

-

GET /v1/{project_id}/antiddos/immediate_protection

anti-ddos:ip:enableDefensePolicy

-

DELETE /v1/{project_id}/antiddos/{floating_ip_id}

anti-ddos:ip:disableDefensePolicy

-

GET /v1/{project_id}/antiddos/{floating_ip_id}/closeAndReason

anti-ddos:ip:disableDefensePolicy

-

GET /v1/{project_id}/antiddos/default/config

anti-ddos:defaultDefensePolicy:get

-

DELETE /v1/{project_id}/antiddos/default/config

anti-ddos:defaultDefensePolicy:delete

-

POST /v1/{project_id}/antiddos/default/config

anti-ddos:defaultDefensePolicy:create

-

POST /v2/{project_id}/warnalert/alertconfig/update

anti-ddos:alertConfig:update

-

GET /v2/{project_id}/warnalert/alertconfig/query

anti-ddos:alertConfig:get

-

Resources

A resource type indicates the resources that an SCP policy applies to. If you specify a resource type for any action in Table 3, the resource URN must be specified in the SCP policy statements using that action, and the policy applies only to resources of this type. If no resource type is specified, the Resource element is marked with an asterisk (*) and the policy applies to all resources. You can also set condition keys in a policy to define resource types.

The following table lists the resource types that you can define in SCP policy statements for Anti-DDoS.

Table 3 Resource types supported by Anti-DDoS

Resource Type

URN

ip

anti-ddos:<region>:<account-id>:ip:<ip-id>

Conditions

Anti-DDoS does not support service-specific condition keys in SCP policies.

Anti-DDoS can use global condition keys applicable to all services. For details, see Global Condition Keys.