Make the MongoDB docs better! We value your opinion. Share your feedback for a chance to win $100.
MongoDB Branding Shape
Click here >
Docs 菜单

atlas api performanceAdvisor listDropIndexRecommendations

返回 Performance Advisor 建议删除的索引。

atlas api 子命令是从 MongoDB Atlas Admin API 自动生成的,并提供对 Admin API 的全面覆盖。Admin API功能有自己的发布生命周期,您可以通过提供的API终结点文档链接进行检查。

Performance Advisor 建议删除未使用、冗余和隐藏的索引,以提高写入性能并增加存储空间。要使用此资源,请求的服务帐户或 API 密钥必须具有 Project Read Only 角色。

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

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

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

--clusterName

字符串

true

用于标识集群的人类可读标签。

--groupId

字符串

true

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

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

-h,--help

false

listDropIndexRecommendations 帮助

-o, --output

字符串

false

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

--outputFile

字符串

false

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

--version

字符串

false

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

名称
类型
必需
说明

-P, --profile

字符串

false

要从您的配置文件中使用的配置文件的名称。要学习;了解Atlas CLI配置文件,请参阅 https://dochub.mongodb.org/core/atlas-cli-save-connection-settings.

atlas api performanceAdvisor listDropIndexSuggestions --version 2024-08-05 --clusterName [clusterName] --groupId 32b6e34b3d91647abb20e7b8