Domain name for API request: config.intl.tencentcloudapi.com.
This API is used to add alarm monitoring rules.
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: AddAlarmPolicy. |
| Version | Yes | String | Common Params. The value used for this API: 2022-08-02. |
| Region | No | String | Common Params. This parameter is not required. |
| Name | Yes | String | Alarm policy name |
| Type | Yes | Integer | Event type 1: Resource non-compliance event. |
| EventScope.N | Yes | Array of Integer | Event range. Valid values: 1 (current account) and 2 (multi-account). |
| RiskLevel.N | Yes | Array of Integer | Risk level. 1: high-risk 2: medium-risk 3: low risk |
| NoticeTime | Yes | String | Notification period |
| NotificationMechanism | Yes | String | Notification mechanism |
| Status | Yes | Integer | Status. Valid values: 1 (enabled) and 2 (disabled). |
| NoticePeriod.N | Yes | Array of Integer | Notification cycle |
| Description | No | String | Policy description |
| Parameter Name | Type | Description |
|---|---|---|
| AlarmPolicyId | Integer | Unique id of the alarm policy |
| 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. |
POST / HTTP/1.1
Host: config.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: AddAlarmPolicy
<Common request parameters>
{
"Name": "Alarm Rule 1",
"Type": 1,
"EventScope": [
1
],
"RiskLevel": [
1
],
"NoticeTime": "09:30:00~23:30:00",
"NotificationMechanism": "real-time sending",
"Status": 1,
"NoticePeriod": [
1
]
}
{
"Response": {
"AlarmPolicyId": 2,
"RequestId": "e2c458f6-dedc-46eb-955a-6d2c3555c597"
}
}
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 |
|---|---|
| InvalidParameter | Parameter error. |
| LimitExceeded.AlertPolicyLimit | Alarm policy count cap |
| ResourceNotFound.ResourceTypeNotExist | The resource type does not exist. |
Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários