对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。

agentengine service-account rotate

为服务账户颁发新秘钥。

为服务帐户颁发新的客户端机密。

新密钥仅显示一次。上一个密钥将继续进行身份验证,最长可达 7 天,或者直到其过期(以较早者为准);再次轮换会立即结束其宽限期。

使用 POST /api/v1/oauth/token 将客户端 ID 和密钥交换为 1 小时的访问令牌。仅将该令牌发送到明确启用服务帐户身份验证且分配的角色允许的终结点:

curl --fail-with-body --silent --show-error \ --user '<client-id>' \ --data grant_type=client_credentials \ '<base-url>/api/v1/oauth/token' | \jq -er '"Authorization: Bearer " + .access_token' | \curl --fail-with-body --silent --show-error \ --header @- \ '<base-url>/api/v1/<service-account-enabled-resource>'
agentengine service-account rotate <client-id> [flags]
--base-url string Platform base URL --context string Named context to target (see 'agentengine context list')-h, --help help for rotate --json Output the rotated service account as JSON --org-id string Organization scope for the service account --project-id string Project scope for the service account --secret-expires-in duration Secret lifetime as a whole number of hours, e.g. 720h (default: server default of 2160h)
--log-file string override log file path --log-level string file log verbosity (error|warn|info|debug) (default "info") --no-log disable file logging-q, --quiet silence stderr below error-v, --verbose count raise stderr verbosity (-v info, -vv debug)
给本页内容打分