tencent cloud

APIs

ModifyAlarm

Download
Focus Mode
Font Size
Last updated: 2026-06-10 15:03:08

1. API Description

Domain name for API request: cls.intl.tencentcloudapi.com.

This API is used to modify an alarm policy. At least one valid configuration item needs to be modified.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: ModifyAlarm.
Version Yes String Common Params. The value used for this API: 2020-10-16.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
AlarmId Yes String

Alert policy ID. - Search the alert policy ID by obtaining the alarm policy list.

Name No String

Alarm policy name. Supports a maximum of 255 bytes. The '

MonitorTime No MonitorTime

Monitoring task execution time point.

Condition No String

Trigger condition for sending alarm information.

Note:

  • Condition and AlarmLevel are one set of configurations, and MultiConditions is another set of configurations. The two sets are mutually exclusive.
AlarmLevel No Integer

Alarm level.

0: Warning (Warn); 1: Reminder (Info); 2: Emergency (Critical)

Note:

  • Condition and AlarmLevel are one set of configurations, and MultiConditions are another set of configurations. The two sets are mutually exclusive.
MultiConditions.N No Array of MultiCondition

Multiple trigger conditions.

Note:

  • Condition and AlarmLevel are one set of configurations, and MultiConditions are another set of configurations. The two sets of configurations are mutually exclusive.
TriggerCount No Integer

Duration cycle. An alarm is triggered after the trigger conditions are constantly met for TriggerCount cycles. The minimum value is 1, and the maximum value is 2000.

AlarmPeriod No Integer

Alarm repeat cycle. In minutes. Value ranges from 0 to 1440.

AlarmTargets.N No Array of AlarmTarget

Monitoring object list.

Status No Boolean

Whether to enable alarm policy.

MessageTemplate No String

User-defined alarm content

CallBack No CallBackInfo

user-defined callback

Analysis.N No Array of AnalysisDimensional

Multi-dimensional analysis

GroupTriggerStatus No Boolean

Group trigger status. true: enabled, false: disabled (default)

GroupTriggerCondition.N No Array of String

Group trigger conditions.

Tags.N No Array of Tag

Tag description list, by specifying this parameter, you can simultaneously bind a tag to the corresponding alarm policy. Up to 10 tag key-value pairs are supported, and no duplicate key-value pairs are allowed.

MonitorObjectType No Integer

Monitored object type. 0: Common monitoring object for execution statements; 1: Each execution statement selects its own monitored object.
When the value is 1, the number of elements in AlarmTargets cannot exceed 10. The Number in AlarmTargets must be consecutive positive integers starting from 1 and must be unique.

Classifications.N No Array of AlarmClassification

Alert additional classification information list.
Number of Classifications Elements cannot exceed 20.
The Key of Classifications elements cannot be empty, must be unique, length cannot exceed 50 characters, and complies with the regular expression ^[a-z]([a-z0-9_]{0,49})$.
Value of Classifications elements cannot exceed 200 characters.

AlarmNoticeIds.N No Array of String

List of associated CLS alarm notification channel groups. - Search the list of associated alarm notification channel groups via Query notification channel group list. It is mutually exclusive with MonitorNotice.

MonitorNotice No MonitorNotice

The associated observability platform notification template is mutually exclusive with the AlarmNoticeIds parameter and cannot include both.

3. Output Parameters

Parameter Name Type Description
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Modify Alarm Policy

Modify Alarm Policy

Input Example

POST / HTTP/1.1
Host: cls.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyAlarm
<Common request parameters>

{
    "AlarmId": "alarm-fb0c92e7-xxxx-xxxx-b141-74859f894481",
    "Name": "bow-test-Chinese"
}

Output Example

{
    "Response": {
        "RequestId": "37fe3a72-xxxx-xxxx-951a-9468fa020261"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation Operation failed.
FailedOperation.InvalidAlarm The alarm policy is exceptional. Please check whether all the log topic IDs exist.
InternalError Internal error.
InvalidParameter Incorrect parameter.
InvalidParameter.AlarmConflict The alarm policy already exists.
InvalidParameter.DbDuplication The unique key of database conflicts.
OperationDenied Operation denied.
OperationDenied.AccountDestroy The account has been terminated.
OperationDenied.AccountIsolate The account has overdue payments.
OperationDenied.AccountNotExists The account does not exist.
OperationDenied.AlarmNotSupportForSearchLow IA storage does not support alarms.
ResourceNotFound.AlarmNotExist The alarm policy does not exist.
ResourceNotFound.AlarmNoticeNotExist The alarm notification template does not exist.
ResourceNotFound.TopicNotExist The log topic does not exist.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback