{"userId":"453bf9********************9090dc",
aliasName: Virtual Machine CPU Monitor,"region":"bj","scope":"BCE_BCC","policies":[{"rules":[{"metricName":"CpuUsage","metricDimensions":[],"operator":">","statistics":"average","threshold":80,"window":60,},],"alarmPendingPeriodCount":3}],"insufficientDataPendingPeriod":300,"alarmRepeatInterval":300,"alarmRepeatCount":10,"targetType":"TARGET_TYPE_MULTI_INSTANCES","targetInstances":[{"region":"bj","identifiers":[{"key":"InstanceId","value":"i-FYc6EU**"}]}],"resourceType":"Instance","alarmLevel":"NOTICE","actions":[{"name":"notifyRdTeam","id":"0262f103-****-****-****-078d0f2d80c5",},]}
Response example
Successful response example
{"success":true,"msg":"","result":{// Strategy name, a unique index for the Alarm Strategy, used for subsequent deletion and update operations"alarmName":"5cc380********************268123",}}
Unsuccessful response example
{"success":false,"msg":"Invalid parameter, aliasName is empty!","result":{"alarmName":null}}
// Request{// Strategy name, returned by the strategy creation API"alarmName":"5cc380********************268123",// Other fields are the same as the strategy creation API// Note: Currently, Alarm Strategy does not support partial updates; only full updates are allowed}
GET /csm/api/v2/userId/453bf9********************9090dc/services/BCE_BCC/alarm/config?
alarmName=5cc380********************268123
Response example
{
alarmName:5cc380********************268123,// Unique identifier for Alarm Strategy, UUID type// For other fields, refer to AlarmConfigV2 in the appendix}
User ID is used to specify the user being queried.
Yes
Query
service
String
Cloud product for which alerts need to be queried, based on the scope parameter
Yes
Query
order
String
Sorting method (e.g., ascending or descending).
Yes
Query
pageNo
Integer
Page number for pagination queries
Yes
Query
pageSize
Integer
Number of entries returned per page
Yes
Query
scope
String
Specify cloud product for alerts
No
Query
region
String
Specify the region to which the alert belongs
No
Query
dimensions
String
Filter Alerts by specified Dimensions
No
Query
metricDimensions
String
Filter Alerts by Metric Dimensions
No
Query
actionEnabled
Boolean
Whether Alert is enabled
No
Query
typeName
String
Resource Type of Alert
No
Query
id
String
ID
Resource ID
Query
uuid
String
UUID
Resource UUID
Query
alarmNamePrefix
String
Alarm name prefix, enabling fuzzy queries
No
Query
Request example
GET /csm/api/v2/userId/453bf**********9090dc/services/BCE_BCC/alarm/config/list?order=desc&pageNo=1&pageSize=2®ion=bj&typeName=Instance&id=i-O8WtQNyQ
Region to which the Alarm Strategy belongs, required. For multi-instance type Alarm Strategies, the Region here must be consistent with the Region to which the Instance belongs
scope
String
Cloud Product Name, required
insufficientDataPendingPeriod
int
No-data check period, unit: second, optional; if not set or set to 0, no-data alarm is disabled
alarmRepeatInterval
int
Repeated alarm period, value must be ≥ 300, unit: second, optional. If not set or set to 0, repeated alarm is disabled
alarmRepeatCount
int
Maximum number of repeated alarms, optional
resourceType
String
Sub-product type of the cloud product, optional, default value: Instance
Notification Template list, required. This template list will be uniformly used for anomaly notifications, recovery notifications, and repeated alarm notifications