import * as pulumi from "@pulumi/pulumi"; import { BaseFargateTaskOptions, RetryPolicyConfig } from "./scheduledTaskBase"; /** * Schedule configuration for the task */ export type ScheduleConfig = { /** * Schedule expression in cron or rate format * Cron: "cron(0 12 * * ? *)" - runs daily at noon UTC * Rate: "rate(1 hour)" - runs every hour */ expression: string; /** * Timezone for the schedule (default: "UTC") * Example: "America/New_York", "Europe/London" */ timezone?: string; /** * Whether the schedule is enabled (default: true) */ enabled?: boolean; /** * Optional start date for the schedule (ISO 8601 format) */ startDate?: string; /** * Optional end date for the schedule (ISO 8601 format) */ endDate?: string; }; /** * Options for creating a scheduled Fargate task */ export type ScheduledFargateTaskOptions = BaseFargateTaskOptions & { /** * Schedule configuration (cron/rate expression) - required */ schedule: ScheduleConfig; /** * Retry policy for failed task invocations */ retryPolicy?: RetryPolicyConfig; }; /** * Creates a scheduled Fargate task that runs on a cron/rate schedule. * * @param taskName A name for this task. For example, "daily-cleanup" * @param dockerImage The docker image to run * @param options Configuration options for the scheduled task * * @example * ```typescript * await createScheduledFargateTask("daily-cleanup", "myapp/cleanup:latest", { * schedule: { * expression: "cron(0 2 * * ? *)", // Daily at 2 AM * timezone: "America/New_York", * }, * cpu: 512, * memory: 1024, * environment: [{ name: "DB_HOST", value: dbHost }], * slackChannel: "#scheduled-tasks-alerts", * team: "platform", * }); * ``` */ export declare function createScheduledFargateTask(taskName: string, dockerImage: string | Promise | pulumi.OutputInstance, options: ScheduledFargateTaskOptions): Promise<{ taskDefinition: import("@pulumi/aws/ecs/taskDefinition").TaskDefinition; taskSecurityGroup: import("@pulumi/aws/ec2/securityGroup").SecurityGroup; logGroup: import("@pulumi/aws/cloudwatch/logGroup").LogGroup; executionRole: import("@pulumi/aws/iam/role").Role; taskRole: import("@pulumi/aws/iam/role").Role; eventBridgeRole: import("@pulumi/aws/iam/role").Role; scheduler: import("@pulumi/aws/scheduler/schedule").Schedule; scheduleGroup: import("@pulumi/aws/scheduler/scheduleGroup").ScheduleGroup; }>;