You need to enable JavaScript to run this app.
文档中心
复制全文
下载 pdf
配额告警
CreateAlarmRule - 创建告警策略
复制全文
下载 pdf
CreateAlarmRule - 创建告警策略

创建告警策略

调试

请求参数

下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。

参数
类型
是否必填
示例值
描述
Action
String
是

CreateAlarmRule

要执行的操作,取值:CreateAlarmRule。

Version
String
是

2022-07-01

API的版本,取值:2022-07-01。

ProviderCode
String
是

iam

服务方code

QuotaCode
String
是

policy

配额code

Description
String
否

配额描述

配额描述

Dimensions
Array of Object
是

[{"Name":"region_code","Value":""}]

配额维度

RuleName
String
是

rule1

告警策略名

AlarmType
String
是

usage

告警类型

Threshold
String
是

100

告警阈值

MetricUnit
String
是

Count

阈值类型

SilenceTime
Integer
否

60

静默时间

返回参数

下表仅列出本接口特有的返回参数。更多信息请参见返回结构。

参数
类型
示例值
描述
RuleID
String

1913591797129412608

规则ID

请求示例

GET /?Action=CreateAlarmRule&Version=2022-07-01&ProviderCode=iam&QuotaCode=policy&RuleName=rule1&AlarmType=usage&Threshold=100&MetricUnit=Count HTTP/1.1
Host: quota.volcengineapi.com
X-Date: 20251225T130716Z
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20251225/cn-beijing/quota/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f


返回示例

{
    "ResponseMetadata": {
        "RequestId": "20221222112731819ED9E34DA83CBE7676"
    },
    "Result": {
        "RuleID": "1605766959574548480"
    }
}

错误码

下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。

状态码
错误码
错误信息
说明
400
RoleNotExist

the role is not exist. role:%v

该角色不存在

400
InvalidParameter

The parameter %v[%v] is invalid.

无效参数

400
InvalidRuleName

The rule name '%s' is invalid

配额告警规则名称不合法

400
AlarmRuleNameDuplicate

The rule name of alarm is duplicate. ProviderCode: '%s', QuotaCode: '%s', RuleName: '%s'

配额告警规则名称重复

400
QuotaAlarmNotSupport

The quota alarm is not support because this quota's usage is not reported. ProviderCode: '%s', QuotaCode: '%s'

此配额项不支持创建配额告警

400
QuotaAlarmLimitExceeded

The number of alarm exceed limit. ProviderCode: '%s', QuotaCode: '%s'

配额告警数超出限制

500
ServiceFailure

The request processing has failed because of an unknown error.

服务错误

最近更新时间:2025.12.29 11:25:49
这个页面对您有帮助吗?
有用
有用
无用
无用