1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. getWorkersScripts
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

cloudflare.getWorkersScripts

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleWorkersScripts = cloudflare.getWorkersScripts({
        accountId: "023e105f4ecef8ad9ca31a8372d0c353",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_workers_scripts = cloudflare.get_workers_scripts(account_id="023e105f4ecef8ad9ca31a8372d0c353")
    
    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",
    		}, 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",
        });
    
    });
    
    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")
                .build());
    
        }
    }
    
    variables:
      exampleWorkersScripts:
        fn::invoke:
          function: cloudflare:getWorkersScripts
          arguments:
            accountId: 023e105f4ecef8ad9ca31a8372d0c353
    

    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,
                            opts: Optional[InvokeOptions] = None) -> GetWorkersScriptsResult
    def get_workers_scripts_output(account_id: Optional[pulumi.Input[str]] = None,
                            max_items: Optional[pulumi.Input[int]] = 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
    AccountId string
    Identifier.
    MaxItems int
    Max items to fetch, default: 1000
    accountId String
    Identifier.
    maxItems Integer
    Max items to fetch, default: 1000
    accountId string
    Identifier.
    maxItems number
    Max items to fetch, default: 1000
    account_id str
    Identifier.
    max_items int
    Max items to fetch, default: 1000
    accountId String
    Identifier.
    maxItems Number
    Max items to fetch, default: 1000

    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
    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
    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
    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
    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
    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

    Supporting Types

    GetWorkersScriptsResult

    CreatedOn string
    When the script was created.
    Etag string
    Hashed script content, can be used in a If-None-Match header when updating.
    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.
    Logpush bool
    Whether Logpush is turned on for the Worker.
    ModifiedOn string
    When the script was last modified.
    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".
    CreatedOn string
    When the script was created.
    Etag string
    Hashed script content, can be used in a If-None-Match header when updating.
    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.
    Logpush bool
    Whether Logpush is turned on for the Worker.
    ModifiedOn string
    When the script was last modified.
    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".
    createdOn String
    When the script was created.
    etag String
    Hashed script content, can be used in a If-None-Match header when updating.
    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.
    logpush Boolean
    Whether Logpush is turned on for the Worker.
    modifiedOn String
    When the script was last modified.
    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".
    createdOn string
    When the script was created.
    etag string
    Hashed script content, can be used in a If-None-Match header when updating.
    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.
    logpush boolean
    Whether Logpush is turned on for the Worker.
    modifiedOn string
    When the script was last modified.
    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".
    created_on str
    When the script was created.
    etag str
    Hashed script content, can be used in a If-None-Match header when updating.
    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.
    logpush bool
    Whether Logpush is turned on for the Worker.
    modified_on str
    When the script was last modified.
    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".
    createdOn String
    When the script was created.
    etag String
    Hashed script content, can be used in a If-None-Match header when updating.
    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.
    logpush Boolean
    Whether Logpush is turned on for the Worker.
    modifiedOn String
    When the script was last modified.
    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".

    GetWorkersScriptsResultPlacement

    Mode string
    Enables Smart Placement. Available values: "smart".
    Status string
    Status of Smart Placement. Available values: "SUCCESS", "UNSUPPORTEDAPPLICATION", "INSUFFICIENTINVOCATIONS".
    Mode string
    Enables Smart Placement. Available values: "smart".
    Status string
    Status of Smart Placement. Available values: "SUCCESS", "UNSUPPORTEDAPPLICATION", "INSUFFICIENTINVOCATIONS".
    mode String
    Enables Smart Placement. Available values: "smart".
    status String
    Status of Smart Placement. Available values: "SUCCESS", "UNSUPPORTEDAPPLICATION", "INSUFFICIENTINVOCATIONS".
    mode string
    Enables Smart Placement. Available values: "smart".
    status string
    Status of Smart Placement. Available values: "SUCCESS", "UNSUPPORTEDAPPLICATION", "INSUFFICIENTINVOCATIONS".
    mode str
    Enables Smart Placement. Available values: "smart".
    status str
    Status of Smart Placement. Available values: "SUCCESS", "UNSUPPORTEDAPPLICATION", "INSUFFICIENTINVOCATIONS".
    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.1.2 published on Monday, Apr 28, 2025 by Pulumi