
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 ListAlarmPolicy API to retrieve all alarm policies configured under the specified account.
Field | Value |
|---|---|
API Name | ListAlarmPolicy |
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: |
| No | Integer | Page number. Must be greater than or equal to |
| No | Integer | Number of records per page. Valid range: |
Both XML and JSON formats are supported.
Field | Type | Description |
|---|---|---|
| String | Unique request ID. |
| Integer | Total number of alarm policies matching the query. |
| Array of AlarmPolicyObject | List of alarm policy objects. See AlarmPolicy Object below. |
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. |
| Integer | Number of trigger rules configured in this policy. |
| Integer | Number of contacts associated with this policy. |
| String | Webhook callback URL for alarm notifications. Empty string if not configured. |
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=ListAlarmPolicy&Version=2021-01-01&PageIndex=1&PageSize=10' \
-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": 10000,
"policyName": "Disk Monitoring",
"productType": 0,
"policyType": 0,
"enabled": 0,
"instanceInfoCount": 2,
"triggerRuleCount": 1,
"contactInfoCount": 1,
"callbackUrl": ""
}
]
},
"totalCount": 1,
"requestId": "xxxx"
}
XML Format
<Data>
<AlarmPolicyList>
<PolicyId>10000</PolicyId>
<PolicyName>Disk Monitoring</PolicyName>
<ProductType>0</ProductType>
<PolicyType>0</PolicyType>
<Enabled>0</Enabled>
<InstanceInfoCount>2</InstanceInfoCount>
<TriggerRuleCount>1</TriggerRuleCount>
<ContactInfoCount>1</ContactInfoCount>
<CallbackUrl></CallbackUrl>
</AlarmPolicyList>
</Data>
<TotalCount>1</TotalCount>
<RequestId>xxxxx</RequestId>
JSON Format
{
"requestId": "xxxx",
"error": {
"type": "sender",
"code": "InvalidParameterValue",
"message": "Invalid `PageSize` parameter value, must be between 1 and 100."
}
}
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