Alarm Strategy-related APIs
Updated at:2025-11-03
Alarm Strategy-related APIs
Alarm Strategy List Query API
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
JAVA
1// build client
2String endpoint = "http://bcm.bj.baidubce.com";
3String userId = "a0d04d7c***************7b6752ce4";
4String ak = "ALTAK***************3hVCYG";
5String sk = "b2c53*******************f9993ac1";
6BcmClientConfiguration config = new BcmClientConfiguration();
7config.setCredentials(new DefaultBceCredentials(ak, sk));
8config.setEndpoint(endpoint);
9bcmClient = new BcmClient(config);
10ListSingleInstanceAlarmConfigsRequest request = ListSingleInstanceAlarmConfigsRequest.builder()
11 .userId(userId)
12 .scope("BCE_BCC")
13 .pageNo(1)
14 .pageSize(10)
15 .build();
16
17Page<AlarmConfig> result = bcmClient.listSingleInstanceAlarmConfigs(request);
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 |
