Alarm Strategy List API
Updated at:2025-11-03
API description
This API retrieves the list of Alarm Strategies for Cloud Product Monitor, Site Monitor, and related alarms.
Request parameters
| Name | Types | Description | Required or not | Parameter location |
|---|---|---|---|---|
| userId | String | User ID | Yes | RequestBody |
| scope | String | Cloud Product Scope, limited to the following character set: 0~9, A~Z, a~z, _ | Yes | RequestBody |
| region | String | Region, default: bj | No | RequestBody |
| dimensions | String | A dimension consists of dimensionName:dimensionValue. When a metric includes multiple dimensions, connect them using semicolons, e.g., dimensionName:dimensionValue;dimensionName:dimensionValue. Only one value can be specified per dimension. | No | RequestBody |
| order | String | Sorting method | Yes | RequestBody |
| pageSize | int | Number per page | Yes | RequestBody |
| pageNo | int | Page number | Yes | RequestBody |
| actionEnabled | boolean | Whether it is enabled | No | RequestBody |
Parameter explanation
- For concepts like Scope, Metric, Statistic, and Dimension, refer to Core Concepts.
Return field description
| Types | Description |
|---|---|
| PageResultResponse<AlarmConfig> | Alarm Strategy List |
Request example
Python
1HOST = 'http://bcm.bj.baidubce.com/'
2AK = 'ALTA****************3hVCYG'
3SK = 'b2c53***********************3ac1'
4config = BceClientConfiguration(credentials=BceCredentials(AK, SK), endpoint=HOST)
5resp = self.client.get_single_instance_alarm_configs(user_id, "BCE_BCC", 1, 10)
6print(resp)
Appendix
AlarmConfig
| Name | Types | Description |
|---|---|---|
| alarmDescription | String | Automatically generated, alarm rule description |
| alarmName | String | Unique alarm name under userId |
| aliasName | String | For frontend display use, duplicates are allowed |
| userId | String | User ID |
| scope | String | Associated Cloud Product Scope |
| region | String | Region |
| monitorObject | MonitorObject | Monitor Object |
| type | AlarmType(enum) | Alarm type, options: NORMAL (Metric alarm) EVENT (Event alarm) |
| eventTypeList | List< String > | Event type list |
| level | AlarmLevel(enum) | Alarm levels, options: NOTICE (Notice) WARNING (Warning) MAJOR (Major) CRITICAL (Critical) |
| actionEnabled | Boolean | Alarm notification status |
| rules | List< List<AlarmRule> > | Alarm rule list |
| alarmActions | Set< String > | Actions to be taken in the alarm status |
| okActions | Set< String > | Actions to be taken in the normal status |
| insufficientActions | Set< String > | Actions under insufficient data collection status |
| insufficientCycle | int | No-data alarm judgment period |
| srcName | String | Instance group ID |
| srcType | String | Instance group type |
| repeatAlarmCycle | int | Repeated alarm period |
| maxRepeatCount | int | Maximum alarm repetition count |
| callbackUrl | String | Alarm callback address |
| callbackToken | String | Alarm callback token |
