全部產品
Search
文件中心

Simple Log Service:get_index_config

更新時間:Jun 30, 2024

調用CLI命令擷取指定Logstore的索引。

請求文法

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

請求參數

該命令的必選和特有參數描述如下。

參數名稱

數實值型別

是否必選

樣本值

描述

--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": [
            ",",
            " ",
            "'",
            "\"",
            ";",
            "=",
            "(",
            ")",
            "[",
            "]",
            "{",
            "}",
            "?",
            "@",
            "&",
            "<",
            ">",
            "/",
            ":",
            "\n",
            "\t"
          ],
          "type": "text"
        },
        "key2": {
          "caseSensitive": false,
          "doc_value": true,
          "token": [
            ",",
            " ",
            "'",
            "\"",
            ";",
            "=",
            "(",
            ")",
            "[",
            "]",
            "{",
            "}",
            "?",
            "@",
            "&",
            "<",
            ">",
            "/",
            ":",
            "\n",
            "\t"
          ],
          "type": "text"
        },
        "key3": {
          "caseSensitive": false,
          "doc_value": true,
          "token": [
            ",",
            " ",
            "'",
            "\"",
            ";",
            "=",
            "(",
            ")",
            "[",
            "]",
            "{",
            "}",
            "?",
            "@",
            "&",
            "<",
            ">",
            "/",
            ":",
            "\n",
            "\t"
          ],
          "type": "text"
        },
        "key4": {
          "caseSensitive": false,
          "doc_value": true,
          "token": [
            ",",
            " ",
            "'",
            "\"",
            ";",
            "=",
            "(",
            ")",
            "[",
            "]",
            "{",
            "}",
            "?",
            "@",
            "&",
            "<",
            ">",
            "/",
            ":",
            "\n",
            "\t"
          ],
          "type": "text"
        }
      },
      "lastModifyTime": 0,
      "line": {
        "caseSensitive": false,
        "chn": false,
        "token": [
          ",",
          " ",
          "'",
          "\"",
          ";",
          "=",
          "(",
          ")",
          "[",
          "]",
          "{",
          "}",
          "?",
          "@",
          "&",
          "<",
          ">",
          "/",
          ":",
          "\n",
          "\t"
        ]
      },
      "storage": "pg",
      "ttl": 30
    }

錯誤碼

如果返回報錯資訊,請參見具體介面的錯誤碼處理。更多資訊,請參見GetIndex錯誤碼處理

API參考

GetIndex