Docs Menu

refreshSessions

refreshSessions

The refreshSessions command updates the last use time for the specified sessions, thereby extending the active state of the sessions.

このコマンドは、次の環境でホストされている配置で使用できます。

  • MongoDB Atlas はクラウドでの MongoDB 配置のためのフルマネージド サービスです

注意

このコマンドは、すべての MongoDB Atlas クラスターでサポートされています。すべてのコマンドに対する Atlas のサポートについては、「サポートされていないコマンド」を参照してください。

  • MongoDB Enterprise: サブスクリプションベースの自己管理型 MongoDB バージョン

  • MongoDB Community: ソースが利用可能で、無料で使用できる自己管理型の MongoDB のバージョン

このコマンドの構文は、次のとおりです。

db.runCommand(
{
refreshSessions: [
{ id : <UUID> }, ...
]
}
)

refreshSessionsを実行するには、 db.runCommand( { <command> } )メソッドを使用します。

db.runCommand(
{
refreshSessions: [
{ id : <UUID> }, ...
]
}
)

MongoDB concatenates each of the specified UUIDs with the hash of the authenticated user credentials to identify the user's sessions to refresh. If the user has no session that match, the refreshSessions has no effect.

配置で認証/承認が強制される場合、 refreshSessionsコマンドを実行するには認証が必要です。

A user can only refresh sessions belonging to the user.

以下も参照してください。