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",
},
});
}
}
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={
"automated": True,
"target_cluster_name": "MyCluster",
"target_project_id": "5cf5a45a9ccf6400e60981b6",
})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: {
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,
},
});
}
}
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 CloudProviderSnapshotRestoreJob Resource
new CloudProviderSnapshotRestoreJob(name: string, args: CloudProviderSnapshotRestoreJobArgs, opts?: CustomResourceOptions);def CloudProviderSnapshotRestoreJob(resource_name, opts=None, cluster_name=None, delivery_type=None, project_id=None, snapshot_id=None, __props__=None);func NewCloudProviderSnapshotRestoreJob(ctx *Context, name string, args CloudProviderSnapshotRestoreJobArgs, opts ...ResourceOption) (*CloudProviderSnapshotRestoreJob, error)public CloudProviderSnapshotRestoreJob(string name, CloudProviderSnapshotRestoreJobArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args CloudProviderSnapshotRestoreJobArgs
- 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 CloudProviderSnapshotRestoreJobArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CloudProviderSnapshotRestoreJobArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
CloudProviderSnapshotRestoreJob Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The CloudProviderSnapshotRestoreJob resource accepts the following input properties:
- Cluster
Name string The name of the Atlas cluster whose snapshot you want to restore.
- Delivery
Type CloudProvider Snapshot Restore Job Delivery Type Args Type of restore job to create. Possible values are: download or automated, only one must be set it in
true.- Project
Id string The unique identifier of the project for the Atlas cluster whose snapshot you want to restore.
- Snapshot
Id string Unique identifier of the snapshot to restore.
- Cluster
Name string The name of the Atlas cluster whose snapshot you want to restore.
- Delivery
Type CloudProvider Snapshot Restore Job Delivery Type Type of restore job to create. Possible values are: download or automated, only one must be set it in
true.- Project
Id string The unique identifier of the project for the Atlas cluster whose snapshot you want to restore.
- Snapshot
Id string Unique identifier of the snapshot to restore.
- cluster
Name string The name of the Atlas cluster whose snapshot you want to restore.
- delivery
Type CloudProvider Snapshot Restore Job Delivery Type Type of restore job to create. Possible values are: download or automated, only one must be set it in
true.- project
Id string The unique identifier of the project for the Atlas cluster whose snapshot you want to restore.
- snapshot
Id string Unique identifier of the snapshot to restore.
- cluster_
name str The name of the Atlas cluster whose snapshot you want to restore.
- delivery_
type Dict[CloudProvider Snapshot Restore Job Delivery Type] Type of restore job to create. Possible values are: download or automated, only one must be set it in
true.- project_
id str The unique identifier of the project for the Atlas cluster whose snapshot you want to restore.
- snapshot_
id str Unique identifier of the snapshot to restore.
Outputs
All input properties are implicitly available as output properties. Additionally, the CloudProviderSnapshotRestoreJob resource produces the following output properties:
- Cancelled bool
Indicates whether the restore job was canceled.
- Created
At string UTC ISO 8601 formatted point in time when Atlas created the restore job.
- Delivery
Urls List<string> One or more URLs for the compressed snapshot files for manual download. Only visible if deliveryType is download.
- Expired bool
Indicates whether the restore job expired.
- Expires
At string UTC ISO 8601 formatted point in time when the restore job expires.
- Finished
At string UTC ISO 8601 formatted point in time when the restore job completed.
- Id string
- The provider-assigned unique ID for this managed resource.
- Snapshot
Restore stringJob Id The unique identifier of the restore job.
- Timestamp string
Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.
- Cancelled bool
Indicates whether the restore job was canceled.
- Created
At string UTC ISO 8601 formatted point in time when Atlas created the restore job.
- Delivery
Urls []string One or more URLs for the compressed snapshot files for manual download. Only visible if deliveryType is download.
- Expired bool
Indicates whether the restore job expired.
- Expires
At string UTC ISO 8601 formatted point in time when the restore job expires.
- Finished
At string UTC ISO 8601 formatted point in time when the restore job completed.
- Id string
- The provider-assigned unique ID for this managed resource.
- Snapshot
Restore stringJob Id The unique identifier of the restore job.
- Timestamp string
Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.
- cancelled boolean
Indicates whether the restore job was canceled.
- created
At string UTC ISO 8601 formatted point in time when Atlas created the restore job.
- delivery
Urls string[] One or more URLs for the compressed snapshot files for manual download. Only visible if deliveryType is download.
- expired boolean
Indicates whether the restore job expired.
- expires
At string UTC ISO 8601 formatted point in time when the restore job expires.
- finished
At string UTC ISO 8601 formatted point in time when the restore job completed.
- id string
- The provider-assigned unique ID for this managed resource.
- snapshot
Restore stringJob Id The unique identifier of the restore job.
- timestamp string
Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.
- cancelled bool
Indicates whether the restore job was canceled.
- created_
at str UTC ISO 8601 formatted point in time when Atlas created the restore job.
- delivery_
urls List[str] One or more URLs for the compressed snapshot files for manual download. Only visible if deliveryType is download.
- expired bool
Indicates whether the restore job expired.
- expires_
at str UTC ISO 8601 formatted point in time when the restore job expires.
- finished_
at str UTC ISO 8601 formatted point in time when the restore job completed.
- id str
- The provider-assigned unique ID for this managed resource.
- snapshot_
restore_ strjob_ id The unique identifier of the restore job.
- timestamp str
Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.
Look up an Existing CloudProviderSnapshotRestoreJob Resource
Get an existing CloudProviderSnapshotRestoreJob 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?: CloudProviderSnapshotRestoreJobState, opts?: CustomResourceOptions): CloudProviderSnapshotRestoreJobstatic get(resource_name, id, opts=None, cancelled=None, cluster_name=None, created_at=None, delivery_type=None, delivery_urls=None, expired=None, expires_at=None, finished_at=None, project_id=None, snapshot_id=None, snapshot_restore_job_id=None, timestamp=None, __props__=None);func GetCloudProviderSnapshotRestoreJob(ctx *Context, name string, id IDInput, state *CloudProviderSnapshotRestoreJobState, opts ...ResourceOption) (*CloudProviderSnapshotRestoreJob, error)public static CloudProviderSnapshotRestoreJob Get(string name, Input<string> id, CloudProviderSnapshotRestoreJobState? 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:
- Cancelled bool
Indicates whether the restore job was canceled.
- Cluster
Name string The name of the Atlas cluster whose snapshot you want to restore.
- Created
At string UTC ISO 8601 formatted point in time when Atlas created the restore job.
- Delivery
Type CloudProvider Snapshot Restore Job Delivery Type Args Type of restore job to create. Possible values are: download or automated, only one must be set it in
true.- Delivery
Urls List<string> One or more URLs for the compressed snapshot files for manual download. Only visible if deliveryType is download.
- Expired bool
Indicates whether the restore job expired.
- Expires
At string UTC ISO 8601 formatted point in time when the restore job expires.
- Finished
At string UTC ISO 8601 formatted point in time when the restore job completed.
- Project
Id string The unique identifier of the project for the Atlas cluster whose snapshot you want to restore.
- Snapshot
Id string Unique identifier of the snapshot to restore.
- Snapshot
Restore stringJob Id The unique identifier of the restore job.
- Timestamp string
Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.
- Cancelled bool
Indicates whether the restore job was canceled.
- Cluster
Name string The name of the Atlas cluster whose snapshot you want to restore.
- Created
At string UTC ISO 8601 formatted point in time when Atlas created the restore job.
- Delivery
Type CloudProvider Snapshot Restore Job Delivery Type Type of restore job to create. Possible values are: download or automated, only one must be set it in
true.- Delivery
Urls []string One or more URLs for the compressed snapshot files for manual download. Only visible if deliveryType is download.
- Expired bool
Indicates whether the restore job expired.
- Expires
At string UTC ISO 8601 formatted point in time when the restore job expires.
- Finished
At string UTC ISO 8601 formatted point in time when the restore job completed.
- Project
Id string The unique identifier of the project for the Atlas cluster whose snapshot you want to restore.
- Snapshot
Id string Unique identifier of the snapshot to restore.
- Snapshot
Restore stringJob Id The unique identifier of the restore job.
- Timestamp string
Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.
- cancelled boolean
Indicates whether the restore job was canceled.
- cluster
Name string The name of the Atlas cluster whose snapshot you want to restore.
- created
At string UTC ISO 8601 formatted point in time when Atlas created the restore job.
- delivery
Type CloudProvider Snapshot Restore Job Delivery Type Type of restore job to create. Possible values are: download or automated, only one must be set it in
true.- delivery
Urls string[] One or more URLs for the compressed snapshot files for manual download. Only visible if deliveryType is download.
- expired boolean
Indicates whether the restore job expired.
- expires
At string UTC ISO 8601 formatted point in time when the restore job expires.
- finished
At string UTC ISO 8601 formatted point in time when the restore job completed.
- project
Id string The unique identifier of the project for the Atlas cluster whose snapshot you want to restore.
- snapshot
Id string Unique identifier of the snapshot to restore.
- snapshot
Restore stringJob Id The unique identifier of the restore job.
- timestamp string
Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.
- cancelled bool
Indicates whether the restore job was canceled.
- cluster_
name str The name of the Atlas cluster whose snapshot you want to restore.
- created_
at str UTC ISO 8601 formatted point in time when Atlas created the restore job.
- delivery_
type Dict[CloudProvider Snapshot Restore Job Delivery Type] Type of restore job to create. Possible values are: download or automated, only one must be set it in
true.- delivery_
urls List[str] One or more URLs for the compressed snapshot files for manual download. Only visible if deliveryType is download.
- expired bool
Indicates whether the restore job expired.
- expires_
at str UTC ISO 8601 formatted point in time when the restore job expires.
- finished_
at str UTC ISO 8601 formatted point in time when the restore job completed.
- project_
id str The unique identifier of the project for the Atlas cluster whose snapshot you want to restore.
- snapshot_
id str Unique identifier of the snapshot to restore.
- snapshot_
restore_ strjob_ id The unique identifier of the restore job.
- timestamp str
Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.
Supporting Types
CloudProviderSnapshotRestoreJobDeliveryType
- Automated bool
- Download bool
- Target
Cluster stringName Name of the target Atlas cluster to which the restore job restores the snapshot. Only required if deliveryType is automated.
- Target
Project stringId
- Automated bool
- Download bool
- Target
Cluster stringName Name of the target Atlas cluster to which the restore job restores the snapshot. Only required if deliveryType is automated.
- Target
Project stringId
- automated boolean
- download boolean
- target
Cluster stringName Name of the target Atlas cluster to which the restore job restores the snapshot. Only required if deliveryType is automated.
- target
Project stringId
- automated bool
- download bool
- target_
cluster_ strname Name of the target Atlas cluster to which the restore job restores the snapshot. Only required if deliveryType is automated.
- target_
project_ strid
Package Details
- Repository
- https://github.com/pulumi/pulumi-mongodbatlas
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
mongodbatlasTerraform Provider.