Consulta as tags vinculadas a vários recursos em nuvem em vários serviços de nuvem.
Descrição da operação
Para serviços de nuvem que suportam tags, consulte Serviços de nuvem que suportam tags.
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
tag:ListTagResources |
get |
*All Resource
|
Nenhuma | Nenhuma |
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| RegionId |
string |
Sim |
O ID da região. Valores válidos:
|
cn-hangzhou |
| RegionId |
string |
Sim |
O token para a próxima consulta. |
cn-hangzhou |
| NextToken |
string |
Não |
O número de entradas por página. Valor máximo: 1000. Valor padrão: 50. |
caeba0bbb2be03f84eb48b699f0a**** |
| PageSize |
integer |
Não |
As chaves de tag e os valores de tag. Você pode especificar de 1 a 10 pares chave-valor. Se você especificar várias tags, o sistema consultará recursos que estão vinculados a todas as tags especificadas. Limites:
|
50 |
| Tags |
string |
Não |
O tipo de tag. Valores válidos:
Valor padrão: All. |
{"k1":"v1","k2":"v2"} |
| Category |
string |
Não |
O Alibaba Cloud Resource Name (ARN) do recurso. Valores válidos de N: 1 a 50. Formato do ARN do recurso:
Nota
ResourceARN suporta os valores |
Custom |
| ResourceARN |
array |
Não |
O Alibaba Cloud Resource Name (ARN) de um recurso. Valores válidos de N: 1 a 50. Formato do ARN: arn:acs:${ProductCode}:${Region}:${Account}:${ResourceType}/${ResourceId} Campos:
Nota
Você pode definir ProductCode e ResourceType em ResourceARN com valores definidos no Resource Group, ActionTrail ou Resource Center. |
arn:acs:ecs:cn-hangzhou:123456789****:instance/i-bp15hr53jws84akg**** |
|
string |
Não |
O ARN do recurso. |
arn:acs:ecs:cn-hangzhou:123456789****:instance/i-bp15hr53jws84akg**** |
Para obter mais informações sobre parâmetros de solicitação comuns, consulte Parâmetros comuns.
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
Os parâmetros de resposta. |
||
| NextToken |
string |
Indica se existe um próximo token. Valores válidos:
|
caeba0bbb2be03f84eb48b699f0a**** |
| RequestId |
string |
O ID da solicitação. |
014738E0-3C7F-47D8-8FB9-469500C6F387 |
| TagResources |
array<object> |
As tags vinculadas aos recursos. |
|
|
array<object> |
As tags vinculadas aos recursos. |
||
| ResourceARN |
string |
O ARN do recurso. |
arn:acs:ecs:cn-hangzhou:123456789****:instance/i-bp15hr53jws84akg**** |
| Tags |
array<object> |
As informações da tag. |
|
|
object |
As informações da tag. |
||
| Key |
string |
A chave da tag. |
k1 |
| Value |
string |
O valor da tag. |
v1 |
| Category |
string |
O tipo da tag. Valores válidos:
|
Custom |
Exemplos
Resposta de sucesso
JSON formato
{
"NextToken": "caeba0bbb2be03f84eb48b699f0a****",
"RequestId": "014738E0-3C7F-47D8-8FB9-469500C6F387",
"TagResources": [
{
"ResourceARN": "arn:acs:ecs:cn-hangzhou:123456789****:instance/i-bp15hr53jws84akg****",
"Tags": [
{
"Key": "k1",
"Value": "v1",
"Category": "Custom"
}
]
}
]
}
Códigos de erro
|
Código de status HTTP |
Código de erro |
Mensagem de erro |
Descrição |
|---|---|---|---|
| 400 | InvalidResourceARN.Account | The Account specified in the ResourceARN parameter does not match the actual account, specifically: %s. | |
| 400 | InvalidResourceARN.FormatError | The format of parameter ResourceARN: %s is not valid, for the correct format, you can refer to the Recommend. | |
| 400 | InvalidResourceARN.Region | The Region specified in the ResourceARN parameter does not match the RegionId parameter, specifically: %s. | |
| 400 | InvalidParameter.TagKey | The TagKey parameter is invalid. The following TagKeys are invalid: %s. | |
| 400 | InvalidParameter.Tags | The Tags parameter cannot be empty, and JSON parsing should adhere to the format of a Map. | |
| 400 | InvalidParameter.RegionId | %s. | |
| 400 | Throttling | You have exceeded the maximum traffic. To increase the limit, submit a ticket. | |
| 403 | Duplicate.TagKey | The Tag.N.Key contains duplicate keys. | |
| 403 | InvalidParameter.Category | The specified Category is invalid. Valid values are Custom and System. | |
| 403 | MissingParameter.ResourceIds | You must specify ResourceIds. | |
| 403 | NoPermission.Operator | The user is not authorized to operate on the specified resource. | |
| 403 | NoPermission.SystemTag | The user does not have permission to operate the system tag. | |
| 403 | NoPermissionKey.Category | Some keys cannot be modified because the user does not have permission. | |
| 403 | NoPermissionKey.Operator | You are not authorized to operate the tag key. | |
| 403 | NumberExceed.ResourceIds | The maximum number of ResourceIds is exceeded. | |
| 403 | NumberExceed.Tags | The maximum number of Tags is exceeded. | |
| 403 | QuotaExceed.TagsPerResource | The maximum number of tags for each resource is exceeded. | |
| 403 | Invalid.NextToken | The parameter NextToken is invalid. | |
| 403 | InvalidParameter.TagValue | The Tag.N.Value parameter is invalid. | |
| 403 | InvalidParameter.ResourceType | The ResourceType parameter is invalid. | |
| 404 | Missing.TagKey | Tag.N.Value has been specified and you must specify Tag.N.Key. | |
| 404 | MissingParameter.AliUid | You must specify AliUid. | |
| 404 | MissingParameter.Bid | You must specify Bid. | |
| 404 | MissingParameter.RegionId | You must specify RegionId. | |
| 404 | MissingParameter.RemoveNum | You must specify RemoveNum. | |
| 404 | MissingParameter.ResourceIdARN | You must specify ResourceIdARN. | |
| 404 | MissingParameter.TagKey | You must specify TagKey. | |
| 404 | MissingParameter.Tags | You must specify Tags. | |
| 404 | NoMatch.RemoveNum | The specified DataNum does not match the deleted number. |
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.