tencent cloud

文档反馈

DescribePolicyGroupList

最后更新时间:2023-08-11 16:09:12

1. API Description

Domain name for API request: monitor.tencentcloudapi.com.

This API is used to get the list of basic policy alarm groups.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: DescribePolicyGroupList.
Version Yes String Common Params. The value used for this API: 2018-07-24.
Region No String Common Params. This parameter is not required for this API.
Module Yes String The value is fixed to monitor.
Limit Yes Integer Number of parameters that can be returned on each page. Value range: 1 - 100.
Offset Yes Integer Parameter offset on each page. The value starts from 0.
Like No String Search by policy name.
InstanceGroupId No Integer Instance group ID.
UpdateTimeOrder No String Sort by update time. Valid values: asc and desc.
ProjectIds.N No Array of Integer Project ID list.
ViewNames.N No Array of String List of alarm policy types.
FilterUnuseReceiver No Integer Whether to filter policy groups without recipients. The value 1 indicates that policy groups without recipients will be filtered. The value 0 indicates that policy groups without recipients will not be filtered.
Receivers.N No Array of String Filter by recipient group.
ReceiverUserList.N No Array of String Filter by recipient.
Dimensions No String Dimension set field (json string), for example, [[{"name":"unInstanceId","value":"ins-6e4b2aaa"}]].
ConditionTempGroupId No String Template-based policy group IDs, which are separated by commas.
ReceiverType No String Filter by recipient or recipient group. The value 'user' indicates by recipient. The value 'group' indicates by recipient group.
IsOpen No Boolean Filter conditions. Whether the alarm policy has been enabled or disabled

3. Output Parameters

Parameter Name Type Description
GroupList Array of DescribePolicyGroupListGroup Policy group list.
Note: This field may return null, indicating that no valid value was found.
Total Integer Total number of policy groups.
Warning String Remarks
Note: This field may return null, indicating that no valid values can be obtained.
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Getting the first two items in the list of basic alarm policy groups

Input Example

POST / HTTP/1.1
Host: monitor.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribePolicyGroupList
<Common request parameters>

{
    "Limit": "2",
    "Module": "monitor",
    "Offset": "0"
}

Output Example

