published on Thursday, Aug 20, 2026 by jschady
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:
Scope: where to look for candidate files, using
path,source, and optionalexcludePattern.Trigger / timing: when a window opens and how long it stays eligible, using
trigger, schedule fields,lookbackInterval,lateAcceptanceInterval,inactivityInterval, andmaxOpenInterval.Criteria: what must be true for the window to succeed, using the structured
criteriaJSON document.Outcome history: what happened over time, exposed through
ExpectationEvaluationhistory andExpectationIncidentlifecycle 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 usingintervaland eitherrecurringDayorrecurringDays.customSchedule: run using either the reusable Site-level Schedule selected byscheduleIdor 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:
ExpectationEvaluationhistory shows each open or closed window and the evidence captured for it.ExpectationIncidentrecords 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 dictionarydata "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:
- Created
At 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.
- Exclude
Pattern string - Optional source exclusion glob.
- Expectations
Version int - Criteria schema version for this expectation.
- Holiday
Region string - 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 string
- If trigger is
daily, this specifies how often to run the expectation. - Last
Evaluated stringAt - Last time this expectation was evaluated.
- Last
Failure stringAt - Last time this expectation closed with a failure result.
- Last
Result string - Most recent terminal result for this expectation.
- Last
Success stringAt - Last time this expectation closed successfully.
- Late
Acceptance intInterval - 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 intInterval - 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 int - If trigger is
daily, this selects the day number inside the chosen interval. - Recurring
Days List<int> - If trigger is
daily, this selects one or more day numbers inside aweek,month,quarter, oryearinterval. - Schedule
Days List<int>Of Weeks - 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 stringZone - Time zone used by the Expectation schedule.
- Schedule
Times List<string>Of Days - 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 int - Workspace ID.
0means the default workspace.
- Created
At 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.
- Exclude
Pattern string - Optional source exclusion glob.
- Expectations
Version int - Criteria schema version for this expectation.
- Holiday
Region string - 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 string
- If trigger is
daily, this specifies how often to run the expectation. - Last
Evaluated stringAt - Last time this expectation was evaluated.
- Last
Failure stringAt - Last time this expectation closed with a failure result.
- Last
Result string - Most recent terminal result for this expectation.
- Last
Success stringAt - Last time this expectation closed successfully.
- Late
Acceptance intInterval - 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 intInterval - 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 int - If trigger is
daily, this selects the day number inside the chosen interval. - Recurring
Days []int - If trigger is
daily, this selects one or more day numbers inside aweek,month,quarter, oryearinterval. - Schedule
Days []intOf Weeks - 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 stringZone - Time zone used by the Expectation schedule.
- Schedule
Times []stringOf Days - 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 int - Workspace ID.
0means 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_ stringat - Last time this expectation was evaluated.
- last_
failure_ stringat - Last time this expectation closed with a failure result.
- last_
result string - Most recent terminal result for this expectation.
- last_
success_ stringat - Last time this expectation closed successfully.
- late_
acceptance_ numberinterval - 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_ numberinterval - 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 aweek,month,quarter, oryearinterval. - schedule_
days_ list(number)of_ weeks - 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_ stringzone - Time zone used by the Expectation schedule.
- schedule_
times_ list(string)of_ days - 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.
0means the default workspace.
- created
At 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.
- exclude
Pattern String - Optional source exclusion glob.
- expectations
Version Integer - Criteria schema version for this expectation.
- holiday
Region String - Optional holiday region used by the Expectation schedule.
- id Integer
- Expectation ID
- inactivity
Interval Integer - 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 StringAt - Last time this expectation was evaluated.
- last
Failure StringAt - Last time this expectation closed with a failure result.
- last
Result String - Most recent terminal result for this expectation.
- last
Success StringAt - Last time this expectation closed successfully.
- late
Acceptance IntegerInterval - How many seconds a schedule-driven window may remain eligible to close as late.
- lookback
Interval Integer - How many seconds before the due boundary the window starts.
- max
Open IntegerInterval - 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 Integer - If trigger is
daily, this selects the day number inside the chosen interval. - recurring
Days List<Integer> - If trigger is
daily, this selects one or more day numbers inside aweek,month,quarter, oryearinterval. - schedule
Days List<Integer>Of Weeks - If trigger is
customSchedule, the 0-based weekdays used by the schedule. - schedule
Id Integer - If trigger is
customSchedule, the reusable Schedule used instead of the Expectation's schedule fields. - schedule
Time StringZone - Time zone used by the Expectation schedule.
- schedule
Times List<String>Of Days - 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 Integer - Workspace ID.
0means 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 boolean
- 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 stringAt - Last time this expectation was evaluated.
- last
Failure stringAt - Last time this expectation closed with a failure result.
- last
Result string - Most recent terminal result for this expectation.
- last
Success stringAt - Last time this expectation closed successfully.
- late
Acceptance numberInterval - 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 numberInterval - 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 number[] - If trigger is
daily, this selects one or more day numbers inside aweek,month,quarter, oryearinterval. - schedule
Days number[]Of Weeks - 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 stringZone - Time zone used by the Expectation schedule.
- schedule
Times string[]Of Days - 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.
0means 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_ strat - Last time this expectation was evaluated.
- last_
failure_ strat - Last time this expectation closed with a failure result.
- last_
result str - Most recent terminal result for this expectation.
- last_
success_ strat - Last time this expectation closed successfully.
- late_
acceptance_ intinterval - 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_ intinterval - 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 aweek,month,quarter, oryearinterval. - schedule_
days_ Sequence[int]of_ weeks - 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_ strzone - Time zone used by the Expectation schedule.
- schedule_
times_ Sequence[str]of_ days - 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.
0means 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 Boolean
- 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 StringAt - Last time this expectation was evaluated.
- last
Failure StringAt - Last time this expectation closed with a failure result.
- last
Result String - Most recent terminal result for this expectation.
- last
Success StringAt - Last time this expectation closed successfully.
- late
Acceptance NumberInterval - 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 NumberInterval - 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 aweek,month,quarter, oryearinterval. - schedule
Days List<Number>Of Weeks - 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 StringZone - Time zone used by the Expectation schedule.
- schedule
Times List<String>Of Days - 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.
0means the default workspace.
Package Details
- Repository
- filescom jschady/pulumi-filescom
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
filescomTerraform Provider.
published on Thursday, Aug 20, 2026 by jschady