import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * ## Example Usage * * ## Import * * ```sh * $ pulumi import cloudflare:index/workerScript:WorkerScript example '/' * ``` * * @deprecated cloudflare.index/workerscript.WorkerScript has been deprecated in favor of cloudflare.index/workersscript.WorkersScript */ export declare class WorkerScript extends pulumi.CustomResource { /** * Get an existing WorkerScript 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?: WorkerScriptState, opts?: pulumi.CustomResourceOptions): WorkerScript; /** * Returns true if the given object is an instance of WorkerScript. 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 WorkerScript; /** * Identifier. */ readonly accountId: pulumi.Output; /** * Configuration for assets within a Worker */ readonly assets: pulumi.Output; /** * List of bindings attached to a Worker. You can find more about bindings on our docs: https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings. */ readonly bindings: pulumi.Output; /** * Name of the part in the multipart request that contains the script (e.g. the file adding a listener to the `fetch` event). Indicates a `service worker syntax` Worker. */ readonly bodyPart: pulumi.Output; /** * Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker. */ readonly compatibilityDate: pulumi.Output; /** * Flags that enable or disable certain features in the Workers runtime. Used to enable upcoming features or opt in or out of specific changes not included in a `compatibilityDate`. */ readonly compatibilityFlags: pulumi.Output; /** * Module or Service Worker contents of the Worker. */ readonly content: pulumi.Output; /** * When the script was created. */ readonly createdOn: pulumi.Output; /** * Hashed script content, can be used in a If-None-Match header when updating. */ readonly etag: pulumi.Output; /** * Whether a Worker contains assets. */ readonly hasAssets: pulumi.Output; /** * Whether a Worker contains modules. */ readonly hasModules: pulumi.Output; /** * Retain assets which exist for a previously uploaded Worker version; used in lieu of providing a completion token. */ readonly keepAssets: pulumi.Output; /** * List of binding types to keep from previous_upload. */ readonly keepBindings: pulumi.Output; /** * Whether Logpush is turned on for the Worker. */ readonly logpush: pulumi.Output; /** * Name of the part in the multipart request that contains the main module (e.g. the file exporting a `fetch` handler). Indicates a `module syntax` Worker. */ readonly mainModule: pulumi.Output; /** * Migrations to apply for Durable Objects associated with this Worker. */ readonly migrations: pulumi.Output; /** * When the script was last modified. */ readonly modifiedOn: pulumi.Output; /** * Observability settings for the Worker. */ readonly observability: pulumi.Output; /** * Configuration for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ readonly placement: pulumi.Output; /** * Name of the script, used in URLs and route configuration. */ readonly scriptName: pulumi.Output; readonly startupTimeMs: pulumi.Output; /** * List of Workers that will consume logs from the attached Worker. */ readonly tailConsumers: pulumi.Output; /** * Usage model for the Worker invocations. * Available values: "standard". */ readonly usageModel: pulumi.Output; /** * Create a WorkerScript 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. */ /** @deprecated cloudflare.index/workerscript.WorkerScript has been deprecated in favor of cloudflare.index/workersscript.WorkersScript */ constructor(name: string, args: WorkerScriptArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering WorkerScript resources. */ export interface WorkerScriptState { /** * Identifier. */ accountId?: pulumi.Input; /** * Configuration for assets within a Worker */ assets?: pulumi.Input; /** * List of bindings attached to a Worker. You can find more about bindings on our docs: https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings. */ bindings?: pulumi.Input[]>; /** * Name of the part in the multipart request that contains the script (e.g. the file adding a listener to the `fetch` event). Indicates a `service worker syntax` Worker. */ bodyPart?: pulumi.Input; /** * Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker. */ compatibilityDate?: pulumi.Input; /** * Flags that enable or disable certain features in the Workers runtime. Used to enable upcoming features or opt in or out of specific changes not included in a `compatibilityDate`. */ compatibilityFlags?: pulumi.Input[]>; /** * Module or Service Worker contents of the Worker. */ content?: pulumi.Input; /** * When the script was created. */ createdOn?: pulumi.Input; /** * Hashed script content, can be used in a If-None-Match header when updating. */ etag?: pulumi.Input; /** * Whether a Worker contains assets. */ hasAssets?: pulumi.Input; /** * Whether a Worker contains modules. */ hasModules?: pulumi.Input; /** * Retain assets which exist for a previously uploaded Worker version; used in lieu of providing a completion token. */ keepAssets?: pulumi.Input; /** * List of binding types to keep from previous_upload. */ keepBindings?: pulumi.Input[]>; /** * Whether Logpush is turned on for the Worker. */ logpush?: pulumi.Input; /** * Name of the part in the multipart request that contains the main module (e.g. the file exporting a `fetch` handler). Indicates a `module syntax` Worker. */ mainModule?: pulumi.Input; /** * Migrations to apply for Durable Objects associated with this Worker. */ migrations?: pulumi.Input; /** * When the script was last modified. */ modifiedOn?: pulumi.Input; /** * Observability settings for the Worker. */ observability?: pulumi.Input; /** * Configuration for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ placement?: pulumi.Input; /** * Name of the script, used in URLs and route configuration. */ scriptName?: pulumi.Input; startupTimeMs?: pulumi.Input; /** * List of Workers that will consume logs from the attached Worker. */ tailConsumers?: pulumi.Input[]>; /** * Usage model for the Worker invocations. * Available values: "standard". */ usageModel?: pulumi.Input; } /** * The set of arguments for constructing a WorkerScript resource. */ export interface WorkerScriptArgs { /** * Identifier. */ accountId: pulumi.Input; /** * Configuration for assets within a Worker */ assets?: pulumi.Input; /** * List of bindings attached to a Worker. You can find more about bindings on our docs: https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings. */ bindings?: pulumi.Input[]>; /** * Name of the part in the multipart request that contains the script (e.g. the file adding a listener to the `fetch` event). Indicates a `service worker syntax` Worker. */ bodyPart?: pulumi.Input; /** * Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker. */ compatibilityDate?: pulumi.Input; /** * Flags that enable or disable certain features in the Workers runtime. Used to enable upcoming features or opt in or out of specific changes not included in a `compatibilityDate`. */ compatibilityFlags?: pulumi.Input[]>; /** * Module or Service Worker contents of the Worker. */ content: pulumi.Input; /** * Retain assets which exist for a previously uploaded Worker version; used in lieu of providing a completion token. */ keepAssets?: pulumi.Input; /** * List of binding types to keep from previous_upload. */ keepBindings?: pulumi.Input[]>; /** * Whether Logpush is turned on for the Worker. */ logpush?: pulumi.Input; /** * Name of the part in the multipart request that contains the main module (e.g. the file exporting a `fetch` handler). Indicates a `module syntax` Worker. */ mainModule?: pulumi.Input; /** * Migrations to apply for Durable Objects associated with this Worker. */ migrations?: pulumi.Input; /** * Observability settings for the Worker. */ observability?: pulumi.Input; /** * Configuration for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). */ placement?: pulumi.Input; /** * Name of the script, used in URLs and route configuration. */ scriptName: pulumi.Input; /** * List of Workers that will consume logs from the attached Worker. */ tailConsumers?: pulumi.Input[]>; /** * Usage model for the Worker invocations. * Available values: "standard". */ usageModel?: pulumi.Input; }