All Products
Search
Document Center

Anti-DDoS:DescribeSceneDefensePolicies

Last Updated:Apr 16, 2024

Queries the configurations of a scenario-specific custom policy.

Operation description

You can call the DescribeSceneDefensePolicies operation to query the configurations of a scenario-specific custom policy that is created. For example, you can query the status, protected objects, and protection rules of the policy.

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.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
yundun-ddoscoo:DescribeSceneDefensePoliciesRead
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
TemplatestringNo

The type of the template that is used to create the policy. Valid values:

  • promotion: the Important Activity template
  • bypass: the Forward All template
promotion
StatusstringNo

The status of the policy. Valid values:

  • 0: disabled
  • 1: pending enabling
  • 2: enabled
  • 3: expired
1
ResourceGroupIdstringNo

The ID of the resource group to which the instance belongs in Resource Management.

If you do not configure this parameter, the instance belongs to the default resource group.

rg-acfm2pz25js****

All Alibaba Cloud API operations must include common request parameters. For more information about common request parameters, see Common parameters.

For more information about sample requests, see the "Examples" section of this topic.

Response parameters

ParameterTypeDescriptionExample
object
Successboolean

Indicates whether the request was successful. Valid values:

  • true: yes
  • false: no
true
RequestIdstring

The ID of the request.

F65DF043-E0EB-4796-9467-23DDCDF92C1D
Policiesobject []

An array that consists of the configurations of the scenario-specific custom policy.

Doneinteger

The execution status of the policy. Valid values:

  • 1: not executed or execution completed
  • 0: being executed
  • -1: execution failed
1
EndTimelong

The time at which the policy expires. The value is a UNIX timestamp. Unit: milliseconds.

1586016000000
Statusinteger

The status of the policy. Valid values:

  • 0: disabled
  • 1: pending enabling
  • 2: enabled
  • 3: expired
1
StartTimelong

The time at which the policy takes effect. The value is a UNIX timestamp. Unit: milliseconds.

1585670400000
ObjectCountinteger

The number of objects that are protected by the policy.

1
Templatestring

The type of the template that is used to create the policy. Valid values:

  • promotion: the Important Activity template
  • bypass: the Forward All template
promotion
PolicyIdstring

The ID of the policy.

321a-fd31-df51-****
Namestring

The name of the policy.

testpolicy
RuntimePoliciesobject []

The running rules of the policy.

Statusinteger

The running status of the policy. Valid values:

  • 0: The policy has not been issued or is restored.
  • 1: The policy is pending.
  • 2: The policy is being restored.
  • 3: The policy takes effect.
  • 4: The policy fails to take effect.
  • 5:The policy fails to be restored.
  • 6: The configurations of the protected objects for the policy does not exist because the configurations may be deleted.
3
oldValuestring

The protection rule that is applied before the policy takes effect.

If you set PolicyType to 1, the value is {"cc_rule_enable": true}. The value indicates that the Frequency Control policy is enabled.

If you set PolicyType to 2, the value is {"ai_rule_enable": 1}. The value indicates that the Intelligent Protection policy is enabled.

{"cc_rule_enable": true}
NewValuestring

The protection rule that is applied when the policy takes effect.

If you set PolicyType to 1, the value is {"cc_rule_enable": false }. The value indicates that the Frequency Control policy is disabled.

If you set PolicyType to 2, the value is {"ai_rule_enable": 0}. The value indicates that the Intelligent Protection policy is disabled.

{"cc_rule_enable": false }
PolicyTypeinteger

The protection policy whose status is changed when the policy takes effect. Valid values:

  • 1: indicates that the Frequency Control policy is changed.
  • 2: indicates that the Intelligent Protection policy is changed.
1

Examples

Sample success responses

JSONformat

{
  "Success": true,
  "RequestId": "F65DF043-E0EB-4796-9467-23DDCDF92C1D",
  "Policies": [
    {
      "Done": 1,
      "EndTime": 1586016000000,
      "Status": 1,
      "StartTime": 1585670400000,
      "ObjectCount": 1,
      "Template": "promotion",
      "PolicyId": "321a-fd31-df51-****",
      "Name": "testpolicy",
      "RuntimePolicies": [
        {
          "Status": 3,
          "oldValue": "{\"cc_rule_enable\": true}",
          "NewValue": "{\"cc_rule_enable\": false }",
          "PolicyType": 1
        }
      ]
    }
  ]
}

Error codes

For a list of error codes, visit the Service error codes.