diff --git a/src/poller/poller-core/index.js b/src/poller/poller-core/index.js index dd90c7da..315e30d7 100644 --- a/src/poller/poller-core/index.js +++ b/src/poller/poller-core/index.js @@ -276,9 +276,11 @@ async function getSpannerMetadata(projectId, spannerInstanceId, units) { try { const spannerInstance = spanner.instance(spannerInstanceId); - + const databaseAdminClient = spanner.getDatabaseAdminClient(); const results = await Promise.all([ - spannerInstance.getDatabases(), + databaseAdminClient.listDatabases({ + parent: databaseAdminClient.instancePath(projectId, spannerInstanceId), + }), spannerInstance.getMetadata(), ]); const numDatabases = results[0][0].length;