MongoDB Atlas v3.30.0 published on Friday, Mar 21, 2025 by Pulumi
mongodbatlas.getCloudBackupSnapshot
Explore with Pulumi AI
# Data Source: mongodbatlas.CloudBackupSnapshot
mongodbatlas.CloudBackupSnapshot provides an Cloud Backup Snapshot datasource. Atlas Cloud Backup Snapshots provide localized backup storage using the native snapshot functionality of the cluster’s cloud service.
NOTE: Groups and projects are synonymous terms. You may find
groupIdin the official documentation.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const testCloudBackupSnapshot = new mongodbatlas.CloudBackupSnapshot("test", {
    projectId: "5d0f1f73cf09a29120e173cf",
    clusterName: "MyClusterTest",
    description: "SomeDescription",
    retentionInDays: 1,
});
const test = mongodbatlas.getCloudBackupSnapshotOutput({
    snapshotId: "5d1285acd5ec13b6c2d1726a",
    projectId: testCloudBackupSnapshot.projectId,
    clusterName: testCloudBackupSnapshot.clusterName,
});
import pulumi
import pulumi_mongodbatlas as mongodbatlas
test_cloud_backup_snapshot = mongodbatlas.CloudBackupSnapshot("test",
    project_id="5d0f1f73cf09a29120e173cf",
    cluster_name="MyClusterTest",
    description="SomeDescription",
    retention_in_days=1)
test = mongodbatlas.get_cloud_backup_snapshot_output(snapshot_id="5d1285acd5ec13b6c2d1726a",
    project_id=test_cloud_backup_snapshot.project_id,
    cluster_name=test_cloud_backup_snapshot.cluster_name)
