Docs Menu
Docs Home
/ /
Atlas CLI
/ /

Atlas dbusers describe

項目一覧

  • 構文
  • Arguments
  • オプション
  • 継承されたオプション
  • 出力

プロジェクトの指定されたデータベースユーザーの詳細を返します。

このコマンドを使用するには、ユーザーアカウントまたはプロジェクト読み取り専用ロールの API キーで認証する必要があります。

コマンド構文
atlas dbusers describe <username> [options]
名前
タイプ
必須
説明
username
string
true
MongoDB database から取得するユーザー名。 ユーザー名の形式は、ユーザーの認証方法によって異なります。
名前
タイプ
必須
説明
--authDB
string
false
認証データベース名。 ユーザーがAmazon Web Services IAM、x.509、またはLDAPで認証される場合、この値は $external になります。 ユーザーが SCRAM-SHA で認証される場合、この値は 管理者 である必要があります。 この値のデフォルトは "admin" です。
-h, --help
false
説明用のヘルプ
-o, --output
string
false
出力形式。 有効な値は、 JSON 、 JSON -path、go-template、または go-template-file です。 完全な出力を表示するには、 -o JSONオプションを使用します。
--projectId
string
false
使用するプロジェクトを識別する 16 進数の string。 このオプションは、構成ファイルまたは環境変数の 設定を上書きします。
名前
タイプ
必須
説明
-P, --profile
string
false
構成ファイルから使用するプロファイルの名前。 Atlas CLI のプロファイルについては、 https://docub.mongodb.org/core/atlas-cli-save- connection-settings を参照してください。

コマンドが成功すると、CLI は次のサンプルのような出力を返します。 括弧内の値は 値を表します。

USERNAME DATABASE
<Username> <DatabaseName>
# Return the details for the SCRAM SHA-authenticating database user named myDbUser:
atlas dbuser describe myDbUser --authDB admin --output json
# Return the details for the AWS IAM-authenticating database user with the ARN arn:aws:iam::772401394250:user/my-test-user. Prepend $external with \ to escape the special-use character:
atlas dbuser describe arn:aws:iam::772401394250:user/my-test-user --authDB \$external --output json
# Return the details for the X.509-authenticating database user with the RFC 2253 Distinguished Name CN=ellen@example.com,OU=users,DC=example,DC=com. Prepend $external with \ to escape the special-use character:
atlas dbuser describe CN=ellen@example.com,OU=users,DC=example,DC=com --authDB \$external --output json

戻る

削除