All Documents
Current Document

Content is empty

If you don't find the content you expect, please try another search term

Documentation

DescribePolicyObject

Last updated:2026-03-18 14:12:49

DescribePolicyObject

Call the DescribePolicyObject API to retrieve the detailed list of instances associated with a specific alarm policy under the specified account.


Description

Field

Value

API Name

DescribePolicyObject

Request Method

GET

Endpoint

monitor.api.ksyun.com

VPC Internal Endpoint

monitor.internal.api.ksyun.com

Version

2021-01-01


Request Parameters

All requests must include the Common Request Parameters. The table below lists only the API-specific parameters.

Parameter

Required

Type

Description

Action

Yes

String

Fixed value: DescribePolicyObject.

Version

Yes

String

Fixed value: 2021-01-01.

PolicyId

Yes

Integer

The ID of the alarm policy to query. To retrieve policy IDs, see Query Alarm Policies.

PageIndex

No

Integer

Page number. Must be greater than or equal to 1. Default: 1.

PageSize

No

Integer

Number of records per page. Valid range: 1100. Default: 10.


Response Parameters

Both JSON and XML formats are supported.

Top-Level Fields

Field

Type

Description

requestId

String

Unique request ID.

totalCount

Integer

Total number of instances associated with this alarm policy.

data.productType

Integer

Cloud service category ID of the alarm policy. See Cloud Service Categories.

data.instanceInfoList

Array of InstanceInfoObject

List of associated instance detail objects. See InstanceInfo Object below.

InstanceInfoObject

Field

Type

Description

instanceId

String

Unique ID of the associated instance.

ip

String

IP address of the instance.

instanceName

String

Display name of the instance.


Request Examples

Example: Query Instances Associated with a Specific Alarm Policy

Request

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=DescribePolicyObject&Version=2021-01-01&PolicyId=20000&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}
Successful Response

JSON Format

{
    "data": {
        "instanceInfoList": [
            {
                "instanceId": "8b759ff8-d71b-41b7-939f-xxxxxxxxxx",
                "ip": "10.0.0.0",
                "instanceName": "cms-test"
            }
        ],
        "productType": 15
    },
    "totalCount": 10,
    "requestId": "xxxx"
}

XML Format

<Data>
    <InstanceInfoList>
        <InstanceId>8b759ff8-d71b-41b7-939f-xxxxxxxxxx</InstanceId>
        <Ip>10.0.0.0</Ip>
        <InstanceName>cms-test</InstanceName>
    </InstanceInfoList>
    <ProductType>15</ProductType>
</Data>
<TotalCount>10</TotalCount>
<RequestId>xxxxx</RequestId>
Error Response

JSON Format

{
    "requestId": "xxxx",
    "error": {
        "type": "sender",
        "code": "InvalidParameterValue",
        "message": "Invalid `PolicyId` parameter value, policy does not exist."
    }
}

Error Codes

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.

On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen
Feedback