import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as cloudflare from "@pulumi/cloudflare"; * * const exampleWorkerVersion = new cloudflare.WorkerVersion("example_worker_version", { * accountId: "023e105f4ecef8ad9ca31a8372d0c353", * workerId: "worker_id", * annotations: { * workersMessage: "Fixed bug.", * workersTag: "v1.0.1", * }, * assets: { * config: { * htmlHandling: "auto-trailing-slash", * notFoundHandling: "404-page", * runWorkerFirst: ["string"], * }, * jwt: "jwt", * }, * bindings: [{ * name: "MY_ENV_VAR", * text: "my_data", * type: "plain_text", * }], * compatibilityDate: "2021-01-01", * compatibilityFlags: ["nodejs_compat"], * limits: { * cpuMs: 50, * }, * mainModule: "index.js", * migrations: { * deletedClasses: ["string"], * newClasses: ["string"], * newSqliteClasses: ["string"], * newTag: "v2", * oldTag: "v1", * renamedClasses: [{ * from: "from", * to: "to", * }], * transferredClasses: [{ * from: "from", * fromScript: "from_script", * to: "to", * }], * }, * modules: [{ * contentFile: "dist/index.js", * contentType: "application/javascript+module", * name: "index.js", * }], * placement: { * mode: "smart", * }, * }); * ``` * * ## Import * * ```sh * $ pulumi import cloudflare:index/workerVersion:WorkerVersion example '//' * ``` */ export declare class WorkerVersion extends pulumi.CustomResource { /** * Get an existing WorkerVersion 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?: WorkerVersionState, opts?: pulumi.CustomResourceOptions): WorkerVersion; /** * Returns true if the given object is an instance of WorkerVersion. 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 WorkerVersion; /** * Identifier. */ readonly accountId: pulumi.Output; /** * Metadata about the version. */ readonly annotations: 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; /** * 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; /** * When the version was created. */ readonly createdOn: pulumi.Output; /** * Resource limits enforced at runtime. */ readonly limits: pulumi.Output; /** * The name of the main module in the `modules` array (e.g. the name of the module that exports a `fetch` handler). */ readonly mainModule: pulumi.Output; /** * The base64-encoded main script content. This is only returned for service worker syntax workers (not ES modules). Used when importing existing workers that use the older service worker syntax. */ readonly mainScriptBase64: pulumi.Output; /** * Migrations for Durable Objects associated with the version. Migrations are applied when the version is deployed. */ readonly migrations: pulumi.Output; /** * Code, sourcemaps, and other content used at runtime. * * This includes [`_headers`](https://developers.cloudflare.com/workers/static-assets/headers/#custom-headers) and * [`_redirects`](https://developers.cloudflare.com/workers/static-assets/redirects/) files used to configure * [Static Assets](https://developers.cloudflare.com/workers/static-assets/). `_headers` and `_redirects` files should be * included as modules named `_headers` and `_redirects` with content type `text/plain`. */ readonly modules: pulumi.Output; /** * The integer version number, starting from one. */ readonly number: pulumi.Output; /** * Placement settings for the version. */ readonly placement: pulumi.Output; /** * The client used to create the version. */ readonly source: pulumi.Output; /** * Time in milliseconds spent on [Worker startup](https://developers.cloudflare.com/workers/platform/limits/#worker-startup-time). */ readonly startupTimeMs: pulumi.Output; /** * Usage model for the version. * Available values: "standard", "bundled", "unbound". * * @deprecated This attribute is deprecated. */ readonly usageModel: pulumi.Output; /** * Identifier for the Worker, which can be ID or name. */ readonly workerId: pulumi.Output; /** * Create a WorkerVersion 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: WorkerVersionArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering WorkerVersion resources. */ export interface WorkerVersionState { /** * Identifier. */ accountId?: pulumi.Input; /** * Metadata about the version. */ annotations?: 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[]>; /** * 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[]>; /** * When the version was created. */ createdOn?: pulumi.Input; /** * Resource limits enforced at runtime. */ limits?: pulumi.Input; /** * The name of the main module in the `modules` array (e.g. the name of the module that exports a `fetch` handler). */ mainModule?: pulumi.Input; /** * The base64-encoded main script content. This is only returned for service worker syntax workers (not ES modules). Used when importing existing workers that use the older service worker syntax. */ mainScriptBase64?: pulumi.Input; /** * Migrations for Durable Objects associated with the version. Migrations are applied when the version is deployed. */ migrations?: pulumi.Input; /** * Code, sourcemaps, and other content used at runtime. * * This includes [`_headers`](https://developers.cloudflare.com/workers/static-assets/headers/#custom-headers) and * [`_redirects`](https://developers.cloudflare.com/workers/static-assets/redirects/) files used to configure * [Static Assets](https://developers.cloudflare.com/workers/static-assets/). `_headers` and `_redirects` files should be * included as modules named `_headers` and `_redirects` with content type `text/plain`. */ modules?: pulumi.Input[]>; /** * The integer version number, starting from one. */ number?: pulumi.Input; /** * Placement settings for the version. */ placement?: pulumi.Input; /** * The client used to create the version. */ source?: pulumi.Input; /** * Time in milliseconds spent on [Worker startup](https://developers.cloudflare.com/workers/platform/limits/#worker-startup-time). */ startupTimeMs?: pulumi.Input; /** * Usage model for the version. * Available values: "standard", "bundled", "unbound". * * @deprecated This attribute is deprecated. */ usageModel?: pulumi.Input; /** * Identifier for the Worker, which can be ID or name. */ workerId?: pulumi.Input; } /** * The set of arguments for constructing a WorkerVersion resource. */ export interface WorkerVersionArgs { /** * Identifier. */ accountId: pulumi.Input; /** * Metadata about the version. */ annotations?: 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[]>; /** * 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[]>; /** * Resource limits enforced at runtime. */ limits?: pulumi.Input; /** * The name of the main module in the `modules` array (e.g. the name of the module that exports a `fetch` handler). */ mainModule?: pulumi.Input; /** * Migrations for Durable Objects associated with the version. Migrations are applied when the version is deployed. */ migrations?: pulumi.Input; /** * Code, sourcemaps, and other content used at runtime. * * This includes [`_headers`](https://developers.cloudflare.com/workers/static-assets/headers/#custom-headers) and * [`_redirects`](https://developers.cloudflare.com/workers/static-assets/redirects/) files used to configure * [Static Assets](https://developers.cloudflare.com/workers/static-assets/). `_headers` and `_redirects` files should be * included as modules named `_headers` and `_redirects` with content type `text/plain`. */ modules?: pulumi.Input[]>; /** * Placement settings for the version. */ placement?: pulumi.Input; /** * Usage model for the version. * Available values: "standard", "bundled", "unbound". * * @deprecated This attribute is deprecated. */ usageModel?: pulumi.Input; /** * Identifier for the Worker, which can be ID or name. */ workerId: pulumi.Input; }