MongoDB Atlas
getCloudProviderSnapshotRestoreJobs
WARNING: This datasource is deprecated, use mongodbatlas_cloud_backup_snapshots_restore_jobs
mongodbatlas.getCloudProviderSnapshotRestoreJobs
provides a Cloud Backup Snapshot Restore Jobs datasource. Gets all the cloud backup snapshot restore jobs for the specified cluster.
NOTE: Groups and projects are synonymous terms. You may find
groupId
in the official documentation.
Example Usage
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
class MyStack : Stack
{
public MyStack()
{
var testCloudProviderSnapshot = new Mongodbatlas.CloudProviderSnapshot("testCloudProviderSnapshot", new Mongodbatlas.CloudProviderSnapshotArgs
{
ProjectId = "5cf5a45a9ccf6400e60981b6",
ClusterName = "MyCluster",
Description = "MyDescription",
RetentionInDays = 1,
});
var testCloudProviderSnapshotRestoreJob = new Mongodbatlas.CloudProviderSnapshotRestoreJob("testCloudProviderSnapshotRestoreJob", new Mongodbatlas.CloudProviderSnapshotRestoreJobArgs
{
ProjectId = "5cf5a45a9ccf6400e60981b6",
ClusterName = "MyCluster",
SnapshotId = testCloudProviderSnapshot.Id,
DeliveryType =
{
{
{ "automated", true },
{ "targetClusterName", "MyCluster" },
{ "targetProjectId", "5cf5a45a9ccf6400e60981b6" },
},
},
});
var testCloudProviderSnapshotRestoreJobs = Output.Tuple(testCloudProviderSnapshotRestoreJob.ProjectId, testCloudProviderSnapshotRestoreJob.ClusterName).Apply(values =>
{
var projectId = values.Item1;
var clusterName = values.Item2;
return Mongodbatlas.GetCloudProviderSnapshotRestoreJobs.Invoke(new Mongodbatlas.GetCloudProviderSnapshotRestoreJobsInvokeArgs
{
ProjectId = projectId,
ClusterName = clusterName,
PageNum = 1,
ItemsPerPage = 5,
});
});
}
}
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 {
testCloudProviderSnapshot, err := mongodbatlas.NewCloudProviderSnapshot(ctx, "testCloudProviderSnapshot", &mongodbatlas.CloudProviderSnapshotArgs{
ProjectId: pulumi.String("5cf5a45a9ccf6400e60981b6"),
ClusterName: pulumi.String("MyCluster"),
Description: pulumi.String("MyDescription"),
RetentionInDays: pulumi.Int(1),
})
if err != nil {
return err
}
testCloudProviderSnapshotRestoreJob, err := mongodbatlas.NewCloudProviderSnapshotRestoreJob(ctx, "testCloudProviderSnapshotRestoreJob", &mongodbatlas.CloudProviderSnapshotRestoreJobArgs{
ProjectId: pulumi.String("5cf5a45a9ccf6400e60981b6"),
ClusterName: pulumi.String("MyCluster"),
SnapshotId: testCloudProviderSnapshot.ID(),
DeliveryType: pulumi.StringMap{
pulumi.String{
Automated: true,
TargetClusterName: "MyCluster",
TargetProjectId: "5cf5a45a9ccf6400e60981b6",
},
},
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_mongodbatlas as mongodbatlas
test_cloud_provider_snapshot = mongodbatlas.CloudProviderSnapshot("testCloudProviderSnapshot",
project_id="5cf5a45a9ccf6400e60981b6",
cluster_name="MyCluster",
description="MyDescription",
retention_in_days=1)
test_cloud_provider_snapshot_restore_job = mongodbatlas.CloudProviderSnapshotRestoreJob("testCloudProviderSnapshotRestoreJob",
project_id="5cf5a45a9ccf6400e60981b6",
cluster_name="MyCluster",
snapshot_id=test_cloud_provider_snapshot.id,
delivery_type=[{
"automated": True,
"targetClusterName": "MyCluster",
"targetProjectId": "5cf5a45a9ccf6400e60981b6",
}])
test_cloud_provider_snapshot_restore_jobs = pulumi.Output.all(test_cloud_provider_snapshot_restore_job.project_id, test_cloud_provider_snapshot_restore_job.cluster_name).apply(lambda project_id, cluster_name: mongodbatlas.get_cloud_provider_snapshot_restore_jobs_output(project_id=project_id,
cluster_name=cluster_name,
page_num=1,
items_per_page=5))
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const testCloudProviderSnapshot = new mongodbatlas.CloudProviderSnapshot("testCloudProviderSnapshot", {
projectId: "5cf5a45a9ccf6400e60981b6",
clusterName: "MyCluster",
description: "MyDescription",
retentionInDays: 1,
});
const testCloudProviderSnapshotRestoreJob = new mongodbatlas.CloudProviderSnapshotRestoreJob("testCloudProviderSnapshotRestoreJob", {
projectId: "5cf5a45a9ccf6400e60981b6",
clusterName: "MyCluster",
snapshotId: testCloudProviderSnapshot.id,
deliveryType: [{
automated: true,
targetClusterName: "MyCluster",
targetProjectId: "5cf5a45a9ccf6400e60981b6",
}],
});
const testCloudProviderSnapshotRestoreJobs = pulumi.all([testCloudProviderSnapshotRestoreJob.projectId, testCloudProviderSnapshotRestoreJob.clusterName]).apply(([projectId, clusterName]) => mongodbatlas.getCloudProviderSnapshotRestoreJobsOutput({
projectId: projectId,
clusterName: clusterName,
pageNum: 1,
itemsPerPage: 5,
}));
Coming soon!
Using getCloudProviderSnapshotRestoreJobs
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getCloudProviderSnapshotRestoreJobs(args: GetCloudProviderSnapshotRestoreJobsArgs, opts?: InvokeOptions): Promise<GetCloudProviderSnapshotRestoreJobsResult>
function getCloudProviderSnapshotRestoreJobsOutput(args: GetCloudProviderSnapshotRestoreJobsOutputArgs, opts?: InvokeOptions): Output<GetCloudProviderSnapshotRestoreJobsResult>
def get_cloud_provider_snapshot_restore_jobs(cluster_name: Optional[str] = None,
items_per_page: Optional[int] = None,
page_num: Optional[int] = None,
project_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCloudProviderSnapshotRestoreJobsResult
def get_cloud_provider_snapshot_restore_jobs_output(cluster_name: Optional[pulumi.Input[str]] = None,
items_per_page: Optional[pulumi.Input[int]] = None,
page_num: Optional[pulumi.Input[int]] = None,
project_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCloudProviderSnapshotRestoreJobsResult]
func LookupCloudProviderSnapshotRestoreJobs(ctx *Context, args *LookupCloudProviderSnapshotRestoreJobsArgs, opts ...InvokeOption) (*LookupCloudProviderSnapshotRestoreJobsResult, error)
func LookupCloudProviderSnapshotRestoreJobsOutput(ctx *Context, args *LookupCloudProviderSnapshotRestoreJobsOutputArgs, opts ...InvokeOption) LookupCloudProviderSnapshotRestoreJobsResultOutput
> Note: This function is named LookupCloudProviderSnapshotRestoreJobs
in the Go SDK.
public static class GetCloudProviderSnapshotRestoreJobs
{
public static Task<GetCloudProviderSnapshotRestoreJobsResult> InvokeAsync(GetCloudProviderSnapshotRestoreJobsArgs args, InvokeOptions? opts = null)
public static Output<GetCloudProviderSnapshotRestoreJobsResult> Invoke(GetCloudProviderSnapshotRestoreJobsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCloudProviderSnapshotRestoreJobsResult> getCloudProviderSnapshotRestoreJobs(GetCloudProviderSnapshotRestoreJobsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
Function: mongodbatlas:index/getCloudProviderSnapshotRestoreJobs:getCloudProviderSnapshotRestoreJobs
Arguments:
# Arguments dictionary
The following arguments are supported:
- Cluster
Name string The name of the Atlas cluster for which you want to retrieve restore jobs.
- Project
Id string The unique identifier of the project for the Atlas cluster.
- Items
Per intPage Number of items to return per page, up to a maximum of 500. Defaults to
100
.- Page
Num int The page to return. Defaults to
1
.
- Cluster
Name string The name of the Atlas cluster for which you want to retrieve restore jobs.
- Project
Id string The unique identifier of the project for the Atlas cluster.
- Items
Per intPage Number of items to return per page, up to a maximum of 500. Defaults to
100
.- Page
Num int The page to return. Defaults to
1
.
- cluster
Name String The name of the Atlas cluster for which you want to retrieve restore jobs.
- project
Id String The unique identifier of the project for the Atlas cluster.
- items
Per IntegerPage Number of items to return per page, up to a maximum of 500. Defaults to
100
.- page
Num Integer The page to return. Defaults to
1
.
- cluster
Name string The name of the Atlas cluster for which you want to retrieve restore jobs.
- project
Id string The unique identifier of the project for the Atlas cluster.
- items
Per numberPage Number of items to return per page, up to a maximum of 500. Defaults to
100
.- page
Num number The page to return. Defaults to
1
.
- cluster_
name str The name of the Atlas cluster for which you want to retrieve restore jobs.
- project_
id str The unique identifier of the project for the Atlas cluster.
- items_
per_ intpage Number of items to return per page, up to a maximum of 500. Defaults to
100
.- page_
num int The page to return. Defaults to
1
.
- cluster
Name String The name of the Atlas cluster for which you want to retrieve restore jobs.
- project
Id String The unique identifier of the project for the Atlas cluster.
- items
Per NumberPage Number of items to return per page, up to a maximum of 500. Defaults to
100
.- page
Num Number The page to return. Defaults to
1
.
getCloudProviderSnapshotRestoreJobs Result
The following output properties are available:
- Cluster
Name string - Id string
The provider-assigned unique ID for this managed resource.
- Project
Id string - Results
List<Get
Cloud Provider Snapshot Restore Jobs Result> Includes cloudProviderSnapshotRestoreJob object for each item detailed in the results array section.
- Total
Count int - Items
Per intPage - Page
Num int
- Cluster
Name string - Id string
The provider-assigned unique ID for this managed resource.
- Project
Id string - Results
[]Get
Cloud Provider Snapshot Restore Jobs Result Includes cloudProviderSnapshotRestoreJob object for each item detailed in the results array section.
- Total
Count int - Items
Per intPage - Page
Num int
- cluster
Name String - id String
The provider-assigned unique ID for this managed resource.
- project
Id String - results
List<Get
Cloud Provider Snapshot Restore Jobs Result> Includes cloudProviderSnapshotRestoreJob object for each item detailed in the results array section.
- total
Count Integer - items
Per IntegerPage - page
Num Integer
- cluster
Name string - id string
The provider-assigned unique ID for this managed resource.
- project
Id string - results
Get
Cloud Provider Snapshot Restore Jobs Result[] Includes cloudProviderSnapshotRestoreJob object for each item detailed in the results array section.
- total
Count number - items
Per numberPage - page
Num number
- cluster_
name str - id str
The provider-assigned unique ID for this managed resource.
- project_
id str - results
Sequence[Get
Cloud Provider Snapshot Restore Jobs Result] Includes cloudProviderSnapshotRestoreJob object for each item detailed in the results array section.
- total_
count int - items_
per_ intpage - page_
num int
- cluster
Name String - id String
The provider-assigned unique ID for this managed resource.
- project
Id String - results List<Property Map>
Includes cloudProviderSnapshotRestoreJob object for each item detailed in the results array section.
- total
Count Number - items
Per NumberPage - page
Num Number
Supporting Types
GetCloudProviderSnapshotRestoreJobsResult
- 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
Type string Type of restore job to create. Possible values are: automated and download.
- 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 unique identifier of the restore job.
- Oplog
Inc int - Oplog
Ts int - Point
In intTime Utc Seconds - Snapshot
Id string Unique identifier of the source snapshot ID of the restore job.
- Target
Cluster stringName Name of the target Atlas cluster to which the restore job restores the snapshot. Only visible if deliveryType is automated.
- Target
Project stringId - 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
Type string Type of restore job to create. Possible values are: automated and download.
- 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 unique identifier of the restore job.
- Oplog
Inc int - Oplog
Ts int - Point
In intTime Utc Seconds - Snapshot
Id string Unique identifier of the source snapshot ID of the restore job.
- Target
Cluster stringName Name of the target Atlas cluster to which the restore job restores the snapshot. Only visible if deliveryType is automated.
- Target
Project stringId - 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
Type String Type of restore job to create. Possible values are: automated and download.
- delivery
Urls List<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 unique identifier of the restore job.
- oplog
Inc Integer - oplog
Ts Integer - point
In IntegerTime Utc Seconds - snapshot
Id String Unique identifier of the source snapshot ID of the restore job.
- target
Cluster StringName Name of the target Atlas cluster to which the restore job restores the snapshot. Only visible if deliveryType is automated.
- target
Project StringId - 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
Type string Type of restore job to create. Possible values are: automated and download.
- 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 unique identifier of the restore job.
- oplog
Inc number - oplog
Ts number - point
In numberTime Utc Seconds - snapshot
Id string Unique identifier of the source snapshot ID of the restore job.
- target
Cluster stringName Name of the target Atlas cluster to which the restore job restores the snapshot. Only visible if deliveryType is automated.
- target
Project stringId - 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_
type str Type of restore job to create. Possible values are: automated and download.
- delivery_
urls Sequence[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 unique identifier of the restore job.
- oplog_
inc int - oplog_
ts int - point_
in_ inttime_ utc_ seconds - snapshot_
id str Unique identifier of the source snapshot ID of the restore job.
- target_
cluster_ strname Name of the target Atlas cluster to which the restore job restores the snapshot. Only visible if deliveryType is automated.
- target_
project_ strid - timestamp str
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
Type String Type of restore job to create. Possible values are: automated and download.
- delivery
Urls List<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 unique identifier of the restore job.
- oplog
Inc Number - oplog
Ts Number - point
In NumberTime Utc Seconds - snapshot
Id String Unique identifier of the source snapshot ID of the restore job.
- target
Cluster StringName Name of the target Atlas cluster to which the restore job restores the snapshot. Only visible if deliveryType is automated.
- target
Project StringId - timestamp String
Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.
Package Details
- Repository
- https://github.com/pulumi/pulumi-mongodbatlas
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
mongodbatlas
Terraform Provider.