Você pode chamar a operação DescribeMonitorGroups para consultar uma lista de grupos de aplicativos.
Descrição da operação
Este tópico fornece um exemplo de como consultar uma lista de grupos de aplicativos. A resposta mostra que dois grupos de aplicativos são retornados: testGroup124 e test123.
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
cms:DescribeMonitorGroups |
get |
*All Resource
|
Nenhuma | Nenhuma |
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| SelectContactGroups |
boolean |
Não |
Especifica se os grupos de contatos de alerta devem ser incluídos na resposta. Valores válidos:
|
true |
| PageNumber |
integer |
Não |
O número da página. As páginas começam na página 1. Valor padrão: 1. |
1 |
| PageSize |
integer |
Não |
O número de entradas a serem retornadas em cada página. As páginas começam na página 1. Valor padrão: 30. |
30 |
| Keyword |
string |
Não |
A palavra-chave para a pesquisa. |
test |
| InstanceId |
string |
Não |
O ID da instância. Este parâmetro é usado para consultar o grupo de aplicativos ao qual a instância especificada pertence. |
i-abcdefgh12**** |
| GroupName |
string |
Não |
O nome do grupo de aplicativos. |
testGroup124 |
| IncludeTemplateHistory |
boolean |
Não |
Especifica se o histórico de modelos de alerta aplicados ao grupo de aplicativos deve ser incluído na resposta. Valores válidos:
|
true |
| Type |
string |
Não |
O tipo do grupo de aplicativos. Valores válidos:
|
custom |
| DynamicTagRuleId |
string |
Não |
O ID da regra de tag dinâmica. |
6b882d9a-5117-42e2-9d0c-4749a0c6**** |
| GroupFounderTagKey |
string |
Não |
A chave da tag do grupo de aplicativos criado usando uma regra de tag dinâmica. |
GroupKey1 |
| GroupFounderTagValue |
string |
Não |
O valor da tag do grupo de aplicativos criado usando uma regra de tag dinâmica. |
GroupValue1 |
| GroupId |
string |
Não |
Os IDs dos grupos de aplicativos. Separe vários IDs com vírgulas (,). |
92**** |
| Tag |
array<object> |
Não |
As tags do grupo de aplicativos. |
|
|
object |
Não |
As tags do grupo de aplicativos. |
||
| Key |
string |
Não |
A chave da tag N. Valores válidos de N: 1 a 5. |
tagKey1 |
| Value |
string |
Não |
O valor da tag N. Valores válidos de N: 1 a 5. |
tagValue1 |
| Types |
string |
Não |
O tipo do grupo de aplicativos. Valores válidos:
|
custom |
Para obter mais informações sobre parâmetros comuns, consulte Parâmetros comuns.
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
Os dados da resposta. |
||
| RequestId |
string |
O ID da solicitação. |
F02B299A-D374-4595-9F55-7534D604F132 |
| Success |
boolean |
Indica se a operação foi bem-sucedida. Valores válidos:
|
true |
| Code |
integer |
O código de status. Nota
Um valor 200 indica que a operação foi bem-sucedida. |
200 |
| Message |
string |
A mensagem de erro. |
The specified resource is not found. |
| PageNumber |
integer |
O número da página. |
1 |
| PageSize |
integer |
O número de entradas retornadas por página. |
30 |
| Total |
integer |
O número total de entradas. |
10 |
| Resources |
object |
||
| Resource |
array<object> |
Os recursos associados ao grupo de monitoramento. |
|
|
array<object> |
Os detalhes da instância vinculada. |
||
| Type |
string |
The type of the application group. Valid values:
|
custom |
| GroupFounderTagValue |
string |
The tag value of the application group that is created using a dynamic tag rule. |
GroupValue1 |
| BindUrl |
string |
The URL that is synchronized from the ACK cluster. |
https://aliyun.com |
| GroupName |
string |
The name of the application group. |
test123 |
| GroupId |
integer |
The ID of the application group. |
12345 |
| ServiceId |
string |
The ID of the Alibaba Cloud service. |
49**** |
| DynamicTagRuleId |
string |
The ID of the dynamic tag rule. |
6b882d9a-5117-42e2-9d0c-4749a0c6**** |
| GmtCreate |
integer |
The timestamp when the application group was created. Unit: milliseconds. |
1603181891000 |
| GroupFounderTagKey |
string |
The tag key of the application group that is created using a dynamic tag rule. |
GroupKey1 |
| GmtModified |
integer |
The timestamp when the application group was modified. Unit: milliseconds. |
1603181891000 |
| ContactGroups |
object |
||
| ContactGroup |
array<object> |
The alert contact groups. |
|
|
object |
An alert contact group. |
||
| Name |
string |
The name of the alert contact group. |
CloudMonitor |
| Tags |
object |
||
| Tag |
array<object> |
The tags that are attached to the application group. |
|
|
object |
A tag that is attached to the application group. |
||
| Key |
string |
The tag key of the application group. |
tagKey1 |
| Value |
string |
The tag value of the application group. |
tagValue1 |
| TemplateIds |
object |
||
| TemplateId |
array |
The IDs of the alert templates. |
|
|
string |
The alert template applied to the application group. |
92**** |
|
| ResourceGroupId |
string |
The ID of the resource group. |
rg-aek2hopjh******* |
| TemplateInfos |
object |
||
| TemplateInfo |
array<object> |
The information about the alert templates. |
|
|
object |
The information about an alert template. |
||
| EffectTime |
integer |
The effective period. |
1603181891000 |
| TemplateId |
string |
The ID of the alert template. |
123*** |
| Ver |
string |
The version of the alert template. |
0 |
Exemplos
Resposta de sucesso
JSON formato
{
"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*******",
"TemplateInfos": {
"TemplateInfo": [
{
"EffectTime": 1603181891000,
"TemplateId": "123***",
"Ver": "0"
}
]
}
}
]
}
}
Códigos de erro
|
Código de status HTTP |
Código de erro |
Mensagem de erro |
Descrição |
|---|---|---|---|
| 400 | ParameterInvalid | %s | |
| 401 | AccessDeniedException | You donot have sufficient access to perform this action. | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 402 | LimitExceeded | The quota for this customer had been reached. | |
| 403 | AccessForbidden | The X.509 certificate or cms access key ID provided does not exist in our records. | |
| 206 | %s | %s | |
| 404 | ResourceNotFound | The specified resource is not found. | The specified resource is not found. |
| 503 | %s | %s | |
| 406 | %s | %s | |
| 429 | Throttli∂ngException | The request was denied due to request throttling. | |
| 409 | %s | %s |
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.