Update cleanupDBs.js (#2093)

This commit is contained in:
sunghyunkang1111 2025-04-03 11:10:40 -05:00 committed by GitHub
parent 32576f50d3
commit 0f6c979268
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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) {