export type BatchImageCommand = { readonly image: string readonly tag: string readonly command: readonly string[] readonly memory: number readonly vCpus: number readonly job_role_arn?: string readonly environment_variables: readonly EnvironmentVariable[] readonly job_queue?: string } export type ContinuousSchedule = { readonly buffer_seconds?: number } export type CronSchedule = { readonly day_of_week: string readonly month: string readonly day_of_month: string readonly hours: string readonly minutes: string } export type CustomEmrJobFlowRole = { readonly role_name: string } export type CustomEmrServiceRole = { readonly role_name: string } export type DockerImageCommand = { readonly image: string readonly tag: string readonly command: readonly string[] readonly memory?: number readonly cpu?: number readonly taskRoleArn?: string readonly log_paths: readonly string[] readonly environment_variables: readonly EnvironmentVariable[] } export type Email = { readonly name: string readonly email: string readonly notify_when: NotificationOptions } export type EmrCommand = { readonly emr_cluster: NewEmrCluster | ExistingEmrCluster readonly job_name: string readonly region: string readonly class: string readonly s3_jar_path: string readonly spark_conf: readonly string[] readonly args: readonly string[] readonly s3_log_details?: S3LogDetails readonly load_data?: readonly S3Cp[] readonly save_results?: readonly S3Cp[] } export type EmrInstanceGroupDetails = { readonly emr_instance_type: string readonly instance_count: number readonly aws_market: OnDemand | Spot readonly ebs_volume_size?: number } export type EnvironmentVariable = { readonly variable_name: string readonly value: string } export type ExistingEmrCluster = { readonly cluster_id: string } export type Healthcheck = { readonly status: string } export type LogEntry = { readonly log_entry_id: string readonly when: string readonly source: string readonly message: string } export type MetadataEntry = { readonly metadata_entry_id: string readonly when: string readonly key: string readonly value: string } export type NewEmrCluster = { readonly name: string readonly release_label: EmrReleaseLabel readonly applications: readonly EmrApplication[] readonly s3_log_uri: string readonly master_instance: EmrInstanceGroupDetails readonly core_instance?: EmrInstanceGroupDetails readonly task_instance?: EmrInstanceGroupDetails readonly ec2_subnet?: string readonly emr_service_role: DefaultEmrServiceRole | CustomEmrServiceRole readonly emr_job_flow_role: DefaultEmrJobFlowRole | CustomEmrJobFlowRole readonly visible_to_all_users: boolean } export type Pagerduty = { readonly service_key: string readonly num_consecutive_failures: number readonly api_url: string } export type Process = { readonly process_id: string readonly process_definition_name: string readonly start_time: string readonly status: ProcessStatus readonly task: readonly Task[] } export type ProcessDefinition = { readonly process_definition_name: string readonly paused?: boolean readonly process_description?: string readonly schedule?: CronSchedule | ContinuousSchedule readonly task_definitions: readonly TaskDefinition[] readonly overlap_action: ProcessOverlapAction readonly notifications?: readonly Email | Pagerduty[] } export type S3Cp = { readonly source: string readonly destination: string } export type S3LogDetails = { readonly log_group_name: string readonly log_stream_name: string } export type ShellScriptCommand = { readonly script: string readonly environment_variables?: readonly EnvironmentVariable[] } export type Spot = { readonly bid_price: number } export type Task = { readonly task_id: string readonly process_id: string readonly process_definition_name: string readonly task_definition_name: string readonly start_time: string readonly end_time?: string readonly previous_attempt_count: number readonly log_entries: readonly LogEntry[] readonly metadata_entries: readonly MetadataEntry[] readonly execution_state?: readonly MetadataEntry[] readonly status: TaskStatus } export type TaskDefinition = { readonly task_definition_name: string readonly dependencies: readonly TaskDependency[] readonly executable: | DockerImageCommand | ShellScriptCommand | BatchImageCommand | EmrCommand readonly max_attempts: number readonly max_runtime_seconds?: number readonly backoff_base_seconds: number readonly backoff_exponent: number readonly require_explicit_success: boolean } export type TaskDependency = { readonly task_definition_name: string readonly success_required: boolean } export type DefaultEmrJobFlowRole = 'EMR_EC2_DefaultRole' export type DefaultEmrServiceRole = 'EMR_DefaultRole' export type EmrApplication = 'Hadoop' | 'Hive' | 'Mahout' | 'Pig' | 'Spark' export type EmrReleaseLabel = | 'emr-5.14.0' | 'emr-5.13.0' | 'emr-5.12.1' | 'emr-5.12.0' | 'emr-5.11.1' | 'emr-5.11.0' | 'emr-5.10.0' | 'emr-5.9.0' | 'emr-4.9.2' | 'emr-4.9.1' export type NotificationOptions = | 'always' | 'on_failure' | 'on_state_change' | 'on_state_change_and_failures' | 'never' export type OnDemand = 'on_demand' export type ProcessOverlapAction = 'wait' | 'terminate' export type ProcessStatus = 'running' | 'succeeded' | 'failed' export type TaskStatus = | 'submitted' | 'runnable' | 'starting' | 'pending' | 'running' | 'failed' | 'succeeded' export type JSONValue = | string | number | boolean | { readonly [x: string]: JSONValue } | readonly JSONValue[]