Queries tag rules.
Operation Description
This topic provides an example to show how to query tag rules that are related to tagkey1
. The sample responses indicate that two tag rules are found. The rule IDs are 1536df65-a719-429d-8813-73cc40d7****
and 56e8cebb-b3d7-4a91-9880-78a8c84f****
.
debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
TagRegionId | string | No | The ID of the region to which the tags belong. | cn-hangzhou |
TagKey | string | No | The tag key. For more information about how to obtain a tag key, see DescribeTagKeyList. | tagkey1 |
TagValue | string | No | The tag value. For more information about how to obtain a tag value, see DescribeTagKeyList. | * |
PageNumber | string | No | The number of the page to return. Pages start from page 1. Default value: 1. | 1 |
PageSize | string | No | The number of entries to return on each page. Minimum value: 1. Default value: 30. | 30 |
DynamicTagRuleId | string | No | The ID of the tag rule. | 004155fa-15ba-466d-b61a-*********** |
For more information about common request parameters, see Common parameters.
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "0D50523D-8D59-4A61-B58E-E2286ECFB3A9",
"Success": true,
"Code": "200",
"Message": "The specified resource is not found.",
"PageSize": "30",
"PageNumber": "1",
"Total": 2,
"TagGroupList": {
"TagGroup": [
{
"Status": "FINISH",
"MatchExpressFilterRelation": "or",
"RegionId": "cn-hangzhou",
"TagKey": "tagkey1",
"DynamicTagRuleId": "1536df65-a719-429d-8813-73cc40d7****",
"MatchExpress": {
"MatchExpress": [
{
"TagValue": "*",
"TagValueMatchFunction": "all",
"TagKey": "azone-version"
}
]
},
"TemplateIdList": {
"TemplateIdList": [
"71****"
]
},
"ContactGroupList": {
"ContactGroupList": [
"CloudMonitor"
]
}
}
]
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParameterValue | Illegal parameters. | Illegal parameters. |
403 | AccessForbidden | User not authorized to operate on the specified resource. | - |
404 | ResourceNotFound | The specified resource is not found. | The specified resource is not found. |
500 | %s | %s | - |
500 | InternalError | The request processing has failed due to some unknown error. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2021-11-04 | API Description Update,The error codes of the API operation change.,The response structure of the API operation changes. | see changesets | ||||||||||||||
|