package main
import (
	"github.com/pulumi/pulumi-mongodbatlas/sdk/v3/go/mongodbatlas"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		testCloudBackupSnapshot, err := mongodbatlas.NewCloudBackupSnapshot(ctx, "test", &mongodbatlas.CloudBackupSnapshotArgs{
			ProjectId:       pulumi.String("5d0f1f73cf09a29120e173cf"),
			ClusterName:     pulumi.String("MyClusterTest"),
			Description:     pulumi.String("SomeDescription"),
			RetentionInDays: pulumi.Int(1),
		})
		if err != nil {
			return err
		}
		_ = mongodbatlas.LookupCloudBackupSnapshotOutput(ctx, mongodbatlas.GetCloudBackupSnapshotOutputArgs{
			SnapshotId:  pulumi.String("5d1285acd5ec13b6c2d1726a"),
			ProjectId:   testCloudBackupSnapshot.ProjectId,
			ClusterName: testCloudBackupSnapshot.ClusterName,
		}, nil)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() => 
{
    var testCloudBackupSnapshot = new Mongodbatlas.CloudBackupSnapshot("test", new()
    {
        ProjectId = "5d0f1f73cf09a29120e173cf",
        ClusterName = "MyClusterTest",
        Description = "SomeDescription",
        RetentionInDays = 1,
    });
    var test = Mongodbatlas.GetCloudBackupSnapshot.Invoke(new()
    {
        SnapshotId = "5d1285acd5ec13b6c2d1726a",
        ProjectId = testCloudBackupSnapshot.ProjectId,
        ClusterName = testCloudBackupSnapshot.ClusterName,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.CloudBackupSnapshot;
import com.pulumi.mongodbatlas.CloudBackupSnapshotArgs;
import com.pulumi.mongodbatlas.MongodbatlasFunctions;
import com.pulumi.mongodbatlas.inputs.GetCloudBackupSnapshotArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        var testCloudBackupSnapshot = new CloudBackupSnapshot("testCloudBackupSnapshot", CloudBackupSnapshotArgs.builder()
            .projectId("5d0f1f73cf09a29120e173cf")
            .clusterName("MyClusterTest")
            .description("SomeDescription")
            .retentionInDays(1)
            .build());
        final var test = MongodbatlasFunctions.getCloudBackupSnapshot(GetCloudBackupSnapshotArgs.builder()
            .snapshotId("5d1285acd5ec13b6c2d1726a")
            .projectId(testCloudBackupSnapshot.projectId())
            .clusterName(testCloudBackupSnapshot.clusterName())
            .build());
    }
}
resources:
  testCloudBackupSnapshot:
    type: mongodbatlas:CloudBackupSnapshot
    name: test
    properties:
      projectId: 5d0f1f73cf09a29120e173cf
      clusterName: MyClusterTest
      description: SomeDescription
      retentionInDays: 1
variables:
  test:
    fn::invoke:
      function: mongodbatlas:getCloudBackupSnapshot
      arguments:
        snapshotId: 5d1285acd5ec13b6c2d1726a
        projectId: ${testCloudBackupSnapshot.projectId}
        clusterName: ${testCloudBackupSnapshot.clusterName}
Using getCloudBackupSnapshot
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getCloudBackupSnapshot(args: GetCloudBackupSnapshotArgs, opts?: InvokeOptions): Promise<GetCloudBackupSnapshotResult>
function getCloudBackupSnapshotOutput(args: GetCloudBackupSnapshotOutputArgs, opts?: InvokeOptions): Output<GetCloudBackupSnapshotResult>def get_cloud_backup_snapshot(cluster_name: Optional[str] = None,
                              project_id: Optional[str] = None,
                              snapshot_id: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetCloudBackupSnapshotResult
def get_cloud_backup_snapshot_output(cluster_name: Optional[pulumi.Input[str]] = None,
                              project_id: Optional[pulumi.Input[str]] = None,
                              snapshot_id: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetCloudBackupSnapshotResult]func LookupCloudBackupSnapshot(ctx *Context, args *LookupCloudBackupSnapshotArgs, opts ...InvokeOption) (*LookupCloudBackupSnapshotResult, error)
func LookupCloudBackupSnapshotOutput(ctx *Context, args *LookupCloudBackupSnapshotOutputArgs, opts ...InvokeOption) LookupCloudBackupSnapshotResultOutput> Note: This function is named LookupCloudBackupSnapshot in the Go SDK.
public static class GetCloudBackupSnapshot 
{
    public static Task<GetCloudBackupSnapshotResult> InvokeAsync(GetCloudBackupSnapshotArgs args, InvokeOptions? opts = null)
    public static Output<GetCloudBackupSnapshotResult> Invoke(GetCloudBackupSnapshotInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetCloudBackupSnapshotResult> getCloudBackupSnapshot(GetCloudBackupSnapshotArgs args, InvokeOptions options)
public static Output<GetCloudBackupSnapshotResult> getCloudBackupSnapshot(GetCloudBackupSnapshotArgs args, InvokeOptions options)
fn::invoke:
  function: mongodbatlas:index/getCloudBackupSnapshot:getCloudBackupSnapshot
  arguments:
    # arguments dictionaryThe following arguments are supported:
- ClusterName string
- The name of the Atlas cluster that contains the snapshot you want to retrieve.
- ProjectId string
- The unique identifier of the project for the Atlas cluster.
- SnapshotId string
- The unique identifier of the snapshot you want to retrieve.
- ClusterName string
- The name of the Atlas cluster that contains the snapshot you want to retrieve.
- ProjectId string
- The unique identifier of the project for the Atlas cluster.
- SnapshotId string
- The unique identifier of the snapshot you want to retrieve.
- clusterName String
- The name of the Atlas cluster that contains the snapshot you want to retrieve.
- projectId String
- The unique identifier of the project for the Atlas cluster.
- snapshotId String
- The unique identifier of the snapshot you want to retrieve.
- clusterName string
- The name of the Atlas cluster that contains the snapshot you want to retrieve.
- projectId string
- The unique identifier of the project for the Atlas cluster.
- snapshotId string
- The unique identifier of the snapshot you want to retrieve.
- cluster_name str
- The name of the Atlas cluster that contains the snapshot you want to retrieve.
- project_id str
- The unique identifier of the project for the Atlas cluster.
- snapshot_id str
- The unique identifier of the snapshot you want to retrieve.
- clusterName String
- The name of the Atlas cluster that contains the snapshot you want to retrieve.
- projectId String
- The unique identifier of the project for the Atlas cluster.
- snapshotId String
- The unique identifier of the snapshot you want to retrieve.
getCloudBackupSnapshot Result
The following output properties are available:
- CloudProvider string
- Cloud provider that stores this snapshot.
- ClusterName string
- CreatedAt string
- UTC ISO 8601 formatted point in time when Atlas took the snapshot.
- Description string
- UDescription of the snapshot. Only present for on-demand snapshots.
- ExpiresAt string
- UTC ISO 8601 formatted point in time when Atlas will delete the snapshot.
- Id string
- The provider-assigned unique ID for this managed resource.
- MasterKey stringUuid 
- Unique ID of the AWS KMS Customer Master Key used to encrypt the snapshot. Only visible for clusters using Encryption at Rest via Customer KMS.
- Members
List<GetCloud Backup Snapshot Member> 
- Block of List of snapshots and the cloud provider where the snapshots are stored. See below
- MongodVersion string
- Version of the MongoDB server.
- ProjectId string
- ReplicaSet stringName 
- Label given to a shard or config server from which Atlas took this snapshot.
- SnapshotId string
- SnapshotIds List<string>
- Unique identifiers of the snapshots created for the shards and config server for a sharded cluster.
- SnapshotType string
- Specified the type of snapshot. Valid values are onDemand and scheduled.
- Status string
- Current status of the snapshot. One of the following values: queued, inProgress, completed, failed.
- StorageSize intBytes 
- Specifies the size of the snapshot in bytes.
- Type string
- Specifies the type of cluster: replicaSet or shardedCluster.
- CloudProvider string
- Cloud provider that stores this snapshot.
- ClusterName string
- CreatedAt string
- UTC ISO 8601 formatted point in time when Atlas took the snapshot.
- Description string
- UDescription of the snapshot. Only present for on-demand snapshots.
- ExpiresAt string
- UTC ISO 8601 formatted point in time when Atlas will delete the snapshot.
- Id string
- The provider-assigned unique ID for this managed resource.
- MasterKey stringUuid 
- Unique ID of the AWS KMS Customer Master Key used to encrypt the snapshot. Only visible for clusters using Encryption at Rest via Customer KMS.
- Members
[]GetCloud Backup Snapshot Member 
- Block of List of snapshots and the cloud provider where the snapshots are stored. See below
- MongodVersion string
- Version of the MongoDB server.
- ProjectId string
- ReplicaSet stringName 
- Label given to a shard or config server from which Atlas took this snapshot.
- SnapshotId string
- SnapshotIds []string
- Unique identifiers of the snapshots created for the shards and config server for a sharded cluster.
- SnapshotType string
- Specified the type of snapshot. Valid values are onDemand and scheduled.
- Status string
- Current status of the snapshot. One of the following values: queued, inProgress, completed, failed.
- StorageSize intBytes 
- Specifies the size of the snapshot in bytes.
- Type string
- Specifies the type of cluster: replicaSet or shardedCluster.
- cloudProvider String
- Cloud provider that stores this snapshot.
- clusterName String
- createdAt String
- UTC ISO 8601 formatted point in time when Atlas took the snapshot.
- description String
- UDescription of the snapshot. Only present for on-demand snapshots.
- expiresAt String
- UTC ISO 8601 formatted point in time when Atlas will delete the snapshot.
- id String
- The provider-assigned unique ID for this managed resource.
- masterKey StringUuid 
- Unique ID of the AWS KMS Customer Master Key used to encrypt the snapshot. Only visible for clusters using Encryption at Rest via Customer KMS.
- members
List<GetCloud Backup Snapshot Member> 
- Block of List of snapshots and the cloud provider where the snapshots are stored. See below
- mongodVersion String
- Version of the MongoDB server.
- projectId String
- replicaSet StringName 
- Label given to a shard or config server from which Atlas took this snapshot.
- snapshotId String
- snapshotIds List<String>
- Unique identifiers of the snapshots created for the shards and config server for a sharded cluster.
- snapshotType String
- Specified the type of snapshot. Valid values are onDemand and scheduled.
- status String
- Current status of the snapshot. One of the following values: queued, inProgress, completed, failed.
- storageSize IntegerBytes 
- Specifies the size of the snapshot in bytes.
- type String
- Specifies the type of cluster: replicaSet or shardedCluster.
- cloudProvider string
- Cloud provider that stores this snapshot.
- clusterName string
- createdAt string
- UTC ISO 8601 formatted point in time when Atlas took the snapshot.
- description string
- UDescription of the snapshot. Only present for on-demand snapshots.
- expiresAt string
- UTC ISO 8601 formatted point in time when Atlas will delete the snapshot.
- id string
- The provider-assigned unique ID for this managed resource.
- masterKey stringUuid 
- Unique ID of the AWS KMS Customer Master Key used to encrypt the snapshot. Only visible for clusters using Encryption at Rest via Customer KMS.
- members
GetCloud Backup Snapshot Member[] 
- Block of List of snapshots and the cloud provider where the snapshots are stored. See below
- mongodVersion string
- Version of the MongoDB server.
- projectId string
- replicaSet stringName 
- Label given to a shard or config server from which Atlas took this snapshot.
- snapshotId string
- snapshotIds string[]
- Unique identifiers of the snapshots created for the shards and config server for a sharded cluster.
- snapshotType string
- Specified the type of snapshot. Valid values are onDemand and scheduled.
- status string
- Current status of the snapshot. One of the following values: queued, inProgress, completed, failed.
- storageSize numberBytes 
- Specifies the size of the snapshot in bytes.
- type string
- Specifies the type of cluster: replicaSet or shardedCluster.
- cloud_provider str
- Cloud provider that stores this snapshot.
- cluster_name str
- created_at str
- UTC ISO 8601 formatted point in time when Atlas took the snapshot.
- description str
- UDescription of the snapshot. Only present for on-demand snapshots.
- expires_at str
- UTC ISO 8601 formatted point in time when Atlas will delete the snapshot.
- id str
- The provider-assigned unique ID for this managed resource.
- master_key_ struuid 
- Unique ID of the AWS KMS Customer Master Key used to encrypt the snapshot. Only visible for clusters using Encryption at Rest via Customer KMS.
- members
Sequence[GetCloud Backup Snapshot Member] 
- Block of List of snapshots and the cloud provider where the snapshots are stored. See below
- mongod_version str
- Version of the MongoDB server.
- project_id str
- replica_set_ strname 
- Label given to a shard or config server from which Atlas took this snapshot.
- snapshot_id str
- snapshot_ids Sequence[str]
- Unique identifiers of the snapshots created for the shards and config server for a sharded cluster.
- snapshot_type str
- Specified the type of snapshot. Valid values are onDemand and scheduled.
- status str
- Current status of the snapshot. One of the following values: queued, inProgress, completed, failed.
- storage_size_ intbytes 
- Specifies the size of the snapshot in bytes.
- type str
- Specifies the type of cluster: replicaSet or shardedCluster.
- cloudProvider String
- Cloud provider that stores this snapshot.
- clusterName String
- createdAt String
- UTC ISO 8601 formatted point in time when Atlas took the snapshot.
- description String
- UDescription of the snapshot. Only present for on-demand snapshots.
- expiresAt String
- UTC ISO 8601 formatted point in time when Atlas will delete the snapshot.
- id String
- The provider-assigned unique ID for this managed resource.
- masterKey StringUuid 
- Unique ID of the AWS KMS Customer Master Key used to encrypt the snapshot. Only visible for clusters using Encryption at Rest via Customer KMS.
- members List<Property Map>
- Block of List of snapshots and the cloud provider where the snapshots are stored. See below
- mongodVersion String
- Version of the MongoDB server.
- projectId String
- replicaSet StringName 
- Label given to a shard or config server from which Atlas took this snapshot.
- snapshotId String
- snapshotIds List<String>
- Unique identifiers of the snapshots created for the shards and config server for a sharded cluster.
- snapshotType String
- Specified the type of snapshot. Valid values are onDemand and scheduled.
- status String
- Current status of the snapshot. One of the following values: queued, inProgress, completed, failed.
- storageSize NumberBytes 
- Specifies the size of the snapshot in bytes.
- type String
- Specifies the type of cluster: replicaSet or shardedCluster.
Supporting Types
GetCloudBackupSnapshotMember    
- CloudProvider string
- Cloud provider that stores this snapshot.
- Id string
- Unique identifier for the sharded cluster snapshot.
- ReplicaSet stringName 
- Label given to a shard or config server from which Atlas took this snapshot.
- CloudProvider string
- Cloud provider that stores this snapshot.
- Id string
- Unique identifier for the sharded cluster snapshot.
- ReplicaSet stringName 
- Label given to a shard or config server from which Atlas took this snapshot.
- cloudProvider String
- Cloud provider that stores this snapshot.
- id String
- Unique identifier for the sharded cluster snapshot.
- replicaSet StringName 
- Label given to a shard or config server from which Atlas took this snapshot.
- cloudProvider string
- Cloud provider that stores this snapshot.
- id string
- Unique identifier for the sharded cluster snapshot.
- replicaSet stringName 
- Label given to a shard or config server from which Atlas took this snapshot.
- cloud_provider str
- Cloud provider that stores this snapshot.
- id str
- Unique identifier for the sharded cluster snapshot.
- replica_set_ strname 
- Label given to a shard or config server from which Atlas took this snapshot.
- cloudProvider String
- Cloud provider that stores this snapshot.
- id String
- Unique identifier for the sharded cluster snapshot.
- replicaSet StringName 
- Label given to a shard or config server from which Atlas took this snapshot.
Package Details
- Repository
- MongoDB Atlas pulumi/pulumi-mongodbatlas
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the mongodbatlasTerraform Provider.