1. Registry
  2. Packages
  3. Files.com
  4. API Docs
  5. getExpectation
Viewing docs for Files.com v0.1.1
published on Thursday, Aug 20, 2026 by jschady
filescom logo
Viewing docs for Files.com v0.1.1
published on Thursday, Aug 20, 2026 by jschady

    Expectations let your Files.com site define what “correct” file delivery looks like, continuously evaluate whether it happened, and keep history when it did not.

    Expectations are meant to answer operational questions like:

    • Did the expected file arrive?

    • Was it on time?

    • Did it meet the required shape and count rules?

    • Is there an active issue someone needs to acknowledge?

    Expectations are different from Automations and Syncs. Automations and Syncs act on files; Expectations monitor whether expected files arrived on time, in the right place, and in the right shape. In practice, Expectations are the sensor and Automations are the actuator.

    An Expectation combines four concepts:

    1. Scope: where to look for candidate files, using path, source, and optional excludePattern.

    2. Trigger / timing: when a window opens and how long it stays eligible, using trigger, schedule fields, lookbackInterval, lateAcceptanceInterval, inactivityInterval, and maxOpenInterval.

    3. Criteria: what must be true for the window to succeed, using the structured criteria JSON document.

    4. Outcome history: what happened over time, exposed through ExpectationEvaluation history and ExpectationIncident lifecycle records.

    Scope and matching

    Expectations reuse the familiar Files.com path-plus-glob model.

    The path field identifies the folder scope, while source identifies which files within that scope are candidates. excludePattern removes files from consideration.

    Like Automations, these fields support glob-style matching. Expectations treat those matches as one logical candidate set for each window. A single Expectation does not implicitly fan out into separate per-customer or per-folder evaluations just because the path contains wildcards.

    Expectation windows

    Expectations are evaluated in windows.

    Each window is persisted as an ExpectationEvaluation record. A window opens, remains open while evidence can still arrive, and then closes into a terminal result such as success, late, missing, or invalid.

    An Expectation has only one open window at a time.

    Trigger modes

    Expectations can open windows in three ways:

    • daily: run on a recurring daily/weekly/monthly/quarterly/yearly cadence using interval and either recurringDay or recurringDays.

    • customSchedule: run using either the reusable Site-level Schedule selected by scheduleId or specific weekdays and times stored on the Expectation.

    • manual: an operator explicitly opens the window.

    Schedule-driven expectations define an on-time deadline and may optionally remain eligible to close as late during lateAcceptanceInterval.

    Manual expectations have no concept of late; they open when triggered and close based on inactivity or hard-stop timing.

    Success criteria

    The criteria field is a structured JSON object describing what counts as success for the window.

    Criteria v1 can express things like:

    • file count constraints

    • total byte constraints

    • allowed extensions

    • filename regex validation

    • forbidden files

    • required named or globbed files with their own per-file constraints

    Criteria v2 adds contentValidation, which runs a customer-authored Files Transform Script in either perFile or wholeBatch mode. Per-file scripts receive the file contents parsed by FTS as payload. Whole-batch scripts receive an array of file objects containing path, name, size, lastModifiedAt, and each file’s parsed payload.

    A content-validation script returns true or { success: true } to pass. It returns false or { success: false, errors: [...] } to fail. Error entries may be strings or structured objects with values such as message, field, row, expected, and actual; these details are preserved in readable form in the Evaluation’s criteriaErrors. Script, parsing, download, and size-limit errors also fail the criterion. Each file is limited to 100 MB, and whole-batch mode additionally limits the combined raw input to 100 MB.

    Required file rule keys may also include standard strftime-style date/time tokens like %Y, %m, and %d. Those tokens are resolved at evaluation time using a stable window anchor: schedule-driven expectations use the window’s deadlineAt, while manual and upload expectations use the window’s openedAt.

    History and incidents

    The Expectation itself stores summary state like lastEvaluatedAt, lastSuccessAt, lastFailureAt, and lastResult.

    For deeper inspection:

    • ExpectationEvaluation history shows each open or closed window and the evidence captured for it.

    • ExpectationIncident records track ongoing failure situations over time, including acknowledge, snooze, and resolve actions.

    Manual windows do not open incidents in v1. Schedule-driven failures can open incidents, and later qualifying success can resolve them.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as filescom from "pulumi-filescom";
    
    const exampleExpectation = filescom.getExpectation({
        id: 1,
    });
    
    import pulumi
    import pulumi_filescom as filescom
    
    example_expectation = filescom.get_expectation(id=1)
    
    package main
    
    import (
    	"github.com/jschady/pulumi-filescom/sdk/go/filescom"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := filescom.GetExpectation(ctx, &filescom.LookupExpectationArgs{
    			Id: 1,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Filescom = Jschady.Filescom;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleExpectation = Filescom.GetExpectation.Invoke(new()
        {
            Id = 1,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.filescom.FilescomFunctions;
    import com.pulumi.filescom.inputs.GetExpectationArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 exampleExpectation = FilescomFunctions.getExpectation(GetExpectationArgs.builder()
                .id(1)
                .build());
    
        }
    }
    
    variables:
      exampleExpectation:
        fn::invoke:
          function: filescom:getExpectation
          arguments:
            id: 1
    
    pulumi {
      required_providers {
        filescom = {
          source = "pulumi/filescom"
        }
      }
    }
    
    data "filescom_getexpectation" "exampleExpectation" {
      id = 1
    }
    

    Using getExpectation

    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 getExpectation(args: GetExpectationArgs, opts?: InvokeOptions): Promise<GetExpectationResult>
    function getExpectationOutput(args: GetExpectationOutputArgs, opts?: InvokeOutputOptions): Output<GetExpectationResult>
    def get_expectation(id: Optional[int] = None,
                        opts: Optional[InvokeOptions] = None) -> GetExpectationResult
    def get_expectation_output(id: pulumi.Input[Optional[int]] = None,
                        opts: Optional[InvokeOutputOptions] = None) -> Output[GetExpectationResult]
    func LookupExpectation(ctx *Context, args *LookupExpectationArgs, opts ...InvokeOption) (*LookupExpectationResult, error)
    func LookupExpectationOutput(ctx *Context, args *LookupExpectationOutputArgs, opts ...InvokeOption) LookupExpectationResultOutput

    > Note: This function is named LookupExpectation in the Go SDK.

    public static class GetExpectation 
    {
        public static Task<GetExpectationResult> InvokeAsync(GetExpectationArgs args, InvokeOptions? opts = null)
        public static Output<GetExpectationResult> Invoke(GetExpectationInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetExpectationResult> Invoke(GetExpectationInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetExpectationResult> getExpectation(GetExpectationArgs args, InvokeOptions options)
    public static Output<GetExpectationResult> getExpectation(GetExpectationArgs args, InvokeOptions options)
    public static Output<GetExpectationResult> getExpectation(GetExpectationArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: filescom:index/getExpectation:getExpectation
      arguments:
        # arguments dictionary
    data "filescom_get_expectation" "name" {
        # arguments
    }

    The following arguments are supported:

    Id int
    Expectation ID
    Id int
    Expectation ID
    id number
    Expectation ID
    id Integer
    Expectation ID
    id number
    Expectation ID
    id int
    Expectation ID
    id Number
    Expectation ID

    getExpectation Result

    The following output properties are available:

    CreatedAt string
    Creation time.
    Criteria object
    Versioned success criteria definition for the expectation. Criteria v2 supports optional FTS content validation.
    Description string
    Expectation description.
    Disabled bool
    If true, the expectation is disabled.
    ExcludePattern string
    Optional source exclusion glob.
    ExpectationsVersion int
    Criteria schema version for this expectation.
    HolidayRegion string
    Optional holiday region used by the Expectation schedule.
    Id int
    Expectation ID
    InactivityInterval int
    How many quiet seconds are required before final closure.
    Interval string
    If trigger is daily, this specifies how often to run the expectation.
    LastEvaluatedAt string
    Last time this expectation was evaluated.
    LastFailureAt string
    Last time this expectation closed with a failure result.
    LastResult string
    Most recent terminal result for this expectation.
    LastSuccessAt string
    Last time this expectation closed successfully.
    LateAcceptanceInterval int
    How many seconds a schedule-driven window may remain eligible to close as late.
    LookbackInterval int
    How many seconds before the due boundary the window starts.
    MaxOpenInterval int
    Hard-stop duration in seconds for unscheduled expectations.
    Name string
    Expectation name.
    Path string
    Path scope for the expectation. Supports workspace-relative presentation. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
    RecurringDay int
    If trigger is daily, this selects the day number inside the chosen interval.
    RecurringDays List<int>
    If trigger is daily, this selects one or more day numbers inside a week, month, quarter, or year interval.
    ScheduleDaysOfWeeks List<int>
    If trigger is customSchedule, the 0-based weekdays used by the schedule.
    ScheduleId int
    If trigger is customSchedule, the reusable Schedule used instead of the Expectation's schedule fields.
    ScheduleTimeZone string
    Time zone used by the Expectation schedule.
    ScheduleTimesOfDays List<string>
    Times of day in HH:MM format for the Expectation schedule.
    Source string
    Source glob used to select candidate files.
    Trigger string
    How this expectation opens windows.
    UpdatedAt string
    Last update time.
    WorkspaceId int
    Workspace ID. 0 means the default workspace.
    CreatedAt string
    Creation time.
    Criteria interface{}
    Versioned success criteria definition for the expectation. Criteria v2 supports optional FTS content validation.
    Description string
    Expectation description.
    Disabled bool
    If true, the expectation is disabled.
    ExcludePattern string
    Optional source exclusion glob.
    ExpectationsVersion int
    Criteria schema version for this expectation.
    HolidayRegion string
    Optional holiday region used by the Expectation schedule.
    Id int
    Expectation ID
    InactivityInterval int
    How many quiet seconds are required before final closure.
    Interval string
    If trigger is daily, this specifies how often to run the expectation.
    LastEvaluatedAt string
    Last time this expectation was evaluated.
    LastFailureAt string
    Last time this expectation closed with a failure result.
    LastResult string
    Most recent terminal result for this expectation.
    LastSuccessAt string
    Last time this expectation closed successfully.
    LateAcceptanceInterval int
    How many seconds a schedule-driven window may remain eligible to close as late.
    LookbackInterval int
    How many seconds before the due boundary the window starts.
    MaxOpenInterval int
    Hard-stop duration in seconds for unscheduled expectations.
    Name string
    Expectation name.
    Path string
    Path scope for the expectation. Supports workspace-relative presentation. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
    RecurringDay int
    If trigger is daily, this selects the day number inside the chosen interval.
    RecurringDays []int
    If trigger is daily, this selects one or more day numbers inside a week, month, quarter, or year interval.
    ScheduleDaysOfWeeks []int
    If trigger is customSchedule, the 0-based weekdays used by the schedule.
    ScheduleId int
    If trigger is customSchedule, the reusable Schedule used instead of the Expectation's schedule fields.
    ScheduleTimeZone string
    Time zone used by the Expectation schedule.
    ScheduleTimesOfDays []string
    Times of day in HH:MM format for the Expectation schedule.
    Source string
    Source glob used to select candidate files.
    Trigger string
    How this expectation opens windows.
    UpdatedAt string
    Last update time.
    WorkspaceId int
    Workspace ID. 0 means the default workspace.
    created_at string
    Creation time.
    criteria any
    Versioned success criteria definition for the expectation. Criteria v2 supports optional FTS content validation.
    description string
    Expectation description.
    disabled bool
    If true, the expectation is disabled.
    exclude_pattern string
    Optional source exclusion glob.
    expectations_version number
    Criteria schema version for this expectation.
    holiday_region string
    Optional holiday region used by the Expectation schedule.
    id number
    Expectation ID
    inactivity_interval number
    How many quiet seconds are required before final closure.
    interval string
    If trigger is daily, this specifies how often to run the expectation.
    last_evaluated_at string
    Last time this expectation was evaluated.
    last_failure_at string
    Last time this expectation closed with a failure result.
    last_result string
    Most recent terminal result for this expectation.
    last_success_at string
    Last time this expectation closed successfully.
    late_acceptance_interval number
    How many seconds a schedule-driven window may remain eligible to close as late.
    lookback_interval number
    How many seconds before the due boundary the window starts.
    max_open_interval number
    Hard-stop duration in seconds for unscheduled expectations.
    name string
    Expectation name.
    path string
    Path scope for the expectation. Supports workspace-relative presentation. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
    recurring_day number
    If trigger is daily, this selects the day number inside the chosen interval.
    recurring_days list(number)
    If trigger is daily, this selects one or more day numbers inside a week, month, quarter, or year interval.
    schedule_days_of_weeks list(number)
    If trigger is customSchedule, the 0-based weekdays used by the schedule.
    schedule_id number
    If trigger is customSchedule, the reusable Schedule used instead of the Expectation's schedule fields.
    schedule_time_zone string
    Time zone used by the Expectation schedule.
    schedule_times_of_days list(string)
    Times of day in HH:MM format for the Expectation schedule.
    source string
    Source glob used to select candidate files.
    trigger string
    How this expectation opens windows.
    updated_at string
    Last update time.
    workspace_id number
    Workspace ID. 0 means the default workspace.
    createdAt String
    Creation time.
    criteria Object
    Versioned success criteria definition for the expectation. Criteria v2 supports optional FTS content validation.
    description String
    Expectation description.
    disabled Boolean
    If true, the expectation is disabled.
    excludePattern String
    Optional source exclusion glob.
    expectationsVersion Integer
    Criteria schema version for this expectation.
    holidayRegion String
    Optional holiday region used by the Expectation schedule.
    id Integer
    Expectation ID
    inactivityInterval Integer
    How many quiet seconds are required before final closure.
    interval String
    If trigger is daily, this specifies how often to run the expectation.
    lastEvaluatedAt String
    Last time this expectation was evaluated.
    lastFailureAt String
    Last time this expectation closed with a failure result.
    lastResult String
    Most recent terminal result for this expectation.
    lastSuccessAt String
    Last time this expectation closed successfully.
    lateAcceptanceInterval Integer
    How many seconds a schedule-driven window may remain eligible to close as late.
    lookbackInterval Integer
    How many seconds before the due boundary the window starts.
    maxOpenInterval Integer
    Hard-stop duration in seconds for unscheduled expectations.
    name String
    Expectation name.
    path String
    Path scope for the expectation. Supports workspace-relative presentation. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
    recurringDay Integer
    If trigger is daily, this selects the day number inside the chosen interval.
    recurringDays List<Integer>
    If trigger is daily, this selects one or more day numbers inside a week, month, quarter, or year interval.
    scheduleDaysOfWeeks List<Integer>
    If trigger is customSchedule, the 0-based weekdays used by the schedule.
    scheduleId Integer
    If trigger is customSchedule, the reusable Schedule used instead of the Expectation's schedule fields.
    scheduleTimeZone String
    Time zone used by the Expectation schedule.
    scheduleTimesOfDays List<String>
    Times of day in HH:MM format for the Expectation schedule.
    source String
    Source glob used to select candidate files.
    trigger String
    How this expectation opens windows.
    updatedAt String
    Last update time.
    workspaceId Integer
    Workspace ID. 0 means the default workspace.
    createdAt string
    Creation time.
    criteria any
    Versioned success criteria definition for the expectation. Criteria v2 supports optional FTS content validation.
    description string
    Expectation description.
    disabled boolean
    If true, the expectation is disabled.
    excludePattern string
    Optional source exclusion glob.
    expectationsVersion number
    Criteria schema version for this expectation.
    holidayRegion string
    Optional holiday region used by the Expectation schedule.
    id number
    Expectation ID
    inactivityInterval number
    How many quiet seconds are required before final closure.
    interval string
    If trigger is daily, this specifies how often to run the expectation.
    lastEvaluatedAt string
    Last time this expectation was evaluated.
    lastFailureAt string
    Last time this expectation closed with a failure result.
    lastResult string
    Most recent terminal result for this expectation.
    lastSuccessAt string
    Last time this expectation closed successfully.
    lateAcceptanceInterval number
    How many seconds a schedule-driven window may remain eligible to close as late.
    lookbackInterval number
    How many seconds before the due boundary the window starts.
    maxOpenInterval number
    Hard-stop duration in seconds for unscheduled expectations.
    name string
    Expectation name.
    path string
    Path scope for the expectation. Supports workspace-relative presentation. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
    recurringDay number
    If trigger is daily, this selects the day number inside the chosen interval.
    recurringDays number[]
    If trigger is daily, this selects one or more day numbers inside a week, month, quarter, or year interval.
    scheduleDaysOfWeeks number[]
    If trigger is customSchedule, the 0-based weekdays used by the schedule.
    scheduleId number
    If trigger is customSchedule, the reusable Schedule used instead of the Expectation's schedule fields.
    scheduleTimeZone string
    Time zone used by the Expectation schedule.
    scheduleTimesOfDays string[]
    Times of day in HH:MM format for the Expectation schedule.
    source string
    Source glob used to select candidate files.
    trigger string
    How this expectation opens windows.
    updatedAt string
    Last update time.
    workspaceId number
    Workspace ID. 0 means the default workspace.
    created_at str
    Creation time.
    criteria Any
    Versioned success criteria definition for the expectation. Criteria v2 supports optional FTS content validation.
    description str
    Expectation description.
    disabled bool
    If true, the expectation is disabled.
    exclude_pattern str
    Optional source exclusion glob.
    expectations_version int
    Criteria schema version for this expectation.
    holiday_region str
    Optional holiday region used by the Expectation schedule.
    id int
    Expectation ID
    inactivity_interval int
    How many quiet seconds are required before final closure.
    interval str
    If trigger is daily, this specifies how often to run the expectation.
    last_evaluated_at str
    Last time this expectation was evaluated.
    last_failure_at str
    Last time this expectation closed with a failure result.
    last_result str
    Most recent terminal result for this expectation.
    last_success_at str
    Last time this expectation closed successfully.
    late_acceptance_interval int
    How many seconds a schedule-driven window may remain eligible to close as late.
    lookback_interval int
    How many seconds before the due boundary the window starts.
    max_open_interval int
    Hard-stop duration in seconds for unscheduled expectations.
    name str
    Expectation name.
    path str
    Path scope for the expectation. Supports workspace-relative presentation. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
    recurring_day int
    If trigger is daily, this selects the day number inside the chosen interval.
    recurring_days Sequence[int]
    If trigger is daily, this selects one or more day numbers inside a week, month, quarter, or year interval.
    schedule_days_of_weeks Sequence[int]
    If trigger is customSchedule, the 0-based weekdays used by the schedule.
    schedule_id int
    If trigger is customSchedule, the reusable Schedule used instead of the Expectation's schedule fields.
    schedule_time_zone str
    Time zone used by the Expectation schedule.
    schedule_times_of_days Sequence[str]
    Times of day in HH:MM format for the Expectation schedule.
    source str
    Source glob used to select candidate files.
    trigger str
    How this expectation opens windows.
    updated_at str
    Last update time.
    workspace_id int
    Workspace ID. 0 means the default workspace.
    createdAt String
    Creation time.
    criteria Any
    Versioned success criteria definition for the expectation. Criteria v2 supports optional FTS content validation.
    description String
    Expectation description.
    disabled Boolean
    If true, the expectation is disabled.
    excludePattern String
    Optional source exclusion glob.
    expectationsVersion Number
    Criteria schema version for this expectation.
    holidayRegion String
    Optional holiday region used by the Expectation schedule.
    id Number
    Expectation ID
    inactivityInterval Number
    How many quiet seconds are required before final closure.
    interval String
    If trigger is daily, this specifies how often to run the expectation.
    lastEvaluatedAt String
    Last time this expectation was evaluated.
    lastFailureAt String
    Last time this expectation closed with a failure result.
    lastResult String
    Most recent terminal result for this expectation.
    lastSuccessAt String
    Last time this expectation closed successfully.
    lateAcceptanceInterval Number
    How many seconds a schedule-driven window may remain eligible to close as late.
    lookbackInterval Number
    How many seconds before the due boundary the window starts.
    maxOpenInterval Number
    Hard-stop duration in seconds for unscheduled expectations.
    name String
    Expectation name.
    path String
    Path scope for the expectation. Supports workspace-relative presentation. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
    recurringDay Number
    If trigger is daily, this selects the day number inside the chosen interval.
    recurringDays List<Number>
    If trigger is daily, this selects one or more day numbers inside a week, month, quarter, or year interval.
    scheduleDaysOfWeeks List<Number>
    If trigger is customSchedule, the 0-based weekdays used by the schedule.
    scheduleId Number
    If trigger is customSchedule, the reusable Schedule used instead of the Expectation's schedule fields.
    scheduleTimeZone String
    Time zone used by the Expectation schedule.
    scheduleTimesOfDays List<String>
    Times of day in HH:MM format for the Expectation schedule.
    source String
    Source glob used to select candidate files.
    trigger String
    How this expectation opens windows.
    updatedAt String
    Last update time.
    workspaceId Number
    Workspace ID. 0 means the default workspace.

    Package Details

    Repository
    filescom jschady/pulumi-filescom
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the filescom Terraform Provider.
    filescom logo
    Viewing docs for Files.com v0.1.1
    published on Thursday, Aug 20, 2026 by jschady

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial