跳转至

创建单个绑定索引配置



POST /api/v1/log_index_cfg/bind

概述

创建一个自定义存储绑定索引

Body 请求参数

参数名 类型 必选 说明
name string Y 索引名字
例子: xxx
允许为空: False
storeType string Y 存储类型
例子: xxx
允许为空: False
exterStoreName string Y 与name互为映射的外部存储的名字
允许为空: False
exterStoreProject string 外部存储索引对应的project
允许为空: False
region string 指定外部资源的地域
允许为空: False
accessCfg json Y 外部资源访问配置信息
允许为空: False
accessCfg.ak string 密钥Id
允许为空: False
accessCfg.sk string 密钥
允许为空: False
accessCfg.url string 链接地址
允许为空: False
accessCfg.username string 用户名
允许为空: False
accessCfg.password string 密码
允许为空: False
fields array 待更新的字段映射配置列表
允许为空: False
fields[*] None
fields[*].field string Y 字段名
例子: message
允许为空: False
fields[*].originalField string Y 原始字段名
例子: content
允许为空: False
允许空字符串: True

参数补充说明

请求例子

curl 'https://openapi.guance.com/api/v1/log_index_cfg/bind' \
  -H 'Content-Type: application/json' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  --data-raw '{"accessCfg":{"url":"aa.com","password":"test","username":"test"},"exterStoreName":"aa_uuid","fields":[{"field":"time","originalField":"time"},{"field":"__docid","originalField":"__docid"},{"field":"message","originalField":"message"}],"storeType":"es","name":"openapi_test"}' \
  --compressed

响应

{
    "code": 200,
    "content": true,
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "TRACE-31E0802B-E53A-4D9B-8FD7-57A0CA4C2D66"
} 

文档评价

文档内容是否对您有帮助? ×