All Products
Search
Document Center

Anti-DDoS:ModifySchedulerRule

Last Updated:Oct 23, 2024

Modifies the scheduling rule of Sec-Traffic Manager.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:ModifySchedulerRuleupdate
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ResourceGroupIdstringNo

The ID of the resource group to which the instance belongs in Resource Management. This parameter is empty by default, which indicates that the instance belongs to the default resource group.

default
RulesstringYes

The details of the scheduling rule. This parameter is a JSON string. The following list describes the fields in the value of the parameter:

  • Type: the address type of the interaction resource that you want to use in the scheduling rule. This field is required and must be of the string type. Valid values:

    • A: IP address
    • CNAME: domain name
  • Value: the address of the interaction resource that you want to use in the scheduling rule. This field is required and must be of the string type.

  • Priority: the priority of the scheduling rule. This field is required and must be of the integer type. Valid values: 0 to 100. A larger value indicates a higher priority.

  • ValueType: the type of the interaction resource that you want to use in the scheduling rule. This field is required and must be of the integer type. Valid values:

    • 1: the IP address of the Anti-DDoS Pro or Anti-DDoS Premium instance
    • 2: the IP address of the interaction resource in the tiered protection scenario
    • 3: the IP address that is used to accelerate access in the network acceleration scenario
    • 5: the domain name that is configured in Alibaba Cloud CDN (CDN) in the CDN interaction scenario
    • 6 the IP address of the interaction resource in the cloud service interaction scenario
    • 8: the IP address of the Secure Chinese Mainland Acceleration (Sec-CMA) instance in the secure acceleration scenario
  • RegionId: the region where the interaction resource is deployed. This parameter must be specified when ValueType is set to 2. The value must be of the string type.

[{"Type":"A", "Value":"1.1.XX.XX", "Priority":80,"ValueType":2, "RegionId":"cn-hangzhou" },{"Type":"A", "Value":"203.199.XX.XX", "Priority":80,"ValueType":1}]
RuleNamestringYes

The name of the rule that you want to modify.

testrule
RuleTypeintegerYes

The type of the scheduling rule. Valid values:

  • 2: tiered protection
  • 3: network acceleration
  • 5: CDN interaction
  • 6: cloud service interaction
  • 8: secure acceleration
2
ParamstringNo

The details of the CDN interaction rule. This parameter is a JSON string. The string contains the following fields:

  • ParamType: the type of the scheduling rule. This field is required and must be of the string type. Set the value to cdn. This indicates that you want to modify a CDN interaction rule.

  • ParamData: the values of parameters that you want to modify for the CDN interaction rule. This field is required and must be of the map type. The ParamData parameter contains the following parameters:

    • Domain: the accelerated domain in CDN. This parameter is required and must be of the string type.
    • Cname: the CNAME that is assigned to the accelerated domain. This parameter is required and must be of the string type.
    • AccessQps: the queries per second (QPS) threshold that is used to switch service traffic to Anti-DDoS Pro or Anti-DDoS Premium. This parameter is required and must be of the integer type.
    • UpstreamQps: the QPS threshold that is used to switch service traffic to CDN. This parameter is optional and must be of the integer type.
{"ParamType":"cdn","ParamData":"Domain":"example.aliyundoc.com","Cname":"demo.aliyundoc.com","AccessQps":100,"UpstreamQps":100}}

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request, which is used to locate and troubleshoot issues.

FFC77501-BDF8-4BC8-9BF5-B295FBC3189B
Cnamestring

The CNAME that is assigned by Sec-Traffic Manager for the scheduling rule.

Note To enable the scheduling rule, you must map the domain name of the service to the CNAME.
48k7b372gpl4****.aliyunddos0001.com
RuleNamestring

The name of the rule.

testrule

Examples

Sample success responses

JSONformat

{
  "RequestId": "FFC77501-BDF8-4BC8-9BF5-B295FBC3189B",
  "Cname": "48k7b372gpl4****.aliyunddos0001.com",
  "RuleName": "testrule"
}

Error codes

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