New

The executive guide to generative AI

Read more

更新连接器名称和描述 API

编辑

更新连接器名称和描述 API

编辑

此功能处于 Beta 阶段,可能会发生更改。其设计和代码不如正式 GA 功能成熟,并且按“原样”提供,不提供任何保证。Beta 功能不受正式 GA 功能的支持 SLA 约束。

更新连接器的 namedescription 字段。

要开始使用连接器 API,请查看我们的教程

请求

编辑

PUT _connector/<connector_id>/_name

先决条件

编辑
  • 要使用自管理连接器同步数据,您需要在您自己的基础设施上部署 Elastic 连接器服务。此服务在 Elastic Cloud 上为 Elastic 管理的连接器自动运行。
  • connector_id 参数应引用现有连接器。

路径参数

编辑
<connector_id>
(必需,字符串)

请求主体

编辑
name
(必需,字符串)连接器的名称。
description
(可选,字符串)连接器的描述。

响应代码

编辑
200
连接器 namedescription 字段已成功更新。
400
未提供 connector_id 或请求负载格式不正确。
404 (缺少资源)
找不到与 connector_id 匹配的连接器。

示例

编辑

以下示例更新 ID 为 my-connector 的连接器的 namedescription 字段

resp = client.connector.update_name(
    connector_id="my-connector",
    name="Custom connector",
    description="This is my customized connector",
)
print(resp)
response = client.connector.update_name(
  connector_id: 'my-connector',
  body: {
    name: 'Custom connector',
    description: 'This is my customized connector'
  }
)
puts response
const response = await client.connector.updateName({
  connector_id: "my-connector",
  name: "Custom connector",
  description: "This is my customized connector",
});
console.log(response);
PUT _connector/my-connector/_name
{
    "name": "Custom connector",
    "description": "This is my customized connector"
}
{
    "result": "updated"
}
Was this helpful?
Feedback