Navigation

listStores

On this page

  • Syntax
  • Parameters
  • Output
  • Example

The listStores command lists all data stores in the Atlas Data Lake storage configuration.

db.runCommand({ listStores: 1 })
Parameter
Type
Description
Required?
listStores
int
Indicates that all data stores be listed.
Value must be 1.
yes

The command prints the following output if it succeeds.

{
"ok": 1,
"cursor": {
"firstBatch": [
{
"name": "<store-name>",
"provider": "s3",
"region": "<region-name>",
"bucket": "<bucket-name>",
"delimiter": "<delimiter>",
"prefix": "<prefix>"
},
{
"name": "<store-name>",
"provider": "atlas",
"clusterName": "<cluster-name>",
"projectId": "<project-id>"
},
...
],
"id": NumberLong(0),
"ns": "<database>.$cmd.listStores"
}
}

The following example uses the listStores command to list all data stores in an Atlas Data Lake storage configuration.

use sample
db.runCommand({ listStores: 1 })

The previous command prints the following:

{
"ok": 1,
"cursor": {
"firstBatch": [
{
"name": "s3store",
"provider": "s3",
"region": "us-east-1",
"bucket": "my-data-lake",
"delimiter": "/",
"prefix": ""
},
{
"name" : "atlasStore",
"provider" : "atlas",
"clusterName" : "myTestCluster",
"projectId" : "<project-id>"
}
],
"id": NumberLong(0),
"ns": "sample.$cmd.listStores"
}
}
Give Feedback

On this page

  • Syntax
  • Parameters
  • Output
  • Example