详情页标题前

阿里云日志服务SLSget_index_config-云淘科技

详情页1

调用CLI命令获取指定Logstore的索引。

请求语法

aliyunlog log get_index_config --project_name= --logstore_name= [--access-id=] [--access-key=] [--sts-token=] [--region-endpoint=] [--client-name=] [--jmes-filter=] [--format-output=] [--decode-output=]

请求参数

该命令的必选和特有参数描述如下。

参数名称 数值类型 是否必选 示例 描述
–project_name String aliyun-test-project Project名称。
–logstore_name String logstroe-a Logstore名称。

关于该命令的全局参数,请参见全局参数。

示例

  • 请求示例使用默认账号获取logstore-a的索引配置。
    aliyunlog log get_index_config --project_name="aliyun-test-project" --logstore_name="logstore-a"

    如果您需要将查询到的索引配置保存到指定文件,可参考如下示例:

    aliyunlog log get_index_config --project_name="aliyun-test-project" --logstore_name="logstore-a" >>export_index_config.json
  • 返回示例
    {
      "index_mode": "v2",
      "keys": {
        "key1": {
          "caseSensitive": false,
          "doc_value": true,
          "token": [
            ",",
            " ",
            "'",
            "\"",
            ";",
            "=",
            "(",
            ")",
            "[",
            "]",
            "{",
            "}",
            "?",
            "@",
            "&",
            "",
            "/",
            ":",
            "
    ",
            "	"
          ],
          "type": "text"
        },
        "key2": {
          "caseSensitive": false,
          "doc_value": true,
          "token": [
            ",",
            " ",
            "'",
            "\"",
            ";",
            "=",
            "(",
            ")",
            "[",
            "]",
            "{",
            "}",
            "?",
            "@",
            "&",
            "",
            "/",
            ":",
            "
    ",
            "	"
          ],
          "type": "text"
        },
        "key3": {
          "caseSensitive": false,
          "doc_value": true,
          "token": [
            ",",
            " ",
            "'",
            "\"",
            ";",
            "=",
            "(",
            ")",
            "[",
            "]",
            "{",
            "}",
            "?",
            "@",
            "&",
            "",
            "/",
            ":",
            "
    ",
            "	"
          ],
          "type": "text"
        },
        "key4": {
          "caseSensitive": false,
          "doc_value": true,
          "token": [
            ",",
            " ",
            "'",
            "\"",
            ";",
            "=",
            "(",
            ")",
            "[",
            "]",
            "{",
            "}",
            "?",
            "@",
            "&",
            "",
            "/",
            ":",
            "
    ",
            "	"
          ],
          "type": "text"
        }
      },
      "lastModifyTime": 0,
      "line": {
        "caseSensitive": false,
        "chn": false,
        "token": [
          ",",
          " ",
          "'",
          "\"",
          ";",
          "=",
          "(",
          ")",
          "[",
          "]",
          "{",
          "}",
          "?",
          "@",
          "&",
          "",
          "/",
          ":",
          "
    ",
          "	"
        ]
      },
      "storage": "pg",
      "ttl": 30
    }

错误码

如果返回报错信息,请参见具体接口的错误码处理。更多信息,请参见GetIndex错误码处理。

API参考

GetIndex

内容没看懂? 不太想学习?想快速解决? 有偿解决: 联系专家

阿里云企业补贴进行中: 马上申请

腾讯云限时活动1折起,即将结束: 马上收藏

同尘科技为腾讯云授权服务中心。

购买腾讯云产品享受折上折,更有现金返利:同意关联,立享优惠

转转请注明出处:https://www.yunxiaoer.com/160477.html

(0)
上一篇 2023年12月10日
下一篇 2023年12月10日
详情页2

相关推荐

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信
本站为广大会员提供阿里云、腾讯云、华为云、百度云等一线大厂的购买,续费优惠,保证底价,买贵退差。