调用DescribeDynamicTagRuleList接口查询智能标签的规则列表。
接口说明
本文将提供一个示例,查找标签键tagkey1的规则列表。返回结果显示,共有 2 条规则,规则 ID 分别为1536df65-a719-429d-8813-73cc40d7****和56e8cebb-b3d7-4a91-9880-78a8c84f****。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
 调试
        
            调试
        
    
授权信息
| 操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 | 
| cms:DescribeDynamicTagRuleList | get | *全部资源 
 | 无 | 无 | 
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 | 
| TagRegionId | string | 否 | 标签归属的地域 ID。 | cn-hangzhou | 
| TagKey | string | 否 | 标签键。 关于如何获取标签键,请参见 DescribeTagKeyList 。 | tagkey1 | 
| TagValue | string | 否 | 标签值。 关于如何获取标签值,请参见 DescribeTagValueList 。 | * | 
| PageNumber | string | 否 | 页码。 起始值:1。默认值:1。 | 1 | 
| PageSize | string | 否 | 分页时每页显示的数据行数。 起始值:1。默认值:30。 | 30 | 
| DynamicTagRuleId | string | 否 | 智能标签规则 ID。 | 004155fa-15ba-466d-b61a-*********** | 
关于公共请求参数的详情,请参见公共参数。
返回参数
| 名称 | 类型 | 描述 | 示例值 | 
| object | 返回结果。 | ||
| RequestId | string | 请求 ID。 | 0D50523D-8D59-4A61-B58E-E2286ECFB3A9 | 
| Success | boolean | 操作是否成功。取值: 
 | true | 
| Code | string | 状态码。 说明 
 200 表示成功。 | 200 | 
| Message | string | 错误信息。 | The specified resource is not found. | 
| PageSize | string | 分页时每页显示的数据行数。 | 30 | 
| PageNumber | string | 页码。 | 1 | 
| Total | integer | 标签列表的条目总数。 | 2 | 
| TagGroupList | object | ||
| TagGroup | array<object> | 应用分组的规则列表。 | |
| array<object> | 应用分组的规则。 | ||
| Status | string | 标签同步到应用分组的状态。 
 | FINISH | 
| MatchExpressFilterRelation | string | 条件表达式之间的关系。取值: 
 说明 
 目前仅支持一种组合条件。 | or | 
| RegionId | string | 资源所属的地域 ID。 | cn-hangzhou | 
| TagKey | string | 标签键。 | tagkey1 | 
| DynamicTagRuleId | string | 标签规则 ID。 | 1536df65-a719-429d-8813-73cc40d7**** | 
| MatchExpress | object | ||
| MatchExpress | array<object> | 标签生成应用分组的匹配表达式。 | |
| object | 标签生成应用分组的匹配表达式。 | ||
| TagValue | string | 标签值。 
 | * | 
| TagValueMatchFunction | string | 标签值的匹配方法。取值: 
 | all | 
| TagKey | string | 标签键。 | azone-version | 
| TemplateIdList | object | ||
| TemplateIdList | array | 报警模板 ID 列表。 | |
| string | 报警模板 ID。 | 71**** | |
| ContactGroupList | object | ||
| ContactGroupList | array | 报警联系组列表。 | |
| string | 报警联系组。 | CloudMonitor | |
| TagValueBlacklist | object | ||
| TagValueBlacklist | array | 动态规则不处理的 TagValue。当用户删除动态 Tag 分组的时候,分组对应的 TagValue 会添加到黑名单;在之后有新的资源新增此 TagValue 时,不会创建对应的分组。 | |
| string | 某个标签的值。 | test、offline | 
示例
正常返回示例
JSON格式
{
  "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"
          ]
        }
      }
    ]
  }
}错误码
| HTTP status code | 错误码 | 错误信息 | 描述 | 
|---|---|---|---|
| 400 | InvalidParameterValue | 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. | 未找到指定资源。 | 
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。