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

mongodbatlas.getOnlineArchives

Explore with Pulumi AI

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

    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.

    Example Usage

    data "mongodbatlas_online_archives" "test" {
        project_id   = var.project_id
        cluster_name = var.cluster_name
    }
    

    Attributes reference

    • db_name - Name of the database that contains the collection.
    • coll_name - Name of the collection.
    • collection_type - Type of MongoDB collection that you want to return. This value can be “TIMESERIES” or “STANDARD”. Default is “STANDARD”.
    • criteria - Criteria to use for archiving data. See criteria.
    • data_expiration_rule - Rule for specifying when data should be deleted from the archive. See data expiration rule.
    • data_process_region - Settings to configure the region where you wish to store your archived data. See data process region.
    • schedule - Regular frequency and duration when archiving process occurs. See schedule.
    • partition_fields - Fields to use to partition data. You can specify up to two frequently queried fields 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 - 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.
    • state - Status of the online archive. Valid values are: Pending, Archiving, Idle, Pausing, Paused, Orphaned and Deleted

    Criteria

    • type - Type of criteria (DATE, CUSTOM)
    • date_field - 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. Set this parameter when type is DATE.
    • date_format - 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. Set this parameter when type is DATE. You must set type to DATE if collectionType is TIMESERIES. Valid values: ISODATE (default), EPOCH_SECONDS, EPOCH_MILLIS, EPOCH_NANOSECONDS.
    • expire_after_days - Number of days after the value in the criteria.dateField when MongoDB Cloud archives data in the specified cluster. Set this parameter when type is DATE.
    • query - 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. Set this parameter when type is CUSTOM.

    Data Expiration Rule

    • expire_after_days - Number of days used in the date criteria for nominating documents for deletion. Value must be between 7 and 9215.

    Data Process Region

    • cloud_provider - Human-readable label that identifies the Cloud service provider where you wish to store your archived data.
    • region - 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

    Schedule

    • type - Type of schedule (DAILY, MONTHLY, WEEKLY).
    • start_hour - Hour of the day when the when the scheduled window to run one online archive starts.
    • end_hour - Hour of the day when the scheduled window to run one online archive ends.
    • start_minute - Minute of the hour when the scheduled window to run one online archive starts.
    • end_minute - Minute of the hour when the scheduled window to run one online archive ends.
    • day_of_month - Day of the month when the scheduled archive starts.
    • day_of_week - Day of the week when the scheduled archive starts. The week starts with Monday (1) and ends with Sunday (7).

    Partition

    • field_name - Human-readable label that identifies the parameter that MongoDB Cloud uses to partition data. To specify a nested parameter, use the dot notation.
    • order - Sequence in which MongoDB Cloud slices the collection data to create partitions. The resource expresses this sequence starting with zero. The value of the criteria.dateField parameter defaults as the first item in the partition sequence.
    • field_type - Data type of the parameter that that MongoDB Cloud uses to partition data. Partition parameters of type UUID must be of binary subtype 4. MongoDB Cloud skips partition parameters of type UUID with subtype 3. Valid values: date, int, long, objectId, string, uuid.

    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:

    ClusterName string

    Name of the cluster that contains the collection.

    Attributes Reference

    In addition to all arguments above, the following attributes are exported:

    ProjectId string
    The unique ID for the project.
    ClusterName string

    Name of the cluster that contains the collection.

    Attributes Reference

    In addition to all arguments above, the following attributes are exported:

    ProjectId string
    The unique ID for the project.
    clusterName String

    Name of the cluster that contains the collection.

    Attributes Reference

    In addition to all arguments above, the following attributes are exported:

    projectId String
    The unique ID for the project.
    clusterName string

    Name of the cluster that contains the collection.

    Attributes Reference

    In addition to all arguments above, the following attributes are exported:

    projectId string
    The unique ID for the project.
    cluster_name str

    Name of the cluster that contains the collection.

    Attributes Reference

    In addition to all arguments above, the following attributes are exported:

    project_id str
    The unique ID for the project.
    clusterName String

    Name of the cluster that contains the collection.

    Attributes Reference

    In addition to all arguments above, the following attributes are exported:

    projectId String
    The unique ID for the project.

    getOnlineArchives Result

    The following output properties are available:

    ClusterName string
    Id string
    The provider-assigned unique ID for this managed resource.
    ProjectId string
    Results List<GetOnlineArchivesResult>
    TotalCount int
    ClusterName string
    Id string
    The provider-assigned unique ID for this managed resource.
    ProjectId string
    Results []GetOnlineArchivesResult
    TotalCount int
    clusterName String
    id String
    The provider-assigned unique ID for this managed resource.
    projectId String
    results List<GetOnlineArchivesResult>
    totalCount Integer
    clusterName string
    id string
    The provider-assigned unique ID for this managed resource.
    projectId string
    results GetOnlineArchivesResult[]
    totalCount number
    cluster_name str
    id str
    The provider-assigned unique ID for this managed resource.
    project_id str
    results Sequence[GetOnlineArchivesResult]
    total_count int
    clusterName String
    id String
    The provider-assigned unique ID for this managed resource.
    projectId String
    results List<Property Map>
    totalCount Number

    Supporting Types

    GetOnlineArchivesResult

    ArchiveId string
    ClusterName string

    Name of the cluster that contains the collection.

    Attributes Reference

    In addition to all arguments above, the following attributes are exported:

    CollName string
    CollectionType string
    Criterias List<GetOnlineArchivesResultCriteria>
    DataExpirationRules List<GetOnlineArchivesResultDataExpirationRule>
    DataProcessRegions List<GetOnlineArchivesResultDataProcessRegion>
    DbName string
    PartitionFields List<GetOnlineArchivesResultPartitionField>
    Paused bool
    ProjectId string
    The unique ID for the project.
    Schedules List<GetOnlineArchivesResultSchedule>
    State string
    ArchiveId string
    ClusterName string

    Name of the cluster that contains the collection.

    Attributes Reference

    In addition to all arguments above, the following attributes are exported:

    CollName string
    CollectionType string
    Criterias []GetOnlineArchivesResultCriteria
    DataExpirationRules []GetOnlineArchivesResultDataExpirationRule
    DataProcessRegions []GetOnlineArchivesResultDataProcessRegion
    DbName string
    PartitionFields []GetOnlineArchivesResultPartitionField
    Paused bool
    ProjectId string
    The unique ID for the project.
    Schedules []GetOnlineArchivesResultSchedule
    State string
    archiveId String
    clusterName String

    Name of the cluster that contains the collection.

    Attributes Reference

    In addition to all arguments above, the following attributes are exported:

    collName String
    collectionType String
    criterias List<GetOnlineArchivesResultCriteria>
    dataExpirationRules List<GetOnlineArchivesResultDataExpirationRule>
    dataProcessRegions List<GetOnlineArchivesResultDataProcessRegion>
    dbName String
    partitionFields List<GetOnlineArchivesResultPartitionField>
    paused Boolean
    projectId String
    The unique ID for the project.
    schedules List<GetOnlineArchivesResultSchedule>
    state String
    archiveId string
    clusterName string

    Name of the cluster that contains the collection.

    Attributes Reference

    In addition to all arguments above, the following attributes are exported:

    collName string
    collectionType string
    criterias GetOnlineArchivesResultCriteria[]
    dataExpirationRules GetOnlineArchivesResultDataExpirationRule[]
    dataProcessRegions GetOnlineArchivesResultDataProcessRegion[]
    dbName string
    partitionFields GetOnlineArchivesResultPartitionField[]
    paused boolean
    projectId string
    The unique ID for the project.
    schedules GetOnlineArchivesResultSchedule[]
    state string
    archiveId String
    clusterName String

    Name of the cluster that contains the collection.

    Attributes Reference

    In addition to all arguments above, the following attributes are exported:

    collName String
    collectionType String
    criterias List<Property Map>
    dataExpirationRules List<Property Map>
    dataProcessRegions List<Property Map>
    dbName String
    partitionFields List<Property Map>
    paused Boolean
    projectId String
    The unique ID for the project.
    schedules List<Property Map>
    state String

    GetOnlineArchivesResultCriteria

    DateField string
    DateFormat string
    ExpireAfterDays int
    Query string
    Type string
    DateField string
    DateFormat string
    ExpireAfterDays int
    Query string
    Type string
    dateField String
    dateFormat String
    expireAfterDays Integer
    query String
    type String
    dateField string
    dateFormat string
    expireAfterDays number
    query string
    type string
    dateField String
    dateFormat String
    expireAfterDays Number
    query String
    type String

    GetOnlineArchivesResultDataExpirationRule

    GetOnlineArchivesResultDataProcessRegion

    CloudProvider string
    Region string
    CloudProvider string
    Region string
    cloudProvider String
    region String
    cloudProvider string
    region string
    cloudProvider String
    region String

    GetOnlineArchivesResultPartitionField

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

    GetOnlineArchivesResultSchedule

    endHour Integer
    endMinute Integer
    startHour Integer
    startMinute Integer
    type String
    dayOfMonth Integer
    dayOfWeek Integer
    endHour number
    endMinute number
    startHour number
    startMinute number
    type string
    dayOfMonth number
    dayOfWeek number
    endHour Number
    endMinute Number
    startHour Number
    startMinute Number
    type String
    dayOfMonth Number
    dayOfWeek Number

    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