AI エージェント向け: ドキュメントインデックスは https://www.mongodb.com/ja-jp/docs/llms.txt で利用できます。すべてのページの markdown バージョンは、いずれかの URL パスに .md を追加することで利用できます。

agentengine secret set

シークレットを設定または更新します。

プロジェクトまたはワークスペース内のシークレットストアにシークレットを設定または更新します。

このプラットフォームでは、MONGODB_URIに加えて、機能.memoryがtrueの場合はVOYAGE_API_KEYが必要です。ANTHROPIC_API_KEYやOPENAI_API_KEYなどのプロバイダーキーはエージェント固有のものです。エージェントが使用するキーを設定してください。

名前は ^[A-Z][A-Z0-9_]{0,127}$ に一致する必要があり、予約済みのプラットフォーム名は使用できません。これはデフォルトでプロジェクトスコープのシークレットを設定します。--workspace-scope または --workspace-id はワークスペースをターゲットにします。--context は組織とプロジェクトのみを指定するため、--project-scope と組み合わせて使用してください。

非表示のプロンプトの値は省略するか、--stdinでパイプします。位置引数VALUEと--valueは非推奨です。一括dotenvインポートは--from-ファイル(stdinの場合は-)を使用します。--from-ファイルはプレーンテキストのシークレットを読み取ります。マスクされたプロンプトまたはシークレットマネージャーからのstdinを使用することをお勧めします。ファイルを使用する場合は、所有者のみがアクセスできるようにし、一度インポートしてから削除するし、履歴、バックアップ、バージョン管理からコピーを除く、コミットまたは公開された可能性がある場合は、インポートされたすべてのシークレットをローテーションします。ファイルをコミットまたは同期しないでください。ファイルパスはLinuxでのみ機能するため、macOSおよびWindowsでは--from-file -を使用してください。

--on-empty は、インポート時の空の値を制御します(skip、warn、または error)。デフォルトでは、対話型ターミナルではプロンプトが表示され、それ以外の場合はエラーになります。

--同期は、次のメッセージが新しい値を使用できるようになるまで待機します。現在のターンでは古い値が保持されます。

例:

agentengine secret set MONGODB_URIsecret-manager export-dotenv | agentengine secret set --from-file -agentengine secret set API_KEY --workspace-scope
agentengine secret set [NAME] [flags]
--base-url string Platform base URL --context string Named context to target (see 'agentengine context list') --description string Human-readable description of the secret --from-file string Security warning: import plaintext dotenv secrets from a private temporary Linux file, or - for stdin on any OS-h, --help help for set --on-empty string Action for empty values when using --from-file: skip, warn, or error --org-id string Organization ID --project-id string Project ID --project-scope Target project-scoped secrets (the default; explicit alternative to --workspace-scope) --stdin Read the entire stdin stream as one secret; use --from-file - for dotenv --sync After setting, wait until the next message can use the new secret values --workspace string Monorepo: target a specific workspace by name (from root agent.yaml) --workspace-id string Workspace ID --workspace-scope Target workspace-scoped secrets instead of project-scoped secrets (the default)
--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)
このページを評価