Domain name for API request: cls.tencentcloudapi.com.
This API is used to create an alarm blocking rule.
A maximum of 20 requests can be initiated per second for this API.
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: CreateAlarmShield. |
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. |
AlarmNoticeId | Yes | String | Notification Channel Group ID |
StartTime | Yes | Integer | Block start time (second-level timestamp). |
EndTime | Yes | Integer | Block end time (second-level timestamp). |
Type | Yes | Integer | Block type. 1: Block all notifications, 2: Block matching rules notifications according to the Rule parameter. |
Reason | Yes | String | Blocking reason. |
Rule | No | String | Blocking rules, required when Type is 2. For detailed information on filling in rules, see Product Documentation. |
Parameter Name | Type | Description |
---|---|---|
TaskId | String | Blocking Rule ID |
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. |
This example shows you how to create an alarm blocking rule.
POST / HTTP/1.1
Host: cls.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateAlarmShield
<Common request parameters>
{
"AlarmNoticeId": "notice-bb42f112-a74d-456e-b3c4-ff5472911b42",
"StartTime": 1701872657,
"EndTime": 1701883657,
"Type": 1,
"Rule": "",
"Reason": "System update, temporarily silenced"
}
{
"Response": {
"TaskId": "bb42f112-a74d-456e-b3c4-ff5472911b42",
"RequestId": "1142f112-a74d-456e-b3c4-ff5472911b11"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
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. |
本页内容是否解决了您的问题?