You need to enable JavaScript to run this app.
导航

查询告警策略详情

最近更新时间2024.05.09 10:29:47

首次发布时间2024.05.09 10:16:53

调用本接口查询指定告警策略的详情。

使用说明

每个请求中必须包含鉴权信息。该鉴权信息用以验证请求者的身份。参见签名机制

使用限制

节流限制:您每秒最多可以提交 30 个 API 请求。

请求说明

  • 请求方式:POST
  • 请求地址:https://open.volcengineapi.com/?Action=DescribeAlertStrategy&Version=2022-03-01

请求参数

Query

参数名称
数据类型
是否必选
参数说明
Action
String
接口名称。当前 API 的名称为 DescribeAlertStrategy
Version
String
接口版本。当前 API 的版本为 2022-03-01

Body

参数名称
数据类型
是否必选
参数说明
示例
Id
String

要查询的告警策略 ID。

说明

您可以调用 ListAlertStrategies 接口获取所有告警策略的 ID。

296323438476230656

返回参数

参数名称
数据类型
参数说明
示例
AlertStrategy
Object
告警策略详情。

请求示例

POST https://open.volcengineapi.com/?Action=DescribeAlertStrategy&Version=2022-03-01
{
    "Id": "296323438476230656"
}

返回示例

{
    "ResponseMetadata": {
        "RequestID": "2024050815055145BE537ACA75DF400887",
        "Action": "DescribeAlertStrategy",
        "Version": "2022-03-01",
        "Service": "mcdn",
        "Region": "cn-north-1"
    },
    "Result": {
        "AlertStrategy": {
            "Id": "296323438476230656",
            "Name": "证书有效期监控",
            "ResourceTypes": [
                "CDN"
            ],
            "ResourceScope": "All",
            "TriggerType": "Threshold",
            "AlertRule": {
                "Level": "warning",
                "Logic": "Any",
                "Conditions": [
                    {
                        "MetricId": "234264782419615744",
                        "Period": 1,
                        "ThresholdType": "Static",
                        "Operator": "<",
                        "Value": 90,
                        "Format": "Day"
                    }
                ],
                "Frequency": 1440,
                "EnableStartTime": "00:00",
                "EnableEndTime": "23:59"
            },
            "SubscribeRule": null,
            "Status": "Disabled"
        }
    }
}

错误码

如果响应正文的 ResponseMetadata 字段中包含 Error 字段,则表示 API 请求失败。关于更多错误码的信息,参见错误码