{
    "Response": {
        "GroupList": [
            {
                "CanSetDefault": true,
                "Conditions": [
                    {
                        "AlarmNotifyPeriod": 86400,
                        "AlarmNotifyType": 0,
                        "CalcType": 1,
                        "CalcValue": "0",
                        "ContinueTime": 60,
                        "MetricId": 33,
                        "MetricShowName": "CPU utilization",
                        "Period": 60,
                        "RuleId": 1111111,
                        "Unit": "%"
                    }
                ],
                "ConditionsTemp": null,
                "EventConditions": [
                    {
                        "AlarmNotifyPeriod": 0,
                        "AlarmNotifyType": 0,
                        "EventId": 42,
                        "EventShowName": "Unreachable by ping",
                        "RuleId": 1111112
                    }
                ],
                "GroupId": 1111111,
                "GroupName": "Copy-test",
                "InsertTime": 1531122504,
                "InstanceGroup": null,
                "IsDefault": 0,
                "IsOpen": true,
                "LastEditUin": "1500000000",
                "NoShieldedSum": 0,
                "ParentGroupId": 0,
                "ProjectId": 0,
                "ReceiverInfos": [
                    {
                        "EndTime": 86400,
                        "NeedSendNotice": 1,
                        "NotifyWay": [
                            "EMAIL",
                            "SMS"
                        ],
                        "PersonInterval": 60,
                        "ReceiverGroupList": [
                            1111
                        ],
                        "ReceiverType": "group",
                        "ReceiverUserList": [],
                        "RecoverNotify": [
                            "SMS"
                        ],
                        "RoundInterval": 60,
                        "RoundNumber": 2,
                        "SendFor": [],
                        "StartTime": 0,
                        "UidList": null
                    }
                ],
                "Remark": "",
                "UpdateTime": 1577689096,
                "UseSum": 0,
                "ViewName": "cvm_device"
            },
            {
                "CanSetDefault": false,
                "Conditions": [
                    {
                        "AlarmNotifyPeriod": 0,
                        "AlarmNotifyType": 0,
                        "CalcType": 1,
                        "CalcValue": "0.85",
                        "ContinueTime": 300,
                        "MetricId": 1220,
                        "MetricShowName": "Disk utilization",
                        "Period": 60,
                        "RuleId": 1111113,
                        "Unit": ""
                    }
                ],
                "ConditionsTemp": null,
                "EventConditions": null,
                "GroupId": 1111112,
                "GroupName": "Default",
                "InsertTime": 1565792922,
                "InstanceGroup": null,
                "IsDefault": 1,
                "IsOpen": true,
                "LastEditUin": "1500000687",
                "NoShieldedSum": 1,
                "ParentGroupId": 0,
                "ProjectId": 0,
                "ReceiverInfos": null,
                "Remark": "",
                "UpdateTime": 1565792922,
                "UseSum": 1,
                "ViewName": "CKAFKA_INSTANCE"
            }
        ],
        "RequestId": "5fdf1257-6024-4b59-b924-2b995080f0bd",
        "Total": 142,
        "Warning": "This method is deprecated! Use `DescribeAlarmPolicies` instead!"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
AuthFailure.UnauthorizedOperation The request is not authorized. For more information on the authentication, see the CAM documentation.
DryRunOperation DryRun Operation. It means that the request would have succeeded, but the DryRun parameter was used.
FailedOperation Operation failed.
FailedOperation.AlertFilterRuleDeleteFailed Failed to delete the filter rule.
FailedOperation.AlertPolicyCreateFailed Failed to create the alarm policy.
FailedOperation.AlertPolicyDeleteFailed Failed to delete the alarm policy.
FailedOperation.AlertPolicyDescribeFailed Failed to query the alarm policy.
FailedOperation.AlertPolicyModifyFailed Failed to modify the alarm policy.
FailedOperation.AlertTriggerRuleDeleteFailed Failed to delete the trigger condition.
FailedOperation.DbQueryFailed Failed to query the database.
FailedOperation.DbRecordCreateFailed Failed to create the database record.
FailedOperation.DbRecordDeleteFailed Failed to delete the database record.
FailedOperation.DbRecordUpdateFailed Failed to update the database record.
FailedOperation.DbTransactionBeginFailed Failed to start the database transaction.
FailedOperation.DbTransactionCommitFailed Failed to submit the database transaction.
FailedOperation.DimQueryRequestFailed Failed to query the service in the request dimension.
FailedOperation.DoHTTPTransferFailed Backend service timed out.
FailedOperation.DruidQueryFailed Failed to query analysis data.
FailedOperation.DuplicateName The name already exists.
FailedOperation.ServiceNotEnabled The service is not enabled and can be used only after being enabled.
InternalError Internal error.
InternalError.ExeTimeout Execution timed out.
InvalidParameter Invalid parameter.
InvalidParameter.InvalidParameter Invalid parameter.
InvalidParameter.InvalidParameterParam Invalid parameter.
InvalidParameterValue The parameter value is incorrect.
LimitExceeded Quota limit is reached.
LimitExceeded.MetricQuotaExceeded Quota limit on metrics is reached. Requests containing unregistered metrics are prohibited.
MissingParameter Missing parameter.
ResourceInUse The resource is in use.
ResourceInsufficient Insufficient resources.
ResourceNotFound The resource is not found.
ResourceUnavailable The resource is unavailable.
ResourcesSoldOut The resources have been sold out.
UnauthorizedOperation Unauthorized operation.
UnknownParameter Unknown parameter.
UnsupportedOperation Unsupported operation.
联系我们

联系我们,为您的业务提供专属服务。

技术支持

如果你想寻求进一步的帮助,通过工单与我们进行联络。我们提供7x24的工单服务。

7x24 电话支持