mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-18 16:31:31 +00:00
Update cleanupDBs.js (#2093)
This commit is contained in:
@@ -20,6 +20,10 @@ async function main() {
|
||||
const client = new CosmosDBManagementClient(credentials, subscriptionId);
|
||||
const accounts = await client.databaseAccounts.list(resourceGroupName);
|
||||
for (const account of accounts) {
|
||||
if (account.name.endsWith("-readonly")) {
|
||||
console.log(`SKIPPED: ${account.name}`);
|
||||
continue;
|
||||
}
|
||||
if (account.kind === "MongoDB") {
|
||||
const mongoDatabases = await client.mongoDBResources.listMongoDBDatabases(resourceGroupName, account.name);
|
||||
for (const database of mongoDatabases) {
|
||||
|
||||
Reference in New Issue
Block a user