文档

ListDataSources - 获取数据源列表

获取数据源列表。

接口说明

方法

GET

URI

/openapi/ha3/instances/{instanceId}/data-sources

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用背景高亮的方式表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
searchengine:ListDataSourcesList
  • Instance
    acs:searchengine:{#regionId}:{#accountId}:instance/{#InstanceId}

请求语法

GET /openapi/ha3/instances/{instanceId}/data-sources

请求参数

名称类型必填描述示例值
instanceIdstring

实例 ID

ha-cn-2r42ostoc01

请求示例

GET /openapi/ha3/instances/ha3_instances_id/data-sources

返回参数

名称类型描述示例值
object

Schema of Response

requestIdstring

请求 ID

93A9E542-8CF8-5BA6-99AB-94C0FE520429
resultobject []

返回参数

namestring

数据源名称。

data_source_name
typestring

类型

odps
domainstring

离线部署

test
indexesarray

索引

string

数据源索引。

index1
lastFulTimelong

上一次全量时间

statusstring

数据源状态

new

返回示例

正确返回

{
  "requestId": "0A6EB64B-B4C8-CF02-810F-E660812972FF",
  "result": [
    {
      "name": "data_source_name",
      "type": "odps",
      "domain": "test",  // 离线部署
      "indexes": [
        "index1",
        "index2"
      ],
      "partitions": [
        "ds=2020"
        "ds=2021"
      ],
      "lastFullTime": 1628502036000,
      "config":{
        "accessKey": "xxx",
        "accessSecret": "xxxs",
        "project":"xxxx",
        "table":"xxx",
        "partition":"xxxx"
      },
      "autoBuildIndex": true,
      "status": "new"	   // new: 创建中; publish: 正常; trash: 删除中
    },
    {
      "name": "data_source_name",
      "type": "odps",
      "domain": "test",  // 离线部署      
      "indexes": [
        "index1",
        "index2"
      ],
      "partitions": [
        "ds=2020"
        "ds=2021"
      ],
      "lastFullTime": 1628502036000,
      "config":{
        "accessKey": "xxx",
        "accessSecret": "xxxs",
        "project":"xxxx",
        "table":"xxx",
        "partition":"xxxx"
      },
      "autoBuildIndex": true,
      "status": "new"   // new: 创建中; publish: 正常; trash: 删除中
    }
  ]
}

示例

正常返回示例

JSON格式

{
  "requestId": "93A9E542-8CF8-5BA6-99AB-94C0FE520429",
  "result": [
    {
      "name": "data_source_name",
      "type": "odps",
      "domain": "test",
      "indexes": [
        "index1"
      ],
      "lastFulTime": 0,
      "status": "new"
    }
  ]
}

错误码

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2023-07-19OpenAPI 返回结构发生变更看变更集
变更项变更内容
出参OpenAPI 返回结构发生变更
2022-01-12新增 OpenAPI看变更集
  • 本页导读 (0)
文档反馈