1. Packages
  2. MongoDB Atlas
  3. API Docs
  4. OnlineArchive
MongoDB Atlas v3.16.2 published on Friday, Jun 21, 2024 by Pulumi

mongodbatlas.OnlineArchive

Explore with Pulumi AI

mongodbatlas logo
MongoDB Atlas v3.16.2 published on Friday, Jun 21, 2024 by Pulumi

    mongodbatlas.OnlineArchive resource provides access to create, edit, pause and resume an online archive for a collection.

    NOTE: Groups and projects are synonymous terms. You may find group_id in the official documentation.

    IMPORTANT: The collection must exists before performing an online archive.

    IMPORTANT: There are fields that are immutable after creation, i.e if date_field value does not exist in the collection, the online archive state will be pending forever, and this field cannot be updated, that means a destroy is required, known error ONLINE_ARCHIVE_CANNOT_MODIFY_FIELD

    Example Usage

    S

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const test = new mongodbatlas.OnlineArchive("test", {
        projectId: projectId,
        clusterName: clusterName,
        collName: collectionName,
        dbName: databaseName,
        partitionFields: [
            {
                fieldName: "dateField",
                order: 0,
            },
            {
                fieldName: "firstName",
                order: 1,
            },
            {
                fieldName: "lastName",
                order: 2,
            },
        ],
        criteria: {
            type: "DATE",
            dateField: "dateField",
            expireAfterDays: 5,
        },
        schedule: {
            type: "DAILY",
            endHour: 1,
            endMinute: 1,
            startHour: 1,
            startMinute: 1,
        },
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    test = mongodbatlas.OnlineArchive("test",
        project_id=project_id,
        cluster_name=cluster_name,
        coll_name=collection_name,
        db_name=database_name,
        partition_fields=[
            mongodbatlas.OnlineArchivePartitionFieldArgs(
                field_name="dateField",
                order=0,
            ),
            mongodbatlas.OnlineArchivePartitionFieldArgs(
                field_name="firstName",
                order=1,
            ),
            mongodbatlas.OnlineArchivePartitionFieldArgs(
                field_name="lastName",
                order=2,
            ),
        ],
        criteria=mongodbatlas.OnlineArchiveCriteriaArgs(
            type="DATE",
            date_field="dateField",
            expire_after_days=5,
        ),
        schedule=mongodbatlas.OnlineArchiveScheduleArgs(
            type="DAILY",
            end_hour=1,
            end_minute=1,
            start_hour=1,
            start_minute=1,
        ))
    
    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.NewOnlineArchive(ctx, "test", &mongodbatlas.OnlineArchiveArgs{
    			ProjectId:   pulumi.Any(projectId),
    			ClusterName: pulumi.Any(clusterName),
    			CollName:    pulumi.Any(collectionName),
    			DbName:      pulumi.Any(databaseName),
    			PartitionFields: mongodbatlas.OnlineArchivePartitionFieldArray{
    				&mongodbatlas.OnlineArchivePartitionFieldArgs{
    					FieldName: pulumi.String("dateField"),
    					Order:     pulumi.Int(0),
    				},
    				&mongodbatlas.OnlineArchivePartitionFieldArgs{
    					FieldName: pulumi.String("firstName"),
    					Order:     pulumi.Int(1),
    				},
    				&mongodbatlas.OnlineArchivePartitionFieldArgs{
    					FieldName: pulumi.String("lastName"),
    					Order:     pulumi.Int(2),
    				},
    			},
    			Criteria: &mongodbatlas.OnlineArchiveCriteriaArgs{
    				Type:            pulumi.String("DATE"),
    				DateField:       pulumi.String("dateField"),
    				ExpireAfterDays: pulumi.Int(5),
    			},
    			Schedule: &mongodbatlas.OnlineArchiveScheduleArgs{
    				Type:        pulumi.String("DAILY"),
    				EndHour:     pulumi.Int(1),
    				EndMinute:   pulumi.Int(1),
    				StartHour:   pulumi.Int(1),
    				StartMinute: pulumi.Int(1),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Mongodbatlas.OnlineArchive("test", new()
        {
            ProjectId = projectId,
            ClusterName = clusterName,
            CollName = collectionName,
            DbName = databaseName,
            PartitionFields = new[]
            {
                new Mongodbatlas.Inputs.OnlineArchivePartitionFieldArgs
                {
                    FieldName = "dateField",
                    Order = 0,
                },
                new Mongodbatlas.Inputs.OnlineArchivePartitionFieldArgs
                {
                    FieldName = "firstName",
                    Order = 1,
                },
                new Mongodbatlas.Inputs.OnlineArchivePartitionFieldArgs
                {
                    FieldName = "lastName",
                    Order = 2,
                },
            },
            Criteria = new Mongodbatlas.Inputs.OnlineArchiveCriteriaArgs
            {
                Type = "DATE",
                DateField = "dateField",
                ExpireAfterDays = 5,
            },
            Schedule = new Mongodbatlas.Inputs.OnlineArchiveScheduleArgs
            {
                Type = "DAILY",
                EndHour = 1,
                EndMinute = 1,
                StartHour = 1,
                StartMinute = 1,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.OnlineArchive;
    import com.pulumi.mongodbatlas.OnlineArchiveArgs;
    import com.pulumi.mongodbatlas.inputs.OnlineArchivePartitionFieldArgs;
    import com.pulumi.mongodbatlas.inputs.OnlineArchiveCriteriaArgs;
    import com.pulumi.mongodbatlas.inputs.OnlineArchiveScheduleArgs;
    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) {
            var test = new OnlineArchive("test", OnlineArchiveArgs.builder()
                .projectId(projectId)
                .clusterName(clusterName)
                .collName(collectionName)
                .dbName(databaseName)
                .partitionFields(            
                    OnlineArchivePartitionFieldArgs.builder()
                        .fieldName("dateField")
                        .order(0)
                        .build(),
                    OnlineArchivePartitionFieldArgs.builder()
                        .fieldName("firstName")
                        .order(1)
                        .build(),
                    OnlineArchivePartitionFieldArgs.builder()
                        .fieldName("lastName")
                        .order(2)
                        .build())
                .criteria(OnlineArchiveCriteriaArgs.builder()
                    .type("DATE")
                    .dateField("dateField")
                    .expireAfterDays(5)
                    .build())
                .schedule(OnlineArchiveScheduleArgs.builder()
                    .type("DAILY")
                    .endHour(1)
                    .endMinute(1)
                    .startHour(1)
                    .startMinute(1)
                    .build())
                .build());
    
        }
    }
    
    resources:
      test:
        type: mongodbatlas:OnlineArchive
        properties:
          projectId: ${projectId}
          clusterName: ${clusterName}
          collName: ${collectionName}
          dbName: ${databaseName}
          partitionFields:
            - fieldName: dateField
              order: 0
            - fieldName: firstName
              order: 1
            - fieldName: lastName
              order: 2
          criteria:
            type: DATE
            dateField: dateField
            expireAfterDays: 5
          schedule:
            type: DAILY
            endHour: 1
            endMinute: 1
            startHour: 1
            startMinute: 1
    

    For custom criteria example

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const test = new mongodbatlas.OnlineArchive("test", {
        projectId: projectId,
        clusterName: clusterName,
        collName: collectionName,
        dbName: databaseName,
        partitionFields: [
            {
                fieldName: "firstName",
                order: 0,
            },
            {
                fieldName: "secondName",
                order: 1,
            },
        ],
        criteria: {
            type: "CUSTOM",
            query: "{ \"department\": \"engineering\" }",
        },
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    test = mongodbatlas.OnlineArchive("test",
        project_id=project_id,
        cluster_name=cluster_name,
        coll_name=collection_name,
        db_name=database_name,
        partition_fields=[
            mongodbatlas.OnlineArchivePartitionFieldArgs(
                field_name="firstName",
                order=0,
            ),
            mongodbatlas.OnlineArchivePartitionFieldArgs(
                field_name="secondName",
                order=1,
            ),
        ],
        criteria=mongodbatlas.OnlineArchiveCriteriaArgs(
            type="CUSTOM",
            query="{ \"department\": \"engineering\" }",
        ))
    
    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.NewOnlineArchive(ctx, "test", &mongodbatlas.OnlineArchiveArgs{
    			ProjectId:   pulumi.Any(projectId),
    			ClusterName: pulumi.Any(clusterName),
    			CollName:    pulumi.Any(collectionName),
    			DbName:      pulumi.Any(databaseName),
    			PartitionFields: mongodbatlas.OnlineArchivePartitionFieldArray{
    				&mongodbatlas.OnlineArchivePartitionFieldArgs{
    					FieldName: pulumi.String("firstName"),
    					Order:     pulumi.Int(0),
    				},
    				&mongodbatlas.OnlineArchivePartitionFieldArgs{
    					FieldName: pulumi.String("secondName"),
    					Order:     pulumi.Int(1),
    				},
    			},
    			Criteria: &mongodbatlas.OnlineArchiveCriteriaArgs{
    				Type:  pulumi.String("CUSTOM"),
    				Query: pulumi.String("{ \"department\": \"engineering\" }"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Mongodbatlas.OnlineArchive("test", new()
        {
            ProjectId = projectId,
            ClusterName = clusterName,
            CollName = collectionName,
            DbName = databaseName,
            PartitionFields = new[]
            {
                new Mongodbatlas.Inputs.OnlineArchivePartitionFieldArgs
                {
                    FieldName = "firstName",
                    Order = 0,
                },
                new Mongodbatlas.Inputs.OnlineArchivePartitionFieldArgs
                {
                    FieldName = "secondName",
                    Order = 1,
                },
            },
            Criteria = new Mongodbatlas.Inputs.OnlineArchiveCriteriaArgs
            {
                Type = "CUSTOM",
                Query = "{ \"department\": \"engineering\" }",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.OnlineArchive;
    import com.pulumi.mongodbatlas.OnlineArchiveArgs;
    import com.pulumi.mongodbatlas.inputs.OnlineArchivePartitionFieldArgs;
    import com.pulumi.mongodbatlas.inputs.OnlineArchiveCriteriaArgs;
    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) {
            var test = new OnlineArchive("test", OnlineArchiveArgs.builder()
                .projectId(projectId)
                .clusterName(clusterName)
                .collName(collectionName)
                .dbName(databaseName)
                .partitionFields(            
                    OnlineArchivePartitionFieldArgs.builder()
                        .fieldName("firstName")
                        .order(0)
                        .build(),
                    OnlineArchivePartitionFieldArgs.builder()
                        .fieldName("secondName")
                        .order(1)
                        .build())
                .criteria(OnlineArchiveCriteriaArgs.builder()
                    .type("CUSTOM")
                    .query("{ \"department\": \"engineering\" }")
                    .build())
                .build());
    
        }
    }
    
    resources:
      test:
        type: mongodbatlas:OnlineArchive
        properties:
          projectId: ${projectId}
          clusterName: ${clusterName}
          collName: ${collectionName}
          dbName: ${databaseName}
          partitionFields:
            - fieldName: firstName
              order: 0
            - fieldName: secondName
              order: 1
          criteria:
            type: CUSTOM
            query: '{ "department": "engineering" }'
    

    Defining custom provider and region example

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const test = new mongodbatlas.OnlineArchive("test", {
        projectId: projectId,
        clusterName: clusterName,
        collName: collectionName,
        dbName: databaseName,
        dataProcessRegion: {
            cloudProvider: "AZURE",
            region: "US_EAST_2",
        },
        partitionFields: [{
            fieldName: "firstName",
            order: 0,
        }],
        criteria: {
            type: "CUSTOM",
            query: "{ \"department\": \"engineering\" }",
        },
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    test = mongodbatlas.OnlineArchive("test",
        project_id=project_id,
        cluster_name=cluster_name,
        coll_name=collection_name,
        db_name=database_name,
        data_process_region=mongodbatlas.OnlineArchiveDataProcessRegionArgs(
            cloud_provider="AZURE",
            region="US_EAST_2",
        ),
        partition_fields=[mongodbatlas.OnlineArchivePartitionFieldArgs(
            field_name="firstName",
            order=0,
        )],
        criteria=mongodbatlas.OnlineArchiveCriteriaArgs(
            type="CUSTOM",
            query="{ \"department\": \"engineering\" }",
        ))
    
    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.NewOnlineArchive(ctx, "test", &mongodbatlas.OnlineArchiveArgs{
    			ProjectId:   pulumi.Any(projectId),
    			ClusterName: pulumi.Any(clusterName),
    			CollName:    pulumi.Any(collectionName),
    			DbName:      pulumi.Any(databaseName),
    			DataProcessRegion: &mongodbatlas.OnlineArchiveDataProcessRegionArgs{
    				CloudProvider: pulumi.String("AZURE"),
    				Region:        pulumi.String("US_EAST_2"),
    			},
    			PartitionFields: mongodbatlas.OnlineArchivePartitionFieldArray{
    				&mongodbatlas.OnlineArchivePartitionFieldArgs{
    					FieldName: pulumi.String("firstName"),
    					Order:     pulumi.Int(0),
    				},
    			},
    			Criteria: &mongodbatlas.OnlineArchiveCriteriaArgs{
    				Type:  pulumi.String("CUSTOM"),
    				Query: pulumi.String("{ \"department\": \"engineering\" }"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Mongodbatlas.OnlineArchive("test", new()
        {
            ProjectId = projectId,
            ClusterName = clusterName,
            CollName = collectionName,
            DbName = databaseName,
            DataProcessRegion = new Mongodbatlas.Inputs.OnlineArchiveDataProcessRegionArgs
            {
                CloudProvider = "AZURE",
                Region = "US_EAST_2",
            },
            PartitionFields = new[]
            {
                new Mongodbatlas.Inputs.OnlineArchivePartitionFieldArgs
                {
                    FieldName = "firstName",
                    Order = 0,
                },
            },
            Criteria = new Mongodbatlas.Inputs.OnlineArchiveCriteriaArgs
            {
                Type = "CUSTOM",
                Query = "{ \"department\": \"engineering\" }",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.OnlineArchive;
    import com.pulumi.mongodbatlas.OnlineArchiveArgs;
    import com.pulumi.mongodbatlas.inputs.OnlineArchiveDataProcessRegionArgs;
    import com.pulumi.mongodbatlas.inputs.OnlineArchivePartitionFieldArgs;
    import com.pulumi.mongodbatlas.inputs.OnlineArchiveCriteriaArgs;
    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) {
            var test = new OnlineArchive("test", OnlineArchiveArgs.builder()
                .projectId(projectId)
                .clusterName(clusterName)
                .collName(collectionName)
                .dbName(databaseName)
                .dataProcessRegion(OnlineArchiveDataProcessRegionArgs.builder()
                    .cloudProvider("AZURE")
                    .region("US_EAST_2")
                    .build())
                .partitionFields(OnlineArchivePartitionFieldArgs.builder()
                    .fieldName("firstName")
                    .order(0)
                    .build())
                .criteria(OnlineArchiveCriteriaArgs.builder()
                    .type("CUSTOM")
                    .query("{ \"department\": \"engineering\" }")
                    .build())
                .build());
    
        }
    }
    
    resources:
      test:
        type: mongodbatlas:OnlineArchive
        properties:
          projectId: ${projectId}
          clusterName: ${clusterName}
          collName: ${collectionName}
          dbName: ${databaseName}
          dataProcessRegion:
            cloudProvider: AZURE
            region: US_EAST_2
          partitionFields:
            - fieldName: firstName
              order: 0
          criteria:
            type: CUSTOM
            query: '{ "department": "engineering" }'
    

    Create OnlineArchive Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new OnlineArchive(name: string, args: OnlineArchiveArgs, opts?: CustomResourceOptions);
    @overload
    def OnlineArchive(resource_name: str,
                      args: OnlineArchiveArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def OnlineArchive(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      cluster_name: Optional[str] = None,
                      coll_name: Optional[str] = None,
                      criteria: Optional[OnlineArchiveCriteriaArgs] = None,
                      db_name: Optional[str] = None,
                      project_id: Optional[str] = None,
                      collection_type: Optional[str] = None,
                      data_expiration_rule: Optional[OnlineArchiveDataExpirationRuleArgs] = None,
                      data_process_region: Optional[OnlineArchiveDataProcessRegionArgs] = None,
                      partition_fields: Optional[Sequence[OnlineArchivePartitionFieldArgs]] = None,
                      paused: Optional[bool] = None,
                      schedule: Optional[OnlineArchiveScheduleArgs] = None,
                      sync_creation: Optional[bool] = None)
    func NewOnlineArchive(ctx *Context, name string, args OnlineArchiveArgs, opts ...ResourceOption) (*OnlineArchive, error)
    public OnlineArchive(string name, OnlineArchiveArgs args, CustomResourceOptions? opts = null)
    public OnlineArchive(String name, OnlineArchiveArgs args)
    public OnlineArchive(String name, OnlineArchiveArgs args, CustomResourceOptions options)
    
    type: mongodbatlas:OnlineArchive
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args OnlineArchiveArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args OnlineArchiveArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args OnlineArchiveArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OnlineArchiveArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OnlineArchiveArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var onlineArchiveResource = new Mongodbatlas.OnlineArchive("onlineArchiveResource", new()
    {
        ClusterName = "string",
        CollName = "string",
        Criteria = new Mongodbatlas.Inputs.OnlineArchiveCriteriaArgs
        {
            Type = "string",
            DateField = "string",
            DateFormat = "string",
            ExpireAfterDays = 0,
            Query = "string",
        },
        DbName = "string",
        ProjectId = "string",
        CollectionType = "string",
        DataExpirationRule = new Mongodbatlas.Inputs.OnlineArchiveDataExpirationRuleArgs
        {
            ExpireAfterDays = 0,
        },
        DataProcessRegion = new Mongodbatlas.Inputs.OnlineArchiveDataProcessRegionArgs
        {
            CloudProvider = "string",
            Region = "string",
        },
        PartitionFields = new[]
        {
            new Mongodbatlas.Inputs.OnlineArchivePartitionFieldArgs
            {
                FieldName = "string",
                Order = 0,
                FieldType = "string",
            },
        },
        Paused = false,
        Schedule = new Mongodbatlas.Inputs.OnlineArchiveScheduleArgs
        {
            Type = "string",
            DayOfMonth = 0,
            DayOfWeek = 0,
            EndHour = 0,
            EndMinute = 0,
            StartHour = 0,
            StartMinute = 0,
        },
        SyncCreation = false,
    });
    
    example, err := mongodbatlas.NewOnlineArchive(ctx, "onlineArchiveResource", &mongodbatlas.OnlineArchiveArgs{
    	ClusterName: pulumi.String("string"),
    	CollName:    pulumi.String("string"),
    	Criteria: &mongodbatlas.OnlineArchiveCriteriaArgs{
    		Type:            pulumi.String("string"),
    		DateField:       pulumi.String("string"),
    		DateFormat:      pulumi.String("string"),
    		ExpireAfterDays: pulumi.Int(0),
    		Query:           pulumi.String("string"),
    	},
    	DbName:         pulumi.String("string"),
    	ProjectId:      pulumi.String("string"),
    	CollectionType: pulumi.String("string"),
    	DataExpirationRule: &mongodbatlas.OnlineArchiveDataExpirationRuleArgs{
    		ExpireAfterDays: pulumi.Int(0),
    	},
    	DataProcessRegion: &mongodbatlas.OnlineArchiveDataProcessRegionArgs{
    		CloudProvider: pulumi.String("string"),
    		Region:        pulumi.String("string"),
    	},
    	PartitionFields: mongodbatlas.OnlineArchivePartitionFieldArray{
    		&mongodbatlas.OnlineArchivePartitionFieldArgs{
    			FieldName: pulumi.String("string"),
    			Order:     pulumi.Int(0),
    			FieldType: pulumi.String("string"),
    		},
    	},
    	Paused: pulumi.Bool(false),
    	Schedule: &mongodbatlas.OnlineArchiveScheduleArgs{
    		Type:        pulumi.String("string"),
    		DayOfMonth:  pulumi.Int(0),
    		DayOfWeek:   pulumi.Int(0),
    		EndHour:     pulumi.Int(0),
    		EndMinute:   pulumi.Int(0),
    		StartHour:   pulumi.Int(0),
    		StartMinute: pulumi.Int(0),
    	},
    	SyncCreation: pulumi.Bool(false),
    })
    
    var onlineArchiveResource = new OnlineArchive("onlineArchiveResource", OnlineArchiveArgs.builder()
        .clusterName("string")
        .collName("string")
        .criteria(OnlineArchiveCriteriaArgs.builder()
            .type("string")
            .dateField("string")
            .dateFormat("string")
            .expireAfterDays(0)
            .query("string")
            .build())
        .dbName("string")
        .projectId("string")
        .collectionType("string")
        .dataExpirationRule(OnlineArchiveDataExpirationRuleArgs.builder()
            .expireAfterDays(0)
            .build())
        .dataProcessRegion(OnlineArchiveDataProcessRegionArgs.builder()
            .cloudProvider("string")
            .region("string")
            .build())
        .partitionFields(OnlineArchivePartitionFieldArgs.builder()
            .fieldName("string")
            .order(0)
            .fieldType("string")
            .build())
        .paused(false)
        .schedule(OnlineArchiveScheduleArgs.builder()
            .type("string")
            .dayOfMonth(0)
            .dayOfWeek(0)
            .endHour(0)
            .endMinute(0)
            .startHour(0)
            .startMinute(0)
            .build())
        .syncCreation(false)
        .build());
    
    online_archive_resource = mongodbatlas.OnlineArchive("onlineArchiveResource",
        cluster_name="string",
        coll_name="string",
        criteria=mongodbatlas.OnlineArchiveCriteriaArgs(
            type="string",
            date_field="string",
            date_format="string",
            expire_after_days=0,
            query="string",
        ),
        db_name="string",
        project_id="string",
        collection_type="string",
        data_expiration_rule=mongodbatlas.OnlineArchiveDataExpirationRuleArgs(
            expire_after_days=0,
        ),
        data_process_region=mongodbatlas.OnlineArchiveDataProcessRegionArgs(
            cloud_provider="string",
            region="string",
        ),
        partition_fields=[mongodbatlas.OnlineArchivePartitionFieldArgs(
            field_name="string",
            order=0,
            field_type="string",
        )],
        paused=False,
        schedule=mongodbatlas.OnlineArchiveScheduleArgs(
            type="string",
            day_of_month=0,
            day_of_week=0,
            end_hour=0,
            end_minute=0,
            start_hour=0,
            start_minute=0,
        ),
        sync_creation=False)
    
    const onlineArchiveResource = new mongodbatlas.OnlineArchive("onlineArchiveResource", {
        clusterName: "string",
        collName: "string",
        criteria: {
            type: "string",
            dateField: "string",
            dateFormat: "string",
            expireAfterDays: 0,
            query: "string",
        },
        dbName: "string",
        projectId: "string",
        collectionType: "string",
        dataExpirationRule: {
            expireAfterDays: 0,
        },
        dataProcessRegion: {
            cloudProvider: "string",
            region: "string",
        },
        partitionFields: [{
            fieldName: "string",
            order: 0,
            fieldType: "string",
        }],
        paused: false,
        schedule: {
            type: "string",
            dayOfMonth: 0,
            dayOfWeek: 0,
            endHour: 0,
            endMinute: 0,
            startHour: 0,
            startMinute: 0,
        },
        syncCreation: false,
    });
    
    type: mongodbatlas:OnlineArchive
    properties:
        clusterName: string
        collName: string
        collectionType: string
        criteria:
            dateField: string
            dateFormat: string
            expireAfterDays: 0
            query: string
            type: string
        dataExpirationRule:
            expireAfterDays: 0
        dataProcessRegion:
            cloudProvider: string
            region: string
        dbName: string
        partitionFields:
            - fieldName: string
              fieldType: string
              order: 0
        paused: false
        projectId: string
        schedule:
            dayOfMonth: 0
            dayOfWeek: 0
            endHour: 0
            endMinute: 0
            startHour: 0
            startMinute: 0
            type: string
        syncCreation: false
    

    OnlineArchive Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The OnlineArchive resource accepts the following input properties:

    ClusterName string
    Name of the cluster that contains the collection.
    CollName string
    Name of the collection.
    Criteria OnlineArchiveCriteria
    Criteria to use for archiving data. See criteria.
    DbName string
    Name of the database that contains the collection.
    ProjectId string
    The unique ID for the project
    CollectionType string
    Type of MongoDB collection that you want to return. This value can be "TIMESERIES" or "STANDARD". Default is "STANDARD".
    DataExpirationRule OnlineArchiveDataExpirationRule
    Rule for specifying when data should be deleted from the archive. See data expiration rule.
    DataProcessRegion OnlineArchiveDataProcessRegion
    Settings to configure the region where you wish to store your archived data. See data process region. This field is immutable hence cannot be updated.
    PartitionFields List<OnlineArchivePartitionField>
    Fields to use to partition data. You can specify up to two frequently queried fields (or up to three fields when one of them is date_field) to use for partitioning data. Queries that don’t contain the specified fields require a full collection scan of all archived documents, which takes longer and increases your costs. To learn more about how partition improves query performance, see Data Structure in S3. The value of a partition field can be up to a maximum of 700 characters. Documents with values exceeding 700 characters are not archived. See partition fields.
    Paused bool
    State of the online archive. This is required for pausing an active online archive or resuming a paused online archive. If the collection has another active online archive, the resume request fails.
    Schedule OnlineArchiveSchedule
    Regular frequency and duration when archiving process occurs. See schedule.
    SyncCreation bool
    ClusterName string
    Name of the cluster that contains the collection.
    CollName string
    Name of the collection.
    Criteria OnlineArchiveCriteriaArgs
    Criteria to use for archiving data. See criteria.
    DbName string
    Name of the database that contains the collection.
    ProjectId string
    The unique ID for the project
    CollectionType string
    Type of MongoDB collection that you want to return. This value can be "TIMESERIES" or "STANDARD". Default is "STANDARD".
    DataExpirationRule OnlineArchiveDataExpirationRuleArgs
    Rule for specifying when data should be deleted from the archive. See data expiration rule.
    DataProcessRegion OnlineArchiveDataProcessRegionArgs
    Settings to configure the region where you wish to store your archived data. See data process region. This field is immutable hence cannot be updated.
    PartitionFields []OnlineArchivePartitionFieldArgs
    Fields to use to partition data. You can specify up to two frequently queried fields (or up to three fields when one of them is date_field) to use for partitioning data. Queries that don’t contain the specified fields require a full collection scan of all archived documents, which takes longer and increases your costs. To learn more about how partition improves query performance, see Data Structure in S3. The value of a partition field can be up to a maximum of 700 characters. Documents with values exceeding 700 characters are not archived. See partition fields.
    Paused bool
    State of the online archive. This is required for pausing an active online archive or resuming a paused online archive. If the collection has another active online archive, the resume request fails.
    Schedule OnlineArchiveScheduleArgs
    Regular frequency and duration when archiving process occurs. See schedule.
    SyncCreation bool
    clusterName String
    Name of the cluster that contains the collection.
    collName String
    Name of the collection.
    criteria OnlineArchiveCriteria
    Criteria to use for archiving data. See criteria.
    dbName String
    Name of the database that contains the collection.
    projectId String
    The unique ID for the project
    collectionType String
    Type of MongoDB collection that you want to return. This value can be "TIMESERIES" or "STANDARD". Default is "STANDARD".
    dataExpirationRule OnlineArchiveDataExpirationRule
    Rule for specifying when data should be deleted from the archive. See data expiration rule.
    dataProcessRegion OnlineArchiveDataProcessRegion
    Settings to configure the region where you wish to store your archived data. See data process region. This field is immutable hence cannot be updated.
    partitionFields List<OnlineArchivePartitionField>
    Fields to use to partition data. You can specify up to two frequently queried fields (or up to three fields when one of them is date_field) to use for partitioning data. Queries that don’t contain the specified fields require a full collection scan of all archived documents, which takes longer and increases your costs. To learn more about how partition improves query performance, see Data Structure in S3. The value of a partition field can be up to a maximum of 700 characters. Documents with values exceeding 700 characters are not archived. See partition fields.
    paused Boolean
    State of the online archive. This is required for pausing an active online archive or resuming a paused online archive. If the collection has another active online archive, the resume request fails.
    schedule OnlineArchiveSchedule
    Regular frequency and duration when archiving process occurs. See schedule.
    syncCreation Boolean
    clusterName string
    Name of the cluster that contains the collection.
    collName string
    Name of the collection.
    criteria OnlineArchiveCriteria
    Criteria to use for archiving data. See criteria.
    dbName string
    Name of the database that contains the collection.
    projectId string
    The unique ID for the project
    collectionType string
    Type of MongoDB collection that you want to return. This value can be "TIMESERIES" or "STANDARD". Default is "STANDARD".
    dataExpirationRule OnlineArchiveDataExpirationRule
    Rule for specifying when data should be deleted from the archive. See data expiration rule.
    dataProcessRegion OnlineArchiveDataProcessRegion
    Settings to configure the region where you wish to store your archived data. See data process region. This field is immutable hence cannot be updated.
    partitionFields OnlineArchivePartitionField[]
    Fields to use to partition data. You can specify up to two frequently queried fields (or up to three fields when one of them is date_field) to use for partitioning data. Queries that don’t contain the specified fields require a full collection scan of all archived documents, which takes longer and increases your costs. To learn more about how partition improves query performance, see Data Structure in S3. The value of a partition field can be up to a maximum of 700 characters. Documents with values exceeding 700 characters are not archived. See partition fields.
    paused boolean
    State of the online archive. This is required for pausing an active online archive or resuming a paused online archive. If the collection has another active online archive, the resume request fails.
    schedule OnlineArchiveSchedule
    Regular frequency and duration when archiving process occurs. See schedule.
    syncCreation boolean
    cluster_name str
    Name of the cluster that contains the collection.
    coll_name str
    Name of the collection.
    criteria OnlineArchiveCriteriaArgs
    Criteria to use for archiving data. See criteria.
    db_name str
    Name of the database that contains the collection.
    project_id str
    The unique ID for the project
    collection_type str
    Type of MongoDB collection that you want to return. This value can be "TIMESERIES" or "STANDARD". Default is "STANDARD".
    data_expiration_rule OnlineArchiveDataExpirationRuleArgs
    Rule for specifying when data should be deleted from the archive. See data expiration rule.
    data_process_region OnlineArchiveDataProcessRegionArgs
    Settings to configure the region where you wish to store your archived data. See data process region. This field is immutable hence cannot be updated.
    partition_fields Sequence[OnlineArchivePartitionFieldArgs]
    Fields to use to partition data. You can specify up to two frequently queried fields (or up to three fields when one of them is date_field) to use for partitioning data. Queries that don’t contain the specified fields require a full collection scan of all archived documents, which takes longer and increases your costs. To learn more about how partition improves query performance, see Data Structure in S3. The value of a partition field can be up to a maximum of 700 characters. Documents with values exceeding 700 characters are not archived. See partition fields.
    paused bool
    State of the online archive. This is required for pausing an active online archive or resuming a paused online archive. If the collection has another active online archive, the resume request fails.
    schedule OnlineArchiveScheduleArgs
    Regular frequency and duration when archiving process occurs. See schedule.
    sync_creation bool
    clusterName String
    Name of the cluster that contains the collection.
    collName String
    Name of the collection.
    criteria Property Map
    Criteria to use for archiving data. See criteria.
    dbName String
    Name of the database that contains the collection.
    projectId String
    The unique ID for the project
    collectionType String
    Type of MongoDB collection that you want to return. This value can be "TIMESERIES" or "STANDARD". Default is "STANDARD".
    dataExpirationRule Property Map
    Rule for specifying when data should be deleted from the archive. See data expiration rule.
    dataProcessRegion Property Map
    Settings to configure the region where you wish to store your archived data. See data process region. This field is immutable hence cannot be updated.
    partitionFields List<Property Map>
    Fields to use to partition data. You can specify up to two frequently queried fields (or up to three fields when one of them is date_field) to use for partitioning data. Queries that don’t contain the specified fields require a full collection scan of all archived documents, which takes longer and increases your costs. To learn more about how partition improves query performance, see Data Structure in S3. The value of a partition field can be up to a maximum of 700 characters. Documents with values exceeding 700 characters are not archived. See partition fields.
    paused Boolean
    State of the online archive. This is required for pausing an active online archive or resuming a paused online archive. If the collection has another active online archive, the resume request fails.
    schedule Property Map
    Regular frequency and duration when archiving process occurs. See schedule.
    syncCreation Boolean

    Outputs

    All input properties are implicitly available as output properties. Additionally, the OnlineArchive resource produces the following output properties:

    ArchiveId string
    ID of the online archive.
    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    Status of the online archive. Valid values are: Pending, Archiving, Idle, Pausing, Paused, Orphaned and Deleted
    ArchiveId string
    ID of the online archive.
    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    Status of the online archive. Valid values are: Pending, Archiving, Idle, Pausing, Paused, Orphaned and Deleted
    archiveId String
    ID of the online archive.
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    Status of the online archive. Valid values are: Pending, Archiving, Idle, Pausing, Paused, Orphaned and Deleted
    archiveId string
    ID of the online archive.
    id string
    The provider-assigned unique ID for this managed resource.
    state string
    Status of the online archive. Valid values are: Pending, Archiving, Idle, Pausing, Paused, Orphaned and Deleted
    archive_id str
    ID of the online archive.
    id str
    The provider-assigned unique ID for this managed resource.
    state str
    Status of the online archive. Valid values are: Pending, Archiving, Idle, Pausing, Paused, Orphaned and Deleted
    archiveId String
    ID of the online archive.
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    Status of the online archive. Valid values are: Pending, Archiving, Idle, Pausing, Paused, Orphaned and Deleted

    Look up Existing OnlineArchive Resource

    Get an existing OnlineArchive 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?: OnlineArchiveState, opts?: CustomResourceOptions): OnlineArchive
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            archive_id: Optional[str] = None,
            cluster_name: Optional[str] = None,
            coll_name: Optional[str] = None,
            collection_type: Optional[str] = None,
            criteria: Optional[OnlineArchiveCriteriaArgs] = None,
            data_expiration_rule: Optional[OnlineArchiveDataExpirationRuleArgs] = None,
            data_process_region: Optional[OnlineArchiveDataProcessRegionArgs] = None,
            db_name: Optional[str] = None,
            partition_fields: Optional[Sequence[OnlineArchivePartitionFieldArgs]] = None,
            paused: Optional[bool] = None,
            project_id: Optional[str] = None,
            schedule: Optional[OnlineArchiveScheduleArgs] = None,
            state: Optional[str] = None,
            sync_creation: Optional[bool] = None) -> OnlineArchive
    func GetOnlineArchive(ctx *Context, name string, id IDInput, state *OnlineArchiveState, opts ...ResourceOption) (*OnlineArchive, error)
    public static OnlineArchive Get(string name, Input<string> id, OnlineArchiveState? state, CustomResourceOptions? opts = null)
    public static OnlineArchive get(String name, Output<String> id, OnlineArchiveState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    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:
    ArchiveId string
    ID of the online archive.
    ClusterName string
    Name of the cluster that contains the collection.
    CollName string
    Name of the collection.
    CollectionType string
    Type of MongoDB collection that you want to return. This value can be "TIMESERIES" or "STANDARD". Default is "STANDARD".
    Criteria OnlineArchiveCriteria
    Criteria to use for archiving data. See criteria.
    DataExpirationRule OnlineArchiveDataExpirationRule
    Rule for specifying when data should be deleted from the archive. See data expiration rule.
    DataProcessRegion OnlineArchiveDataProcessRegion
    Settings to configure the region where you wish to store your archived data. See data process region. This field is immutable hence cannot be updated.
    DbName string
    Name of the database that contains the collection.
    PartitionFields List<OnlineArchivePartitionField>
    Fields to use to partition data. You can specify up to two frequently queried fields (or up to three fields when one of them is date_field) to use for partitioning data. Queries that don’t contain the specified fields require a full collection scan of all archived documents, which takes longer and increases your costs. To learn more about how partition improves query performance, see Data Structure in S3. The value of a partition field can be up to a maximum of 700 characters. Documents with values exceeding 700 characters are not archived. See partition fields.
    Paused bool
    State of the online archive. This is required for pausing an active online archive or resuming a paused online archive. If the collection has another active online archive, the resume request fails.
    ProjectId string
    The unique ID for the project
    Schedule OnlineArchiveSchedule
    Regular frequency and duration when archiving process occurs. See schedule.
    State string
    Status of the online archive. Valid values are: Pending, Archiving, Idle, Pausing, Paused, Orphaned and Deleted
    SyncCreation bool
    ArchiveId string
    ID of the online archive.
    ClusterName string
    Name of the cluster that contains the collection.
    CollName string
    Name of the collection.
    CollectionType string
    Type of MongoDB collection that you want to return. This value can be "TIMESERIES" or "STANDARD". Default is "STANDARD".
    Criteria OnlineArchiveCriteriaArgs
    Criteria to use for archiving data. See criteria.
    DataExpirationRule OnlineArchiveDataExpirationRuleArgs
    Rule for specifying when data should be deleted from the archive. See data expiration rule.
    DataProcessRegion OnlineArchiveDataProcessRegionArgs
    Settings to configure the region where you wish to store your archived data. See data process region. This field is immutable hence cannot be updated.
    DbName string
    Name of the database that contains the collection.
    PartitionFields []OnlineArchivePartitionFieldArgs
    Fields to use to partition data. You can specify up to two frequently queried fields (or up to three fields when one of them is date_field) to use for partitioning data. Queries that don’t contain the specified fields require a full collection scan of all archived documents, which takes longer and increases your costs. To learn more about how partition improves query performance, see Data Structure in S3. The value of a partition field can be up to a maximum of 700 characters. Documents with values exceeding 700 characters are not archived. See partition fields.
    Paused bool
    State of the online archive. This is required for pausing an active online archive or resuming a paused online archive. If the collection has another active online archive, the resume request fails.
    ProjectId string
    The unique ID for the project
    Schedule OnlineArchiveScheduleArgs
    Regular frequency and duration when archiving process occurs. See schedule.
    State string
    Status of the online archive. Valid values are: Pending, Archiving, Idle, Pausing, Paused, Orphaned and Deleted
    SyncCreation bool
    archiveId String
    ID of the online archive.
    clusterName String
    Name of the cluster that contains the collection.
    collName String
    Name of the collection.
    collectionType String
    Type of MongoDB collection that you want to return. This value can be "TIMESERIES" or "STANDARD". Default is "STANDARD".
    criteria OnlineArchiveCriteria
    Criteria to use for archiving data. See criteria.
    dataExpirationRule OnlineArchiveDataExpirationRule
    Rule for specifying when data should be deleted from the archive. See data expiration rule.
    dataProcessRegion OnlineArchiveDataProcessRegion
    Settings to configure the region where you wish to store your archived data. See data process region. This field is immutable hence cannot be updated.
    dbName String
    Name of the database that contains the collection.
    partitionFields List<OnlineArchivePartitionField>
    Fields to use to partition data. You can specify up to two frequently queried fields (or up to three fields when one of them is date_field) to use for partitioning data. Queries that don’t contain the specified fields require a full collection scan of all archived documents, which takes longer and increases your costs. To learn more about how partition improves query performance, see Data Structure in S3. The value of a partition field can be up to a maximum of 700 characters. Documents with values exceeding 700 characters are not archived. See partition fields.
    paused Boolean
    State of the online archive. This is required for pausing an active online archive or resuming a paused online archive. If the collection has another active online archive, the resume request fails.
    projectId String
    The unique ID for the project
    schedule OnlineArchiveSchedule
    Regular frequency and duration when archiving process occurs. See schedule.
    state String
    Status of the online archive. Valid values are: Pending, Archiving, Idle, Pausing, Paused, Orphaned and Deleted
    syncCreation Boolean
    archiveId string
    ID of the online archive.
    clusterName string
    Name of the cluster that contains the collection.
    collName string
    Name of the collection.
    collectionType string
    Type of MongoDB collection that you want to return. This value can be "TIMESERIES" or "STANDARD". Default is "STANDARD".
    criteria OnlineArchiveCriteria
    Criteria to use for archiving data. See criteria.
    dataExpirationRule OnlineArchiveDataExpirationRule
    Rule for specifying when data should be deleted from the archive. See data expiration rule.
    dataProcessRegion OnlineArchiveDataProcessRegion
    Settings to configure the region where you wish to store your archived data. See data process region. This field is immutable hence cannot be updated.
    dbName string
    Name of the database that contains the collection.
    partitionFields OnlineArchivePartitionField[]
    Fields to use to partition data. You can specify up to two frequently queried fields (or up to three fields when one of them is date_field) to use for partitioning data. Queries that don’t contain the specified fields require a full collection scan of all archived documents, which takes longer and increases your costs. To learn more about how partition improves query performance, see Data Structure in S3. The value of a partition field can be up to a maximum of 700 characters. Documents with values exceeding 700 characters are not archived. See partition fields.
    paused boolean
    State of the online archive. This is required for pausing an active online archive or resuming a paused online archive. If the collection has another active online archive, the resume request fails.
    projectId string
    The unique ID for the project
    schedule OnlineArchiveSchedule
    Regular frequency and duration when archiving process occurs. See schedule.
    state string
    Status of the online archive. Valid values are: Pending, Archiving, Idle, Pausing, Paused, Orphaned and Deleted
    syncCreation boolean
    archive_id str
    ID of the online archive.
    cluster_name str
    Name of the cluster that contains the collection.
    coll_name str
    Name of the collection.
    collection_type str
    Type of MongoDB collection that you want to return. This value can be "TIMESERIES" or "STANDARD". Default is "STANDARD".
    criteria OnlineArchiveCriteriaArgs
    Criteria to use for archiving data. See criteria.
    data_expiration_rule OnlineArchiveDataExpirationRuleArgs
    Rule for specifying when data should be deleted from the archive. See data expiration rule.
    data_process_region OnlineArchiveDataProcessRegionArgs
    Settings to configure the region where you wish to store your archived data. See data process region. This field is immutable hence cannot be updated.
    db_name str
    Name of the database that contains the collection.
    partition_fields Sequence[OnlineArchivePartitionFieldArgs]
    Fields to use to partition data. You can specify up to two frequently queried fields (or up to three fields when one of them is date_field) to use for partitioning data. Queries that don’t contain the specified fields require a full collection scan of all archived documents, which takes longer and increases your costs. To learn more about how partition improves query performance, see Data Structure in S3. The value of a partition field can be up to a maximum of 700 characters. Documents with values exceeding 700 characters are not archived. See partition fields.
    paused bool
    State of the online archive. This is required for pausing an active online archive or resuming a paused online archive. If the collection has another active online archive, the resume request fails.
    project_id str
    The unique ID for the project
    schedule OnlineArchiveScheduleArgs
    Regular frequency and duration when archiving process occurs. See schedule.
    state str
    Status of the online archive. Valid values are: Pending, Archiving, Idle, Pausing, Paused, Orphaned and Deleted
    sync_creation bool
    archiveId String
    ID of the online archive.
    clusterName String
    Name of the cluster that contains the collection.
    collName String
    Name of the collection.
    collectionType String
    Type of MongoDB collection that you want to return. This value can be "TIMESERIES" or "STANDARD". Default is "STANDARD".
    criteria Property Map
    Criteria to use for archiving data. See criteria.
    dataExpirationRule Property Map
    Rule for specifying when data should be deleted from the archive. See data expiration rule.
    dataProcessRegion Property Map
    Settings to configure the region where you wish to store your archived data. See data process region. This field is immutable hence cannot be updated.
    dbName String
    Name of the database that contains the collection.
    partitionFields List<Property Map>
    Fields to use to partition data. You can specify up to two frequently queried fields (or up to three fields when one of them is date_field) to use for partitioning data. Queries that don’t contain the specified fields require a full collection scan of all archived documents, which takes longer and increases your costs. To learn more about how partition improves query performance, see Data Structure in S3. The value of a partition field can be up to a maximum of 700 characters. Documents with values exceeding 700 characters are not archived. See partition fields.
    paused Boolean
    State of the online archive. This is required for pausing an active online archive or resuming a paused online archive. If the collection has another active online archive, the resume request fails.
    projectId String
    The unique ID for the project
    schedule Property Map
    Regular frequency and duration when archiving process occurs. See schedule.
    state String
    Status of the online archive. Valid values are: Pending, Archiving, Idle, Pausing, Paused, Orphaned and Deleted
    syncCreation Boolean

    Supporting Types

    OnlineArchiveCriteria, OnlineArchiveCriteriaArgs

    Type string

    Type of criteria (DATE, CUSTOM)

    The following fields are required for criteria type DATE

    DateField string
    Indexed database parameter that stores the date that determines when data moves to the online archive. MongoDB Cloud archives the data when the current date exceeds the date in this database parameter plus the number of days specified through the expireAfterDays parameter.
    DateFormat string
    Syntax used to write the date after which data moves to the online archive. Date can be expressed as ISO 8601 or Epoch timestamps. The Epoch timestamp can be expressed as nanoseconds, milliseconds, or seconds. You must set type to DATE if collectionType is TIMESERIES. Valid values: ISODATE (default), EPOCH_SECONDS, EPOCH_MILLIS, EPOCH_NANOSECONDS.
    ExpireAfterDays int

    Number of days after the value in the criteria.dateField when MongoDB Cloud archives data in the specified cluster.

    NOTE: if DATE is selected, the partition_fields.field_name must be completed with the date_field value

    The only field required for criteria type CUSTOM

    Query string
    JSON query to use to select documents for archiving. Atlas uses the specified query with the db.collection.find(query) command. The empty document {} to return all documents is not supported.
    Type string

    Type of criteria (DATE, CUSTOM)

    The following fields are required for criteria type DATE

    DateField string
    Indexed database parameter that stores the date that determines when data moves to the online archive. MongoDB Cloud archives the data when the current date exceeds the date in this database parameter plus the number of days specified through the expireAfterDays parameter.
    DateFormat string
    Syntax used to write the date after which data moves to the online archive. Date can be expressed as ISO 8601 or Epoch timestamps. The Epoch timestamp can be expressed as nanoseconds, milliseconds, or seconds. You must set type to DATE if collectionType is TIMESERIES. Valid values: ISODATE (default), EPOCH_SECONDS, EPOCH_MILLIS, EPOCH_NANOSECONDS.
    ExpireAfterDays int

    Number of days after the value in the criteria.dateField when MongoDB Cloud archives data in the specified cluster.

    NOTE: if DATE is selected, the partition_fields.field_name must be completed with the date_field value

    The only field required for criteria type CUSTOM

    Query string
    JSON query to use to select documents for archiving. Atlas uses the specified query with the db.collection.find(query) command. The empty document {} to return all documents is not supported.
    type String

    Type of criteria (DATE, CUSTOM)

    The following fields are required for criteria type DATE

    dateField String
    Indexed database parameter that stores the date that determines when data moves to the online archive. MongoDB Cloud archives the data when the current date exceeds the date in this database parameter plus the number of days specified through the expireAfterDays parameter.
    dateFormat String
    Syntax used to write the date after which data moves to the online archive. Date can be expressed as ISO 8601 or Epoch timestamps. The Epoch timestamp can be expressed as nanoseconds, milliseconds, or seconds. You must set type to DATE if collectionType is TIMESERIES. Valid values: ISODATE (default), EPOCH_SECONDS, EPOCH_MILLIS, EPOCH_NANOSECONDS.
    expireAfterDays Integer

    Number of days after the value in the criteria.dateField when MongoDB Cloud archives data in the specified cluster.

    NOTE: if DATE is selected, the partition_fields.field_name must be completed with the date_field value

    The only field required for criteria type CUSTOM

    query String
    JSON query to use to select documents for archiving. Atlas uses the specified query with the db.collection.find(query) command. The empty document {} to return all documents is not supported.
    type string

    Type of criteria (DATE, CUSTOM)

    The following fields are required for criteria type DATE

    dateField string
    Indexed database parameter that stores the date that determines when data moves to the online archive. MongoDB Cloud archives the data when the current date exceeds the date in this database parameter plus the number of days specified through the expireAfterDays parameter.
    dateFormat string
    Syntax used to write the date after which data moves to the online archive. Date can be expressed as ISO 8601 or Epoch timestamps. The Epoch timestamp can be expressed as nanoseconds, milliseconds, or seconds. You must set type to DATE if collectionType is TIMESERIES. Valid values: ISODATE (default), EPOCH_SECONDS, EPOCH_MILLIS, EPOCH_NANOSECONDS.
    expireAfterDays number

    Number of days after the value in the criteria.dateField when MongoDB Cloud archives data in the specified cluster.

    NOTE: if DATE is selected, the partition_fields.field_name must be completed with the date_field value

    The only field required for criteria type CUSTOM

    query string
    JSON query to use to select documents for archiving. Atlas uses the specified query with the db.collection.find(query) command. The empty document {} to return all documents is not supported.
    type str

    Type of criteria (DATE, CUSTOM)

    The following fields are required for criteria type DATE

    date_field str
    Indexed database parameter that stores the date that determines when data moves to the online archive. MongoDB Cloud archives the data when the current date exceeds the date in this database parameter plus the number of days specified through the expireAfterDays parameter.
    date_format str
    Syntax used to write the date after which data moves to the online archive. Date can be expressed as ISO 8601 or Epoch timestamps. The Epoch timestamp can be expressed as nanoseconds, milliseconds, or seconds. You must set type to DATE if collectionType is TIMESERIES. Valid values: ISODATE (default), EPOCH_SECONDS, EPOCH_MILLIS, EPOCH_NANOSECONDS.
    expire_after_days int

    Number of days after the value in the criteria.dateField when MongoDB Cloud archives data in the specified cluster.

    NOTE: if DATE is selected, the partition_fields.field_name must be completed with the date_field value

    The only field required for criteria type CUSTOM

    query str
    JSON query to use to select documents for archiving. Atlas uses the specified query with the db.collection.find(query) command. The empty document {} to return all documents is not supported.
    type String

    Type of criteria (DATE, CUSTOM)

    The following fields are required for criteria type DATE

    dateField String
    Indexed database parameter that stores the date that determines when data moves to the online archive. MongoDB Cloud archives the data when the current date exceeds the date in this database parameter plus the number of days specified through the expireAfterDays parameter.
    dateFormat String
    Syntax used to write the date after which data moves to the online archive. Date can be expressed as ISO 8601 or Epoch timestamps. The Epoch timestamp can be expressed as nanoseconds, milliseconds, or seconds. You must set type to DATE if collectionType is TIMESERIES. Valid values: ISODATE (default), EPOCH_SECONDS, EPOCH_MILLIS, EPOCH_NANOSECONDS.
    expireAfterDays Number

    Number of days after the value in the criteria.dateField when MongoDB Cloud archives data in the specified cluster.

    NOTE: if DATE is selected, the partition_fields.field_name must be completed with the date_field value

    The only field required for criteria type CUSTOM

    query String
    JSON query to use to select documents for archiving. Atlas uses the specified query with the db.collection.find(query) command. The empty document {} to return all documents is not supported.

    OnlineArchiveDataExpirationRule, OnlineArchiveDataExpirationRuleArgs

    ExpireAfterDays int
    Number of days used in the date criteria for nominating documents for deletion. Value must be between 7 and 9215.
    ExpireAfterDays int
    Number of days used in the date criteria for nominating documents for deletion. Value must be between 7 and 9215.
    expireAfterDays Integer
    Number of days used in the date criteria for nominating documents for deletion. Value must be between 7 and 9215.
    expireAfterDays number
    Number of days used in the date criteria for nominating documents for deletion. Value must be between 7 and 9215.
    expire_after_days int
    Number of days used in the date criteria for nominating documents for deletion. Value must be between 7 and 9215.
    expireAfterDays Number
    Number of days used in the date criteria for nominating documents for deletion. Value must be between 7 and 9215.

    OnlineArchiveDataProcessRegion, OnlineArchiveDataProcessRegionArgs

    CloudProvider string
    Human-readable label that identifies the Cloud service provider where you wish to store your archived data. AZURE may be selected only if Azure is the Cloud service provider for the cluster and no AWS online archive has been created for the cluster.
    Region string
    Human-readable label that identifies the geographic location of the region where you wish to store your archived data. For allowed values, see MongoDB Atlas API documentation
    CloudProvider string
    Human-readable label that identifies the Cloud service provider where you wish to store your archived data. AZURE may be selected only if Azure is the Cloud service provider for the cluster and no AWS online archive has been created for the cluster.
    Region string
    Human-readable label that identifies the geographic location of the region where you wish to store your archived data. For allowed values, see MongoDB Atlas API documentation
    cloudProvider String
    Human-readable label that identifies the Cloud service provider where you wish to store your archived data. AZURE may be selected only if Azure is the Cloud service provider for the cluster and no AWS online archive has been created for the cluster.
    region String
    Human-readable label that identifies the geographic location of the region where you wish to store your archived data. For allowed values, see MongoDB Atlas API documentation
    cloudProvider string
    Human-readable label that identifies the Cloud service provider where you wish to store your archived data. AZURE may be selected only if Azure is the Cloud service provider for the cluster and no AWS online archive has been created for the cluster.
    region string
    Human-readable label that identifies the geographic location of the region where you wish to store your archived data. For allowed values, see MongoDB Atlas API documentation
    cloud_provider str
    Human-readable label that identifies the Cloud service provider where you wish to store your archived data. AZURE may be selected only if Azure is the Cloud service provider for the cluster and no AWS online archive has been created for the cluster.
    region str
    Human-readable label that identifies the geographic location of the region where you wish to store your archived data. For allowed values, see MongoDB Atlas API documentation
    cloudProvider String
    Human-readable label that identifies the Cloud service provider where you wish to store your archived data. AZURE may be selected only if Azure is the Cloud service provider for the cluster and no AWS online archive has been created for the cluster.
    region String
    Human-readable label that identifies the geographic location of the region where you wish to store your archived data. For allowed values, see MongoDB Atlas API documentation

    OnlineArchivePartitionField, OnlineArchivePartitionFieldArgs

    FieldName string
    Order int
    FieldType string
    FieldName string
    Order int
    FieldType string
    fieldName String
    order Integer
    fieldType String
    fieldName string
    order number
    fieldType string
    fieldName String
    order Number
    fieldType String

    OnlineArchiveSchedule, OnlineArchiveScheduleArgs

    Type string
    Type of schedule (``DAILY, MONTHLY, WEEKLY`).
    DayOfMonth int
    Day of the month when the scheduled archive starts. This field should be provided only when schedule type is MONTHLY.
    DayOfWeek int
    Day of the week when the scheduled archive starts. The week starts with Monday (1) and ends with Sunday (7). This field should be provided only when schedule type is WEEKLY.
    EndHour int
    Hour of the day when the scheduled window to run one online archive ends.
    EndMinute int
    Minute of the hour when the scheduled window to run one online archive ends.
    StartHour int
    Hour of the day when the when the scheduled window to run one online archive starts.
    StartMinute int
    Minute of the hour when the scheduled window to run one online archive starts.
    Type string
    Type of schedule (``DAILY, MONTHLY, WEEKLY`).
    DayOfMonth int
    Day of the month when the scheduled archive starts. This field should be provided only when schedule type is MONTHLY.
    DayOfWeek int
    Day of the week when the scheduled archive starts. The week starts with Monday (1) and ends with Sunday (7). This field should be provided only when schedule type is WEEKLY.
    EndHour int
    Hour of the day when the scheduled window to run one online archive ends.
    EndMinute int
    Minute of the hour when the scheduled window to run one online archive ends.
    StartHour int
    Hour of the day when the when the scheduled window to run one online archive starts.
    StartMinute int
    Minute of the hour when the scheduled window to run one online archive starts.
    type String
    Type of schedule (``DAILY, MONTHLY, WEEKLY`).
    dayOfMonth Integer
    Day of the month when the scheduled archive starts. This field should be provided only when schedule type is MONTHLY.
    dayOfWeek Integer
    Day of the week when the scheduled archive starts. The week starts with Monday (1) and ends with Sunday (7). This field should be provided only when schedule type is WEEKLY.
    endHour Integer
    Hour of the day when the scheduled window to run one online archive ends.
    endMinute Integer
    Minute of the hour when the scheduled window to run one online archive ends.
    startHour Integer
    Hour of the day when the when the scheduled window to run one online archive starts.
    startMinute Integer
    Minute of the hour when the scheduled window to run one online archive starts.
    type string
    Type of schedule (``DAILY, MONTHLY, WEEKLY`).
    dayOfMonth number
    Day of the month when the scheduled archive starts. This field should be provided only when schedule type is MONTHLY.
    dayOfWeek number
    Day of the week when the scheduled archive starts. The week starts with Monday (1) and ends with Sunday (7). This field should be provided only when schedule type is WEEKLY.
    endHour number
    Hour of the day when the scheduled window to run one online archive ends.
    endMinute number
    Minute of the hour when the scheduled window to run one online archive ends.
    startHour number
    Hour of the day when the when the scheduled window to run one online archive starts.
    startMinute number
    Minute of the hour when the scheduled window to run one online archive starts.
    type str
    Type of schedule (``DAILY, MONTHLY, WEEKLY`).
    day_of_month int
    Day of the month when the scheduled archive starts. This field should be provided only when schedule type is MONTHLY.
    day_of_week int
    Day of the week when the scheduled archive starts. The week starts with Monday (1) and ends with Sunday (7). This field should be provided only when schedule type is WEEKLY.
    end_hour int
    Hour of the day when the scheduled window to run one online archive ends.
    end_minute int
    Minute of the hour when the scheduled window to run one online archive ends.
    start_hour int
    Hour of the day when the when the scheduled window to run one online archive starts.
    start_minute int
    Minute of the hour when the scheduled window to run one online archive starts.
    type String
    Type of schedule (``DAILY, MONTHLY, WEEKLY`).
    dayOfMonth Number
    Day of the month when the scheduled archive starts. This field should be provided only when schedule type is MONTHLY.
    dayOfWeek Number
    Day of the week when the scheduled archive starts. The week starts with Monday (1) and ends with Sunday (7). This field should be provided only when schedule type is WEEKLY.
    endHour Number
    Hour of the day when the scheduled window to run one online archive ends.
    endMinute Number
    Minute of the hour when the scheduled window to run one online archive ends.
    startHour Number
    Hour of the day when the when the scheduled window to run one online archive starts.
    startMinute Number
    Minute of the hour when the scheduled window to run one online archive starts.

    Import

    terraform import mongodbatlas_online_archive.users_archive <project_id>-<cluster_name>-<archive_id>
    

    See MongoDB Atlas API Documentation for more information.

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    MongoDB Atlas pulumi/pulumi-mongodbatlas
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the mongodbatlas Terraform Provider.
    mongodbatlas logo
    MongoDB Atlas v3.16.2 published on Friday, Jun 21, 2024 by Pulumi