Class 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,
},
});
}
}
Inherited Members
Namespace: Pulumi.Mongodbatlas
Assembly: Pulumi.Mongodbatlas.dll
Syntax
public class CloudProviderSnapshot : CustomResource
Constructors
View SourceCloudProviderSnapshot(String, CloudProviderSnapshotArgs, CustomResourceOptions)
Create a CloudProviderSnapshot resource with the given unique name, arguments, and options.
Declaration
public CloudProviderSnapshot(string name, CloudProviderSnapshotArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| CloudProviderSnapshotArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceClusterName
The name of the Atlas cluster that contains the snapshots you want to retrieve.
Declaration
public Output<string> ClusterName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
CreatedAt
UTC ISO 8601 formatted point in time when Atlas took the snapshot.
Declaration
public Output<string> CreatedAt { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Description
Description of the on-demand snapshot.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ExpiresAt
UTC ISO 8601 formatted point in time when Atlas will delete the snapshot.
Declaration
public Output<string> ExpiresAt { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
MasterKeyUuid
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.
Declaration
public Output<string> MasterKeyUuid { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
MongodVersion
Version of the MongoDB server.
Declaration
public Output<string> MongodVersion { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ProjectId
The unique identifier of the project for the Atlas cluster.
Declaration
public Output<string> ProjectId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
RetentionInDays
The number of days that Atlas should retain the on-demand snapshot. Must be at least 1.
Declaration
public Output<int> RetentionInDays { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
SnapshotId
Unique identifier of the snapshot.
Declaration
public Output<string> SnapshotId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SnapshotType
Specified the type of snapshot. Valid values are onDemand and scheduled.
Declaration
public Output<string> SnapshotType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Status
Current status of the snapshot. One of the following values will be returned: queued, inProgress, completed, failed.
Declaration
public Output<string> Status { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
StorageSizeBytes
Specifies the size of the snapshot in bytes.
Declaration
public Output<int> StorageSizeBytes { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Type
Specifies the type of cluster: replicaSet or shardedCluster.
Declaration
public Output<string> Type { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, CloudProviderSnapshotState, CustomResourceOptions)
Get an existing CloudProviderSnapshot resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static CloudProviderSnapshot Get(string name, Input<string> id, CloudProviderSnapshotState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| CloudProviderSnapshotState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| CloudProviderSnapshot |