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 contains the testGroup124 and test123 application groups.

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

Parameter Type Required Example Description
Action String Yes DescribeMonitorGroups

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

GroupName String No testGroup124

The name of the application group.

Keyword String No test

The keyword to be matched.

PageSize Integer No 30

The number of entries to return on each page.

Default value: 30.

PageNumber Integer No 1

The number of the page to return.

Pages start from page 1. Default value: 1.

InstanceId String No i-abcdefgh12****

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

SelectContactGroups Boolean No true

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

  • true: to include the alert groups.
  • false: to exclude the alert groups.
IncludeTemplateHistory Boolean No true

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

  • true: to include the historical alert templates.
  • false: to exclude the historical alert templates.
Tag.N.Key String No tagKey1

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

Tag.N.Value String No tagValue1

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

Type String No custom

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.
DynamicTagRuleId String No 6b882d9a-5117-42e2-9d0c-4749a0c6****

The ID of the tag rule.

GroupFounderTagKey String No GroupKey1

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

GroupFounderTagValue String No GroupValue1

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

GroupId String No 92****

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

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

Response parameters

Parameter Type Example Description
RequestId String F02B299A-D374-4595-9F55-7534D604F132

The ID of the request.

Message String The specified resource is not found.

The returned message.

PageNumber Integer 1

The page number of the returned page.

PageSize Integer 30

The number of entries returned per page.

Code Integer 200

The HTTP status code.

Note The value 200 indicates that the call was successful.
Resources Array of Resource

The resources that are associated with the application group.

Resource
BindUrl String https://aliyun.com

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

ContactGroups Array of ContactGroup

The alert groups.

ContactGroup
Name String CloudMonitor

The name of the alert group.

DynamicTagRuleId String 6b882d9a-5117-42e2-9d0c-4749a0c6****

The ID of the tag rule.

GmtCreate Long 1603181891000

The timestamp when the application group was created.

This value is a UNIX timestamp that represents the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

GmtModified Long 1603181891000

The timestamp when the application group was last modified.

This value is a UNIX timestamp that represents the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.

GroupFounderTagKey String GroupKey1

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

GroupFounderTagValue String GroupValue1

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

GroupId Long 12345

The ID of the application group.

GroupName String test123

The name of the application group.

ServiceId String 49****

The ID of the Alibaba Cloud service.

Tags Array of Tag

The tags that are attached to the application group.

Tag
Key String tagKey1

The tag key of the application group.

Value String tagValue1

The tag value of the application group.

TemplateIds List 92****

The alert templates that are applied to the application group.

Type String custom

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.
Success Boolean true

Indicates whether the call was successful. Valid values:

  • true: The call was successful.
  • false: The call failed.
Total Integer 10

The total number of returned entries.

Examples

Sample requests

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

Sample success responses

XML format

<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>12345</GroupId>
            </Resource>
      </Resources>
      <Code>200</Code>
      <Success>true</Success>
</DescribeMonitorGroupsResponse>

JSON format

{
    "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": 12345
            }
        ]
    },
    "Code": 200,
    "Success": true
}

Error codes

HTTP status code Error code Error message Description
404 ResourceNotFound The specified resource is not found. The error message returned because the specified resource is not found.

For a list of error codes, visit the API Error Center.