調用DescribeDeprecatedTemplate,查看歷史索引模板詳情。

調試

您可以在OpenAPI Explorer中直接運行該接口,免去您計算簽名的困擾。運行成功后,OpenAPI Explorer可以自動生成SDK代碼示例。

請求頭

該接口使用公共請求頭,無特殊請求頭。請參見公共請求參數文檔。

請求語法

GET /openapi/instances/{InstanceId}/deprecated-templates/{name} HTTP/1.1

請求參數

名稱 類型 位置 是否必選 示例值 描述
InstanceId String Path es-cn-tl329rbpc0001****

實例ID。

name String Path template

索引模板名稱。

返回數據

名稱 類型 示例值 描述
RequestId String F99407AB-2FA9-489E-A259-40CF6DCC47D9

請求ID。

Result Object

返回結果信息。

dataStream Boolean false

是否同時自動創建數據流:

  • true:是
  • false:否
indexPatterns Array of String ["schema1*","schema2*"]

索引模式數組。

indexTemplate String openstore-index-template

索引模版名稱。

order Long 100

優先級。

template Object

索引模板配置信息。

aliases String "{}"

別名配置。

mappings String "{\"properties\":{\"created_at\":{\"format\":\"EEE MMM dd HH:mm:ss Z yyyy\",\"type\":\"date\"},\"host_name\":{\"type\":\"keyword\"}}}"

索引模板的mappings配置。

settings String "{\"index.number_of_shards\":\"1\"}"

索引模板的settings配置。

version String 70000

索引模板的版本。

示例

請求示例

GET /openapi/instances/es-cn-tl329rbpc0001****/deprecated-templates/template HTTP/1.1
Host:elasticsearch.aliyuncs.com
Content-Type:application/json

正常返回示例

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Result" : {
    "indexTemplate" : ".transform-notifications-000002",
    "indexPatterns" : [ ".transform-notifications-*" ],
    "dataStream" : false,
    "template" : {
      "settings" : "{\"index.hidden\":\"true\",\"index.number_of_shards\":\"1\",\"index.auto_expand_replicas\":\"0-1\"}",
      "mappings" : "{\"_meta\":{\"version\":\"7.10.0\"},\"dynamic\":\"false\",\"properties\":{\"level\":{\"type\":\"keyword\"},\"transform_id\":{\"type\":\"keyword\"},\"node_name\":{\"type\":\"keyword\"},\"message\":{\"type\":\"text\",\"fields\":{\"raw\":{\"type\":\"keyword\"}}},\"timestamp\":{\"type\":\"date\"}}}",
      "aliases" : "{\".transform-notifications-read\":{\"is_hidden\":true}}"
    },
    "version" : "7100099",
    "order" : 0
  },
  "RequestId" : "2C1B46F2-D827-4C05-B8C2-5A823EC3C306"
}

錯誤碼

訪問錯誤中心查看更多錯誤碼。