Class CloudProviderSnapshotRestoreJob
mongodbatlas..CloudProviderSnapshotRestoreJob provides a resource to create a new restore job from a cloud provider snapshot of a specified cluster. The restore job can be one of two types:
automated: Atlas automatically restores the snapshot with snapshotId to the Atlas cluster with name targetClusterName in the Atlas project with targetGroupId.
download: Atlas provides a URL to download a .tar.gz of the snapshot with snapshotId. The contents of the archive contain the data files for your Atlas cluster.
NOTE: Groups and projects are synonymous terms. You may find
groupIdin the official documentation.
Example Usage
Example automated delivery type.
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
{
Automated = true,
Target_cluster_name = "MyCluster",
Target_project_id = "5cf5a45a9ccf6400e60981b6",
},
});
}
}
Example download delivery type.
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 CloudProviderSnapshotRestoreJob : CustomResource
Constructors
View SourceCloudProviderSnapshotRestoreJob(String, CloudProviderSnapshotRestoreJobArgs, CustomResourceOptions)
Create a CloudProviderSnapshotRestoreJob resource with the given unique name, arguments, and options.
Declaration
public CloudProviderSnapshotRestoreJob(string name, CloudProviderSnapshotRestoreJobArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| CloudProviderSnapshotRestoreJobArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceCancelled
Indicates whether the restore job was canceled.
Declaration
public Output<bool> Cancelled { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
ClusterName
The name of the Atlas cluster whose snapshot you want to restore.
Declaration
public Output<string> ClusterName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
CreatedAt
UTC ISO 8601 formatted point in time when Atlas created the restore job.
Declaration
public Output<string> CreatedAt { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DeliveryType
Type of restore job to create. Possible values are: download or automated, only one must be set it in true.
Declaration
public Output<CloudProviderSnapshotRestoreJobDeliveryType> DeliveryType { get; }
Property Value
| Type | Description |
|---|---|
| Output<CloudProviderSnapshotRestoreJobDeliveryType> |
DeliveryUrls
One or more URLs for the compressed snapshot files for manual download. Only visible if deliveryType is download.
Declaration
public Output<ImmutableArray<string>> DeliveryUrls { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Expired
Indicates whether the restore job expired.
Declaration
public Output<bool> Expired { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
ExpiresAt
UTC ISO 8601 formatted point in time when the restore job expires.
Declaration
public Output<string> ExpiresAt { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
FinishedAt
UTC ISO 8601 formatted point in time when the restore job completed.
Declaration
public Output<string> FinishedAt { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ProjectId
The unique identifier of the project for the Atlas cluster whose snapshot you want to restore.
Declaration
public Output<string> ProjectId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SnapshotId
Unique identifier of the snapshot to restore.
Declaration
public Output<string> SnapshotId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SnapshotRestoreJobId
The unique identifier of the restore job.
Declaration
public Output<string> SnapshotRestoreJobId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Timestamp
Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.
Declaration
public Output<string> Timestamp { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, CloudProviderSnapshotRestoreJobState, CustomResourceOptions)
Get an existing CloudProviderSnapshotRestoreJob resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static CloudProviderSnapshotRestoreJob Get(string name, Input<string> id, CloudProviderSnapshotRestoreJobState 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. |
| CloudProviderSnapshotRestoreJobState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| CloudProviderSnapshotRestoreJob |