tencent cloud

Feedback

ModifyAlarmShield

Last updated: 2024-06-11 16:02:58

    1. API Description

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

    This API is used to modify alarm blocking rules.

    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: ModifyAlarmShield.
    Version Yes String Common Params. The value used for this API: 2020-10-16.
    Region No String Common Params. This parameter is not required for this API.
    TaskId Yes String Blocking rule ID.
    AlarmNoticeId Yes String Notification channel group ID.
    StartTime No Integer Block start time (second-level timestamp).
    EndTime No Integer Block end time (second-level timestamp).
    Type No Integer Block type. 1: Block all notifications, 2: Block matching rules notifications according to the Rule parameter.
    Rule No String Blocking rules, required when Type is 2. For detailed information on filling in rules, see Product Documentation.
    Reason No String Blocking Reason
    Status No Integer Rule status. Only when the rule status is in effect (status:1) can it be modified to expired (status:2).

    3. Output Parameters

    Parameter Name Type Description
    RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Modifying Alarm Blocking

    This example shows you how to modify alarm blocking.

    Input Example

    POST / HTTP/1.1
    Host: cls.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: ModifyAlarmShield
    <Common request parameters>
    
    {
        "TaskId": "bb42f112-a74d-456e-b3c4-ff5472911b42",
        "AlarmNoticeId": "notice-bb42f112-a74d-456e-b3c4-ff5472911b42",
        "StartTime": 1701872657,
        "EndTime": 1701892657,
        "Type": 1,
        "Rule": "",
        "Reason": "Modify Reason"
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "1142f112-a74d-456e-b3c4-ff5472911b11"
        }
    }
    

    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
    FailedOperation Operation failed.
    FailedOperation.Timeout Operation timed out
    InternalError Internal error.
    InvalidParameter Incorrect parameter.
    InvalidParameter.AlarmNoticeConflict The alarm notification template already exists.
    MissingParameter Missing parameter.
    OperationDenied.AccountDestroy The account has been terminated.
    OperationDenied.AccountIsolate The account has overdue payments.
    OperationDenied.AccountNotExists The account does not exist.