Call the DescribeDynamicTagRuleList operation to query the rules for dynamic tags.
Operation description
This topic provides an example of how to query the rules for the tag key tagkey1. The response shows that two rules are returned. The rule IDs are 1536df65-a719-429d-8813-73cc40d7**** and 56e8cebb-b3d7-4a91-9880-78a8c84f****.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cms:DescribeDynamicTagRuleList |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| TagRegionId |
string |
No |
The region ID of the tag. |
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 DescribeTagValueList. |
* |
| PageNumber |
string |
No |
The page number. Start value: 1. Default value: 1. |
1 |
| PageSize |
string |
No |
The number of entries to return on each page. Start value: 1. Default value: 30. |
30 |
| DynamicTagRuleId |
string |
No |
The ID of the dynamic tag rule. |
004155fa-15ba-466d-b61a-*********** |
For more information about common request parameters, see Common parameters.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response that is returned. |
||
| RequestId |
string |
The request ID. |
0D50523D-8D59-4A61-B58E-E2286ECFB3A9 |
| Success |
boolean |
Indicates whether the operation was successful. Valid values:
|
true |
| Code |
string |
The status code. Note
A status code of 200 indicates that the operation was successful. |
200 |
| Message |
string |
The error message. |
The specified resource is not found. |
| PageSize |
string |
The number of entries returned per page. |
30 |
| PageNumber |
string |
The page number. |
1 |
| Total |
integer |
The total number of entries in the tag list. |
2 |
| TagGroupList |
object |
||
| TagGroup |
array<object> |
The list of rules for the application groups. |
|
|
array<object> |
The rule for the application group. |
||
| Status |
string |
The status of tag sync to the application group.
|
FINISH |
| MatchExpressFilterRelation |
string |
The relationship between conditional expressions. Valid values:
Note
Only one combination of conditions is supported. |
or |
| RegionId |
string |
The region ID of the resource. |
cn-hangzhou |
| TagKey |
string |
The tag key. |
tagkey1 |
| DynamicTagRuleId |
string |
The ID of the tag rule. |
1536df65-a719-429d-8813-73cc40d7**** |
| MatchExpress |
object |
||
| MatchExpress |
array<object> |
The matching expression used to create an application group from a tag. |
|
|
object |
The matching expression used to create an application group from a tag. |
||
| TagValue |
string |
The tag value.
|
* |
| TagValueMatchFunction |
string |
The method used to match the tag value. Valid values:
|
all |
| TagKey |
string |
The tag key. |
azone-version |
| TemplateIdList |
object |
||
| TemplateIdList |
array |
A list of alert template IDs. |
|
|
string |
The ID of the alert template. |
71**** |
|
| ContactGroupList |
object |
||
| ContactGroupList |
array |
A list of alert contact groups. |
|
|
string |
The alert contact group. |
CloudMonitor |
|
| TagValueBlacklist |
object |
||
| TagValueBlacklist |
array |
The tag values that are not processed by the dynamic rule. When a user deletes a dynamic tag group, the tag values of the group are added to a blacklist. If a new resource is later added with a blacklisted tag value, a corresponding group is not created. |
|
|
string |
The value of a tag. |
test、offline |
Examples
Success response
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"
]
},
"TagValueBlacklist": {
"TagValueBlacklist": [
"test、offline"
]
}
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameterValue | Illegal parameters. | Illegal parameters. |
| 500 | %s | %s | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 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. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.