文档

DescribeMonitorGroups - 查询应用分组列表

更新时间:

调用DescribeMonitorGroups接口查询应用分组列表。

接口说明

本文将提供一个示例,查询当前账号的应用分组列表。返回结果显示当前账号存在两个应用分组testGroup124test123

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用背景高亮的方式表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
cms:DescribeMonitorGroupsRead
  • 全部资源
    *

请求参数

名称类型必填描述示例值
SelectContactGroupsboolean

返回结果中是否需要包含报警联系组。取值:

  • true:是。
  • false:否。
true
PageNumberinteger

页码。

起始值:1。默认值:1。

1
PageSizeinteger

分页时每页显示的数据行数。

起始值:1。默认值:30。

30
Keywordstring

搜索关键字。

test
InstanceIdstring

资源实例 ID。该参数用于查询指定实例所在的应用分组。

i-abcdefgh12****
GroupNamestring

应用分组名称。

testGroup124
IncludeTemplateHistoryboolean

返回结果是否包含已应用到应用分组的报警模板历史。取值:

  • true:是。
  • false:否。
true
Typestring

应用分组类型。取值:

  • custom:自建的应用分组。
  • ehpc_cluster:从 EHPC 集群同步的应用分组。
  • kubernetes:从容器服务 Kubernetes 版同步的应用分组。
custom
DynamicTagRuleIdstring

智能标签规则 ID。

6b882d9a-5117-42e2-9d0c-4749a0c6****
GroupFounderTagKeystring

通过智能标签创建应用分组的标签键。

GroupKey1
GroupFounderTagValuestring

通过智能标签创建应用分组的标签值。

GroupValue1
GroupIdstring

应用分组 ID。多个应用分组 ID 之间用半角逗号(,)分隔。

92****
Tagobject []

应用分组的标签。

Keystring

应用分组的标签键。N 的取值范围:1~5。

tagKey1
Valuestring

应用分组的标签值。N 的取值范围:1~5。

tagValue1
Typesstring

应用分组类型。取值:

  • custom:自建的应用分组。
  • ehpc_cluster:从 EHPC 集群同步的应用分组。
  • kubernetes:从容器服务 Kubernetes 版同步的应用分组。
  • tag:通过标签自动创建的应用分组。
  • resMgr:通过资源组创建的应用分组。
  • ess:从弹性伸缩 ESS 同步的应用分组。
custom

关于公共请求参数的详情,请参见公共参数

返回参数

名称类型描述示例值
object

返回结果。

RequestIdstring

请求 ID。

F02B299A-D374-4595-9F55-7534D604F132
Successboolean

操作是否成功。取值:

  • true:成功。

  • false:失败。

true
Codeinteger

状态码。

说明 200 表示成功。
200
Messagestring

错误信息。

The specified resource is not found.
PageNumberinteger

页码。

1
PageSizeinteger

分页时每页显示的数据行数。

30
Totalinteger

总记录条数。

10
Resourcesobject []

关联资源。

Typestring

应用分组类型。取值:

  • custom:自建的应用分组。
  • ehpc_cluster:从 EHPC 集群同步的应用分组。
  • kubernetes:从容器服务 Kubernetes 版同步的应用分组。
custom
GroupFounderTagValuestring

通过智能标签创建应用分组的标签值。

GroupValue1
BindUrlstring

从容器服务 Kubernetes 版同步过来的 URL 地址。

https://aliyun.com
GroupNamestring

应用分组名称。

test123
GroupIdlong

应用分组 ID。

12345
ServiceIdstring

阿里云服务 ID。

49****
DynamicTagRuleIdstring

智能标签规则 ID。

6b882d9a-5117-42e2-9d0c-4749a0c6****
GmtCreatelong

创建应用分组的时间戳。单位:毫秒。

1603181891000
GroupFounderTagKeystring

通过智能标签创建应用分组的标签键。

GroupKey1
GmtModifiedlong

修改应用分组的时间戳。单位:毫秒。

1603181891000
ContactGroupsobject []

报警联系组。

Namestring

报警联系组名称。

CloudMonitor
Tagsobject []

应用分组绑定的标签列表。

Keystring

应用分组的标签键。

tagKey1
Valuestring

应用分组的标签值。

tagValue1
TemplateIdsarray

模板 ID。

string

应用分组应用过的报警模板。

92****
ResourceGroupIdstring

资源 ID。

rg-aek2hopjh*******

示例

正常返回示例

JSON格式

{
  "RequestId": "F02B299A-D374-4595-9F55-7534D604F132",
  "Success": true,
  "Code": 200,
  "Message": "The specified resource is not found.",
  "PageNumber": 1,
  "PageSize": 30,
  "Total": 10,
  "Resources": {
    "Resource": [
      {
        "Type": "custom",
        "GroupFounderTagValue": "GroupValue1",
        "BindUrl": "https://aliyun.com",
        "GroupName": "test123",
        "GroupId": 12345,
        "ServiceId": "49****",
        "DynamicTagRuleId": "6b882d9a-5117-42e2-9d0c-4749a0c6****",
        "GmtCreate": 1603181891000,
        "GroupFounderTagKey": "GroupKey1",
        "GmtModified": 1603181891000,
        "ContactGroups": {
          "ContactGroup": [
            {
              "Name": "CloudMonitor"
            }
          ]
        },
        "Tags": {
          "Tag": [
            {
              "Key": "tagKey1",
              "Value": "tagValue1"
            }
          ]
        },
        "TemplateIds": {
          "TemplateId": [
            "92****"
          ]
        },
        "ResourceGroupId": "rg-aek2hopjh*******"
      }
    ]
  }
}

错误码

HTTP status code错误码错误信息描述
206%s%s-
400ParameterInvalid%s-
401AccessDeniedExceptionYou donot have sufficient access to perform this action.-
402LimitExceededThe quota for this customer had been reached.-
403AccessForbiddenThe X.509 certificate or cms access key ID provided does not exist in our records.-
404ResourceNotFoundThe specified resource is not found.未找到指定资源。
429Throttli∂ngExceptionThe request was denied due to request throttling.-
500InternalErrorThe request processing has failed due to some unknown error.-

访问错误中心查看更多错误码。

  • 本页导读 (1)
文档反馈