import * as pulumi from "@pulumi/pulumi"; /** * Worker Cron Triggers allow users to map a cron expression to a Worker script * using a `ScheduledEvent` listener that enables Workers to be executed on a * schedule. Worker Cron Triggers are ideal for running periodic jobs for * maintenance or calling third-party APIs to collect up-to-date data. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pulumi_cloudflare from "@mapped/pulumi-cloudflare"; * import * from "fs"; * * const exampleScript = new cloudflare.WorkerScript("exampleScript", { * name: "example-script", * content: fs.readFileSync("path/to/my.js"), * }); * const exampleTrigger = new cloudflare.WorkerCronTrigger("exampleTrigger", { * scriptName: exampleScript.name, * schedules: [ * "*/5 * * * *", * "10 7 * * mon-fri", * ], * }); * ``` * * ## Import * * Worker Cron Triggers can be imported using the script name of the Worker they are targeting. * * ```sh * $ pulumi import cloudflare:index/workerCronTrigger:WorkerCronTrigger example my-script * ``` */ export declare class WorkerCronTrigger extends pulumi.CustomResource { /** * Get an existing WorkerCronTrigger resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: WorkerCronTriggerState, opts?: pulumi.CustomResourceOptions): WorkerCronTrigger; /** * Returns true if the given object is an instance of WorkerCronTrigger. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is WorkerCronTrigger; readonly accountId: pulumi.Output; /** * List of cron expressions to execute the Worker Script */ readonly schedules: pulumi.Output; /** * Worker script to target for the schedules */ readonly scriptName: pulumi.Output; /** * Create a WorkerCronTrigger resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: WorkerCronTriggerArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering WorkerCronTrigger resources. */ export interface WorkerCronTriggerState { accountId?: pulumi.Input; /** * List of cron expressions to execute the Worker Script */ schedules?: pulumi.Input[]>; /** * Worker script to target for the schedules */ scriptName?: pulumi.Input; } /** * The set of arguments for constructing a WorkerCronTrigger resource. */ export interface WorkerCronTriggerArgs { accountId: pulumi.Input; /** * List of cron expressions to execute the Worker Script */ schedules: pulumi.Input[]>; /** * Worker script to target for the schedules */ scriptName: pulumi.Input; }