Queries the scheduling rule of an on-demand instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes QuerySchedruleOnDemand

The operation that you want to perform. Set the value to QuerySchedruleOnDemand.

InstanceId String Yes ddosbgp-cn-z2q1qzxb****

The ID of the on-demand instance.

Note You can call the DescribeOnDemandInstance operation to query the IDs of all on-demand instances.
RegionId String No cn-zhangjiakou

The region ID of the on-demand instance.

Note You can call the DescribeRegions operation to query all regions supported by Anti-DDoS Origin.

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

Parameter Type Example Description
InstanceId String ddosbgp-cn-z2q1qzxb****

The ID of the on-demand instance.

RequestId String 4A8F9980-5ACB-497F-9F15-48E9D6B29028

The ID of the request.

RuleConfig Array of Config

The configurations of the scheduling rule.

RuleAction String declare

The scheduling action. Set the value to declare, which indicates that the route is advertised.

RuleConditionCnt String 3

If the inbound bandwidth or packets consecutively exceed the threshold for the specified number of times, the scheduling rule is triggered and traffic is rerouted to the on-demand instance. The specified number of times is the value of this parameter.

Note The threshold of inbound bandwidth is the value of RuleConditionMbps. The threshold of inbound packets is the value of RuleConditionKpps.
RuleConditionKpps String 10

The threshold of inbound packets. Unit: Kpps. Minimum value: 10.

RuleConditionMbps String 100

The threshold of inbound bandwidth. Unit: Mbit/s. Minimum value: 100.

RuleName String ddosbgp-cn-z2q1qzxb****

The name of the scheduling rule.

RuleSwitch String on

Indicates whether the scheduling rule is enabled. Valid values:

  • on: enabled
  • off: disabled
RuleUndoBeginTime String 03:00

The start time of the period during which the scheduling rule is automatically stopped. The time must be in the 24-hour clock and in the hh:mm format.

If the system detects that DDoS attacks stop, the system no longer reroutes traffic to the on-demand instance from the time you specified. We recommend that you set this parameter to a value that is defined as off-peak hours.

Note This parameter takes effect only when the RuleUndoMode parameter is set to auto.
RuleUndoEndTime String 03:05

The end time of the period during which the scheduling rule is automatically stopped. The time must be in the 24-hour clock and in the hh:mm format.

RuleUndoMode String auto

The stop method of the scheduling rule. Valid values:

  • auto: The scheduling rule automatically stops.
  • manual: The scheduling rule is manually stopped.
TimeZone String GMT-08:00

The time zone of the time when the scheduling rule automatically stops. The time zone must be in the GMT-hh:mm format.

For example, the value GMT-08:00 indicates that the time zone is UTC+8.

Note This parameter takes effect only when the RuleUndoMode parameter is set to auto.
RuleStatus Array of Status

The status of the scheduling rule.

Net String 47.***. ***.0/24

The CIDR block of the on-demand instance.

RuleSchedStatus String unscheduled

The scheduling status. Valid values:

  • scheduled
  • unscheduled
UserId String 171986973287****

The ID of the Alibaba Cloud account.

Examples

Sample requests

http(s)://[Endpoint]/?Action=QuerySchedruleOnDemand
&InstanceId=ddosbgp-cn-z2q1qzxb****
&<Common request parameters>

Sample success responses

XML format

<QuerySchedruleOnDemandResponse>
      <RequestId>4A8F9980-5ACB-497F-9F15-48E9D6B29028</RequestId>
      <InstanceId>ddosbgp-cn-z2q1qzxb****</InstanceId>
      <UserId>171986973287****</UserId>
      <RuleStatus>
            <RuleSchedStatus>unscheduled</RuleSchedStatus>
            <Net>47. ***. ***.0/24</Net>
      </RuleStatus>
      <RuleConfig>
            <RuleUndoEndTime>03:05</RuleUndoEndTime>
            <RuleSwitch>on</RuleSwitch>
            <TimeZone>GMT-08:00</TimeZone>
            <RuleConditionCnt>3</RuleConditionCnt>
            <RuleAction>declare</RuleAction>
            <RuleConditionMbps>100</RuleConditionMbps>
            <RuleConditionKpps>10</RuleConditionKpps>
            <RuleUndoMode>auto</RuleUndoMode>
            <RuleName>ddosbgp-cn-z2q1qzxb****</RuleName>
            <RuleUndoBeginTime>03:00</RuleUndoBeginTime>
      </RuleConfig>
</QuerySchedruleOnDemandResponse>

JSON format

{
    "RequestId": "4A8F9980-5ACB-497F-9F15-48E9D6B29028",
    "InstanceId": "ddosbgp-cn-z2q1qzxb****",
    "UserId": "171986973287****",
    "RuleStatus": [
        {
            "RuleSchedStatus": "unscheduled",
            "Net": "47. ***. ***.0/24"
        }
    ],
    "RuleConfig": [
        {
            "RuleUndoEndTime": "03:05",
            "RuleSwitch": "on",
            "TimeZone": "GMT-08:00",
            "RuleConditionCnt": "3",
            "RuleAction": "declare",
            "RuleConditionMbps": "100",
            "RuleConditionKpps": "10",
            "RuleUndoMode": "auto",
            "RuleName": "ddosbgp-cn-z2q1qzxb****",
            "RuleUndoBeginTime": "03:00"
        }
    ]
}

Error codes

For a list of error codes, visit the API Error Center.