Creates a scheduling rule for Sec-Traffic Manager.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateSchedulerRule |
The operation that you want to perform. Set the value to CreateSchedulerRule. |
RegionId | String | No | cn-hangzhou |
The region ID of the instance. Valid values:
|
ResourceGroupId | String | No | default |
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. |
Rules | String | Yes | [{"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}] |
The details of the scheduling rule. This parameter is a JSON string. The following list describes the fields in the value of the parameter:
|
RuleName | String | Yes | testrule |
The name of the scheduling rule. |
RuleType | Integer | Yes | 2 |
The type of the scheduling rule. Valid values:
|
Param | String | No | {"ParamType":"cdn","ParamData":"Domain":"example.aliyundoc.com","Cname":"demo.aliyundoc.com","AccessQps":100,"UpstreamQps":100}} |
The details of the CDN interaction rule. This parameter is a JSON string. The following list describes the fields in the value of the parameter:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 8DFB602D-1AAC-46C4-90F2-C84086E7A6E4 |
The ID of the request, which is used to locate and troubleshoot issues. |
Cname | String | 48k7b372gpl4****.aliyunddos0001.com |
The CNAME 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.
|
RuleName | String | testrule |
The name of the scheduling rule. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=CreateSchedulerRule
&ResourceGroupId=default
&Rules=[{"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}]
&RuleName=testrule
&RuleType=2
&Param={"ParamType":"cdn","ParamData":"Domain":"example.aliyundoc.com","Cname":"demo.aliyundoc.com","AccessQps":100,"UpstreamQps":100}}
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateSchedulerRuleResponse>
<RequestId>8DFB602D-1AAC-46C4-90F2-C84086E7A6E4</RequestId>
<Cname>48k7b372gpl4****.aliyunddos0001.com</Cname>
<RuleName>testrule</RuleName>
</CreateSchedulerRuleResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "8DFB602D-1AAC-46C4-90F2-C84086E7A6E4",
"Cname" : "48k7b372gpl4****.aliyunddos0001.com",
"RuleName" : "testrule"
}
Error codes
For a list of error codes, visit the Error Center.