
Content is empty
If you don't find the content you expect, please try another search term
Last updated:2026-03-18 14:12:49
Call the DescribeAlarmPolicy API to retrieve detailed configuration information for a specific alarm policy under the specified account. Note that this response does not include the list of associated instance details — use the Query Alarm Policy Associated Instances API for that.
Field | Value |
|---|---|
API Name | DescribeAlarmPolicy |
Request Method | GET |
Endpoint |
|
VPC Internal Endpoint |
|
Version |
|
All requests must include the Common Request Parameters. The table below lists only the API-specific parameters.
Parameter | Required | Type | Description |
|---|---|---|---|
| Yes | String | Fixed value: |
| Yes | String | Fixed value: |
| Yes | Integer | The ID of the alarm policy to query. To retrieve policy IDs, see Query Alarm Policies. |
Both XML and JSON formats are supported.
Field | Type | Description |
|---|---|---|
| String | Unique request ID. |
| Integer | Total number of records returned. |
| Array of AlarmPolicyObject | List of alarm policy detail objects. |
Field | Type | Description |
|---|---|---|
| Integer | Unique ID of the alarm policy. |
| String | Name of the alarm policy. |
| Integer | Cloud service category ID. See Cloud Service Categories. |
| Integer | Policy type. |
| Integer | Whether the policy is enabled. |
| Integer | Number of instances associated with this policy. |
| Array of TriggerRuleObject | List of trigger rules. See TriggerRule Object below. |
| Array of ContactInfoObject | List of associated contacts. See ContactInfo Object below. |
| String | Webhook callback URL for alarm notifications. Empty string if not configured. |
Field | Type | Description |
|---|---|---|
| Integer | Unique ID of the trigger rule. |
| String | Statistical period. Example: |
| String | Statistical aggregation method. Supported values: |
| String | Comparison operator. Supported values: |
| String | Threshold value that triggers the alarm. |
| String | Display name of the monitoring metric. Example: |
| String | Identifier key of the monitoring metric. Example: |
| String | Unit of the monitoring metric. Example: |
| String | Start time of the rule's effective window. Format: |
| String | End time of the rule's effective window. Format: |
| String | Dimension tags for filtering metric data. Example: |
| String | Interval between repeated alarm notifications. Example: |
| Integer | Number of consecutive periods that must breach the threshold before an alarm fires. |
| Integer | Maximum number of alarm notifications to send. Valid range: |
Field | Type | Description |
|---|---|---|
| Integer | Unique ID of the contact or contact group. |
| String | Name of the contact or contact group. |
| Integer | Notification delivery method. |
| Integer | Contact type. |
Replace
${region}with the appropriate region code. See: Region Reference. Replace${CommonParams}with the appropriate common parameters. See: Common Parameters.
curl -X GET 'https://monitor.${region}.api.ksyun.com/?Action=DescribeAlarmPolicy&Version=2021-01-01&PolicyId=20000' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'host: monitor.api.ksyun.com' \
-H 'cache-control: no-cache' \
-H ${CommonParams}
JSON Format
{
"data": {
"alarmPolicyList": [
{
"policyId": 20000,
"policyName": "Disk Monitoring",
"productType": 0,
"policyType": 0,
"enabled": 0,
"instanceInfoCount": 10,
"triggerRuleList": [
{
"triggerId": 10000,
"period": "3m",
"method": "avg",
"compare": ">",
"triggerValue": "90",
"itemName": "Disk Usage",
"itemKey": "vfs.fs.size",
"units": "%",
"effectBT": "00:00",
"effectET": "23:59",
"tags": "p2=pused",
"interval": "5m",
"points": 1,
"maxCount": 3
}
],
"contactInfoList": [
{
"contactId": 1,
"contactName": "sys-kop",
"contactWay": 1,
"contactFlag": 1
}
],
"callbackUrl": ""
}
]
},
"totalCount": 1,
"requestId": "xxxx"
}
XML Format
<Data>
<AlarmPolicyList>
<PolicyId>20000</PolicyId>
<PolicyName>Disk Monitoring</PolicyName>
<ProductType>0</ProductType>
<PolicyType>0</PolicyType>
<Enabled>0</Enabled>
<InstanceInfoCount>10</InstanceInfoCount>
<TriggerRuleList>
<TriggerId>10000</TriggerId>
<Period>3m</Period>
<Method>avg</Method>
<Compare>></Compare>
<TriggerValue>90</TriggerValue>
<ItemName>Disk Usage</ItemName>
<ItemKey>vfs.fs.size</ItemKey>
<Units>%</Units>
<EffectBT>00:00</EffectBT>
<EffectET>23:59</EffectET>
<Tags>p2=pused</Tags>
<Interval>5m</Interval>
<Points>1</Points>
<MaxCount>3</MaxCount>
</TriggerRuleList>
<ContactInfoList>
<ContactId>1</ContactId>
<ContactName>sys-kop</ContactName>
<ContactWay>1</ContactWay>
<ContactFlag>1</ContactFlag>
</ContactInfoList>
<CallbackUrl></CallbackUrl>
</AlarmPolicyList>
</Data>
<TotalCount>1</TotalCount>
<RequestId>xxxxx</RequestId>
JSON Format
{
"requestId": "xxxx",
"error": {
"type": "sender",
"code": "InvalidParameterValue",
"message": "Invalid `PolicyId` parameter value, policy does not exist."
}
}
The table below lists only the error codes specific to this API's business logic. For all other error codes, refer to Common Error Codes.
Pure Mode