1. Packages
  2. Mongodbatlas Provider
  3. API Docs
  4. CloudBackupSnapshot
MongoDB Atlas v3.30.0 published on Friday, Mar 21, 2025 by Pulumi

mongodbatlas.CloudBackupSnapshot

Explore with Pulumi AI

# Resource: mongodbatlas.CloudBackupSnapshot

mongodbatlas.CloudBackupSnapshot provides a resource to take a cloud backup snapshot on demand. On-demand snapshots happen immediately, unlike scheduled snapshots which occur at regular intervals. If there is already an on-demand snapshot with a status of queued or inProgress, you must wait until Atlas has completed the on-demand snapshot before taking another.

NOTE: Groups and projects are synonymous terms. You may find groupId in the official documentation.

NOTE: If Backup Compliance Policy is enabled for the project for which this backup schedule is defined, you cannot delete a backup snapshot or decrease the retention time for a snapshot after it’s taken. See Backup Compliance Policy Prohibited Actions and Considerations.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const myCluster = new mongodbatlas.AdvancedCluster("my_cluster", {
    projectId: "<PROJECT-ID>",
    name: "MyCluster",
    clusterType: "REPLICASET",
    backupEnabled: true,
    replicationSpecs: [{
        regionConfigs: [{
            priority: 7,
            providerName: "AWS",
            regionName: "EU_WEST_2",
            electableSpecs: {
                instanceSize: "M10",
                nodeCount: 3,
            },
        }],
    }],
});
const test = new mongodbatlas.CloudBackupSnapshot("test", {
    projectId: myCluster.projectId,
    clusterName: myCluster.name,
    description: "myDescription",
    retentionInDays: 1,
});
const testCloudBackupSnapshotRestoreJob = new mongodbatlas.CloudBackupSnapshotRestoreJob("test", {
    projectId: test.projectId,
    clusterName: test.clusterName,
    snapshotId: test.snapshotId,
    deliveryTypeConfig: {
        download: true,
    },
});
Copy
import pulumi
import pulumi_mongodbatlas as mongodbatlas

my_cluster = mongodbatlas.AdvancedCluster("my_cluster",
    project_id="<PROJECT-ID>",
    name="MyCluster",
    cluster_type="REPLICASET",
    backup_enabled=True,
    replication_specs=[{
        "region_configs": [{
            "priority": 7,
            "provider_name": "AWS",
            "region_name": "EU_WEST_2",
            "electable_specs": {
                "instance_size": "M10",
                "node_count": 3,
            },
        }],
    }])
test = mongodbatlas.CloudBackupSnapshot("test",
    project_id=my_cluster.project_id,
    cluster_name=my_cluster.name,
    description="myDescription",
    retention_in_days=1)
test_cloud_backup_snapshot_restore_job = mongodbatlas.CloudBackupSnapshotRestoreJob("test",
    project_id=test.project_id,
    cluster_name=test.cluster_name,
    snapshot_id=test.snapshot_id,
    delivery_type_config={
        "download": True,
    })
