All Products
Search
Document Center

CloudMonitor:DescribeDynamicTagRuleList

Last Updated:Mar 01, 2024

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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
TagRegionIdstringNo

The ID of the region to which the tags belong.

cn-hangzhou
TagKeystringNo

The tag key.

For more information about how to obtain a tag key, see DescribeTagKeyList .

tagkey1
TagValuestringNo

The tag value.

For more information about how to obtain a tag value, see DescribeTagKeyList .

*
PageNumberstringNo

The number of the page to return.

Pages start from page 1. Default value: 1.

1
PageSizestringNo

The number of entries to return on each page.

Minimum value: 1. Default value: 30.

30
DynamicTagRuleIdstringNo

The ID of the tag rule.

004155fa-15ba-466d-b61a-***********

For more information about common request parameters, see Common parameters.

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

0D50523D-8D59-4A61-B58E-E2286ECFB3A9
Successboolean

Indicates whether the call was successful. Valid values:

  • true: The call was successful.
  • false: The call failed.
true
Codestring

The HTTP status code.

Note The status code 200 indicates that the call was successful.
200
Messagestring

The error message.

The specified resource is not found.
PageSizestring

The number of entries returned per page.

30
PageNumberstring

The page number of the returned page.

1
Totalinteger

The total number of returned entries.

2
TagGroupListobject []

The tag rules of application groups.

Statusstring

The status of adding instances that meet the tag rule to the application group. Valid values:

  • RUNNING
  • FINISH
FINISH
MatchExpressFilterRelationstring

The logical operator that is used between conditional expressions. Valid values:

  • and
  • or
Note Only one logical operator can be used in a request.
or
RegionIdstring

The ID of the region to which the tags belong.

cn-hangzhou
TagKeystring

The tag key.

tagkey1
DynamicTagRuleIdstring

The ID of the tag rule.

1536df65-a719-429d-8813-73cc40d7****
MatchExpressobject []

The conditional expressions used to create an application group based on the tag.

TagValuestring

The tag value.

The TagValue and TagValueMatchFunction parameters must be used in pairs.

*
TagValueMatchFunctionstring

The method that is used to match tag values. Valid values:

  • all: includes all
  • startWith: starts with a prefix
  • endWith: ends with a suffix
  • contains: contains
  • notContains: does not contain
  • equals: equals
all
TagKeystring

The tag key.

azone-version
TemplateIdListarray

The IDs of the alert templates.

string
71****
ContactGroupListarray

The alert contact group.

string
CloudMonitor

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
400InvalidParameterValueIllegal parameters.Illegal parameters.
403AccessForbiddenUser not authorized to operate on the specified resource.-
404ResourceNotFoundThe specified resource is not found.The specified resource is not found.
500%s%s-
500InternalErrorThe request processing has failed due to some unknown error.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2021-11-04API Description Update. The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
API DescriptionAPI Description Update.
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 500
Output ParametersThe response structure of the API has changed.