MongoDB Atlas v3.7.2, Mar 31 23
MongoDB Atlas v3.7.2, Mar 31 23
mongodbatlas.getOnlineArchives
Explore with Pulumi AI
mongodbatlas.OnlineArchive
Describes the list of all the online archives for a cluster
NOTE: Groups and projects are synonymous terms. You may find group_id in the official documentation.
Attributes reference
Each object in the results array represents an online archive with the following attributes:
archive_id
- ID of the online archive.db_name
- Name of the database that contains the collection.coll_name
- Name of the collection.collection_type
- Classification of MongoDB database collection that you want to return, “TIMESERIES” or “STANDARD”. Default is “STANDARD”.criteria
- Criteria to use for archiving data.criteria.type
- Type of criteria (DATE, CUSTOM)criteria.date_field
- Name of an already indexed date field from the documents. Data is archived when the current date is greater than the value of the date field specified here plus the number of days specified via theexpire_after_days
parameter.criteria.date_format
- the date format. Valid values: ISODATE (default), EPOCH_SECONDS, EPOCH_MILLIS, EPOCH_NANOSECONDScriteria.expire_after_days
- Number of days that specifies the age limit for the data in the live Atlas cluster.criteria.query
- JSON query to use to select documents for archiving. Only forCUSTOM
typepartition_fields
- Fields to use to partition data.partition_fields.field_name
- Name of the field. To specify a nested field, use the dot notation.partition_fields.order
- Position of the field in the partition. Value can be: 0,1,2 By default, the date field specified in the criteria.dateField parameter is in the first position of the partition.partitio_fields.field_type
- Type of the partition fieldstate
- Status of the online archive. Valid values are: Pending, Archiving, Idle, Pausing, Paused, Orphaned and Deleted
See MongoDB Atlas API Documentation for more information.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;
return await Deployment.RunAsync(() =>
{
var test = Mongodbatlas.GetOnlineArchives.Invoke(new()
{
ProjectId = @var.Project_id,
ClusterName = @var.Cluster_name,
});
});
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 {
_, err := mongodbatlas.LookupOnlineArchives(ctx, &mongodbatlas.LookupOnlineArchivesArgs{
ProjectId: _var.Project_id,
ClusterName: _var.Cluster_name,
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.mongodbatlas.MongodbatlasFunctions;
import com.pulumi.mongodbatlas.inputs.GetOnlineArchivesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var test = MongodbatlasFunctions.getOnlineArchives(GetOnlineArchivesArgs.builder()
.projectId(var_.project_id())
.clusterName(var_.cluster_name())
.build());
}
}
import pulumi
import pulumi_mongodbatlas as mongodbatlas
test = mongodbatlas.get_online_archives(project_id=var["project_id"],
cluster_name=var["cluster_name"])
import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";
const test = mongodbatlas.getOnlineArchives({
projectId: _var.project_id,
clusterName: _var.cluster_name,
});
variables:
test:
fn::invoke:
Function: mongodbatlas:getOnlineArchives
Arguments:
projectId: ${var.project_id}
clusterName: ${var.cluster_name}
Using getOnlineArchives
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 getOnlineArchives(args: GetOnlineArchivesArgs, opts?: InvokeOptions): Promise<GetOnlineArchivesResult>
function getOnlineArchivesOutput(args: GetOnlineArchivesOutputArgs, opts?: InvokeOptions): Output<GetOnlineArchivesResult>
def get_online_archives(cluster_name: Optional[str] = None,
project_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetOnlineArchivesResult
def get_online_archives_output(cluster_name: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetOnlineArchivesResult]
func LookupOnlineArchives(ctx *Context, args *LookupOnlineArchivesArgs, opts ...InvokeOption) (*LookupOnlineArchivesResult, error)
func LookupOnlineArchivesOutput(ctx *Context, args *LookupOnlineArchivesOutputArgs, opts ...InvokeOption) LookupOnlineArchivesResultOutput
> Note: This function is named LookupOnlineArchives
in the Go SDK.
public static class GetOnlineArchives
{
public static Task<GetOnlineArchivesResult> InvokeAsync(GetOnlineArchivesArgs args, InvokeOptions? opts = null)
public static Output<GetOnlineArchivesResult> Invoke(GetOnlineArchivesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetOnlineArchivesResult> getOnlineArchives(GetOnlineArchivesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: mongodbatlas:index/getOnlineArchives:getOnlineArchives
arguments:
# arguments dictionary
The following arguments are supported:
- Cluster
Name string Name of the cluster that contains the collection.
- Project
Id string The unique ID for the project.
- Cluster
Name string Name of the cluster that contains the collection.
- Project
Id string The unique ID for the project.
- cluster
Name String Name of the cluster that contains the collection.
- project
Id String The unique ID for the project.
- cluster
Name string Name of the cluster that contains the collection.
- project
Id string The unique ID for the project.
- cluster_
name str Name of the cluster that contains the collection.
- project_
id str The unique ID for the project.
- cluster
Name String Name of the cluster that contains the collection.
- project
Id String The unique ID for the project.
getOnlineArchives 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
Online Archives Result> - Total
Count int
- Cluster
Name string - Id string
The provider-assigned unique ID for this managed resource.
- Project
Id string - Results
[]Get
Online Archives Result - Total
Count int
- cluster
Name String - id String
The provider-assigned unique ID for this managed resource.
- project
Id String - results
List<Get
Online Archives Result> - total
Count Integer
- cluster
Name string - id string
The provider-assigned unique ID for this managed resource.
- project
Id string - results
Get
Online Archives Result[] - total
Count number
- cluster_
name str - id str
The provider-assigned unique ID for this managed resource.
- project_
id str - results
Sequence[Get
Online Archives Result] - total_
count int
- cluster
Name String - id String
The provider-assigned unique ID for this managed resource.
- project
Id String - results List<Property Map>
- total
Count Number
Supporting Types
GetOnlineArchivesResult
- Archive
Id string - Cluster
Name string Name of the cluster that contains the collection.
- Coll
Name string - Collection
Type string - Criterias
List<Get
Online Archives Result Criteria> - Db
Name string - Partition
Fields List<GetOnline Archives Result Partition Field> - Paused bool
- Project
Id string The unique ID for the project.
- State string
- Archive
Id string - Cluster
Name string Name of the cluster that contains the collection.
- Coll
Name string - Collection
Type string - Criterias
[]Get
Online Archives Result Criteria - Db
Name string - Partition
Fields []GetOnline Archives Result Partition Field - Paused bool
- Project
Id string The unique ID for the project.
- State string
- archive
Id String - cluster
Name String Name of the cluster that contains the collection.
- coll
Name String - collection
Type String - criterias
List<Get
Online Archives Result Criteria> - db
Name String - partition
Fields List<GetOnline Archives Result Partition Field> - paused Boolean
- project
Id String The unique ID for the project.
- state String
- archive
Id string - cluster
Name string Name of the cluster that contains the collection.
- coll
Name string - collection
Type string - criterias
Get
Online Archives Result Criteria[] - db
Name string - partition
Fields GetOnline Archives Result Partition Field[] - paused boolean
- project
Id string The unique ID for the project.
- state string
- archive_
id str - cluster_
name str Name of the cluster that contains the collection.
- coll_
name str - collection_
type str - criterias
Sequence[Get
Online Archives Result Criteria] - db_
name str - partition_
fields Sequence[GetOnline Archives Result Partition Field] - paused bool
- project_
id str The unique ID for the project.
- state str
- archive
Id String - cluster
Name String Name of the cluster that contains the collection.
- coll
Name String - collection
Type String - criterias List<Property Map>
- db
Name String - partition
Fields List<Property Map> - paused Boolean
- project
Id String The unique ID for the project.
- state String
GetOnlineArchivesResultCriteria
- Date
Field string - Date
Format string - Expire
After intDays - Query string
- Type string
- Date
Field string - Date
Format string - Expire
After intDays - Query string
- Type string
- date
Field String - date
Format String - expire
After IntegerDays - query String
- type String
- date
Field string - date
Format string - expire
After numberDays - query string
- type string
- date_
field str - date_
format str - expire_
after_ intdays - query str
- type str
- date
Field String - date
Format String - expire
After NumberDays - query String
- type String
GetOnlineArchivesResultPartitionField
- field_
name str - field_
type str - order int
Package Details
- Repository
- MongoDB Atlas pulumi/pulumi-mongodbatlas
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
mongodbatlas
Terraform Provider.