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. |
RuleName | String | Yes | testrule |
The name of the scheduling rule. |
Rules | String | Yes | [{"Type":"A", "Value":"1.1.1.1", "Priority":80,"ValueType":2, "RegionId":"cn-hangzhou" },{"Type":"A", "Value":"203. ***. ***.199", "Priority":80,"ValueType":1}] |
Details about the scheduling rule. This parameter is a JSON string. The fields in the value are described as follows:
|
RuleType | Integer | Yes | 2 |
The type of the scheduling rule. Valid values:
|
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. |
Param | String | No | {"ParamType":"cdn","ParamData":{"Domain":"cdn.test.com","Cname":"cdncname.test.com","AccessQps":100,"UpstreamQps":100}} |
Details about the CDN interaction rule. This parameter is a JSON string. The fields in the value are described as follows:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Cname | String | 48k7b372gpl4****.aliyunddos0001.com |
The CNAME record assigned by Sec-Traffic Manager for the rule. Note To enable the rule, you must map the domain name of your service to the CNAME record.
|
RequestId | String | 0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc |
The ID of the request. |
RuleName | String | testrule |
The name of the rule. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=CreateSchedulerRule
&RuleName=testrule
&Rules=[{"Type":"A", "Value":"1.1.1.1", "Priority":80,"ValueType":2, "RegionId":"cn-hangzhou" },{"Type":"A", "Value":"203. ***. ***.199", "Priority":80,"ValueType":1}]
&RuleType=2
&<Common request parameters>
Sample success responses
XML
format
<CreateSchedulerRuleResponse>
<RequestId>0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc</RequestId>
<Cname>48k7b372gpl4****.aliyunddos0001.com</Cname>
<RuleName>testrule</RuleName>
</CreateSchedulerRuleResponse>
JSON
format
{
"RequestId": "0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc",
"Cname": "48k7b372gpl4****.aliyunddos0001.com",
"RuleName": "testrule"
}
Error codes
For a list of error codes, visit the API Error Center.