All Products
Search
Document Center

SchedulerX:CreateSchedulerxNotificationPolicy

Last Updated:Nov 20, 2025

Creates a notification policy.

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:
    • For mandatory resource types, indicate with a prefix of * .
    • 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
edas:CreateSchedulerxNotificationPolicycreate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID.

cn-hangzhou
PolicyNamestringYes

The name of the notification policy.

test-weekdays
DescriptionstringNo

The description of the notification policy.

Monday-Friday only
ChannelTimeRangestringYes

The configuration for the effective time periods of notification channels.

Note Please see the detailed explanation of this parameter below.
{ "sendChannel": "sms,webhook,mail,phone", "timezone": "UTC+08:00", "webhookIsAtAll": "false", "timeRanges": { "all": [ { "startTime": "08:00", "endTime": "18:00", "daysOfWeek": [1, 2, 3, 4, 5] } ] } }

ChannelTimeRange configuration description

Configuration for the effective time of notification channels. Supports two modes: unified configuration and separate configuration.

Format

This field must be in JSON format and supports the following core properties:

Properties

sendChannel: Notification channel configuration (required)

  • A required field that specifies the notification channels to be configured.
  • Format: Multiple channels separated by commas, e.g., "sms,webhook,mail,phone".
  • Supported channels: sms, webhook (e.g., DingTalk, WeCom), mail, and phone.

timezone: Time zone setting

  • Supports GMT or UTC format.
  • Example: GMT+8 or UTC+08:00.
  • Note: The time zone determines the reference standard for the effective time of alerts and is independent of the actual geographical location. For example, if you are in the Beijing region but configure "New York Time Zone (UTC-4), Monday 00:00-03:00", the system will operate based on the local time in New York.

webhookIsAtAll: Webhook notification configuration

  • The value is "true" or "false".
  • Indicates whether to @all members in a Webhook notification.

timeRanges: Time range configuration (required)

  • Supports two configuration modes:

    1. Unified Configuration: Use "all" as the key to set a single time period for all selected channels.
    2. Separate Configuration: Configure a time period for each channel individually, with the key being the specific channel identifier.

Time period configuration items

Each time period includes the following properties:

  • startTime: The start time, in HH:mm format (required).
  • endTime: The end time, in HH:mm format (required).
  • daysOfWeek: The effective days of the week, in an array format. 1-7 represent Monday to Sunday (optional. If empty, this time period is not effective).

Example configurations

Example 1: Unified configuration mode

{
  "sendChannel": "sms,webhook,mail,phone",
  "timezone": "UTC+08:00",
  "webhookIsAtAll": "false",
  "timeRanges": {
    "all": [
      {
        "startTime": "08:00",
        "endTime": "18:00",
        "daysOfWeek": [1, 2, 3, 4, 5]
      }
    ]
  }
}

Example 2: Separate configuration mode

{
  "sendChannel": "sms,webhook,mail,phone",
  "timezone": "GMT+8",
  "webhookIsAtAll": "false",
  "timeRanges": {
    "webhook": [
      {
        "startTime": "08:00",
        "endTime": "18:00",
        "daysOfWeek": [1, 2, 3, 4, 5]
      }
    ],
    "sms": [
      {
        "startTime": "08:00",
        "endTime": "18:00",
        "daysOfWeek": [1, 2, 3, 4, 5]
      }
    ],
    "mail": [
      {
        "startTime": "08:00",
        "endTime": "18:00",
        "daysOfWeek": [1, 2, 3, 4, 5]
      }
    ],
    "phone": [
      {
        "startTime": "08:00",
        "endTime": "18:00",
        "daysOfWeek": [1, 2, 3, 4, 5]
      }
    ]
  }
}

Note

  1. The sendChannel field is required and can only contain supported notification channels.
  2. When timeRanges contains "all", it signifies the unified configuration mode. In this case, it cannot contain configurations for other individual channels.
  3. When timeRanges does not contain "all", you need to configure each channel specified in sendChannel separately.
  4. Time must use the 24-hour format (HH:mm).
  5. Days of the week are represented by numbers from 1 to 7, corresponding to Monday through Sunday.
  6. The time zone supports configuration in both GMT and UTC formats.

Response parameters

ParameterTypeDescriptionExample
object
Codeinteger

The status code.

200
Messagestring

Additional information. Returned only when an error occurs.

Invalid parameter: Notification policy already exists: test-weekdays
RequestIdstring

The unique request ID.

39090022-1F3B-4797-8518-6B61095F1AF0
Successboolean

Indicates whether the request was successful.

true
AccessDeniedDetailobject

The access denial details.

AuthActionstring

The authentication action.

edas:CreateSchedulerxNotificationPolicy
AuthPrincipalDisplayNamestring

The principal name.

209312833131416xxx
AuthPrincipalOwnerIdstring

The account of the principal.

1827811800526xxx
AuthPrincipalTypestring

The principal type.

SubUser
EncodedDiagnosticMessagestring

The encoded diagnostic message.

AQFn/cLPZ/3Cz0YxQkZBMjVGLTY0REUtNTlGNS05NzUwLTgyMUE4M0MwMTFDRQ==
NoPermissionTypestring

The permission denial type.

ImplicitDeny
PolicyTypestring

The policy type.

AccountLevelIdentityBasedPolicy

Examples

Sample success responses

JSONformat

{
  "Code": 200,
  "Message": "Invalid parameter: Notification policy already exists: test-weekdays\n",
  "RequestId": "39090022-1F3B-4797-8518-6B61095F1AF0",
  "Success": true,
  "AccessDeniedDetail": {
    "AuthAction": "edas:CreateSchedulerxNotificationPolicy",
    "AuthPrincipalDisplayName": "209312833131416xxx",
    "AuthPrincipalOwnerId": "1827811800526xxx",
    "AuthPrincipalType": "SubUser",
    "EncodedDiagnosticMessage": "AQFn/cLPZ/3Cz0YxQkZBMjVGLTY0REUtNTlGNS05NzUwLTgyMUE4M0MwMTFDRQ==",
    "NoPermissionType": "ImplicitDeny",
    "PolicyType": "AccountLevelIdentityBasedPolicy"
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
2025-10-29Add OperationView Change Details