CloudProviderSnapshot
mongodbatlas..CloudProviderSnapshot provides a resource to take a cloud provider 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
groupIdin the official documentation.
Example Usage
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
class MyStack : Stack
{
public MyStack()
{
var myCluster = new Mongodbatlas.Cluster("myCluster", new Mongodbatlas.ClusterArgs
{
ProjectId = "5cf5a45a9ccf6400e60981b6",
DiskSizeGb = 5,
ProviderName = "AWS",
ProviderRegionName = "EU_WEST_2",
ProviderInstanceSizeName = "M10",
ProviderBackupEnabled = true,
ProviderDiskIops = 100,
ProviderEncryptEbsVolume = false,
});
var testCloudProviderSnapshot = new Mongodbatlas.CloudProviderSnapshot("testCloudProviderSnapshot", new Mongodbatlas.CloudProviderSnapshotArgs
{
ProjectId = myCluster.ProjectId,
ClusterName = myCluster.Name,
Description = "myDescription",
RetentionInDays = 1,
});
var testCloudProviderSnapshotRestoreJob = new Mongodbatlas.CloudProviderSnapshotRestoreJob("testCloudProviderSnapshotRestoreJob", new Mongodbatlas.CloudProviderSnapshotRestoreJobArgs
{
ProjectId = testCloudProviderSnapshot.ProjectId,
ClusterName = testCloudProviderSnapshot.ClusterName,
SnapshotId = testCloudProviderSnapshot.SnapshotId,
DeliveryType = new Mongodbatlas.Inputs.CloudProviderSnapshotRestoreJobDeliveryTypeArgs
{
Download = true,
},
});
}
}
Coming soon!
import pulumi
import pulumi_mongodbatlas as mongodbatlas
my_cluster = mongodbatlas.Cluster("myCluster",
project_id="5cf5a45a9ccf6400e60981b6",
disk_size_gb=5,
provider_name="AWS",
provider_region_name="EU_WEST_2",
provider_instance_size_name="M10",
provider_backup_enabled=True,
provider_disk_iops=100,
provider_encrypt_ebs_volume=False)
test_cloud_provider_snapshot = mongodbatlas.CloudProviderSnapshot("testCloudProviderSnapshot",
project_id=my_cluster.project_id,
cluster_name=my_cluster.name,
description="myDescription",
retention_in_days=1)
test_cloud_provider_snapshot_restore_job = mongodbatlas.CloudProviderSnapshotRestoreJob("testCloudProviderSnapshotRestoreJob",
project_id=test_cloud_provider_snapshot.project_id,
cluster_name=test_cloud_provider_snapshot.cluster_name,
snapshot_id=test_cloud_provider_snapshot.snapshot_id,
delivery_type={
"download": True,
})import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const myCluster = new mongodbatlas.Cluster("myCluster", {
projectId: "5cf5a45a9ccf6400e60981b6",
diskSizeGb: 5,
providerName: "AWS",
providerRegionName: "EU_WEST_2",
providerInstanceSizeName: "M10",
providerBackupEnabled: true,
providerDiskIops: 100,
providerEncryptEbsVolume: false,
});
const testCloudProviderSnapshot = new mongodbatlas.CloudProviderSnapshot("testCloudProviderSnapshot", {
projectId: myCluster.projectId,
clusterName: myCluster.name,
description: "myDescription",
retentionInDays: 1,
});
const testCloudProviderSnapshotRestoreJob = new mongodbatlas.CloudProviderSnapshotRestoreJob("testCloudProviderSnapshotRestoreJob", {
projectId: testCloudProviderSnapshot.projectId,
clusterName: testCloudProviderSnapshot.clusterName,
snapshotId: testCloudProviderSnapshot.snapshotId,
deliveryType: {
download: true,
},
});Create a CloudProviderSnapshot Resource
new CloudProviderSnapshot(name: string, args: CloudProviderSnapshotArgs, opts?: CustomResourceOptions);def CloudProviderSnapshot(resource_name, opts=None, cluster_name=None, description=None, project_id=None, retention_in_days=None, __props__=None);func NewCloudProviderSnapshot(ctx *Context, name string, args CloudProviderSnapshotArgs, opts ...ResourceOption) (*CloudProviderSnapshot, error)public CloudProviderSnapshot(string name, CloudProviderSnapshotArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args CloudProviderSnapshotArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args CloudProviderSnapshotArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CloudProviderSnapshotArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
CloudProviderSnapshot Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The CloudProviderSnapshot resource accepts the following input properties:
- Cluster
Name string The name of the Atlas cluster that contains the snapshots you want to retrieve.
- Description string
Description of the on-demand snapshot.
- Project
Id string The unique identifier of the project for the Atlas cluster.
- Retention
In intDays The number of days that Atlas should retain the on-demand snapshot. Must be at least 1.
- Cluster
Name string The name of the Atlas cluster that contains the snapshots you want to retrieve.
- Description string
Description of the on-demand snapshot.
- Project
Id string The unique identifier of the project for the Atlas cluster.
- Retention
In intDays The number of days that Atlas should retain the on-demand snapshot. Must be at least 1.
- cluster
Name string The name of the Atlas cluster that contains the snapshots you want to retrieve.
- description string
Description of the on-demand snapshot.
- project
Id string The unique identifier of the project for the Atlas cluster.
- retention
In numberDays The number of days that Atlas should retain the on-demand snapshot. Must be at least 1.
- cluster_
name str The name of the Atlas cluster that contains the snapshots you want to retrieve.
- description str
Description of the on-demand snapshot.
- project_
id str The unique identifier of the project for the Atlas cluster.
- retention_
in_ floatdays 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 CloudProviderSnapshot resource produces the following output properties:
- Created
At string UTC ISO 8601 formatted point in time when Atlas took the snapshot.
- Expires
At 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.
- Master
Key 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.
- Mongod
Version string Version of the MongoDB server.
- Snapshot
Id string Unique identifier of the snapshot.
- Snapshot
Type 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.
- Storage
Size intBytes Specifies the size of the snapshot in bytes.
- Type string
Specifies the type of cluster: replicaSet or shardedCluster.
- Created
At string UTC ISO 8601 formatted point in time when Atlas took the snapshot.
- Expires
At 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.
- Master
Key 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.
- Mongod
Version string Version of the MongoDB server.
- Snapshot
Id string Unique identifier of the snapshot.
- Snapshot
Type 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.
- Storage
Size intBytes Specifies the size of the snapshot in bytes.
- Type string
Specifies the type of cluster: replicaSet or shardedCluster.
- created
At string UTC ISO 8601 formatted point in time when Atlas took the snapshot.
- expires
At 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.
- master
Key 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.
- mongod
Version string Version of the MongoDB server.
- snapshot
Id string Unique identifier of the snapshot.
- snapshot
Type 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.
- storage
Size numberBytes Specifies the size of the snapshot in bytes.
- type string
Specifies the type of cluster: replicaSet or shardedCluster.
- 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_ 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.
- mongod_
version str Version of the MongoDB server.
- snapshot_
id str Unique identifier of the snapshot.
- 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_ floatbytes Specifies the size of the snapshot in bytes.
- type str
Specifies the type of cluster: replicaSet or shardedCluster.
Look up an Existing CloudProviderSnapshot Resource
Get an existing CloudProviderSnapshot 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?: CloudProviderSnapshotState, opts?: CustomResourceOptions): CloudProviderSnapshotstatic get(resource_name, id, opts=None, cluster_name=None, created_at=None, description=None, expires_at=None, master_key_uuid=None, mongod_version=None, project_id=None, retention_in_days=None, snapshot_id=None, snapshot_type=None, status=None, storage_size_bytes=None, type=None, __props__=None);func GetCloudProviderSnapshot(ctx *Context, name string, id IDInput, state *CloudProviderSnapshotState, opts ...ResourceOption) (*CloudProviderSnapshot, error)public static CloudProviderSnapshot Get(string name, Input<string> id, CloudProviderSnapshotState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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:
- Cluster
Name string The name of the Atlas cluster that contains the snapshots you want to retrieve.
- Created
At string UTC ISO 8601 formatted point in time when Atlas took the snapshot.
- Description string
Description of the on-demand snapshot.
- Expires
At string UTC ISO 8601 formatted point in time when Atlas will delete the snapshot.
- Master
Key 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.
- Mongod
Version string Version of the MongoDB server.
- Project
Id string The unique identifier of the project for the Atlas cluster.
- Retention
In intDays The number of days that Atlas should retain the on-demand snapshot. Must be at least 1.
- Snapshot
Id string Unique identifier of the snapshot.
- Snapshot
Type 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.
- Storage
Size intBytes Specifies the size of the snapshot in bytes.
- Type string
Specifies the type of cluster: replicaSet or shardedCluster.
- Cluster
Name string The name of the Atlas cluster that contains the snapshots you want to retrieve.
- Created
At string UTC ISO 8601 formatted point in time when Atlas took the snapshot.
- Description string
Description of the on-demand snapshot.
- Expires
At string UTC ISO 8601 formatted point in time when Atlas will delete the snapshot.
- Master
Key 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.
- Mongod
Version string Version of the MongoDB server.
- Project
Id string The unique identifier of the project for the Atlas cluster.
- Retention
In intDays The number of days that Atlas should retain the on-demand snapshot. Must be at least 1.
- Snapshot
Id string Unique identifier of the snapshot.
- Snapshot
Type 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.
- Storage
Size intBytes Specifies the size of the snapshot in bytes.
- Type string
Specifies the type of cluster: replicaSet or shardedCluster.
- cluster
Name string The name of the Atlas cluster that contains the snapshots you want to retrieve.
- created
At string UTC ISO 8601 formatted point in time when Atlas took the snapshot.
- description string
Description of the on-demand snapshot.
- expires
At string UTC ISO 8601 formatted point in time when Atlas will delete the snapshot.
- master
Key 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.
- mongod
Version string Version of the MongoDB server.
- project
Id string The unique identifier of the project for the Atlas cluster.
- retention
In numberDays The number of days that Atlas should retain the on-demand snapshot. Must be at least 1.
- snapshot
Id string Unique identifier of the snapshot.
- snapshot
Type 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.
- storage
Size numberBytes Specifies the size of the snapshot in bytes.
- type string
Specifies the type of cluster: replicaSet or shardedCluster.
- cluster_
name 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 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_ 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.
- mongod_
version str Version of the MongoDB server.
- project_
id str The unique identifier of the project for the Atlas cluster.
- retention_
in_ floatdays 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_
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_ floatbytes Specifies the size of the snapshot in bytes.
- type str
Specifies the type of cluster: replicaSet or shardedCluster.
Package Details
- Repository
- https://github.com/pulumi/pulumi-mongodbatlas
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
mongodbatlasTerraform Provider.