tencent cloud

文档反馈

ModifyPolicyGroup

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

1. API Description

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

This API is used to update policy group.

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: ModifyPolicyGroup.
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.
GroupId Yes Integer Policy group ID.
ViewName Yes String Alarm type.
GroupName Yes String Policy group name.
IsUnionRule Yes Integer The 'AND' and 'OR' rules for metric alarms. The value 1 indicates 'AND', which means that an alarm will be triggered only when all rules are met. The value 0 indicates 'OR', which means that an alarm will be triggered when any rule is met.
Conditions.N No Array of ModifyPolicyGroupCondition Metric alarm condition rules. No filling indicates that all existing metric alarm condition rules will be deleted.
EventConditions.N No Array of ModifyPolicyGroupEventCondition Event alarm conditions. No filling indicates that all existing event alarm conditions will be deleted.
ConditionTempGroupId No Integer Template-based policy group ID.

3. Output Parameters

Parameter Name Type Description
GroupId Integer Policy group ID.
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Updating policy group

Input Example

https://monitor.tencentcloudapi.com/?Action=ModifyPolicyGroup
&Module=monitor
&GroupId=1998785
&ViewName=cvm_device
&GroupName=NewPolicyGroup
&IsUnionRule=0
&Conditions.0.MetricId=33
&Conditions.0.RuleId=5001614
&Conditions.0.CalcType=1
&Conditions.0.CalcValue=50
&Conditions.0.CalcPeriod=300
&Conditions.0.ContinuePeriod=3
&Conditions.0.AlarmNotifyType=0
&Conditions.0.AlarmNotifyPeriod=7200
&<Common request parameters>

Output Example

{
    "Response": {
        "GroupId": 1998785,
        "RequestId": "dfa8ff38-8272-4165-8ec2-357d76c43457"
    }
}

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.DruidQueryFailed Failed to query analysis data.
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.
MissingParameter Missing parameter.
ResourceNotFound The resource is not found.
UnauthorizedOperation Unauthorized operation.
UnknownParameter Unknown parameter.
UnsupportedOperation Unsupported operation.
联系我们

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

技术支持

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

7x24 电话支持