All Products
Search
Document Center

Anti-DDoS:QuerySchedruleOnDemand

Last Updated:Apr 10, 2024

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.

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

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the on-demand instance.

Note You can call the DescribeOnDemandInstance operation to query the IDs of all on-demand instances.
ddosbgp-cn-z2q1qzxb****
RegionIdstringNo

The region ID of the on-demand instance.

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

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
RequestIdstring

The ID of the request.

4A8F9980-5ACB-497F-9F15-48E9D6B29028
InstanceIdstring

The ID of the on-demand instance.

ddosbgp-cn-z2q1qzxb****
UserIdstring

The ID of the Alibaba Cloud account.

171986973287****
RuleConfigobject []

The configurations of the scheduling rule.

RuleSwitchstring

Indicates whether the scheduling rule is enabled. Valid values:

  • on: enabled
  • off: disabled
on
RuleConditionMbpsstring

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

100
TimeZonestring

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.
GMT-08:00
RuleActionstring

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

declare
RuleConditionKppsstring

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

10
RuleUndoModestring

The stop method of the scheduling rule. Valid values:

  • auto: The scheduling rule automatically stops.
  • manual: The scheduling rule is manually stopped.
auto
RuleUndoBeginTimestring

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.
03:00
RuleConditionCntstring

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.
3
RuleUndoEndTimestring

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.

03:05
RuleNamestring

The name of the scheduling rule.

ddosbgp-cn-z2q1qzxb****
RuleStatusobject []

The status of the scheduling rule.

RuleSchedStatusstring

The scheduling status. Valid values:

  • scheduled
  • unscheduled
unscheduled
Netstring

The CIDR block of the on-demand instance.

47.***.***.0/24

Examples

Sample success responses

JSONformat

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

Error codes

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