Queries application groups.

This topic provides an example of how to query the application groups of the current account. The response indicates that the current account has two application groups named testGroup124 and test123.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

ParameterTypeRequiredExampleDescription
ActionStringYesDescribeMonitorGroups

The operation that you want to perform. Set the value to DescribeMonitorGroups.

SelectContactGroupsBooleanNotrue

Specifies whether to include the alert contact groups in the response. Valid values:

  • true: The alert contact groups are included.
  • false: The alert contact groups are excluded.
PageNumberIntegerNo1

The page number.

Pages start from page 1. Default value: 1.

PageSizeIntegerNo30

The number of entries per page.

Pages start from page 1. Default value: 30.

KeywordStringNotest

The search keyword.

InstanceIdStringNoi-abcdefgh12****

The instance ID. This parameter is used to query the application group to which the specified instance belongs.

GroupNameStringNotestGroup124

The name of the application group.

IncludeTemplateHistoryBooleanNotrue

Specifies whether to include the historical alert templates that are applied to the application group in the response. Valid values:

  • true: The historical alert templates are included.
  • false: The historical alert templates are excluded.
TypeStringNocustom

The type of the application group. Valid values:

  • custom: a self-managed application group.
  • ehpc_cluster: an application group that is synchronized from an Elastic High Performance Computing (E-HPC) cluster.
  • kubernetes: an application group that is synchronized from a Container Service for Kubernetes (ACK) cluster.
DynamicTagRuleIdStringNo6b882d9a-5117-42e2-9d0c-4749a0c6****

The ID of the tag rule.

GroupFounderTagKeyStringNoGroupKey1

The tag key that is created for the application group by using the tag rule.

GroupFounderTagValueStringNoGroupValue1

The tag value that is created for the application group by using the tag rule.

GroupIdStringNo92****

The IDs of the application groups. Separate multiple IDs with commas (,).

Tag.N.KeyStringNotagKey1

The tag key of the application group. Valid values of N: 1 to 5.

Tag.N.ValueStringNotagValue1

The tag value of the application group. Valid values of N: 1 to 5.

TypesStringNocustom

The type of the application group. Valid values:

  • custom: a self-managed application group.
  • ehpc_cluster: an application group that is synchronized from an E-HPC cluster.
  • kubernetes: an application group that is synchronized from an ACK cluster.
  • tag: the application group that is automatically created by using tags.
  • resMgr: the application group that is created by using resource groups.
  • ess: the application group that is synchronized from Auto Scaling (ESS).

For more information about common request parameters, see Common parameters.

Response parameters

ParameterTypeExampleDescription
RequestIdStringF02B299A-D374-4595-9F55-7534D604F132

The request ID.

SuccessBooleantrue

Indicates whether the request was successful. Valid values:

  • true
  • false
CodeInteger200

The status code.

Note The status code 200 indicates that the request was successful.
MessageStringThe specified resource is not found.

The error message.

PageNumberInteger1

The page number.

PageSizeInteger30

The number of entries per page.

TotalInteger10

The total number of entries returned.

ResourcesArray of Resource

The resources that are associated with the application group.

Resource
TypeStringcustom

The type of the application group. Valid values:

  • custom: a self-managed application group.
  • ehpc_cluster: an application group that is synchronized from an E-HPC cluster.
  • kubernetes: an application group that is synchronized from an ACK cluster.
GroupFounderTagValueStringGroupValue1

The tag value that is created for the application group by using the tag rule.

BindUrlStringhttps://aliyun.com

The URL of the ACK cluster from which the application group is synchronized.

GroupNameStringtest123

The name of the application group.

GroupIdLong12345

The ID of the application group.

ServiceIdString49****

The ID of the Alibaba Cloud service.

DynamicTagRuleIdString6b882d9a-5117-42e2-9d0c-4749a0c6****

The ID of the tag rule.

GmtCreateLong1603181891000

The timestamp when the application group was created. Unit: milliseconds.

GroupFounderTagKeyStringGroupKey1

The tag key that is created for the application group by using the tag rule.

GmtModifiedLong1603181891000

The timestamp when the application group was modified. Unit: milliseconds.

ContactGroupsArray of ContactGroup

