Table: mongodbatlas_serverless_instance - Query MongoDB Atlas Serverless Instances using SQL
MongoDB Atlas Serverless Instances are a part of MongoDB's fully managed cloud database service. This service allows you to deploy, operate, and scale MongoDB databases in the cloud. Serverless instances provide on-demand, pay-per-use access to your MongoDB data, scaling automatically to meet your application's read and write workload needs.
Table Usage Guide
The mongodbatlas_serverless_instance
table provides insights into the configuration and performance of MongoDB Atlas Serverless Instances. As a Database Administrator or Developer, you can use this table to examine details about these instances, including their configuration, status, and associated metrics. This can help you optimize resource usage, troubleshoot performance issues, and ensure the smooth operation of your MongoDB databases in the cloud.
Examples
Basic info
Explore which serverless instances are in use in your MongoDB Atlas setup. This can help you monitor and manage your resources more effectively.
select id, namefrom mongodbatlas_serverless_instance;
select id, namefrom mongodbatlas_serverless_instance;
Get connection details for serverless instances
Explore the connection details for your serverless instances to understand how to connect to them in different scenarios. This can be particularly useful when setting up new applications or troubleshooting connectivity issues.
select id, name, connection_strings ->> 'standardSrv' as conn_str_standard_srv, connection_strings ->> 'standard' as conn_str_standardfrom mongodbatlas_serverless_instance;
select id, name, json_extract(connection_strings, '$.standardSrv') as conn_str_standard_srv, json_extract(connection_strings, '$.standard') as conn_str_standardfrom mongodbatlas_serverless_instance;
List instances with provider backups disabled
Explore which serverless instances have provider backups disabled to identify potential data loss risks and prioritize areas for improved data security.
select name, cluster_type, provider_backup_enabledfrom mongodbatlas_serverless_instancewhere provider_backup_enabled = false;
select name, cluster_type, provider_backup_enabledfrom mongodbatlas_serverless_instancewhere provider_backup_enabled = 0;
Schema for mongodbatlas_serverless_instance
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
connection_strings | jsonb | Set of connection strings that your applications use to connect to this cluster. | |
id | text | Unique identifier of the cluster. | |
mongodb_version | text | Version of MongoDB that the serverless instance runs, in <major version>.<minor version> format. | |
name | text | = | The name of the cluster as it appears in Atlas. |
organization_id | text | =, !=, ~~, ~~*, !~~, !~~* | Unique identifier for the organization. |
project_id | text | = | Unique identifier of the project that this cluster belongs to. |
provider_settings | jsonb | Configuration for the provisioned hosts on which MongoDB runs. The available options are specific to the cloud service provider. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
state_name | text | Stage of deployment of this serverless instance when the resource made its request. | |
title | text | Title of the resource. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- mongodbatlas
You can pass the configuration to the command with the --config
argument:
steampipe_export_mongodbatlas --config '<your_config>' mongodbatlas_serverless_instance