ManageAlertRulesUnifiedActionInput

更新时间:
复制 MD 格式

名称

类型

描述

示例值

object

管理告警规则请求体聚合(CREATE/UPDATE/PATCH/BATCH_DELETE 共用,按 action 选填字段)

action

string

操作类型

CREATE

actionIntegrationConfig ActionIntegrationConfig

行动集成配置

{"enabled":true,"actions":[]}

annotations

object

注解

{"summary":"CPU usage exceeds 90%"}

string

注释

{'projectName': 'test', 'envName': 'production'}

armsIntegrationConfig ArmsIntegrationConfig

ARMS 集成配置

{"enabled":false}

bizSource

string

业务来源(可选)。如 managed_service_for_prometheus / umodel / application_insights / cloud_monitoring / sls;CREATE/UPDATE/PATCH 均按需传入

示例值

conditionConfig ConditionConfigUnified

条件聚合配置

{"type":"PROMETHEUS_SIMPLE_CONDITION","durationSecs":0,"severity":"CRITICAL"}

contentTemplate

string

内容模板

实例 {{instance}} CPU 使用率超过 {{threshold}}%

datasourceConfig DatasourceConfigUnified

数据源聚合配置

{"type":"PROMETHEUS","instanceId":"prom-cn-hangzhou-xxxxx"}

displayName

string

显示名称

test

drillEvalTime

integer

告警演习时刻,Unix 毫秒时间戳。drillMode=ONE_SHOT 时后端必填;不可晚于当前时间,最早不超过 90 天前

1783728000000

drillMode

string

告警演习模式。action=DRILL_ALERT 时后端必填:ONE_SHOT 指定一个时刻推演一轮完整生命周期(OCCURRED→PERSISTENT→RECOVERED 三条事件);TIME_TRAVEL 指定一段时间按规则调度间隔逐轮推演(OCCURRED→PERSISTENT→…→RECOVERED)

ONE_SHOT

drillTimeRange

object

告警演习时间范围,Unix 毫秒时间戳。drillMode=TIME_TRAVEL 时后端必填;endTime 必须晚于 startTime 且不可晚于当前时间;endTime 与 startTime 的跨度不可超过 1 小时(超出后端返回 400);按规则调度间隔逐轮推演,轮数上限 500,超出后端返回 400

{"startTime":1783728000000,"endTime":1783731600000}

endTime

integer

演习结束时间,Unix 毫秒时间戳,必须晚于开始时间,且与开始时间跨度不超过 1 小时

1783731600000

startTime

integer

演习开始时间,Unix 毫秒时间戳

1783728000000

enabled

boolean

是否启用

true

labels

object

标签

{"env":"production"}

string

资源标签

{'projectName': 'test', 'envName': 'production'}

notifyConfig NotifyConfigUnified

通知聚合配置

{"type":"DIRECT_NOTIFY","channels":[{"type":"GROUP","identifiers":[""]}]}

observeResourceConfig ObserveResourceConfig

可观测资源配置

{"relationType":"CLOUD_INSTANCE","resources":[]}

observeResourceInstanceId

string

[已废弃] 监控对象实例 ID;新接入请改用 observeResourceConfig.resources。仅为兼容历史 SDK 保留

example-id-001

observeResourceType

string

[已废弃] 监控对象资源类型;新接入请改用 observeResourceConfig.entityType。仅为兼容历史 SDK 保留

default

queryConfig QueryConfigUnified

查询聚合配置

{"type":"PROMETHEUS_SINGLE_QUERY","expr":"up > 0"}

rcaConfig AlertRuleRcaConfig

RCA(根因分析)配置(可选)。CREATE/UPDATE/PATCH 均按需传入

{"enabled":false}

regionId

string

地域 ID(与 V1 AlertRule.regionId 对齐;未提供时使用网关 callerRegionId)

example-id-001

scheduleConfig ScheduleConfigUnified

调度聚合配置

{"type":"FIXED","intervalSecs":60}

uuid

string

规则 UUID(UPDATE/PATCH 必填)

xxx-xxx-xxx

uuidList

array

待删除规则 UUID 列表(BATCH_DELETE)

["cms_v2_81d01768-fee9-459f-af49-ab2704f1db2b"]

string

待删除规则 UUID

xxx-xxx-xxx

workspace

string

工作空间(CREATE/UPDATE 等)

workspace-test