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
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeMonitorGroups | The operation that you want to perform. Set the value to DescribeMonitorGroups. |
SelectContactGroups | Boolean | No | true | Specifies whether to include the alert contact groups in the response. Valid values:
|
PageNumber | Integer | No | 1 | The page number. Pages start from page 1. Default value: 1. |
PageSize | Integer | No | 30 | The number of entries per page. Pages start from page 1. Default value: 30. |
Keyword | String | No | test | The search keyword. |
InstanceId | String | No | i-abcdefgh12**** | The instance ID. This parameter is used to query the application group to which the specified instance belongs. |
GroupName | String | No | testGroup124 | The name of the application group. |
IncludeTemplateHistory | Boolean | No | true | Specifies whether to include the historical alert templates that are applied to the application group in the response. Valid values:
|
Type | String | No | custom | The type of the application group. Valid values:
|
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 (,). |
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. |
Types | String | No | custom | The type of the application group. Valid values:
|
For more information about common request parameters, see Common parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | F02B299A-D374-4595-9F55-7534D604F132 | The request ID. |
Success | Boolean | true | Indicates whether the request was successful. Valid values:
|
Code | Integer | 200 | The status code. Note The status code 200 indicates that the request was successful. |
Message | String | The specified resource is not found. | The error message. |
PageNumber | Integer | 1 | The page number. |
PageSize | Integer | 30 | The number of entries per page. |
Total | Integer | 10 | The total number of entries returned. |
Resources | Array of Resource | The resources that are associated with the application group. | |
Resource | |||
Type | String | custom | The type of the application group. Valid values:
|
GroupFounderTagValue | String | GroupValue1 | The tag value that is created for the application group by using the tag rule. |
BindUrl | String | https://aliyun.com | The URL of the ACK cluster from which the application group is synchronized. |
GroupName | String | test123 | The name of the application group. |
GroupId | Long | 12345 | The ID of the application group. |
ServiceId | String | 49**** | The ID of the Alibaba Cloud service. |
DynamicTagRuleId | String | 6b882d9a-5117-42e2-9d0c-4749a0c6**** | The ID of the tag rule. |
GmtCreate | Long | 1603181891000 | The timestamp when the application group was created. Unit: milliseconds. |
GroupFounderTagKey | String | GroupKey1 | The tag key that is created for the application group by using the tag rule. |
GmtModified | Long | 1603181891000 | The timestamp when the application group was modified. Unit: milliseconds. |
ContactGroups | Array of ContactGroup | The alert contact groups. | |
ContactGroup | |||
Name | String | CloudMonitor | The name of the alert contact group. |
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 | Array of String | 92**** | The alert templates that are applied to the application group. |
ResourceGroupId | String | rg-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 code | Error code | Error message | Description |
---|---|---|---|
404 | ResourceNotFound | The specified resource is not found. | The specified resource is not found. |
For a list of error codes, see Service error codes.