Copy
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 {
		myCluster, err := mongodbatlas.NewAdvancedCluster(ctx, "my_cluster", &mongodbatlas.AdvancedClusterArgs{
			ProjectId:     pulumi.String("<PROJECT-ID>"),
			Name:          pulumi.String("MyCluster"),
			ClusterType:   pulumi.String("REPLICASET"),
			BackupEnabled: pulumi.Bool(true),
			ReplicationSpecs: mongodbatlas.AdvancedClusterReplicationSpecArray{
				&mongodbatlas.AdvancedClusterReplicationSpecArgs{
					RegionConfigs: mongodbatlas.AdvancedClusterReplicationSpecRegionConfigArray{
						&mongodbatlas.AdvancedClusterReplicationSpecRegionConfigArgs{
							Priority:     pulumi.Int(7),
							ProviderName: pulumi.String("AWS"),
							RegionName:   pulumi.String("EU_WEST_2"),
							ElectableSpecs: &mongodbatlas.AdvancedClusterReplicationSpecRegionConfigElectableSpecsArgs{
								InstanceSize: pulumi.String("M10"),
								NodeCount:    pulumi.Int(3),
							},
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		test, err := mongodbatlas.NewCloudBackupSnapshot(ctx, "test", &mongodbatlas.CloudBackupSnapshotArgs{
			ProjectId:       myCluster.ProjectId,
			ClusterName:     myCluster.Name,
			Description:     pulumi.String("myDescription"),
			RetentionInDays: pulumi.Int(1),
		})
		if err != nil {
			return err
		}
		_, err = mongodbatlas.NewCloudBackupSnapshotRestoreJob(ctx, "test", &mongodbatlas.CloudBackupSnapshotRestoreJobArgs{
			ProjectId:   test.ProjectId,
			ClusterName: test.ClusterName,
			SnapshotId:  test.SnapshotId,
			DeliveryTypeConfig: &mongodbatlas.CloudBackupSnapshotRestoreJobDeliveryTypeConfigArgs{
				Download: pulumi.Bool(true),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;

return await Deployment.RunAsync(() => 
{
    var myCluster = new Mongodbatlas.AdvancedCluster("my_cluster", new()
    {
        ProjectId = "<PROJECT-ID>",
        Name = "MyCluster",
        ClusterType = "REPLICASET",
        BackupEnabled = true,
        ReplicationSpecs = new[]
        {
            new Mongodbatlas.Inputs.AdvancedClusterReplicationSpecArgs
            {
                RegionConfigs = new[]
                {
                    new Mongodbatlas.Inputs.AdvancedClusterReplicationSpecRegionConfigArgs
                    {
                        Priority = 7,
                        ProviderName = "AWS",
                        RegionName = "EU_WEST_2",
                        ElectableSpecs = new Mongodbatlas.Inputs.AdvancedClusterReplicationSpecRegionConfigElectableSpecsArgs
                        {
                            InstanceSize = "M10",
                            NodeCount = 3,
                        },
                    },
                },
            },
        },
    });

    var test = new Mongodbatlas.CloudBackupSnapshot("test", new()
    {
        ProjectId = myCluster.ProjectId,
        ClusterName = myCluster.Name,
        Description = "myDescription",
        RetentionInDays = 1,
    });

    var testCloudBackupSnapshotRestoreJob = new Mongodbatlas.CloudBackupSnapshotRestoreJob("test", new()
    {
        ProjectId = test.ProjectId,
        ClusterName = test.ClusterName,
        SnapshotId = test.SnapshotId,
        DeliveryTypeConfig = new Mongodbatlas.Inputs.CloudBackupSnapshotRestoreJobDeliveryTypeConfigArgs
        {
            Download = true,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.AdvancedCluster;
import com.pulumi.mongodbatlas.AdvancedClusterArgs;
import com.pulumi.mongodbatlas.inputs.AdvancedClusterReplicationSpecArgs;
import com.pulumi.mongodbatlas.CloudBackupSnapshot;
import com.pulumi.mongodbatlas.CloudBackupSnapshotArgs;
import com.pulumi.mongodbatlas.CloudBackupSnapshotRestoreJob;
import com.pulumi.mongodbatlas.CloudBackupSnapshotRestoreJobArgs;
import com.pulumi.mongodbatlas.inputs.CloudBackupSnapshotRestoreJobDeliveryTypeConfigArgs;
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 myCluster = new AdvancedCluster("myCluster", AdvancedClusterArgs.builder()
            .projectId("<PROJECT-ID>")
            .name("MyCluster")
            .clusterType("REPLICASET")
            .backupEnabled(true)
            .replicationSpecs(AdvancedClusterReplicationSpecArgs.builder()
                .regionConfigs(AdvancedClusterReplicationSpecRegionConfigArgs.builder()
                    .priority(7)
                    .providerName("AWS")
                    .regionName("EU_WEST_2")
                    .electableSpecs(AdvancedClusterReplicationSpecRegionConfigElectableSpecsArgs.builder()
                        .instanceSize("M10")
                        .nodeCount(3)
                        .build())
                    .build())
                .build())
            .build());

        var test = new CloudBackupSnapshot("test", CloudBackupSnapshotArgs.builder()
            .projectId(myCluster.projectId())
            .clusterName(myCluster.name())
            .description("myDescription")
            .retentionInDays(1)
            .build());

        var testCloudBackupSnapshotRestoreJob = new CloudBackupSnapshotRestoreJob("testCloudBackupSnapshotRestoreJob", CloudBackupSnapshotRestoreJobArgs.builder()
            .projectId(test.projectId())
            .clusterName(test.clusterName())
            .snapshotId(test.snapshotId())
            .deliveryTypeConfig(CloudBackupSnapshotRestoreJobDeliveryTypeConfigArgs.builder()
                .download(true)
                .build())
            .build());

    }
}
Copy
resources:
  myCluster:
    type: mongodbatlas:AdvancedCluster
    name: my_cluster
    properties:
      projectId: <PROJECT-ID>
      name: MyCluster
      clusterType: REPLICASET
      backupEnabled: true # enable cloud backup snapshots
      replicationSpecs:
        - regionConfigs:
            - priority: 7
              providerName: AWS
              regionName: EU_WEST_2
              electableSpecs:
                instanceSize: M10
                nodeCount: 3
  test:
    type: mongodbatlas:CloudBackupSnapshot
    properties:
      projectId: ${myCluster.projectId}
      clusterName: ${myCluster.name}
      description: myDescription
      retentionInDays: 1
  testCloudBackupSnapshotRestoreJob:
    type: mongodbatlas:CloudBackupSnapshotRestoreJob
    name: test
    properties:
      projectId: ${test.projectId}
      clusterName: ${test.clusterName}
      snapshotId: ${test.snapshotId}
      deliveryTypeConfig:
        download: true
Copy

Create CloudBackupSnapshot Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new CloudBackupSnapshot(name: string, args: CloudBackupSnapshotArgs, opts?: CustomResourceOptions);
@overload
def CloudBackupSnapshot(resource_name: str,
                        args: CloudBackupSnapshotArgs,
                        opts: Optional[ResourceOptions] = None)

@overload
def CloudBackupSnapshot(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        cluster_name: Optional[str] = None,
                        description: Optional[str] = None,
                        project_id: Optional[str] = None,
                        retention_in_days: Optional[int] = None)
func NewCloudBackupSnapshot(ctx *Context, name string, args CloudBackupSnapshotArgs, opts ...ResourceOption) (*CloudBackupSnapshot, error)
public CloudBackupSnapshot(string name, CloudBackupSnapshotArgs args, CustomResourceOptions? opts = null)
public CloudBackupSnapshot(String name, CloudBackupSnapshotArgs args)
public CloudBackupSnapshot(String name, CloudBackupSnapshotArgs args, CustomResourceOptions options)
type: mongodbatlas:CloudBackupSnapshot
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. CloudBackupSnapshotArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. CloudBackupSnapshotArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. CloudBackupSnapshotArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. CloudBackupSnapshotArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. CloudBackupSnapshotArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var cloudBackupSnapshotResource = new Mongodbatlas.CloudBackupSnapshot("cloudBackupSnapshotResource", new()
{
    ClusterName = "string",
    Description = "string",
    ProjectId = "string",
    RetentionInDays = 0,
});
Copy
example, err := mongodbatlas.NewCloudBackupSnapshot(ctx, "cloudBackupSnapshotResource", &mongodbatlas.CloudBackupSnapshotArgs{
	ClusterName:     pulumi.String("string"),
	Description:     pulumi.String("string"),
	ProjectId:       pulumi.String("string"),
	RetentionInDays: pulumi.Int(0),
})
Copy
var cloudBackupSnapshotResource = new CloudBackupSnapshot("cloudBackupSnapshotResource", CloudBackupSnapshotArgs.builder()
    .clusterName("string")
    .description("string")
    .projectId("string")
    .retentionInDays(0)
    .build());
Copy
cloud_backup_snapshot_resource = mongodbatlas.CloudBackupSnapshot("cloudBackupSnapshotResource",
    cluster_name="string",
    description="string",
    project_id="string",
    retention_in_days=0)
Copy
const cloudBackupSnapshotResource = new mongodbatlas.CloudBackupSnapshot("cloudBackupSnapshotResource", {
    clusterName: "string",
    description: "string",
    projectId: "string",
    retentionInDays: 0,
});
Copy
type: mongodbatlas:CloudBackupSnapshot
properties:
    clusterName: string
    description: string
    projectId: string
    retentionInDays: 0
Copy

CloudBackupSnapshot Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The CloudBackupSnapshot resource accepts the following input properties:

ClusterName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Atlas cluster that contains the snapshots you want to retrieve.
Description
This property is required.
Changes to this property will trigger replacement.
string
Description of the on-demand snapshot.
ProjectId
This property is required.
Changes to this property will trigger replacement.
string
The unique identifier of the project for the Atlas cluster.
RetentionInDays
This property is required.
Changes to this property will trigger replacement.
int
The number of days that Atlas should retain the on-demand snapshot. Must be at least 1.
ClusterName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Atlas cluster that contains the snapshots you want to retrieve.
Description
This property is required.
Changes to this property will trigger replacement.
string
Description of the on-demand snapshot.
ProjectId
This property is required.
Changes to this property will trigger replacement.
string
The unique identifier of the project for the Atlas cluster.
RetentionInDays
This property is required.
Changes to this property will trigger replacement.
int
The number of days that Atlas should retain the on-demand snapshot. Must be at least 1.
clusterName
This property is required.
Changes to this property will trigger replacement.
String
The name of the Atlas cluster that contains the snapshots you want to retrieve.
description
This property is required.
Changes to this property will trigger replacement.
String
Description of the on-demand snapshot.
projectId
This property is required.
Changes to this property will trigger replacement.
String
The unique identifier of the project for the Atlas cluster.
retentionInDays
This property is required.
Changes to this property will trigger replacement.
Integer
The number of days that Atlas should retain the on-demand snapshot. Must be at least 1.
clusterName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Atlas cluster that contains the snapshots you want to retrieve.
description
This property is required.
Changes to this property will trigger replacement.
string
Description of the on-demand snapshot.
projectId
This property is required.
Changes to this property will trigger replacement.
string
The unique identifier of the project for the Atlas cluster.
retentionInDays
This property is required.
Changes to this property will trigger replacement.
number
The number of days that Atlas should retain the on-demand snapshot. Must be at least 1.
cluster_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the Atlas cluster that contains the snapshots you want to retrieve.
description
This property is required.
Changes to this property will trigger replacement.
str
Description of the on-demand snapshot.
project_id
This property is required.
Changes to this property will trigger replacement.
str
The unique identifier of the project for the Atlas cluster.
retention_in_days
This property is required.
Changes to this property will trigger replacement.
int
The number of days that Atlas should retain the on-demand snapshot. Must be at least 1.
clusterName
This property is required.
Changes to this property will trigger replacement.
String
The name of the Atlas cluster that contains the snapshots you want to retrieve.
description
This property is required.
Changes to this property will trigger replacement.
String
Description of the on-demand snapshot.
projectId
This property is required.
Changes to this property will trigger replacement.
String
The unique identifier of the project for the Atlas cluster.
retentionInDays
This property is required.
Changes to this property will trigger replacement.
Number
The number of days that Atlas should retain the on-demand snapshot. Must be at least 1.

Outputs

All input properties are implicitly available as output properties. Additionally, the CloudBackupSnapshot resource produces the following output properties:

CloudProvider string
Cloud provider that stores this snapshot.
CreatedAt string
UTC ISO 8601 formatted point in time when Atlas took the snapshot.
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.
MasterKeyUuid string
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<CloudBackupSnapshotMember>
Block of List of snapshots and the cloud provider where the snapshots are stored. Atlas returns this parameter when type is shardedCluster. See below
MongodVersion string
Version of the MongoDB server.
ReplicaSetName string
Label given to a shard or config server from which Atlas took this snapshot.
SnapshotId string
Unique identifier of the snapshot.
SnapshotIds List<string>
Unique identifiers of the snapshots created for the shards and config server for a sharded cluster. Atlas returns this parameter when type is shardedCluster. These identifiers should match those given in the members[#].id parameters. This allows you to map a snapshot to its shard or config server name.
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 will be returned: queued, inProgress, completed, failed.
StorageSizeBytes int
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.
CreatedAt string
UTC ISO 8601 formatted point in time when Atlas took the snapshot.
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.
MasterKeyUuid string
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 []CloudBackupSnapshotMember
Block of List of snapshots and the cloud provider where the snapshots are stored. Atlas returns this parameter when type is shardedCluster. See below
MongodVersion string
Version of the MongoDB server.
ReplicaSetName string
Label given to a shard or config server from which Atlas took this snapshot.
SnapshotId string
Unique identifier of the snapshot.
SnapshotIds []string
Unique identifiers of the snapshots created for the shards and config server for a sharded cluster. Atlas returns this parameter when type is shardedCluster. These identifiers should match those given in the members[#].id parameters. This allows you to map a snapshot to its shard or config server name.
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 will be returned: queued, inProgress, completed, failed.
StorageSizeBytes int
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.
createdAt String
UTC ISO 8601 formatted point in time when Atlas took the snapshot.
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.
masterKeyUuid String
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<CloudBackupSnapshotMember>
Block of List of snapshots and the cloud provider where the snapshots are stored. Atlas returns this parameter when type is shardedCluster. See below
mongodVersion String
Version of the MongoDB server.
replicaSetName String
Label given to a shard or config server from which Atlas took this snapshot.
snapshotId String
Unique identifier of the snapshot.
snapshotIds List<String>
Unique identifiers of the snapshots created for the shards and config server for a sharded cluster. Atlas returns this parameter when type is shardedCluster. These identifiers should match those given in the members[#].id parameters. This allows you to map a snapshot to its shard or config server name.
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 will be returned: queued, inProgress, completed, failed.
storageSizeBytes Integer
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.
createdAt string
UTC ISO 8601 formatted point in time when Atlas took the snapshot.
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.
masterKeyUuid string
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 CloudBackupSnapshotMember[]
Block of List of snapshots and the cloud provider where the snapshots are stored. Atlas returns this parameter when type is shardedCluster. See below
mongodVersion string
Version of the MongoDB server.
replicaSetName string
Label given to a shard or config server from which Atlas took this snapshot.
snapshotId string
Unique identifier of the snapshot.
snapshotIds string[]
Unique identifiers of the snapshots created for the shards and config server for a sharded cluster. Atlas returns this parameter when type is shardedCluster. These identifiers should match those given in the members[#].id parameters. This allows you to map a snapshot to its shard or config server name.
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 will be returned: queued, inProgress, completed, failed.
storageSizeBytes number
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.
created_at str
UTC ISO 8601 formatted point in time when Atlas took the snapshot.
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_uuid str
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[CloudBackupSnapshotMember]
Block of List of snapshots and the cloud provider where the snapshots are stored. Atlas returns this parameter when type is shardedCluster. See below
mongod_version str
Version of the MongoDB server.
replica_set_name str
Label given to a shard or config server from which Atlas took this snapshot.
snapshot_id str
Unique identifier of the snapshot.
snapshot_ids Sequence[str]
Unique identifiers of the snapshots created for the shards and config server for a sharded cluster. Atlas returns this parameter when type is shardedCluster. These identifiers should match those given in the members[#].id parameters. This allows you to map a snapshot to its shard or config server name.
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 will be returned: queued, inProgress, completed, failed.
storage_size_bytes int
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.
createdAt String
UTC ISO 8601 formatted point in time when Atlas took the snapshot.
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.
masterKeyUuid String
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. Atlas returns this parameter when type is shardedCluster. See below
mongodVersion String
Version of the MongoDB server.
replicaSetName String
Label given to a shard or config server from which Atlas took this snapshot.
snapshotId String
Unique identifier of the snapshot.
snapshotIds List<String>
Unique identifiers of the snapshots created for the shards and config server for a sharded cluster. Atlas returns this parameter when type is shardedCluster. These identifiers should match those given in the members[#].id parameters. This allows you to map a snapshot to its shard or config server name.
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 will be returned: queued, inProgress, completed, failed.
storageSizeBytes Number
Specifies the size of the snapshot in bytes.
type String
Specifies the type of cluster: replicaSet or shardedCluster.

Look up Existing CloudBackupSnapshot Resource

Get an existing CloudBackupSnapshot resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: CloudBackupSnapshotState, opts?: CustomResourceOptions): CloudBackupSnapshot
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cloud_provider: Optional[str] = None,
        cluster_name: Optional[str] = None,
        created_at: Optional[str] = None,
        description: Optional[str] = None,
        expires_at: Optional[str] = None,
        master_key_uuid: Optional[str] = None,
        members: Optional[Sequence[CloudBackupSnapshotMemberArgs]] = None,
        mongod_version: Optional[str] = None,
        project_id: Optional[str] = None,
        replica_set_name: Optional[str] = None,
        retention_in_days: Optional[int] = None,
        snapshot_id: Optional[str] = None,
        snapshot_ids: Optional[Sequence[str]] = None,
        snapshot_type: Optional[str] = None,
        status: Optional[str] = None,
        storage_size_bytes: Optional[int] = None,
        type: Optional[str] = None) -> CloudBackupSnapshot
func GetCloudBackupSnapshot(ctx *Context, name string, id IDInput, state *CloudBackupSnapshotState, opts ...ResourceOption) (*CloudBackupSnapshot, error)
public static CloudBackupSnapshot Get(string name, Input<string> id, CloudBackupSnapshotState? state, CustomResourceOptions? opts = null)
public static CloudBackupSnapshot get(String name, Output<String> id, CloudBackupSnapshotState state, CustomResourceOptions options)
resources:  _:    type: mongodbatlas:CloudBackupSnapshot    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
CloudProvider string
Cloud provider that stores this snapshot.
ClusterName Changes to this property will trigger replacement. string
The name of the Atlas cluster that contains the snapshots you want to retrieve.
CreatedAt string
UTC ISO 8601 formatted point in time when Atlas took the snapshot.
Description Changes to this property will trigger replacement. string
Description of the on-demand snapshot.
ExpiresAt string
UTC ISO 8601 formatted point in time when Atlas will delete the snapshot.
MasterKeyUuid string
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<CloudBackupSnapshotMember>
Block of List of snapshots and the cloud provider where the snapshots are stored. Atlas returns this parameter when type is shardedCluster. See below
MongodVersion string
Version of the MongoDB server.
ProjectId Changes to this property will trigger replacement. string
The unique identifier of the project for the Atlas cluster.
ReplicaSetName string
Label given to a shard or config server from which Atlas took this snapshot.
RetentionInDays Changes to this property will trigger replacement. int
The number of days that Atlas should retain the on-demand snapshot. Must be at least 1.
SnapshotId string
Unique identifier of the snapshot.
SnapshotIds List<string>
Unique identifiers of the snapshots created for the shards and config server for a sharded cluster. Atlas returns this parameter when type is shardedCluster. These identifiers should match those given in the members[#].id parameters. This allows you to map a snapshot to its shard or config server name.
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 will be returned: queued, inProgress, completed, failed.
StorageSizeBytes int
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 Changes to this property will trigger replacement. string
The name of the Atlas cluster that contains the snapshots you want to retrieve.
CreatedAt string
UTC ISO 8601 formatted point in time when Atlas took the snapshot.
Description Changes to this property will trigger replacement. string
Description of the on-demand snapshot.
ExpiresAt string
UTC ISO 8601 formatted point in time when Atlas will delete the snapshot.
MasterKeyUuid string
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 []CloudBackupSnapshotMemberArgs
Block of List of snapshots and the cloud provider where the snapshots are stored. Atlas returns this parameter when type is shardedCluster. See below
MongodVersion string
Version of the MongoDB server.
ProjectId Changes to this property will trigger replacement. string
The unique identifier of the project for the Atlas cluster.
ReplicaSetName string
Label given to a shard or config server from which Atlas took this snapshot.
RetentionInDays Changes to this property will trigger replacement. int
The number of days that Atlas should retain the on-demand snapshot. Must be at least 1.
SnapshotId string
Unique identifier of the snapshot.
SnapshotIds []string
Unique identifiers of the snapshots created for the shards and config server for a sharded cluster. Atlas returns this parameter when type is shardedCluster. These identifiers should match those given in the members[#].id parameters. This allows you to map a snapshot to its shard or config server name.
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 will be returned: queued, inProgress, completed, failed.
StorageSizeBytes int
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 Changes to this property will trigger replacement. String
The name of the Atlas cluster that contains the snapshots you want to retrieve.
createdAt String
UTC ISO 8601 formatted point in time when Atlas took the snapshot.
description Changes to this property will trigger replacement. String
Description of the on-demand snapshot.
expiresAt String
UTC ISO 8601 formatted point in time when Atlas will delete the snapshot.
masterKeyUuid String
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<CloudBackupSnapshotMember>
Block of List of snapshots and the cloud provider where the snapshots are stored. Atlas returns this parameter when type is shardedCluster. See below
mongodVersion String
Version of the MongoDB server.
projectId Changes to this property will trigger replacement. String
The unique identifier of the project for the Atlas cluster.
replicaSetName String
Label given to a shard or config server from which Atlas took this snapshot.
retentionInDays Changes to this property will trigger replacement. Integer
The number of days that Atlas should retain the on-demand snapshot. Must be at least 1.
snapshotId String
Unique identifier of the snapshot.
snapshotIds List<String>
Unique identifiers of the snapshots created for the shards and config server for a sharded cluster. Atlas returns this parameter when type is shardedCluster. These identifiers should match those given in the members[#].id parameters. This allows you to map a snapshot to its shard or config server name.
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 will be returned: queued, inProgress, completed, failed.
storageSizeBytes Integer
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 Changes to this property will trigger replacement. string
The name of the Atlas cluster that contains the snapshots you want to retrieve.
createdAt string
UTC ISO 8601 formatted point in time when Atlas took the snapshot.
description Changes to this property will trigger replacement. string
Description of the on-demand snapshot.
expiresAt string
UTC ISO 8601 formatted point in time when Atlas will delete the snapshot.
masterKeyUuid string
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 CloudBackupSnapshotMember[]
Block of List of snapshots and the cloud provider where the snapshots are stored. Atlas returns this parameter when type is shardedCluster. See below
mongodVersion string
Version of the MongoDB server.
projectId Changes to this property will trigger replacement. string
The unique identifier of the project for the Atlas cluster.
replicaSetName string
Label given to a shard or config server from which Atlas took this snapshot.
retentionInDays Changes to this property will trigger replacement. number
The number of days that Atlas should retain the on-demand snapshot. Must be at least 1.
snapshotId string
Unique identifier of the snapshot.
snapshotIds string[]
Unique identifiers of the snapshots created for the shards and config server for a sharded cluster. Atlas returns this parameter when type is shardedCluster. These identifiers should match those given in the members[#].id parameters. This allows you to map a snapshot to its shard or config server name.
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 will be returned: queued, inProgress, completed, failed.
storageSizeBytes number
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 Changes to this property will trigger replacement. str
The name of the Atlas cluster that contains the snapshots you want to retrieve.
created_at str
UTC ISO 8601 formatted point in time when Atlas took the snapshot.
description Changes to this property will trigger replacement. str
Description of the on-demand snapshot.
expires_at str
UTC ISO 8601 formatted point in time when Atlas will delete the snapshot.
master_key_uuid str
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[CloudBackupSnapshotMemberArgs]
Block of List of snapshots and the cloud provider where the snapshots are stored. Atlas returns this parameter when type is shardedCluster. See below
mongod_version str
Version of the MongoDB server.
project_id Changes to this property will trigger replacement. str
The unique identifier of the project for the Atlas cluster.
replica_set_name str
Label given to a shard or config server from which Atlas took this snapshot.
retention_in_days Changes to this property will trigger replacement. int
The number of days that Atlas should retain the on-demand snapshot. Must be at least 1.
snapshot_id str
Unique identifier of the snapshot.
snapshot_ids Sequence[str]
Unique identifiers of the snapshots created for the shards and config server for a sharded cluster. Atlas returns this parameter when type is shardedCluster. These identifiers should match those given in the members[#].id parameters. This allows you to map a snapshot to its shard or config server name.
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 will be returned: queued, inProgress, completed, failed.
storage_size_bytes int
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 Changes to this property will trigger replacement. String
The name of the Atlas cluster that contains the snapshots you want to retrieve.
createdAt String
UTC ISO 8601 formatted point in time when Atlas took the snapshot.
description Changes to this property will trigger replacement. String
Description of the on-demand snapshot.
expiresAt String
UTC ISO 8601 formatted point in time when Atlas will delete the snapshot.
masterKeyUuid String
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. Atlas returns this parameter when type is shardedCluster. See below
mongodVersion String
Version of the MongoDB server.
projectId Changes to this property will trigger replacement. String
The unique identifier of the project for the Atlas cluster.
replicaSetName String
Label given to a shard or config server from which Atlas took this snapshot.
retentionInDays Changes to this property will trigger replacement. Number
The number of days that Atlas should retain the on-demand snapshot. Must be at least 1.
snapshotId String
Unique identifier of the snapshot.
snapshotIds List<String>
Unique identifiers of the snapshots created for the shards and config server for a sharded cluster. Atlas returns this parameter when type is shardedCluster. These identifiers should match those given in the members[#].id parameters. This allows you to map a snapshot to its shard or config server name.
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 will be returned: queued, inProgress, completed, failed.
storageSizeBytes Number
Specifies the size of the snapshot in bytes.
type String
Specifies the type of cluster: replicaSet or shardedCluster.

Supporting Types

CloudBackupSnapshotMember
, CloudBackupSnapshotMemberArgs

CloudProvider string
Cloud provider that stores this snapshot.
Id string
Unique identifier for the sharded cluster snapshot.
ReplicaSetName string
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.
ReplicaSetName string
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.
replicaSetName String
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.
replicaSetName string
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_name str
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.
replicaSetName String
Label given to a shard or config server from which Atlas took this snapshot.

Import

Cloud Backup Snapshot entries can be imported using project project_id, cluster_name and snapshot_id (Unique identifier of the snapshot), in the format PROJECTID-CLUSTERNAME-SNAPSHOTID, e.g.

$ pulumi import mongodbatlas:index/cloudBackupSnapshot:CloudBackupSnapshot test 5d0f1f73cf09a29120e173cf-MyClusterTest-5d116d82014b764445b2f9b5
Copy

For more information see: MongoDB Atlas API Reference.

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
MongoDB Atlas pulumi/pulumi-mongodbatlas
License
Apache-2.0
Notes
This Pulumi package is based on the mongodbatlas Terraform Provider.