Join us Sept 17 at .local NYC! Use code WEB50 to save 50% on tickets. Learn more >
MongoDB Event
Docs 菜单
Docs 主页
/ /
Atlas CLI
/ / / /

Atlas API atlasSearch getAtlasSearchIndexByName

公开预览版:请提供反馈:返回您使用其数据库、集合名称和索引名称标识的一个Atlas Search索引。

公共预览版: Atlas API子命令从MongoDB Atlas Admin API自动生成,全面覆盖 Admin API ,目前处于公共预览版(请通过以下网址提供反馈:https://反馈.mongodb.com/forums/930808-Atlas-cli)。Admin API功能有自己的发布生命周期,您可以通过提供的API端点文档链接进行检查。

Atlas Search 索引包含索引字段和用于创建索引的分析器。要使用此资源,请求的 API 密钥必须具有项目数据访问读写角色。

此命令是自动生成的,对应 1:1 和Atlas API端点 https://www.mongodb.com/zh-cn/docs/api/doc/atlas-admin-api-v2/operation/operation-getatlassearchindexbyname

有关更多信息和示例,请参阅上面链接的参考API文档。

命令语法
atlas api atlasSearch getAtlasSearchIndexByName [options]
名称
类型
必需
说明

--clusterName

字符串

true

集群名称,该集群包含具有一个或多个 Atlas Search 索引的集合。

--collectionName

字符串

true

集合名称,该集合包含一个或多个 Atlas Search 索引。

--databaseName

字符串

true

用于标识包含具有一个或多个 Atlas Search 索引的集合的数据库的标签。

--envelope

envelope

false

指示应用程序是否将响应包装在信封JSON对象中的标志。某些API客户端无法访问权限HTTP响应标头或状态代码。要修复此问题,请在查询中设立Envelope=true。返回结果列表的端点将结果对象用作信封。应用程序将状态参数添加到响应正文中。

--groupId

字符串

true

用于标识项目的唯一 24-十六进制数字字符串。 使用 [/groups](# 标签/Projects/operation/listProjects) 端点检索身份验证的用户有权访问权限的所有项目。

注意:群组和项目是同义词。您的群组 ID 与项目 ID 相同。对于现有群组,群组/项目 ID 保持不变。资源和相应的端点使用“群组”一词。

-h,--help

false

getAtlasSearchIndexByName 帮助

--indexName

字符串

true

要返回的 Atlas Search 索引的名称。

-o, --output

字符串

false

首选API格式,可以是 ["JSON", go-template] 此值默认为 "JSON"。

--outputFile

字符串

false

要将API输出写入其中的文件。 当端点的输出为二进制(例如:gzip)且命令未通过管道传输(例如: Atlas command > out.zip)时,需要使用此标志

--pretty

false

指示响应正文是否应采用 prettyprint 格式的标记。

--version

字符串

false

进行API调用时要使用的API版本 [选项:"2024-05-30"],默认为最新版本或配置文件 api_version 配置值(如果设立了此值),默认为 "2024-05-30"。

名称
类型
必需
说明

-P, --profile

字符串

false

atlas api atlasSearch getAtlasSearchIndexByName --version 2024-05-30 --clusterName [clusterName] --collectionName [collectionName] --databaseName [databaseName] --groupId 32b6e34b3d91647abb20e7b8 --indexName [indexName]

在此页面上