1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. getWorkersScripts
Cloudflare v6.9.1 published on Thursday, Sep 18, 2025 by Pulumi

cloudflare.getWorkersScripts

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.9.1 published on Thursday, Sep 18, 2025 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleWorkersScripts = cloudflare.getWorkersScripts({
        accountId: "023e105f4ecef8ad9ca31a8372d0c353",
        tags: "production:yes,staging:no",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_workers_scripts = cloudflare.get_workers_scripts(account_id="023e105f4ecef8ad9ca31a8372d0c353",
        tags="production:yes,staging:no")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudflare.LookupWorkersScripts(ctx, &cloudflare.LookupWorkersScriptsArgs{
    			AccountId: "023e105f4ecef8ad9ca31a8372d0c353",
    			Tags:      pulumi.StringRef("production:yes,staging:no"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleWorkersScripts = Cloudflare.GetWorkersScripts.Invoke(new()
        {
            AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
            Tags = "production:yes,staging:no",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.CloudflareFunctions;
    import com.pulumi.cloudflare.inputs.GetWorkersScriptsArgs;
    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) {
            final var exampleWorkersScripts = CloudflareFunctions.getWorkersScripts(GetWorkersScriptsArgs.builder()
                .accountId("023e105f4ecef8ad9ca31a8372d0c353")
                .tags("production:yes,staging:no")
                .build());
    
        }
    }
    
    variables:
      exampleWorkersScripts:
        fn::invoke:
          function: cloudflare:getWorkersScripts
          arguments:
            accountId: 023e105f4ecef8ad9ca31a8372d0c353
            tags: production:yes,staging:no
    

    Using getWorkersScripts

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getWorkersScripts(args: GetWorkersScriptsArgs, opts?: InvokeOptions): Promise<GetWorkersScriptsResult>
    function getWorkersScriptsOutput(args: GetWorkersScriptsOutputArgs, opts?: InvokeOptions): Output<GetWorkersScriptsResult>
    def get_workers_scripts(account_id: Optional[str] = None,
                            max_items: Optional[int] = None,
                            tags: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetWorkersScriptsResult
    def get_workers_scripts_output(account_id: Optional[pulumi.Input[str]] = None,
                            max_items: Optional[pulumi.Input[int]] = None,
                            tags: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetWorkersScriptsResult]
    func LookupWorkersScripts(ctx *Context, args *LookupWorkersScriptsArgs, opts ...InvokeOption) (*LookupWorkersScriptsResult, error)
    func LookupWorkersScriptsOutput(ctx *Context, args *LookupWorkersScriptsOutputArgs, opts ...InvokeOption) LookupWorkersScriptsResultOutput

    > Note: This function is named LookupWorkersScripts in the Go SDK.

    public static class GetWorkersScripts 
    {
        public static Task<GetWorkersScriptsResult> InvokeAsync(GetWorkersScriptsArgs args, InvokeOptions? opts = null)
        public static Output<GetWorkersScriptsResult> Invoke(GetWorkersScriptsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetWorkersScriptsResult> getWorkersScripts(GetWorkersScriptsArgs args, InvokeOptions options)
    public static Output<GetWorkersScriptsResult> getWorkersScripts(GetWorkersScriptsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudflare:index/getWorkersScripts:getWorkersScripts
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AccountId string
    Identifier.
    MaxItems int
    Max items to fetch, default: 1000
    Tags string
    Filter scripts by tags. Format: comma-separated list of tag:allowed pairs where allowed is 'yes' or 'no'.
    AccountId string
    Identifier.
    MaxItems int
    Max items to fetch, default: 1000
    Tags string
    Filter scripts by tags. Format: comma-separated list of tag:allowed pairs where allowed is 'yes' or 'no'.
    accountId String
    Identifier.
    maxItems Integer
    Max items to fetch, default: 1000
    tags String
    Filter scripts by tags. Format: comma-separated list of tag:allowed pairs where allowed is 'yes' or 'no'.
    accountId string
    Identifier.
    maxItems number
    Max items to fetch, default: 1000
    tags string
    Filter scripts by tags. Format: comma-separated list of tag:allowed pairs where allowed is 'yes' or 'no'.
    account_id str
    Identifier.
    max_items int
    Max items to fetch, default: 1000
    tags str
    Filter scripts by tags. Format: comma-separated list of tag:allowed pairs where allowed is 'yes' or 'no'.
    accountId String
    Identifier.
    maxItems Number
    Max items to fetch, default: 1000
    tags String
    Filter scripts by tags. Format: comma-separated list of tag:allowed pairs where allowed is 'yes' or 'no'.

    getWorkersScripts Result

    The following output properties are available:

    AccountId string
    Identifier.
    Id string
    The provider-assigned unique ID for this managed resource.
    Results List<GetWorkersScriptsResult>
    The items returned by the data source
    MaxItems int
    Max items to fetch, default: 1000
    Tags string
    Filter scripts by tags. Format: comma-separated list of tag:allowed pairs where allowed is 'yes' or 'no'.
    AccountId string
    Identifier.
    Id string
    The provider-assigned unique ID for this managed resource.
    Results []GetWorkersScriptsResult
    The items returned by the data source
    MaxItems int
    Max items to fetch, default: 1000
    Tags string
    Filter scripts by tags. Format: comma-separated list of tag:allowed pairs where allowed is 'yes' or 'no'.
    accountId String
    Identifier.
    id String
    The provider-assigned unique ID for this managed resource.
    results List<GetWorkersScriptsResult>
    The items returned by the data source
    maxItems Integer
    Max items to fetch, default: 1000
    tags String
    Filter scripts by tags. Format: comma-separated list of tag:allowed pairs where allowed is 'yes' or 'no'.
    accountId string
    Identifier.
    id string
    The provider-assigned unique ID for this managed resource.
    results GetWorkersScriptsResult[]
    The items returned by the data source
    maxItems number
    Max items to fetch, default: 1000
    tags string
    Filter scripts by tags. Format: comma-separated list of tag:allowed pairs where allowed is 'yes' or 'no'.
    account_id str
    Identifier.
    id str
    The provider-assigned unique ID for this managed resource.
    results Sequence[GetWorkersScriptsResult]
    The items returned by the data source
    max_items int
    Max items to fetch, default: 1000
    tags str
    Filter scripts by tags. Format: comma-separated list of tag:allowed pairs where allowed is 'yes' or 'no'.
    accountId String
    Identifier.
    id String
    The provider-assigned unique ID for this managed resource.
    results List<Property Map>
    The items returned by the data source
    maxItems Number
    Max items to fetch, default: 1000
    tags String
    Filter scripts by tags. Format: comma-separated list of tag:allowed pairs where allowed is 'yes' or 'no'.

    Supporting Types

    GetWorkersScriptsResult

    CompatibilityDate string
    Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker.
    CompatibilityFlags List<string>
    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 compatibility_date.
    CreatedOn string
    When the script was created.
    Etag string
    Hashed script content, can be used in a If-None-Match header when updating.
    Handlers List<string>
    The names of handlers exported as part of the default export.
    HasAssets bool
    Whether a Worker contains assets.
    HasModules bool
    Whether a Worker contains modules.
    Id string
    The id of the script in the Workers system. Usually the script name.
    LastDeployedFrom string
    The client most recently used to deploy this Worker.
    Logpush bool
    Whether Logpush is turned on for the Worker.
    MigrationTag string
    The tag of the Durable Object migration that was most recently applied for this Worker.
    ModifiedOn string
    When the script was last modified.
    NamedHandlers List<GetWorkersScriptsResultNamedHandler>
    Named exports, such as Durable Object class implementations and named entrypoints.
    Placement GetWorkersScriptsResultPlacement
    Configuration for Smart Placement.
    PlacementMode string
    Enables Smart Placement. Available values: "smart".

    Deprecated: This attribute is deprecated.

    PlacementStatus string
    Status of Smart Placement. Available values: "SUCCESS", "UNSUPPORTEDAPPLICATION", "INSUFFICIENTINVOCATIONS".

    Deprecated: This attribute is deprecated.

    TailConsumers List<GetWorkersScriptsResultTailConsumer>
    List of Workers that will consume logs from the attached Worker.
    UsageModel string
    Usage model for the Worker invocations. Available values: "standard", "bundled", "unbound".
    CompatibilityDate string
    Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker.
    CompatibilityFlags []string
    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 compatibility_date.
    CreatedOn string
    When the script was created.
    Etag string
    Hashed script content, can be used in a If-None-Match header when updating.
    Handlers []string
    The names of handlers exported as part of the default export.
    HasAssets bool
    Whether a Worker contains assets.
    HasModules bool
    Whether a Worker contains modules.
    Id string
    The id of the script in the Workers system. Usually the script name.
    LastDeployedFrom string
    The client most recently used to deploy this Worker.
    Logpush bool
    Whether Logpush is turned on for the Worker.
    MigrationTag string
    The tag of the Durable Object migration that was most recently applied for this Worker.
    ModifiedOn string
    When the script was last modified.
    NamedHandlers []GetWorkersScriptsResultNamedHandler
    Named exports, such as Durable Object class implementations and named entrypoints.
    Placement GetWorkersScriptsResultPlacement
    Configuration for Smart Placement.
    PlacementMode string
    Enables Smart Placement. Available values: "smart".

    Deprecated: This attribute is deprecated.

    PlacementStatus string
    Status of Smart Placement. Available values: "SUCCESS", "UNSUPPORTEDAPPLICATION", "INSUFFICIENTINVOCATIONS".

    Deprecated: This attribute is deprecated.

    TailConsumers []GetWorkersScriptsResultTailConsumer
    List of Workers that will consume logs from the attached Worker.
    UsageModel string
    Usage model for the Worker invocations. Available values: "standard", "bundled", "unbound".
    compatibilityDate String
    Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker.
    compatibilityFlags List<String>
    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 compatibility_date.
    createdOn String
    When the script was created.
    etag String
    Hashed script content, can be used in a If-None-Match header when updating.
    handlers List<String>
    The names of handlers exported as part of the default export.
    hasAssets Boolean
    Whether a Worker contains assets.
    hasModules Boolean
    Whether a Worker contains modules.
    id String
    The id of the script in the Workers system. Usually the script name.
    lastDeployedFrom String
    The client most recently used to deploy this Worker.
    logpush Boolean
    Whether Logpush is turned on for the Worker.
    migrationTag String
    The tag of the Durable Object migration that was most recently applied for this Worker.
    modifiedOn String
    When the script was last modified.
    namedHandlers List<GetWorkersScriptsResultNamedHandler>
    Named exports, such as Durable Object class implementations and named entrypoints.
    placement GetWorkersScriptsResultPlacement
    Configuration for Smart Placement.
    placementMode String
    Enables Smart Placement. Available values: "smart".

    Deprecated: This attribute is deprecated.

    placementStatus String
    Status of Smart Placement. Available values: "SUCCESS", "UNSUPPORTEDAPPLICATION", "INSUFFICIENTINVOCATIONS".

    Deprecated: This attribute is deprecated.

    tailConsumers List<GetWorkersScriptsResultTailConsumer>
    List of Workers that will consume logs from the attached Worker.
    usageModel String
    Usage model for the Worker invocations. Available values: "standard", "bundled", "unbound".
    compatibilityDate string
    Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker.
    compatibilityFlags string[]
    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 compatibility_date.
    createdOn string
    When the script was created.
    etag string
    Hashed script content, can be used in a If-None-Match header when updating.
    handlers string[]
    The names of handlers exported as part of the default export.
    hasAssets boolean
    Whether a Worker contains assets.
    hasModules boolean
    Whether a Worker contains modules.
    id string
    The id of the script in the Workers system. Usually the script name.
    lastDeployedFrom string
    The client most recently used to deploy this Worker.
    logpush boolean
    Whether Logpush is turned on for the Worker.
    migrationTag string
    The tag of the Durable Object migration that was most recently applied for this Worker.
    modifiedOn string
    When the script was last modified.
    namedHandlers GetWorkersScriptsResultNamedHandler[]
    Named exports, such as Durable Object class implementations and named entrypoints.
    placement GetWorkersScriptsResultPlacement
    Configuration for Smart Placement.
    placementMode string
    Enables Smart Placement. Available values: "smart".

    Deprecated: This attribute is deprecated.

    placementStatus string
    Status of Smart Placement. Available values: "SUCCESS", "UNSUPPORTEDAPPLICATION", "INSUFFICIENTINVOCATIONS".

    Deprecated: This attribute is deprecated.

    tailConsumers GetWorkersScriptsResultTailConsumer[]
    List of Workers that will consume logs from the attached Worker.
    usageModel string
    Usage model for the Worker invocations. Available values: "standard", "bundled", "unbound".
    compatibility_date str
    Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker.
    compatibility_flags Sequence[str]
    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 compatibility_date.
    created_on str
    When the script was created.
    etag str
    Hashed script content, can be used in a If-None-Match header when updating.
    handlers Sequence[str]
    The names of handlers exported as part of the default export.
    has_assets bool
    Whether a Worker contains assets.
    has_modules bool
    Whether a Worker contains modules.
    id str
    The id of the script in the Workers system. Usually the script name.
    last_deployed_from str
    The client most recently used to deploy this Worker.
    logpush bool
    Whether Logpush is turned on for the Worker.
    migration_tag str
    The tag of the Durable Object migration that was most recently applied for this Worker.
    modified_on str
    When the script was last modified.
    named_handlers Sequence[GetWorkersScriptsResultNamedHandler]
    Named exports, such as Durable Object class implementations and named entrypoints.
    placement GetWorkersScriptsResultPlacement
    Configuration for Smart Placement.
    placement_mode str
    Enables Smart Placement. Available values: "smart".

    Deprecated: This attribute is deprecated.

    placement_status str
    Status of Smart Placement. Available values: "SUCCESS", "UNSUPPORTEDAPPLICATION", "INSUFFICIENTINVOCATIONS".

    Deprecated: This attribute is deprecated.

    tail_consumers Sequence[GetWorkersScriptsResultTailConsumer]
    List of Workers that will consume logs from the attached Worker.
    usage_model str
    Usage model for the Worker invocations. Available values: "standard", "bundled", "unbound".
    compatibilityDate String
    Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker.
    compatibilityFlags List<String>
    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 compatibility_date.
    createdOn String
    When the script was created.
    etag String
    Hashed script content, can be used in a If-None-Match header when updating.
    handlers List<String>
    The names of handlers exported as part of the default export.
    hasAssets Boolean
    Whether a Worker contains assets.
    hasModules Boolean
    Whether a Worker contains modules.
    id String
    The id of the script in the Workers system. Usually the script name.
    lastDeployedFrom String
    The client most recently used to deploy this Worker.
    logpush Boolean
    Whether Logpush is turned on for the Worker.
    migrationTag String
    The tag of the Durable Object migration that was most recently applied for this Worker.
    modifiedOn String
    When the script was last modified.
    namedHandlers List<Property Map>
    Named exports, such as Durable Object class implementations and named entrypoints.
    placement Property Map
    Configuration for Smart Placement.
    placementMode String
    Enables Smart Placement. Available values: "smart".

    Deprecated: This attribute is deprecated.

    placementStatus String
    Status of Smart Placement. Available values: "SUCCESS", "UNSUPPORTEDAPPLICATION", "INSUFFICIENTINVOCATIONS".

    Deprecated: This attribute is deprecated.

    tailConsumers List<Property Map>
    List of Workers that will consume logs from the attached Worker.
    usageModel String
    Usage model for the Worker invocations. Available values: "standard", "bundled", "unbound".

    GetWorkersScriptsResultNamedHandler

    Handlers List<string>
    The names of handlers exported as part of the named export.
    Name string
    The name of the export.
    Handlers []string
    The names of handlers exported as part of the named export.
    Name string
    The name of the export.
    handlers List<String>
    The names of handlers exported as part of the named export.
    name String
    The name of the export.
    handlers string[]
    The names of handlers exported as part of the named export.
    name string
    The name of the export.
    handlers Sequence[str]
    The names of handlers exported as part of the named export.
    name str
    The name of the export.
    handlers List<String>
    The names of handlers exported as part of the named export.
    name String
    The name of the export.

    GetWorkersScriptsResultPlacement

    LastAnalyzedAt string
    The last time the script was analyzed for Smart Placement.
    Mode string
    Enables Smart Placement. Available values: "smart".
    Status string
    Status of Smart Placement. Available values: "SUCCESS", "UNSUPPORTEDAPPLICATION", "INSUFFICIENTINVOCATIONS".
    LastAnalyzedAt string
    The last time the script was analyzed for Smart Placement.
    Mode string
    Enables Smart Placement. Available values: "smart".
    Status string
    Status of Smart Placement. Available values: "SUCCESS", "UNSUPPORTEDAPPLICATION", "INSUFFICIENTINVOCATIONS".
    lastAnalyzedAt String
    The last time the script was analyzed for Smart Placement.
    mode String
    Enables Smart Placement. Available values: "smart".
    status String
    Status of Smart Placement. Available values: "SUCCESS", "UNSUPPORTEDAPPLICATION", "INSUFFICIENTINVOCATIONS".
    lastAnalyzedAt string
    The last time the script was analyzed for Smart Placement.
    mode string
    Enables Smart Placement. Available values: "smart".
    status string
    Status of Smart Placement. Available values: "SUCCESS", "UNSUPPORTEDAPPLICATION", "INSUFFICIENTINVOCATIONS".
    last_analyzed_at str
    The last time the script was analyzed for Smart Placement.
    mode str
    Enables Smart Placement. Available values: "smart".
    status str
    Status of Smart Placement. Available values: "SUCCESS", "UNSUPPORTEDAPPLICATION", "INSUFFICIENTINVOCATIONS".
    lastAnalyzedAt String
    The last time the script was analyzed for Smart Placement.
    mode String
    Enables Smart Placement. Available values: "smart".
    status String
    Status of Smart Placement. Available values: "SUCCESS", "UNSUPPORTEDAPPLICATION", "INSUFFICIENTINVOCATIONS".

    GetWorkersScriptsResultTailConsumer

    Environment string
    Optional environment if the Worker utilizes one.
    Namespace string
    Optional dispatch namespace the script belongs to.
    Service string
    Name of Worker that is to be the consumer.
    Environment string
    Optional environment if the Worker utilizes one.
    Namespace string
    Optional dispatch namespace the script belongs to.
    Service string
    Name of Worker that is to be the consumer.
    environment String
    Optional environment if the Worker utilizes one.
    namespace String
    Optional dispatch namespace the script belongs to.
    service String
    Name of Worker that is to be the consumer.
    environment string
    Optional environment if the Worker utilizes one.
    namespace string
    Optional dispatch namespace the script belongs to.
    service string
    Name of Worker that is to be the consumer.
    environment str
    Optional environment if the Worker utilizes one.
    namespace str
    Optional dispatch namespace the script belongs to.
    service str
    Name of Worker that is to be the consumer.
    environment String
    Optional environment if the Worker utilizes one.
    namespace String
    Optional dispatch namespace the script belongs to.
    service String
    Name of Worker that is to be the consumer.

    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 v6.9.1 published on Thursday, Sep 18, 2025 by Pulumi