ManageAlertRulesUnifiedActionInput

Updated at:

Parameter

Type

Description

Example

object

The aggregated request body for managing alert rules, shared by CREATE, UPDATE, PATCH, and BATCH_DELETE, with optional fields based on the action.

action

string

The operation type.

CREATE

actionIntegrationConfig ActionIntegrationConfig

The action integration configuration.

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

annotations

object

The annotations.

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

string

The annotation.

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

armsIntegrationConfig ArmsIntegrationConfig

The ARMS integration configuration.

{"enabled":false}

bizSource

string

The business source (optional). Examples include managed_service_for_prometheus, umodel, application_insights, cloud_monitoring, and sls. Pass as needed for CREATE, UPDATE, and PATCH.

Sample value

conditionConfig ConditionConfigUnified

The condition aggregation configuration.

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

contentTemplate

string

The content template.

Instance {{instance}} CPU usage exceeds {{threshold}}%

datasourceConfig DatasourceConfigUnified

The data source aggregation configuration.

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

displayName

string

The display name.

test

drillEvalTime

integer

The alert drill time, in Unix milliseconds. Required by the backend when drillMode is ONE_SHOT. It cannot be later than the current time or earlier than 90 days ago.

1783728000000

drillMode

string

The alert drill mode. Required by the backend when action is DRILL_ALERT. ONE_SHOT specifies a single time point to simulate a complete lifecycle (three events: OCCURRED, PERSISTENT, and RECOVERED). TIME_TRAVEL specifies a time period to simulate round by round according to the rule scheduling interval (OCCURRED, PERSISTENT, ..., RECOVERED).

ONE_SHOT

drillTimeRange

object

The alert drill time range, in Unix milliseconds. Required by the backend when drillMode is TIME_TRAVEL. The endTime must be later than the startTime and cannot be later than the current time. The span between endTime and startTime cannot exceed 1 hour (the backend returns 400 if exceeded). Simulates round by round according to the rule scheduling interval, with a maximum of 500 rounds (the backend returns 400 if exceeded).

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

endTime

integer

The drill end time, in Unix milliseconds. Must be later than the start time, and the span from the start time cannot exceed 1 hour.

1783731600000

startTime

integer

The drill start time, in Unix milliseconds.

1783728000000

enabled

boolean

Specifies whether the rule is enabled.

true

labels

object

The labels.

{"env":"production"}

string

The resource label.

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

notifyConfig NotifyConfigUnified

The notification aggregation configuration.

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

observeResourceConfig ObserveResourceConfig

The observable resource configuration.

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

observeResourceInstanceId

string

[Deprecated] The monitored object instance ID. Use observeResourceConfig.resources for new integrations. Retained only for compatibility with legacy SDKs.

example-id-001

observeResourceType

string

[Deprecated] The monitored object resource type. Use observeResourceConfig.entityType for new integrations. Retained only for compatibility with legacy SDKs.

default

queryConfig QueryConfigUnified

The query aggregation configuration.

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

rcaConfig AlertRuleRcaConfig

The root cause analysis (RCA) configuration (optional). Pass as needed for CREATE, UPDATE, and PATCH.

{"enabled":false}

regionId

string

The region ID. Aligned with V1 AlertRule.regionId. The gateway callerRegionId is used if not provided.

example-id-001

scheduleConfig ScheduleConfigUnified

The scheduling aggregation configuration.

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

uuid

string

The rule UUID. Required for UPDATE and PATCH.

xxx-xxx-xxx

uuidList

array

The list of rule UUIDs to be deleted (BATCH_DELETE).

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

string

The UUID of the rule to be deleted.

xxx-xxx-xxx

workspace

string

The workspace (for CREATE, UPDATE, and other actions).

workspace-test