调用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