The alert contact groups.

ContactGroup
NameStringCloudMonitor

The name of the alert contact group.

TagsArray of Tag

The tags that are attached to the application group.

Tag
KeyStringtagKey1

The tag key of the application group.

ValueStringtagValue1

The tag value of the application group.

TemplateIdsArray of String92****

The alert templates that are applied to the application group.

ResourceGroupIdStringrg-aek2hopjh*******

The resource ID.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeMonitorGroups
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeMonitorGroupsResponse>
    <RequestId>F02B299A-D374-4595-9F55-7534D604F132</RequestId>
    <PageSize>30</PageSize>
    <PageNumber>1</PageNumber>
    <Total>2</Total>
    <Resources>
        <Resource>
            <GroupName>testGroup124</GroupName>
            <ContactGroups>
                <ContactGroup>
                    <Name>CloudMonitor</Name>
                </ContactGroup>
            </ContactGroups>
            <Type>custom</Type>
            <GmtCreate>1603181891000</GmtCreate>
            <GmtModified>1603181891000</GmtModified>
            <GroupFounderTagKey>1204</GroupFounderTagKey>
            <GroupFounderTagValue>001</GroupFounderTagValue>
            <TemplateIds>
                <TemplateId>92****</TemplateId>
            </TemplateIds>
            <Tags>
                <Tag>
                    <Value>tagKey1</Value>
                    <Key>tagValue1</Key>
                </Tag>
            </Tags>
            <GroupId>7301****</GroupId>
        </Resource>
        <Resource>
            <GroupName>test123</GroupName>
            <ContactGroups>
                <ContactGroup>
                    <Name>CloudMonitor</Name>
                </ContactGroup>
            </ContactGroups>
            <Type>tag</Type>
            <GmtCreate>1603181891000</GmtCreate>
            <DynamicTagRuleId>6b882d9a-5117-42e2-9d0c-4749a0c6****</DynamicTagRuleId>
            <GmtModified>1603181891000</GmtModified>
            <GroupFounderTagKey>GroupKey1</GroupFounderTagKey>
            <GroupFounderTagValue>GroupValue1</GroupFounderTagValue>
            <TemplateIds>
            </TemplateIds>
            <Tags>
            </Tags>
            <GroupId>92****</GroupId>
        </Resource>
    </Resources>
    <Code>200</Code>
    <Success>true</Success>
</DescribeMonitorGroupsResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "F02B299A-D374-4595-9F55-7534D604F132",
  "PageSize" : 30,
  "PageNumber" : 1,
  "Total" : 2,
  "Resources" : {
    "Resource" : [ {
      "GroupName" : "testGroup124",
      "ContactGroups" : {
        "ContactGroup" : [ {
          "Name" : "CloudMonitor"
        } ]
      },
      "Type" : "custom",
      "GmtCreate" : 1603181891000,
      "GmtModified" : 1603181891000,
      "GroupFounderTagKey" : "1204",
      "GroupFounderTagValue" : "001",
      "TemplateIds" : {
        "TemplateId" : [ "92****" ]
      },
      "Tags" : {
        "Tag" : [ {
          "Value" : "tagKey1",
          "Key" : "tagValue1"
        } ]
      },
      "GroupId" : "7301****"
    }, {
      "GroupName" : "test123",
      "ContactGroups" : {
        "ContactGroup" : [ {
          "Name" : "CloudMonitor"
        } ]
      },
      "Type" : "tag",
      "GmtCreate" : 1603181891000,
      "DynamicTagRuleId" : "6b882d9a-5117-42e2-9d0c-4749a0c6****",
      "GmtModified" : 1603181891000,
      "GroupFounderTagKey" : "GroupKey1",
      "GroupFounderTagValue" : "GroupValue1",
      "TemplateIds" : {
        "TemplateId" : [ ]
      },
      "Tags" : {
        "Tag" : [ ]
      },
      "GroupId" : "92****"
    } ]
  },
  "Code" : 200,
  "Success" : true
}

Error codes

HTTP status codeError codeError messageDescription
404ResourceNotFoundThe specified resource is not found.The specified resource is not found.

For a list of error codes, see Service error codes.