You can call this operation to query a resource group.

Debugging

Alibaba Cloud provides OpenAPI Explorer to simplify API usage. You can use OpenAPI Explorer to search for API operations, call API operations, and dynamically generate SDK sample code.

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 demo

The name of the resource group that you want to query.

Note You can search for a resource group by specifying the group name.
Keyword String No test

The name of the resource group that you want to query.

Note You can search for a resource group by specifying the group name or keyword.
PageSize Integer No 10

The number of entries to return on each page. Default value: 10.

PageNumber Integer No 1

The number of the page to return. Default value: 1.

InstanceId String No xxx-1

The ID of the instance that belongs to the specified resource group. You can search for the resource group to which the specified instance belongs.

SelectContactGroups Boolean No true

Specifies whether to include the associated contact groups in the returned results.

IncludeTemplateHistory Boolean No true

Specifies whether to include the history of the resource alert template in the returned results.

Tag.N.Key String No testKey1

The key of the tag of the specified resource group.

Nmust be set to 1, 2, 3, 4, or 5.

Tag.N.Value String No testValue1

The value of the tag of the specified resource group.

N must be set to 1, 2, 3, 4, or 5.

Type String No custom

The type of the specified resource group.

  • custom: a custom resource group
  • ehpc_cluster: a resource group synchronized from an Elastic High Performance Computing (E-HPC) cluster
  • kubernetes: a resource group synchronized from a Kubernetes cluster

Response parameters

Parameter Type Example Description
RequestId String 31BC7201-00F2-47B2-B7B9-6A173076ACE8

The ID of the request.

Message String success

The error message.

Note If the status code 200 is returned, no error occurs.
PageNumber Integer 1

The page number of the returned page.

PageSize Integer 10

The number of entries returned per page.

Code Integer 200

The HTTP status code.

Resources Array

The resources associated with the resource group.

Resource

The resources associated with the resource group.

BindUrl String http://xxx

The URL of the Kubernetes cluster from which the resource group is synchronized.

ContactGroups Array

The contact groups returned.

ContactGroup

The contact group returned.

Name String Default contact group

The name of the contact group returned.

GmtCreate Long 1489043796000

The time when the resource group was created.

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

GmtModified Long 1525183537000

The time when the resource group was modified.

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

GroupId Long 12345

The ID of the resource group that was queried.

GroupName String demo

The name of the resource group that was queried.

ServiceId String 49922

The ID of the service.

Tags Array

The list of tags attached to the resource group.

Tag

The tag attached to the resource group.

Key String tagKey1

The key of the tag.

Value String tagValue1

The value of the tag.

TemplateIds List 123

The alert template applied to the resource group.

Note If the IncludeTemplateHistory parameter is set to true, the returned results contain this parameter.
TemplateId

The alert template applied to the resource group.

Note If the IncludeTemplateHistory parameter is set to true, the returned results contain this parameter.
Type String custom

The type of the resource group that was queried.

  • custom: a custom resource group.
  • ehpc_cluster: a resource group synchronized from an E-HPC cluster
  • kubernetes: a resource group synchronized from a Kubernetes cluster
Success Boolean true

Indicates whether the call is successful. A value of true indicates that the call is successful. A value of false indicates that the call has failed.

Total Integer 10

The total number of entries returned.

Examples

Sample requests


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

Sample success responses

XML format

<PageNumber>1</PageNumber>
<PageSize>10</PageSize>
<RequestId>31BC7201-00F2-47B2-B7B9-6A173076ACE8</RequestId>
<Success>true</Success>
<Code>200</Code>
<Total>1</Total>
<Resources>
    <Resource>
        <GroupName>demo</GroupName>
        <Type>custom</Type>
        <ContactGroups>
            <ContactGroup>
                <Name>Default contact group</Name>
            </ContactGroup>
        </ContactGroups>
        <ServiceId>49922</ServiceId>
        <GmtCreate>1489043796000</GmtCreate>
        <GmtModified>1525183537000</GmtModified>
        <GroupId>12345</GroupId>
        <Tags>
            <Tag>
                <Value>tagValue1</Value>
                <Key>tagKey1</Key>
            </Tag>
        </Tags>
        <TemplateIds>
        </TemplateIds>
    </Resource>
</Resources>

JSON format

{
	"PageNumber":1,
	"PageSize":10,
	"RequestId":"31BC7201-00F2-47B2-B7B9-6A173076ACE8",
	"Success":true,
	"Code":200,
	"Total":1,
	"Resources":{
		"Resource":[
			{
				"TemplateIds":{
					"TemplateId":[]
				},
				"Tags":{
					"Tag":[
						{
							"Value":"tagValue1",
							"Key":"tagKey1"
						}
					]
				},
				"GroupName":"demo",
				"Type":"custom",
				"ServiceId":49922,
				"ContactGroups":{
					"ContactGroup":[
						{
							"Name":"Default contact group"
						}
					]
				},
				"GmtCreate":1489043796000,
				"GroupId":12345,
				"GmtModified":1525183537000
			}
		]
	}
}

Error codes

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