1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. WorkersScript
Cloudflare v5.43.0 published on Wednesday, Nov 13, 2024 by Pulumi

cloudflare.WorkersScript

Explore with Pulumi AI

cloudflare logo
Cloudflare v5.43.0 published on Wednesday, Nov 13, 2024 by Pulumi

    Provides a Cloudflare worker script resource. In order for a script to be active, you’ll also need to setup a cloudflare.WorkerRoute.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    import * as std from "@pulumi/std";
    
    const myNamespace = new cloudflare.WorkersKvNamespace("my_namespace", {
        accountId: "f037e56e89293a057740de681ac9abbe",
        title: "example",
    });
    // Sets the script with the name "script_1"
    const myScript = new cloudflare.WorkersScript("my_script", {
        accountId: "f037e56e89293a057740de681ac9abbe",
        name: "script_1",
        content: std.file({
            input: "script.js",
        }).then(invoke => invoke.result),
        kvNamespaceBindings: [{
            name: "MY_EXAMPLE_KV_NAMESPACE",
            namespaceId: myNamespace.id,
        }],
        plainTextBindings: [{
            name: "MY_EXAMPLE_PLAIN_TEXT",
            text: "foobar",
        }],
        secretTextBindings: [{
            name: "MY_EXAMPLE_SECRET_TEXT",
            text: secretFooValue,
        }],
        webassemblyBindings: [{
            name: "MY_EXAMPLE_WASM",
            module: std.filebase64({
                input: "example.wasm",
            }).then(invoke => invoke.result),
        }],
        serviceBindings: [{
            name: "MY_SERVICE_BINDING",
            service: "MY_SERVICE",
            environment: "production",
        }],
        r2BucketBindings: [{
            name: "MY_BUCKET",
            bucketName: "MY_BUCKET_NAME",
        }],
        analyticsEngineBindings: [{
            name: "MY_DATASET",
            dataset: "dataset1",
        }],
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    import pulumi_std as std
    
    my_namespace = cloudflare.WorkersKvNamespace("my_namespace",
        account_id="f037e56e89293a057740de681ac9abbe",
        title="example")
    # Sets the script with the name "script_1"
    my_script = cloudflare.WorkersScript("my_script",
        account_id="f037e56e89293a057740de681ac9abbe",
        name="script_1",
        content=std.file(input="script.js").result,
        kv_namespace_bindings=[{
            "name": "MY_EXAMPLE_KV_NAMESPACE",
            "namespace_id": my_namespace.id,
        }],
        plain_text_bindings=[{
            "name": "MY_EXAMPLE_PLAIN_TEXT",
            "text": "foobar",
        }],
        secret_text_bindings=[{
            "name": "MY_EXAMPLE_SECRET_TEXT",
            "text": secret_foo_value,
        }],
        webassembly_bindings=[{
            "name": "MY_EXAMPLE_WASM",
            "module": std.filebase64(input="example.wasm").result,
        }],
        service_bindings=[{
            "name": "MY_SERVICE_BINDING",
            "service": "MY_SERVICE",
            "environment": "production",
        }],
        r2_bucket_bindings=[{
            "name": "MY_BUCKET",
            "bucket_name": "MY_BUCKET_NAME",
        }],
        analytics_engine_bindings=[{
            "name": "MY_DATASET",
            "dataset": "dataset1",
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
    	"github.com/pulumi/pulumi-std/sdk/go/std"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myNamespace, err := cloudflare.NewWorkersKvNamespace(ctx, "my_namespace", &cloudflare.WorkersKvNamespaceArgs{
    			AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
    			Title:     pulumi.String("example"),
    		})
    		if err != nil {
    			return err
    		}
    		invokeFile, err := std.File(ctx, &std.FileArgs{
    			Input: "script.js",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		invokeFilebase641, err := std.Filebase64(ctx, &std.Filebase64Args{
    			Input: "example.wasm",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// Sets the script with the name "script_1"
    		_, err = cloudflare.NewWorkersScript(ctx, "my_script", &cloudflare.WorkersScriptArgs{
    			AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
    			Name:      pulumi.String("script_1"),
    			Content:   pulumi.String(invokeFile.Result),
    			KvNamespaceBindings: cloudflare.WorkersScriptKvNamespaceBindingArray{
    				&cloudflare.WorkersScriptKvNamespaceBindingArgs{
    					Name:        pulumi.String("MY_EXAMPLE_KV_NAMESPACE"),
    					NamespaceId: myNamespace.ID(),
    				},
    			},
    			PlainTextBindings: cloudflare.WorkersScriptPlainTextBindingArray{
    				&cloudflare.WorkersScriptPlainTextBindingArgs{
    					Name: pulumi.String("MY_EXAMPLE_PLAIN_TEXT"),
    					Text: pulumi.String("foobar"),
    				},
    			},
    			SecretTextBindings: cloudflare.WorkersScriptSecretTextBindingArray{
    				&cloudflare.WorkersScriptSecretTextBindingArgs{
    					Name: pulumi.String("MY_EXAMPLE_SECRET_TEXT"),
    					Text: pulumi.Any(secretFooValue),
    				},
    			},
    			WebassemblyBindings: cloudflare.WorkersScriptWebassemblyBindingArray{
    				&cloudflare.WorkersScriptWebassemblyBindingArgs{
    					Name:   pulumi.String("MY_EXAMPLE_WASM"),
    					Module: pulumi.String(invokeFilebase641.Result),
    				},
    			},
    			ServiceBindings: cloudflare.WorkersScriptServiceBindingArray{
    				&cloudflare.WorkersScriptServiceBindingArgs{
    					Name:        pulumi.String("MY_SERVICE_BINDING"),
    					Service:     pulumi.String("MY_SERVICE"),
    					Environment: pulumi.String("production"),
    				},
    			},
    			R2BucketBindings: cloudflare.WorkersScriptR2BucketBindingArray{
    				&cloudflare.WorkersScriptR2BucketBindingArgs{
    					Name:       pulumi.String("MY_BUCKET"),
    					BucketName: pulumi.String("MY_BUCKET_NAME"),
    				},
    			},
    			AnalyticsEngineBindings: cloudflare.WorkersScriptAnalyticsEngineBindingArray{
    				&cloudflare.WorkersScriptAnalyticsEngineBindingArgs{
    					Name:    pulumi.String("MY_DATASET"),
    					Dataset: pulumi.String("dataset1"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    using Std = Pulumi.Std;
    
    return await Deployment.RunAsync(() => 
    {
        var myNamespace = new Cloudflare.WorkersKvNamespace("my_namespace", new()
        {
            AccountId = "f037e56e89293a057740de681ac9abbe",
            Title = "example",
        });
    
        // Sets the script with the name "script_1"
        var myScript = new Cloudflare.WorkersScript("my_script", new()
        {
            AccountId = "f037e56e89293a057740de681ac9abbe",
            Name = "script_1",
            Content = Std.File.Invoke(new()
            {
                Input = "script.js",
            }).Apply(invoke => invoke.Result),
            KvNamespaceBindings = new[]
            {
                new Cloudflare.Inputs.WorkersScriptKvNamespaceBindingArgs
                {
                    Name = "MY_EXAMPLE_KV_NAMESPACE",
                    NamespaceId = myNamespace.Id,
                },
            },
            PlainTextBindings = new[]
            {
                new Cloudflare.Inputs.WorkersScriptPlainTextBindingArgs
                {
                    Name = "MY_EXAMPLE_PLAIN_TEXT",
                    Text = "foobar",
                },
            },
            SecretTextBindings = new[]
            {
                new Cloudflare.Inputs.WorkersScriptSecretTextBindingArgs
                {
                    Name = "MY_EXAMPLE_SECRET_TEXT",
                    Text = secretFooValue,
                },
            },
            WebassemblyBindings = new[]
            {
                new Cloudflare.Inputs.WorkersScriptWebassemblyBindingArgs
                {
                    Name = "MY_EXAMPLE_WASM",
                    Module = Std.Filebase64.Invoke(new()
                    {
                        Input = "example.wasm",
                    }).Apply(invoke => invoke.Result),
                },
            },
            ServiceBindings = new[]
            {
                new Cloudflare.Inputs.WorkersScriptServiceBindingArgs
                {
                    Name = "MY_SERVICE_BINDING",
                    Service = "MY_SERVICE",
                    Environment = "production",
                },
            },
            R2BucketBindings = new[]
            {
                new Cloudflare.Inputs.WorkersScriptR2BucketBindingArgs
                {
                    Name = "MY_BUCKET",
                    BucketName = "MY_BUCKET_NAME",
                },
            },
            AnalyticsEngineBindings = new[]
            {
                new Cloudflare.Inputs.WorkersScriptAnalyticsEngineBindingArgs
                {
                    Name = "MY_DATASET",
                    Dataset = "dataset1",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.WorkersKvNamespace;
    import com.pulumi.cloudflare.WorkersKvNamespaceArgs;
    import com.pulumi.cloudflare.WorkersScript;
    import com.pulumi.cloudflare.WorkersScriptArgs;
    import com.pulumi.cloudflare.inputs.WorkersScriptKvNamespaceBindingArgs;
    import com.pulumi.cloudflare.inputs.WorkersScriptPlainTextBindingArgs;
    import com.pulumi.cloudflare.inputs.WorkersScriptSecretTextBindingArgs;
    import com.pulumi.cloudflare.inputs.WorkersScriptWebassemblyBindingArgs;
    import com.pulumi.cloudflare.inputs.WorkersScriptServiceBindingArgs;
    import com.pulumi.cloudflare.inputs.WorkersScriptR2BucketBindingArgs;
    import com.pulumi.cloudflare.inputs.WorkersScriptAnalyticsEngineBindingArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var myNamespace = new WorkersKvNamespace("myNamespace", WorkersKvNamespaceArgs.builder()
                .accountId("f037e56e89293a057740de681ac9abbe")
                .title("example")
                .build());
    
            // Sets the script with the name "script_1"
            var myScript = new WorkersScript("myScript", WorkersScriptArgs.builder()
                .accountId("f037e56e89293a057740de681ac9abbe")
                .name("script_1")
                .content(StdFunctions.file(FileArgs.builder()
                    .input("script.js")
                    .build()).result())
                .kvNamespaceBindings(WorkersScriptKvNamespaceBindingArgs.builder()
                    .name("MY_EXAMPLE_KV_NAMESPACE")
                    .namespaceId(myNamespace.id())
                    .build())
                .plainTextBindings(WorkersScriptPlainTextBindingArgs.builder()
                    .name("MY_EXAMPLE_PLAIN_TEXT")
                    .text("foobar")
                    .build())
                .secretTextBindings(WorkersScriptSecretTextBindingArgs.builder()
                    .name("MY_EXAMPLE_SECRET_TEXT")
                    .text(secretFooValue)
                    .build())
                .webassemblyBindings(WorkersScriptWebassemblyBindingArgs.builder()
                    .name("MY_EXAMPLE_WASM")
                    .module(StdFunctions.filebase64(Filebase64Args.builder()
                        .input("example.wasm")
                        .build()).result())
                    .build())
                .serviceBindings(WorkersScriptServiceBindingArgs.builder()
                    .name("MY_SERVICE_BINDING")
                    .service("MY_SERVICE")
                    .environment("production")
                    .build())
                .r2BucketBindings(WorkersScriptR2BucketBindingArgs.builder()
                    .name("MY_BUCKET")
                    .bucketName("MY_BUCKET_NAME")
                    .build())
                .analyticsEngineBindings(WorkersScriptAnalyticsEngineBindingArgs.builder()
                    .name("MY_DATASET")
                    .dataset("dataset1")
                    .build())
                .build());
    
        }
    }
    
    resources:
      myNamespace:
        type: cloudflare:WorkersKvNamespace
        name: my_namespace
        properties:
          accountId: f037e56e89293a057740de681ac9abbe
          title: example
      # Sets the script with the name "script_1"
      myScript:
        type: cloudflare:WorkersScript
        name: my_script
        properties:
          accountId: f037e56e89293a057740de681ac9abbe
          name: script_1
          content:
            fn::invoke:
              Function: std:file
              Arguments:
                input: script.js
              Return: result
          kvNamespaceBindings:
            - name: MY_EXAMPLE_KV_NAMESPACE
              namespaceId: ${myNamespace.id}
          plainTextBindings:
            - name: MY_EXAMPLE_PLAIN_TEXT
              text: foobar
          secretTextBindings:
            - name: MY_EXAMPLE_SECRET_TEXT
              text: ${secretFooValue}
          webassemblyBindings:
            - name: MY_EXAMPLE_WASM
              module:
                fn::invoke:
                  Function: std:filebase64
                  Arguments:
                    input: example.wasm
                  Return: result
          serviceBindings:
            - name: MY_SERVICE_BINDING
              service: MY_SERVICE
              environment: production
          r2BucketBindings:
            - name: MY_BUCKET
              bucketName: MY_BUCKET_NAME
          analyticsEngineBindings:
            - name: MY_DATASET
              dataset: dataset1
    

    Create WorkersScript Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new WorkersScript(name: string, args: WorkersScriptArgs, opts?: CustomResourceOptions);
    @overload
    def WorkersScript(resource_name: str,
                      args: WorkersScriptArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def WorkersScript(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      content: Optional[str] = None,
                      name: Optional[str] = None,
                      account_id: Optional[str] = None,
                      module: Optional[bool] = None,
                      placements: Optional[Sequence[WorkersScriptPlacementArgs]] = None,
                      d1_database_bindings: Optional[Sequence[WorkersScriptD1DatabaseBindingArgs]] = None,
                      dispatch_namespace: Optional[str] = None,
                      hyperdrive_config_bindings: Optional[Sequence[WorkersScriptHyperdriveConfigBindingArgs]] = None,
                      kv_namespace_bindings: Optional[Sequence[WorkersScriptKvNamespaceBindingArgs]] = None,
                      logpush: Optional[bool] = None,
                      compatibility_date: Optional[str] = None,
                      analytics_engine_bindings: Optional[Sequence[WorkersScriptAnalyticsEngineBindingArgs]] = None,
                      compatibility_flags: Optional[Sequence[str]] = None,
                      plain_text_bindings: Optional[Sequence[WorkersScriptPlainTextBindingArgs]] = None,
                      queue_bindings: Optional[Sequence[WorkersScriptQueueBindingArgs]] = None,
                      r2_bucket_bindings: Optional[Sequence[WorkersScriptR2BucketBindingArgs]] = None,
                      secret_text_bindings: Optional[Sequence[WorkersScriptSecretTextBindingArgs]] = None,
                      service_bindings: Optional[Sequence[WorkersScriptServiceBindingArgs]] = None,
                      tags: Optional[Sequence[str]] = None,
                      webassembly_bindings: Optional[Sequence[WorkersScriptWebassemblyBindingArgs]] = None)
    func NewWorkersScript(ctx *Context, name string, args WorkersScriptArgs, opts ...ResourceOption) (*WorkersScript, error)
    public WorkersScript(string name, WorkersScriptArgs args, CustomResourceOptions? opts = null)
    public WorkersScript(String name, WorkersScriptArgs args)
    public WorkersScript(String name, WorkersScriptArgs args, CustomResourceOptions options)
    
    type: cloudflare:WorkersScript
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args WorkersScriptArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args WorkersScriptArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args WorkersScriptArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WorkersScriptArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WorkersScriptArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var workersScriptResource = new Cloudflare.WorkersScript("workersScriptResource", new()
    {
        Content = "string",
        Name = "string",
        AccountId = "string",
        Module = false,
        Placements = new[]
        {
            new Cloudflare.Inputs.WorkersScriptPlacementArgs
            {
                Mode = "string",
            },
        },
        D1DatabaseBindings = new[]
        {
            new Cloudflare.Inputs.WorkersScriptD1DatabaseBindingArgs
            {
                DatabaseId = "string",
                Name = "string",
            },
        },
        DispatchNamespace = "string",
        HyperdriveConfigBindings = new[]
        {
            new Cloudflare.Inputs.WorkersScriptHyperdriveConfigBindingArgs
            {
                Binding = "string",
                Id = "string",
            },
        },
        KvNamespaceBindings = new[]
        {
            new Cloudflare.Inputs.WorkersScriptKvNamespaceBindingArgs
            {
                Name = "string",
                NamespaceId = "string",
            },
        },
        Logpush = false,
        CompatibilityDate = "string",
        AnalyticsEngineBindings = new[]
        {
            new Cloudflare.Inputs.WorkersScriptAnalyticsEngineBindingArgs
            {
                Dataset = "string",
                Name = "string",
            },
        },
        CompatibilityFlags = new[]
        {
            "string",
        },
        PlainTextBindings = new[]
        {
            new Cloudflare.Inputs.WorkersScriptPlainTextBindingArgs
            {
                Name = "string",
                Text = "string",
            },
        },
        QueueBindings = new[]
        {
            new Cloudflare.Inputs.WorkersScriptQueueBindingArgs
            {
                Binding = "string",
                Queue = "string",
            },
        },
        R2BucketBindings = new[]
        {
            new Cloudflare.Inputs.WorkersScriptR2BucketBindingArgs
            {
                BucketName = "string",
                Name = "string",
            },
        },
        SecretTextBindings = new[]
        {
            new Cloudflare.Inputs.WorkersScriptSecretTextBindingArgs
            {
                Name = "string",
                Text = "string",
            },
        },
        ServiceBindings = new[]
        {
            new Cloudflare.Inputs.WorkersScriptServiceBindingArgs
            {
                Name = "string",
                Service = "string",
                Environment = "string",
            },
        },
        Tags = new[]
        {
            "string",
        },
        WebassemblyBindings = new[]
        {
            new Cloudflare.Inputs.WorkersScriptWebassemblyBindingArgs
            {
                Module = "string",
                Name = "string",
            },
        },
    });
    
    example, err := cloudflare.NewWorkersScript(ctx, "workersScriptResource", &cloudflare.WorkersScriptArgs{
    	Content:   pulumi.String("string"),
    	Name:      pulumi.String("string"),
    	AccountId: pulumi.String("string"),
    	Module:    pulumi.Bool(false),
    	Placements: cloudflare.WorkersScriptPlacementArray{
    		&cloudflare.WorkersScriptPlacementArgs{
    			Mode: pulumi.String("string"),
    		},
    	},
    	D1DatabaseBindings: cloudflare.WorkersScriptD1DatabaseBindingArray{
    		&cloudflare.WorkersScriptD1DatabaseBindingArgs{
    			DatabaseId: pulumi.String("string"),
    			Name:       pulumi.String("string"),
    		},
    	},
    	DispatchNamespace: pulumi.String("string"),
    	HyperdriveConfigBindings: cloudflare.WorkersScriptHyperdriveConfigBindingArray{
    		&cloudflare.WorkersScriptHyperdriveConfigBindingArgs{
    			Binding: pulumi.String("string"),
    			Id:      pulumi.String("string"),
    		},
    	},
    	KvNamespaceBindings: cloudflare.WorkersScriptKvNamespaceBindingArray{
    		&cloudflare.WorkersScriptKvNamespaceBindingArgs{
    			Name:        pulumi.String("string"),
    			NamespaceId: pulumi.String("string"),
    		},
    	},
    	Logpush:           pulumi.Bool(false),
    	CompatibilityDate: pulumi.String("string"),
    	AnalyticsEngineBindings: cloudflare.WorkersScriptAnalyticsEngineBindingArray{
    		&cloudflare.WorkersScriptAnalyticsEngineBindingArgs{
    			Dataset: pulumi.String("string"),
    			Name:    pulumi.String("string"),
    		},
    	},
    	CompatibilityFlags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	PlainTextBindings: cloudflare.WorkersScriptPlainTextBindingArray{
    		&cloudflare.WorkersScriptPlainTextBindingArgs{
    			Name: pulumi.String("string"),
    			Text: pulumi.String("string"),
    		},
    	},
    	QueueBindings: cloudflare.WorkersScriptQueueBindingArray{
    		&cloudflare.WorkersScriptQueueBindingArgs{
    			Binding: pulumi.String("string"),
    			Queue:   pulumi.String("string"),
    		},
    	},
    	R2BucketBindings: cloudflare.WorkersScriptR2BucketBindingArray{
    		&cloudflare.WorkersScriptR2BucketBindingArgs{
    			BucketName: pulumi.String("string"),
    			Name:       pulumi.String("string"),
    		},
    	},
    	SecretTextBindings: cloudflare.WorkersScriptSecretTextBindingArray{
    		&cloudflare.WorkersScriptSecretTextBindingArgs{
    			Name: pulumi.String("string"),
    			Text: pulumi.String("string"),
    		},
    	},
    	ServiceBindings: cloudflare.WorkersScriptServiceBindingArray{
    		&cloudflare.WorkersScriptServiceBindingArgs{
    			Name:        pulumi.String("string"),
    			Service:     pulumi.String("string"),
    			Environment: pulumi.String("string"),
    		},
    	},
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	WebassemblyBindings: cloudflare.WorkersScriptWebassemblyBindingArray{
    		&cloudflare.WorkersScriptWebassemblyBindingArgs{
    			Module: pulumi.String("string"),
    			Name:   pulumi.String("string"),
    		},
    	},
    })
    
    var workersScriptResource = new WorkersScript("workersScriptResource", WorkersScriptArgs.builder()
        .content("string")
        .name("string")
        .accountId("string")
        .module(false)
        .placements(WorkersScriptPlacementArgs.builder()
            .mode("string")
            .build())
        .d1DatabaseBindings(WorkersScriptD1DatabaseBindingArgs.builder()
            .databaseId("string")
            .name("string")
            .build())
        .dispatchNamespace("string")
        .hyperdriveConfigBindings(WorkersScriptHyperdriveConfigBindingArgs.builder()
            .binding("string")
            .id("string")
            .build())
        .kvNamespaceBindings(WorkersScriptKvNamespaceBindingArgs.builder()
            .name("string")
            .namespaceId("string")
            .build())
        .logpush(false)
        .compatibilityDate("string")
        .analyticsEngineBindings(WorkersScriptAnalyticsEngineBindingArgs.builder()
            .dataset("string")
            .name("string")
            .build())
        .compatibilityFlags("string")
        .plainTextBindings(WorkersScriptPlainTextBindingArgs.builder()
            .name("string")
            .text("string")
            .build())
        .queueBindings(WorkersScriptQueueBindingArgs.builder()
            .binding("string")
            .queue("string")
            .build())
        .r2BucketBindings(WorkersScriptR2BucketBindingArgs.builder()
            .bucketName("string")
            .name("string")
            .build())
        .secretTextBindings(WorkersScriptSecretTextBindingArgs.builder()
            .name("string")
            .text("string")
            .build())
        .serviceBindings(WorkersScriptServiceBindingArgs.builder()
            .name("string")
            .service("string")
            .environment("string")
            .build())
        .tags("string")
        .webassemblyBindings(WorkersScriptWebassemblyBindingArgs.builder()
            .module("string")
            .name("string")
            .build())
        .build());
    
    workers_script_resource = cloudflare.WorkersScript("workersScriptResource",
        content="string",
        name="string",
        account_id="string",
        module=False,
        placements=[{
            "mode": "string",
        }],
        d1_database_bindings=[{
            "database_id": "string",
            "name": "string",
        }],
        dispatch_namespace="string",
        hyperdrive_config_bindings=[{
            "binding": "string",
            "id": "string",
        }],
        kv_namespace_bindings=[{
            "name": "string",
            "namespace_id": "string",
        }],
        logpush=False,
        compatibility_date="string",
        analytics_engine_bindings=[{
            "dataset": "string",
            "name": "string",
        }],
        compatibility_flags=["string"],
        plain_text_bindings=[{
            "name": "string",
            "text": "string",
        }],
        queue_bindings=[{
            "binding": "string",
            "queue": "string",
        }],
        r2_bucket_bindings=[{
            "bucket_name": "string",
            "name": "string",
        }],
        secret_text_bindings=[{
            "name": "string",
            "text": "string",
        }],
        service_bindings=[{
            "name": "string",
            "service": "string",
            "environment": "string",
        }],
        tags=["string"],
        webassembly_bindings=[{
            "module": "string",
            "name": "string",
        }])
    
    const workersScriptResource = new cloudflare.WorkersScript("workersScriptResource", {
        content: "string",
        name: "string",
        accountId: "string",
        module: false,
        placements: [{
            mode: "string",
        }],
        d1DatabaseBindings: [{
            databaseId: "string",
            name: "string",
        }],
        dispatchNamespace: "string",
        hyperdriveConfigBindings: [{
            binding: "string",
            id: "string",
        }],
        kvNamespaceBindings: [{
            name: "string",
            namespaceId: "string",
        }],
        logpush: false,
        compatibilityDate: "string",
        analyticsEngineBindings: [{
            dataset: "string",
            name: "string",
        }],
        compatibilityFlags: ["string"],
        plainTextBindings: [{
            name: "string",
            text: "string",
        }],
        queueBindings: [{
            binding: "string",
            queue: "string",
        }],
        r2BucketBindings: [{
            bucketName: "string",
            name: "string",
        }],
        secretTextBindings: [{
            name: "string",
            text: "string",
        }],
        serviceBindings: [{
            name: "string",
            service: "string",
            environment: "string",
        }],
        tags: ["string"],
        webassemblyBindings: [{
            module: "string",
            name: "string",
        }],
    });
    
    type: cloudflare:WorkersScript
    properties:
        accountId: string
        analyticsEngineBindings:
            - dataset: string
              name: string
        compatibilityDate: string
        compatibilityFlags:
            - string
        content: string
        d1DatabaseBindings:
            - databaseId: string
              name: string
        dispatchNamespace: string
        hyperdriveConfigBindings:
            - binding: string
              id: string
        kvNamespaceBindings:
            - name: string
              namespaceId: string
        logpush: false
        module: false
        name: string
        placements:
            - mode: string
        plainTextBindings:
            - name: string
              text: string
        queueBindings:
            - binding: string
              queue: string
        r2BucketBindings:
            - bucketName: string
              name: string
        secretTextBindings:
            - name: string
              text: string
        serviceBindings:
            - environment: string
              name: string
              service: string
        tags:
            - string
        webassemblyBindings:
            - module: string
              name: string
    

    WorkersScript Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The WorkersScript resource accepts the following input properties:

    AccountId string
    The account identifier to target for the resource.
    Content string
    The script content.
    Name string
    The name for the script. Modifying this attribute will force creation of a new resource.
    AnalyticsEngineBindings List<WorkersScriptAnalyticsEngineBinding>
    CompatibilityDate string
    The date to use for the compatibility flag.
    CompatibilityFlags List<string>
    Compatibility flags used for Worker Scripts.
    D1DatabaseBindings List<WorkersScriptD1DatabaseBinding>
    DispatchNamespace string
    Name of the Workers for Platforms dispatch namespace.
    HyperdriveConfigBindings List<WorkersScriptHyperdriveConfigBinding>
    KvNamespaceBindings List<WorkersScriptKvNamespaceBinding>
    Logpush bool
    Enabling allows Worker events to be sent to a defined Logpush destination.
    Module bool
    Whether to upload Worker as a module.
    Placements List<WorkersScriptPlacement>
    PlainTextBindings List<WorkersScriptPlainTextBinding>
    QueueBindings List<WorkersScriptQueueBinding>
    R2BucketBindings List<WorkersScriptR2BucketBinding>
    SecretTextBindings List<WorkersScriptSecretTextBinding>
    ServiceBindings List<WorkersScriptServiceBinding>
    Tags List<string>
    WebassemblyBindings List<WorkersScriptWebassemblyBinding>
    AccountId string
    The account identifier to target for the resource.
    Content string
    The script content.
    Name string
    The name for the script. Modifying this attribute will force creation of a new resource.
    AnalyticsEngineBindings []WorkersScriptAnalyticsEngineBindingArgs
    CompatibilityDate string
    The date to use for the compatibility flag.
    CompatibilityFlags []string
    Compatibility flags used for Worker Scripts.
    D1DatabaseBindings []WorkersScriptD1DatabaseBindingArgs
    DispatchNamespace string
    Name of the Workers for Platforms dispatch namespace.
    HyperdriveConfigBindings []WorkersScriptHyperdriveConfigBindingArgs
    KvNamespaceBindings []WorkersScriptKvNamespaceBindingArgs
    Logpush bool
    Enabling allows Worker events to be sent to a defined Logpush destination.
    Module bool
    Whether to upload Worker as a module.
    Placements []WorkersScriptPlacementArgs
    PlainTextBindings []WorkersScriptPlainTextBindingArgs
    QueueBindings []WorkersScriptQueueBindingArgs
    R2BucketBindings []WorkersScriptR2BucketBindingArgs
    SecretTextBindings []WorkersScriptSecretTextBindingArgs
    ServiceBindings []WorkersScriptServiceBindingArgs
    Tags []string
    WebassemblyBindings []WorkersScriptWebassemblyBindingArgs
    accountId String
    The account identifier to target for the resource.
    content String
    The script content.
    name String
    The name for the script. Modifying this attribute will force creation of a new resource.
    analyticsEngineBindings List<WorkersScriptAnalyticsEngineBinding>
    compatibilityDate String
    The date to use for the compatibility flag.
    compatibilityFlags List<String>
    Compatibility flags used for Worker Scripts.
    d1DatabaseBindings List<WorkersScriptD1DatabaseBinding>
    dispatchNamespace String
    Name of the Workers for Platforms dispatch namespace.
    hyperdriveConfigBindings List<WorkersScriptHyperdriveConfigBinding>
    kvNamespaceBindings List<WorkersScriptKvNamespaceBinding>
    logpush Boolean
    Enabling allows Worker events to be sent to a defined Logpush destination.
    module Boolean
    Whether to upload Worker as a module.
    placements List<WorkersScriptPlacement>
    plainTextBindings List<WorkersScriptPlainTextBinding>
    queueBindings List<WorkersScriptQueueBinding>
    r2BucketBindings List<WorkersScriptR2BucketBinding>
    secretTextBindings List<WorkersScriptSecretTextBinding>
    serviceBindings List<WorkersScriptServiceBinding>
    tags List<String>
    webassemblyBindings List<WorkersScriptWebassemblyBinding>
    accountId string
    The account identifier to target for the resource.
    content string
    The script content.
    name string
    The name for the script. Modifying this attribute will force creation of a new resource.
    analyticsEngineBindings WorkersScriptAnalyticsEngineBinding[]
    compatibilityDate string
    The date to use for the compatibility flag.
    compatibilityFlags string[]
    Compatibility flags used for Worker Scripts.
    d1DatabaseBindings WorkersScriptD1DatabaseBinding[]
    dispatchNamespace string
    Name of the Workers for Platforms dispatch namespace.
    hyperdriveConfigBindings WorkersScriptHyperdriveConfigBinding[]
    kvNamespaceBindings WorkersScriptKvNamespaceBinding[]
    logpush boolean
    Enabling allows Worker events to be sent to a defined Logpush destination.
    module boolean
    Whether to upload Worker as a module.
    placements WorkersScriptPlacement[]
    plainTextBindings WorkersScriptPlainTextBinding[]
    queueBindings WorkersScriptQueueBinding[]
    r2BucketBindings WorkersScriptR2BucketBinding[]
    secretTextBindings WorkersScriptSecretTextBinding[]
    serviceBindings WorkersScriptServiceBinding[]
    tags string[]
    webassemblyBindings WorkersScriptWebassemblyBinding[]
    account_id str
    The account identifier to target for the resource.
    content str
    The script content.
    name str
    The name for the script. Modifying this attribute will force creation of a new resource.
    analytics_engine_bindings Sequence[WorkersScriptAnalyticsEngineBindingArgs]
    compatibility_date str
    The date to use for the compatibility flag.
    compatibility_flags Sequence[str]
    Compatibility flags used for Worker Scripts.
    d1_database_bindings Sequence[WorkersScriptD1DatabaseBindingArgs]
    dispatch_namespace str
    Name of the Workers for Platforms dispatch namespace.
    hyperdrive_config_bindings Sequence[WorkersScriptHyperdriveConfigBindingArgs]
    kv_namespace_bindings Sequence[WorkersScriptKvNamespaceBindingArgs]
    logpush bool
    Enabling allows Worker events to be sent to a defined Logpush destination.
    module bool
    Whether to upload Worker as a module.
    placements Sequence[WorkersScriptPlacementArgs]
    plain_text_bindings Sequence[WorkersScriptPlainTextBindingArgs]
    queue_bindings Sequence[WorkersScriptQueueBindingArgs]
    r2_bucket_bindings Sequence[WorkersScriptR2BucketBindingArgs]
    secret_text_bindings Sequence[WorkersScriptSecretTextBindingArgs]
    service_bindings Sequence[WorkersScriptServiceBindingArgs]
    tags Sequence[str]
    webassembly_bindings Sequence[WorkersScriptWebassemblyBindingArgs]
    accountId String
    The account identifier to target for the resource.
    content String
    The script content.
    name String
    The name for the script. Modifying this attribute will force creation of a new resource.
    analyticsEngineBindings List<Property Map>
    compatibilityDate String
    The date to use for the compatibility flag.
    compatibilityFlags List<String>
    Compatibility flags used for Worker Scripts.
    d1DatabaseBindings List<Property Map>
    dispatchNamespace String
    Name of the Workers for Platforms dispatch namespace.
    hyperdriveConfigBindings List<Property Map>
    kvNamespaceBindings List<Property Map>
    logpush Boolean
    Enabling allows Worker events to be sent to a defined Logpush destination.
    module Boolean
    Whether to upload Worker as a module.
    placements List<Property Map>
    plainTextBindings List<Property Map>
    queueBindings List<Property Map>
    r2BucketBindings List<Property Map>
    secretTextBindings List<Property Map>
    serviceBindings List<Property Map>
    tags List<String>
    webassemblyBindings List<Property Map>

    Outputs

    All input properties are implicitly available as output properties. Additionally, the WorkersScript resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing WorkersScript Resource

    Get an existing WorkersScript resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: WorkersScriptState, opts?: CustomResourceOptions): WorkersScript
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            analytics_engine_bindings: Optional[Sequence[WorkersScriptAnalyticsEngineBindingArgs]] = None,
            compatibility_date: Optional[str] = None,
            compatibility_flags: Optional[Sequence[str]] = None,
            content: Optional[str] = None,
            d1_database_bindings: Optional[Sequence[WorkersScriptD1DatabaseBindingArgs]] = None,
            dispatch_namespace: Optional[str] = None,
            hyperdrive_config_bindings: Optional[Sequence[WorkersScriptHyperdriveConfigBindingArgs]] = None,
            kv_namespace_bindings: Optional[Sequence[WorkersScriptKvNamespaceBindingArgs]] = None,
            logpush: Optional[bool] = None,
            module: Optional[bool] = None,
            name: Optional[str] = None,
            placements: Optional[Sequence[WorkersScriptPlacementArgs]] = None,
            plain_text_bindings: Optional[Sequence[WorkersScriptPlainTextBindingArgs]] = None,
            queue_bindings: Optional[Sequence[WorkersScriptQueueBindingArgs]] = None,
            r2_bucket_bindings: Optional[Sequence[WorkersScriptR2BucketBindingArgs]] = None,
            secret_text_bindings: Optional[Sequence[WorkersScriptSecretTextBindingArgs]] = None,
            service_bindings: Optional[Sequence[WorkersScriptServiceBindingArgs]] = None,
            tags: Optional[Sequence[str]] = None,
            webassembly_bindings: Optional[Sequence[WorkersScriptWebassemblyBindingArgs]] = None) -> WorkersScript
    func GetWorkersScript(ctx *Context, name string, id IDInput, state *WorkersScriptState, opts ...ResourceOption) (*WorkersScript, error)
    public static WorkersScript Get(string name, Input<string> id, WorkersScriptState? state, CustomResourceOptions? opts = null)
    public static WorkersScript get(String name, Output<String> id, WorkersScriptState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AccountId string
    The account identifier to target for the resource.
    AnalyticsEngineBindings List<WorkersScriptAnalyticsEngineBinding>
    CompatibilityDate string
    The date to use for the compatibility flag.
    CompatibilityFlags List<string>
    Compatibility flags used for Worker Scripts.
    Content string
    The script content.
    D1DatabaseBindings List<WorkersScriptD1DatabaseBinding>
    DispatchNamespace string
    Name of the Workers for Platforms dispatch namespace.
    HyperdriveConfigBindings List<WorkersScriptHyperdriveConfigBinding>
    KvNamespaceBindings List<WorkersScriptKvNamespaceBinding>
    Logpush bool
    Enabling allows Worker events to be sent to a defined Logpush destination.
    Module bool
    Whether to upload Worker as a module.
    Name string
    The name for the script. Modifying this attribute will force creation of a new resource.
    Placements List<WorkersScriptPlacement>
    PlainTextBindings List<WorkersScriptPlainTextBinding>
    QueueBindings List<WorkersScriptQueueBinding>
    R2BucketBindings List<WorkersScriptR2BucketBinding>
    SecretTextBindings List<WorkersScriptSecretTextBinding>
    ServiceBindings List<WorkersScriptServiceBinding>
    Tags List<string>
    WebassemblyBindings List<WorkersScriptWebassemblyBinding>
    AccountId string
    The account identifier to target for the resource.
    AnalyticsEngineBindings []WorkersScriptAnalyticsEngineBindingArgs
    CompatibilityDate string
    The date to use for the compatibility flag.
    CompatibilityFlags []string
    Compatibility flags used for Worker Scripts.
    Content string
    The script content.
    D1DatabaseBindings []WorkersScriptD1DatabaseBindingArgs
    DispatchNamespace string
    Name of the Workers for Platforms dispatch namespace.
    HyperdriveConfigBindings []WorkersScriptHyperdriveConfigBindingArgs
    KvNamespaceBindings []WorkersScriptKvNamespaceBindingArgs
    Logpush bool
    Enabling allows Worker events to be sent to a defined Logpush destination.
    Module bool
    Whether to upload Worker as a module.
    Name string
    The name for the script. Modifying this attribute will force creation of a new resource.
    Placements []WorkersScriptPlacementArgs
    PlainTextBindings []WorkersScriptPlainTextBindingArgs
    QueueBindings []WorkersScriptQueueBindingArgs
    R2BucketBindings []WorkersScriptR2BucketBindingArgs
    SecretTextBindings []WorkersScriptSecretTextBindingArgs
    ServiceBindings []WorkersScriptServiceBindingArgs
    Tags []string
    WebassemblyBindings []WorkersScriptWebassemblyBindingArgs
    accountId String
    The account identifier to target for the resource.
    analyticsEngineBindings List<WorkersScriptAnalyticsEngineBinding>
    compatibilityDate String
    The date to use for the compatibility flag.
    compatibilityFlags List<String>
    Compatibility flags used for Worker Scripts.
    content String
    The script content.
    d1DatabaseBindings List<WorkersScriptD1DatabaseBinding>
    dispatchNamespace String
    Name of the Workers for Platforms dispatch namespace.
    hyperdriveConfigBindings List<WorkersScriptHyperdriveConfigBinding>
    kvNamespaceBindings List<WorkersScriptKvNamespaceBinding>
    logpush Boolean
    Enabling allows Worker events to be sent to a defined Logpush destination.
    module Boolean
    Whether to upload Worker as a module.
    name String
    The name for the script. Modifying this attribute will force creation of a new resource.
    placements List<WorkersScriptPlacement>
    plainTextBindings List<WorkersScriptPlainTextBinding>
    queueBindings List<WorkersScriptQueueBinding>
    r2BucketBindings List<WorkersScriptR2BucketBinding>
    secretTextBindings List<WorkersScriptSecretTextBinding>
    serviceBindings List<WorkersScriptServiceBinding>
    tags List<String>
    webassemblyBindings List<WorkersScriptWebassemblyBinding>
    accountId string
    The account identifier to target for the resource.
    analyticsEngineBindings WorkersScriptAnalyticsEngineBinding[]
    compatibilityDate string
    The date to use for the compatibility flag.
    compatibilityFlags string[]
    Compatibility flags used for Worker Scripts.
    content string
    The script content.
    d1DatabaseBindings WorkersScriptD1DatabaseBinding[]
    dispatchNamespace string
    Name of the Workers for Platforms dispatch namespace.
    hyperdriveConfigBindings WorkersScriptHyperdriveConfigBinding[]
    kvNamespaceBindings WorkersScriptKvNamespaceBinding[]
    logpush boolean
    Enabling allows Worker events to be sent to a defined Logpush destination.
    module boolean
    Whether to upload Worker as a module.
    name string
    The name for the script. Modifying this attribute will force creation of a new resource.
    placements WorkersScriptPlacement[]
    plainTextBindings WorkersScriptPlainTextBinding[]
    queueBindings WorkersScriptQueueBinding[]
    r2BucketBindings WorkersScriptR2BucketBinding[]
    secretTextBindings WorkersScriptSecretTextBinding[]
    serviceBindings WorkersScriptServiceBinding[]
    tags string[]
    webassemblyBindings WorkersScriptWebassemblyBinding[]
    account_id str
    The account identifier to target for the resource.
    analytics_engine_bindings Sequence[WorkersScriptAnalyticsEngineBindingArgs]
    compatibility_date str
    The date to use for the compatibility flag.
    compatibility_flags Sequence[str]
    Compatibility flags used for Worker Scripts.
    content str
    The script content.
    d1_database_bindings Sequence[WorkersScriptD1DatabaseBindingArgs]
    dispatch_namespace str
    Name of the Workers for Platforms dispatch namespace.
    hyperdrive_config_bindings Sequence[WorkersScriptHyperdriveConfigBindingArgs]
    kv_namespace_bindings Sequence[WorkersScriptKvNamespaceBindingArgs]
    logpush bool
    Enabling allows Worker events to be sent to a defined Logpush destination.
    module bool
    Whether to upload Worker as a module.
    name str
    The name for the script. Modifying this attribute will force creation of a new resource.
    placements Sequence[WorkersScriptPlacementArgs]
    plain_text_bindings Sequence[WorkersScriptPlainTextBindingArgs]
    queue_bindings Sequence[WorkersScriptQueueBindingArgs]
    r2_bucket_bindings Sequence[WorkersScriptR2BucketBindingArgs]
    secret_text_bindings Sequence[WorkersScriptSecretTextBindingArgs]
    service_bindings Sequence[WorkersScriptServiceBindingArgs]
    tags Sequence[str]
    webassembly_bindings Sequence[WorkersScriptWebassemblyBindingArgs]
    accountId String
    The account identifier to target for the resource.
    analyticsEngineBindings List<Property Map>
    compatibilityDate String
    The date to use for the compatibility flag.
    compatibilityFlags List<String>
    Compatibility flags used for Worker Scripts.
    content String
    The script content.
    d1DatabaseBindings List<Property Map>
    dispatchNamespace String
    Name of the Workers for Platforms dispatch namespace.
    hyperdriveConfigBindings List<Property Map>
    kvNamespaceBindings List<Property Map>
    logpush Boolean
    Enabling allows Worker events to be sent to a defined Logpush destination.
    module Boolean
    Whether to upload Worker as a module.
    name String
    The name for the script. Modifying this attribute will force creation of a new resource.
    placements List<Property Map>
    plainTextBindings List<Property Map>
    queueBindings List<Property Map>
    r2BucketBindings List<Property Map>
    secretTextBindings List<Property Map>
    serviceBindings List<Property Map>
    tags List<String>
    webassemblyBindings List<Property Map>

    Supporting Types

    WorkersScriptAnalyticsEngineBinding, WorkersScriptAnalyticsEngineBindingArgs

    Dataset string
    The name of the Analytics Engine dataset to write to.
    Name string
    The global variable for the binding in your Worker code.
    Dataset string
    The name of the Analytics Engine dataset to write to.
    Name string
    The global variable for the binding in your Worker code.
    dataset String
    The name of the Analytics Engine dataset to write to.
    name String
    The global variable for the binding in your Worker code.
    dataset string
    The name of the Analytics Engine dataset to write to.
    name string
    The global variable for the binding in your Worker code.
    dataset str
    The name of the Analytics Engine dataset to write to.
    name str
    The global variable for the binding in your Worker code.
    dataset String
    The name of the Analytics Engine dataset to write to.
    name String
    The global variable for the binding in your Worker code.

    WorkersScriptD1DatabaseBinding, WorkersScriptD1DatabaseBindingArgs

    DatabaseId string
    Database ID of D1 database to use.
    Name string
    The global variable for the binding in your Worker code.
    DatabaseId string
    Database ID of D1 database to use.
    Name string
    The global variable for the binding in your Worker code.
    databaseId String
    Database ID of D1 database to use.
    name String
    The global variable for the binding in your Worker code.
    databaseId string
    Database ID of D1 database to use.
    name string
    The global variable for the binding in your Worker code.
    database_id str
    Database ID of D1 database to use.
    name str
    The global variable for the binding in your Worker code.
    databaseId String
    Database ID of D1 database to use.
    name String
    The global variable for the binding in your Worker code.

    WorkersScriptHyperdriveConfigBinding, WorkersScriptHyperdriveConfigBindingArgs

    Binding string
    The global variable for the binding in your Worker code.
    Id string
    The ID of the Hyperdrive config to use.
    Binding string
    The global variable for the binding in your Worker code.
    Id string
    The ID of the Hyperdrive config to use.
    binding String
    The global variable for the binding in your Worker code.
    id String
    The ID of the Hyperdrive config to use.
    binding string
    The global variable for the binding in your Worker code.
    id string
    The ID of the Hyperdrive config to use.
    binding str
    The global variable for the binding in your Worker code.
    id str
    The ID of the Hyperdrive config to use.
    binding String
    The global variable for the binding in your Worker code.
    id String
    The ID of the Hyperdrive config to use.

    WorkersScriptKvNamespaceBinding, WorkersScriptKvNamespaceBindingArgs

    Name string
    The global variable for the binding in your Worker code.
    NamespaceId string
    ID of the KV namespace you want to use.
    Name string
    The global variable for the binding in your Worker code.
    NamespaceId string
    ID of the KV namespace you want to use.
    name String
    The global variable for the binding in your Worker code.
    namespaceId String
    ID of the KV namespace you want to use.
    name string
    The global variable for the binding in your Worker code.
    namespaceId string
    ID of the KV namespace you want to use.
    name str
    The global variable for the binding in your Worker code.
    namespace_id str
    ID of the KV namespace you want to use.
    name String
    The global variable for the binding in your Worker code.
    namespaceId String
    ID of the KV namespace you want to use.

    WorkersScriptPlacement, WorkersScriptPlacementArgs

    Mode string
    The placement mode for the Worker. Available values: smart.
    Mode string
    The placement mode for the Worker. Available values: smart.
    mode String
    The placement mode for the Worker. Available values: smart.
    mode string
    The placement mode for the Worker. Available values: smart.
    mode str
    The placement mode for the Worker. Available values: smart.
    mode String
    The placement mode for the Worker. Available values: smart.

    WorkersScriptPlainTextBinding, WorkersScriptPlainTextBindingArgs

    Name string
    The global variable for the binding in your Worker code.
    Text string
    The plain text you want to store.
    Name string
    The global variable for the binding in your Worker code.
    Text string
    The plain text you want to store.
    name String
    The global variable for the binding in your Worker code.
    text String
    The plain text you want to store.
    name string
    The global variable for the binding in your Worker code.
    text string
    The plain text you want to store.
    name str
    The global variable for the binding in your Worker code.
    text str
    The plain text you want to store.
    name String
    The global variable for the binding in your Worker code.
    text String
    The plain text you want to store.

    WorkersScriptQueueBinding, WorkersScriptQueueBindingArgs

    Binding string
    The name of the global variable for the binding in your Worker code.
    Queue string
    Name of the queue you want to use.
    Binding string
    The name of the global variable for the binding in your Worker code.
    Queue string
    Name of the queue you want to use.
    binding String
    The name of the global variable for the binding in your Worker code.
    queue String
    Name of the queue you want to use.
    binding string
    The name of the global variable for the binding in your Worker code.
    queue string
    Name of the queue you want to use.
    binding str
    The name of the global variable for the binding in your Worker code.
    queue str
    Name of the queue you want to use.
    binding String
    The name of the global variable for the binding in your Worker code.
    queue String
    Name of the queue you want to use.

    WorkersScriptR2BucketBinding, WorkersScriptR2BucketBindingArgs

    BucketName string
    The name of the Bucket to bind to.
    Name string
    The global variable for the binding in your Worker code.
    BucketName string
    The name of the Bucket to bind to.
    Name string
    The global variable for the binding in your Worker code.
    bucketName String
    The name of the Bucket to bind to.
    name String
    The global variable for the binding in your Worker code.
    bucketName string
    The name of the Bucket to bind to.
    name string
    The global variable for the binding in your Worker code.
    bucket_name str
    The name of the Bucket to bind to.
    name str
    The global variable for the binding in your Worker code.
    bucketName String
    The name of the Bucket to bind to.
    name String
    The global variable for the binding in your Worker code.

    WorkersScriptSecretTextBinding, WorkersScriptSecretTextBindingArgs

    Name string
    The global variable for the binding in your Worker code.
    Text string
    The secret text you want to store.
    Name string
    The global variable for the binding in your Worker code.
    Text string
    The secret text you want to store.
    name String
    The global variable for the binding in your Worker code.
    text String
    The secret text you want to store.
    name string
    The global variable for the binding in your Worker code.
    text string
    The secret text you want to store.
    name str
    The global variable for the binding in your Worker code.
    text str
    The secret text you want to store.
    name String
    The global variable for the binding in your Worker code.
    text String
    The secret text you want to store.

    WorkersScriptServiceBinding, WorkersScriptServiceBindingArgs

    Name string
    The global variable for the binding in your Worker code.
    Service string
    The name of the Worker to bind to.
    Environment string
    The name of the Worker environment to bind to.
    Name string
    The global variable for the binding in your Worker code.
    Service string
    The name of the Worker to bind to.
    Environment string
    The name of the Worker environment to bind to.
    name String
    The global variable for the binding in your Worker code.
    service String
    The name of the Worker to bind to.
    environment String
    The name of the Worker environment to bind to.
    name string
    The global variable for the binding in your Worker code.
    service string
    The name of the Worker to bind to.
    environment string
    The name of the Worker environment to bind to.
    name str
    The global variable for the binding in your Worker code.
    service str
    The name of the Worker to bind to.
    environment str
    The name of the Worker environment to bind to.
    name String
    The global variable for the binding in your Worker code.
    service String
    The name of the Worker to bind to.
    environment String
    The name of the Worker environment to bind to.

    WorkersScriptWebassemblyBinding, WorkersScriptWebassemblyBindingArgs

    Module string
    The base64 encoded wasm module you want to store.
    Name string
    The global variable for the binding in your Worker code.
    Module string
    The base64 encoded wasm module you want to store.
    Name string
    The global variable for the binding in your Worker code.
    module String
    The base64 encoded wasm module you want to store.
    name String
    The global variable for the binding in your Worker code.
    module string
    The base64 encoded wasm module you want to store.
    name string
    The global variable for the binding in your Worker code.
    module str
    The base64 encoded wasm module you want to store.
    name str
    The global variable for the binding in your Worker code.
    module String
    The base64 encoded wasm module you want to store.
    name String
    The global variable for the binding in your Worker code.

    Import

    $ pulumi import cloudflare:index/workersScript:WorkersScript example <account_id>/<script_name>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Cloudflare v5.43.0 published on Wednesday, Nov 13, 2024 by Pulumi