Skip to content

Demand Model

Data models for demand execution operations.


Demand execution data models.

Defines the request, response, and configuration models for demand execution scaffolding and management.

ContextManagerConfiguration

Bases: PydanticBaseModel

Configuration for demand execution context management.

Controls behavior of input/output handling, cleanup, and environment variable management.

Attributes:

Name Type Description
isolate_inputs bool

If True, copy inputs to working directory instead of using shared scratch. Useful for mutable inputs.

cleanup_inputs bool

If True, remove input data after execution.

cleanup_working_dir bool

If True, remove working directory after execution.

env_file_write_mode EnvFileWriteMode

How to handle environment variable files.

input_data_sync_configuration DataSyncConfiguration

Configuration for input data sync.

output_data_sync_configuration DataSyncConfiguration

Configuration for output data sync.

DataSyncConfiguration

Bases: PydanticBaseModel

Configuration for data synchronization behavior.

Controls how data is synced between S3 and EFS for demand executions.

Attributes:

Name Type Description
temporary_request_payload_path S3Path | None

Optional S3 path for storing large request payloads that exceed state machine limits.

force bool

If True, sync data even if it already exists and passes checksum/size validation.

size_only bool

If True, only check file sizes when validating sync. If False, also verify checksums.

DemandExecutionCleanupConfigs

Bases: PydanticBaseModel

Cleanup configurations generated for a demand execution.

Contains the data sync requests and path removal requests to execute after the demand execution completes.

Attributes:

Name Type Description
data_sync_requests list[PrepareBatchDataSyncRequest | DataSyncRequest]

Requests for syncing output data.

remove_data_paths_requests list[RemoveDataPathsRequest]

Requests to remove temporary data.

DemandExecutionSetupConfigs

Bases: PydanticBaseModel

Setup configurations generated for a demand execution.

Contains the data sync requests and batch job configuration needed to run the demand execution.

Attributes:

Name Type Description
data_sync_requests list[PrepareBatchDataSyncRequest | DataSyncRequest]

Requests for syncing input data.

batch_create_request CreateDefinitionAndPrepareArgsRequest

Request to create the batch job.

DemandFileSystemConfigurations

Bases: PydanticBaseModel

Collection of file system configurations for demand execution.

Attributes:

Name Type Description
shared FileSystemConfiguration

Configuration for the shared/input volume (read-only).

scratch FileSystemConfiguration

Configuration for the scratch/working volume (read-write).

tmp FileSystemConfiguration | None

Optional configuration for a dedicated tmp volume.

EnvFileWriteMode

Bases: str, Enum

Modes for writing environment files in batch jobs.

Controls whether environment variables are written to a file on EFS or passed directly to the container.

Attributes:

Name Type Description
NEVER

Never write env file, always pass variables directly.

ALWAYS

Always write env file to avoid variable size limits.

IF_REQUIRED

Write env file only if variables exceed size threshold.

FileSystemConfiguration

Bases: PydanticBaseModel

Configuration for an EFS file system mount.

Attributes:

Name Type Description
file_system str | None

Optional file system ID or name.

access_point str | None

Optional access point ID or name.

container_path str | None

Optional custom container mount path.

PrepareDemandScaffoldingRequest

Bases: PydanticBaseModel

Request for preparing demand execution scaffolding.

Attributes:

Name Type Description
demand_execution DemandExecution

The demand execution to prepare infrastructure for.

file_system_configurations DemandFileSystemConfigurations

EFS mount configurations.

context_manager_configuration ContextManagerConfiguration

Execution context settings.

PrepareDemandScaffoldingResponse

Bases: PydanticBaseModel

Response from preparing demand execution scaffolding.

Attributes:

Name Type Description
demand_execution DemandExecution

The updated demand execution with resolved paths.

setup_configs DemandExecutionSetupConfigs

Configurations for pre-execution setup.

cleanup_configs DemandExecutionCleanupConfigs

Configurations for post-execution cleanup.