tencent cloud

文档反馈

DescribeConditionsTemplateList

最后更新时间:2023-08-18 17:32:48

    1. API Description

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

    This API is used to get the trigger condition template.

    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: DescribeConditionsTemplateList.
    Version Yes String Common Params. The value used for this API: 2018-07-24.
    Region No String Common Params. This parameter is not required.
    Module Yes String The value is fixed to monitor.
    ViewName No String View name, which can be obtained via DescribeAllNamespaces. For the monitoring of Tencent Cloud services, the value of this parameter is QceNamespacesNew.N.Id of the output parameter of DescribeAllNamespaces, for example, cvm_device.
    GroupName No String Filter by trigger condition template name.
    GroupID No String Filter by trigger condition template ID.
    Limit No Integer Pagination parameter, which specifies the number of returned results per page. Value range: 1-100. Default value: 20.
    Offset No Integer Pagination offset starting from 0. Default value: 0.
    UpdateTimeOrder No String Sorting method by update time. asc: Ascending order; desc: Descending order.
    PolicyCountOrder No String Sorting order based on the number of associated policies. Valid values: asc (ascending order), desc (descending order).

    3. Output Parameters

    Parameter Name Type Description
    Total Integer Total number of templates.
    TemplateGroupList Array of TemplateGroup Template list.
    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 list of alarm policy templates

    Input Example

    POST / HTTP/1.1
    Host: monitor.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeConditionsTemplateList
    <Common request parameters>
    
    {
        "ViewName": "cvm_device",
        "Module": "monitor",
        "UpdateTimeOrder": "desc",
        "GroupName": "test",
        "Limit": "1",
        "Offset": "0",
        "GroupID": " 1998658"
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "853dafdc-22d4-4e9d-88a7-ebc43abf7cef",
            "TemplateGroupList": [
                {
                    "Conditions": [
                        {
                            "AlarmNotifyPeriod": 0,
                            "AlarmNotifyType": 0,
                            "CalcType": "",
                            "CalcValue": "",
                            "ContinueTime": "",
                            "MetricDisplayName": "CVM restarted",
                            "MetricID": 25,
                            "Period": 60,
                            "RuleID": 5001158,
                            "Unit": ""
                        }
                    ],
                    "EventConditions": [
                        {
                            "AlarmNotifyPeriod": "0",
                            "AlarmNotifyType": "0",
                            "EventDisplayName": "Unpingable",
                            "EventID": "42",
                            "RuleID": "5001160"
                        }
                    ],
                    "GroupID": 1998664,
                    "GroupName": "test",
                    "InsertTime": 1567074714,
                    "LastEditUin": 1500000687,
                    "IsUnionRule": 0,
                    "PolicyGroups": [
                        {
                            "CanSetDefault": true,
                            "Enable": true,
                            "GroupID": 1998665,
                            "GroupName": "test2",
                            "InsertTime": 1567075011,
                            "IsDefault": 0,
                            "LastEditUin": 1500000687,
                            "NoShieldedInstanceCount": 1,
                            "ParentGroupID": 1998664,
                            "ProjectID": 0,
                            "ReceiverInfos": [
                                {
                                    "EndTime": 57599,
                                    "NeedSendNotice": 1,
                                    "NotifyWay": [
                                        "EMAIL",
                                        "SMS"
                                    ],
                                    "PersonInterval": 60,
                                    "ReceiverGroupList": null,
                                    "ReceiverType": "group",
                                    "ReceiverUserList": null,
                                    "RecoverNotify": [
                                        "SMS"
                                    ],
                                    "RoundInterval": 60,
                                    "RoundNumber": 2,
                                    "SendFor": null,
                                    "StartTime": 57600,
                                    "UIDList": null
                                }
                            ],
                            "Remark": "test2",
                            "TotalInstanceCount": 1,
                            "UpdateTime": 1567075012,
                            "ViewName": "cvm_device"
                        }
                    ],
                    "Remark": "test",
                    "UpdateTime": 1567074881,
                    "ViewName": "cvm_device"
                }
            ],
            "Total": 1
        }
    }
    

    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.