1. Registry
  2. Packages
  3. Cloudflare Provider
  4. API Docs
  5. getWorkersDeployments
Viewing docs for Cloudflare v6.23.1
published on Wednesday, Oct 21, 2026 by Pulumi
cloudflare logo cloudflare logo
Viewing docs for Cloudflare v6.23.1
published on Wednesday, Oct 21, 2026 by Pulumi

    Accepted Permissions

    • Workers Scripts Read
    • Workers Scripts Write
    • Workers Tail Read

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleWorkersDeployments = cloudflare.getWorkersDeployments({
        accountId: "023e105f4ecef8ad9ca31a8372d0c353",
        scriptName: "this-is_my_script-01",
        since: "2019-12-27T18:11:19.117Z",
        until: "2019-12-27T18:11:19.117Z",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_workers_deployments = cloudflare.get_workers_deployments(account_id="023e105f4ecef8ad9ca31a8372d0c353",
        script_name="this-is_my_script-01",
        since="2019-12-27T18:11:19.117Z",
        until="2019-12-27T18:11:19.117Z")
    
    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.GetWorkersDeployments(ctx, &cloudflare.LookupWorkersDeploymentsArgs{
    			AccountId:  "023e105f4ecef8ad9ca31a8372d0c353",
    			ScriptName: "this-is_my_script-01",
    			Since:      pulumi.StringRef("2019-12-27T18:11:19.117Z"),
    			Until:      pulumi.StringRef("2019-12-27T18:11:19.117Z"),
    		}, 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 exampleWorkersDeployments = Cloudflare.GetWorkersDeployments.Invoke(new()
        {
            AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
            ScriptName = "this-is_my_script-01",
            Since = "2019-12-27T18:11:19.117Z",
            Until = "2019-12-27T18:11:19.117Z",
        });
    
    });
    
    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.GetWorkersDeploymentsArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 exampleWorkersDeployments = CloudflareFunctions.getWorkersDeployments(GetWorkersDeploymentsArgs.builder()
                .accountId("023e105f4ecef8ad9ca31a8372d0c353")
                .scriptName("this-is_my_script-01")
                .since("2019-12-27T18:11:19.117Z")
                .until("2019-12-27T18:11:19.117Z")
                .build());
    
        }
    }
    
    variables:
      exampleWorkersDeployments:
        fn::invoke:
          function: cloudflare:getWorkersDeployments
          arguments:
            accountId: 023e105f4ecef8ad9ca31a8372d0c353
            scriptName: this-is_my_script-01
            since: 2019-12-27T18:11:19.117Z
            until: 2019-12-27T18:11:19.117Z
    
    terraform {
      required_providers {
        cloudflare = {
          source = "pulumi/cloudflare"
        }
      }
    }
    
    data "cloudflare_workers_deployments" "exampleWorkersDeployments" {
      account_id  = "023e105f4ecef8ad9ca31a8372d0c353"
      script_name = "this-is_my_script-01"
      since       = "2019-12-27T18:11:19.117Z"
      until       = "2019-12-27T18:11:19.117Z"
    }
    

    Using getWorkersDeployments

    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 getWorkersDeployments(args: GetWorkersDeploymentsArgs, opts?: InvokeOptions): Promise<GetWorkersDeploymentsResult>
    function getWorkersDeploymentsOutput(args: GetWorkersDeploymentsOutputArgs, opts?: InvokeOutputOptions): Output<GetWorkersDeploymentsResult>
    def get_workers_deployments(account_id: Optional[str] = None,
                                max_items: Optional[int] = None,
                                script_name: Optional[str] = None,
                                since: Optional[str] = None,
                                until: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetWorkersDeploymentsResult
    def get_workers_deployments_output(account_id: pulumi.Input[Optional[str]] = None,
                                max_items: pulumi.Input[Optional[int]] = None,
                                script_name: pulumi.Input[Optional[str]] = None,
                                since: pulumi.Input[Optional[str]] = None,
                                until: pulumi.Input[Optional[str]] = None,
                                opts: Optional[InvokeOutputOptions] = None) -> Output[GetWorkersDeploymentsResult]
    func LookupWorkersDeployments(ctx *Context, args *LookupWorkersDeploymentsArgs, opts ...InvokeOption) (*LookupWorkersDeploymentsResult, error)
    func LookupWorkersDeploymentsOutput(ctx *Context, args *LookupWorkersDeploymentsOutputArgs, opts ...InvokeOption) LookupWorkersDeploymentsResultOutput

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

    public static class GetWorkersDeployments 
    {
        public static Task<GetWorkersDeploymentsResult> InvokeAsync(GetWorkersDeploymentsArgs args, InvokeOptions? opts = null)
        public static Output<GetWorkersDeploymentsResult> Invoke(GetWorkersDeploymentsInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetWorkersDeploymentsResult> Invoke(GetWorkersDeploymentsInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetWorkersDeploymentsResult> getWorkersDeployments(GetWorkersDeploymentsArgs args, InvokeOptions options)
    public static Output<GetWorkersDeploymentsResult> getWorkersDeployments(GetWorkersDeploymentsArgs args, InvokeOptions options)
    public static Output<GetWorkersDeploymentsResult> getWorkersDeployments(GetWorkersDeploymentsArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: cloudflare:index/getWorkersDeployments:getWorkersDeployments
      arguments:
        # arguments dictionary
    data "cloudflare_get_workers_deployments" "name" {
        # arguments
    }

    The following arguments are supported:

    AccountId string
    Identifier.
    ScriptName string
    Name of the script.
    MaxItems int
    Max items to fetch, default: 1000
    Since string
    Start of the deployment creation time range, inclusive.
    Until string
    End of the deployment creation time range, inclusive.
    AccountId string
    Identifier.
    ScriptName string
    Name of the script.
    MaxItems int
    Max items to fetch, default: 1000
    Since string
    Start of the deployment creation time range, inclusive.
    Until string
    End of the deployment creation time range, inclusive.
    account_id string
    Identifier.
    script_name string
    Name of the script.
    max_items number
    Max items to fetch, default: 1000
    since string
    Start of the deployment creation time range, inclusive.
    until string
    End of the deployment creation time range, inclusive.
    accountId String
    Identifier.
    scriptName String
    Name of the script.
    maxItems Integer
    Max items to fetch, default: 1000
    since String
    Start of the deployment creation time range, inclusive.
    until String
    End of the deployment creation time range, inclusive.
    accountId string
    Identifier.
    scriptName string
    Name of the script.
    maxItems number
    Max items to fetch, default: 1000
    since string
    Start of the deployment creation time range, inclusive.
    until string
    End of the deployment creation time range, inclusive.
    account_id str
    Identifier.
    script_name str
    Name of the script.
    max_items int
    Max items to fetch, default: 1000
    since str
    Start of the deployment creation time range, inclusive.
    until str
    End of the deployment creation time range, inclusive.
    accountId String
    Identifier.
    scriptName String
    Name of the script.
    maxItems Number
    Max items to fetch, default: 1000
    since String
    Start of the deployment creation time range, inclusive.
    until String
    End of the deployment creation time range, inclusive.

    getWorkersDeployments Result

    The following output properties are available:

    AccountId string
    Identifier.
    Results List<GetWorkersDeploymentsResult>
    The items returned by the data source
    ScriptName string
    Name of the script.
    MaxItems int
    Max items to fetch, default: 1000
    Since string
    Start of the deployment creation time range, inclusive.
    Until string
    End of the deployment creation time range, inclusive.
    AccountId string
    Identifier.
    Results []GetWorkersDeploymentsResult
    The items returned by the data source
    ScriptName string
    Name of the script.
    MaxItems int
    Max items to fetch, default: 1000
    Since string
    Start of the deployment creation time range, inclusive.
    Until string
    End of the deployment creation time range, inclusive.
    account_id string
    Identifier.
    results list(object)
    The items returned by the data source
    script_name string
    Name of the script.
    max_items number
    Max items to fetch, default: 1000
    since string
    Start of the deployment creation time range, inclusive.
    until string
    End of the deployment creation time range, inclusive.
    accountId String
    Identifier.
    results List<GetWorkersDeploymentsResult>
    The items returned by the data source
    scriptName String
    Name of the script.
    maxItems Integer
    Max items to fetch, default: 1000
    since String
    Start of the deployment creation time range, inclusive.
    until String
    End of the deployment creation time range, inclusive.
    accountId string
    Identifier.
    results GetWorkersDeploymentsResult[]
    The items returned by the data source
    scriptName string
    Name of the script.
    maxItems number
    Max items to fetch, default: 1000
    since string
    Start of the deployment creation time range, inclusive.
    until string
    End of the deployment creation time range, inclusive.
    account_id str
    Identifier.
    results Sequence[GetWorkersDeploymentsResult]
    The items returned by the data source
    script_name str
    Name of the script.
    max_items int
    Max items to fetch, default: 1000
    since str
    Start of the deployment creation time range, inclusive.
    until str
    End of the deployment creation time range, inclusive.
    accountId String
    Identifier.
    results List<Property Map>
    The items returned by the data source
    scriptName String
    Name of the script.
    maxItems Number
    Max items to fetch, default: 1000
    since String
    Start of the deployment creation time range, inclusive.
    until String
    End of the deployment creation time range, inclusive.

    Supporting Types

    GetWorkersDeploymentsResult

    GetWorkersDeploymentsResultDeployment

    Annotations GetWorkersDeploymentsResultDeploymentAnnotations
    AuthorEmail string
    CreatedOn string
    Id string
    Source string
    Strategy string
    Available values: "percentage".
    Versions List<GetWorkersDeploymentsResultDeploymentVersion>
    Worker versions included in this deployment. Each object must contain a versionId UUID and a percentage; percentages across all objects must total 100. In the cf CLI, pass the entire array as one JSON value to --versions, either inline, for example --versions '[{"versionId":"023e105f-2a42-4f8b-a1c1-73f6a2a30c0f","percentage":100}]', or from a JSON file with --versions @versions.json.
    Annotations GetWorkersDeploymentsResultDeploymentAnnotations
    AuthorEmail string
    CreatedOn string
    Id string
    Source string
    Strategy string
    Available values: "percentage".
    Versions []GetWorkersDeploymentsResultDeploymentVersion
    Worker versions included in this deployment. Each object must contain a versionId UUID and a percentage; percentages across all objects must total 100. In the cf CLI, pass the entire array as one JSON value to --versions, either inline, for example --versions '[{"versionId":"023e105f-2a42-4f8b-a1c1-73f6a2a30c0f","percentage":100}]', or from a JSON file with --versions @versions.json.
    annotations object
    author_email string
    created_on string
    id string
    source string
    strategy string
    Available values: "percentage".
    versions list(object)
    Worker versions included in this deployment. Each object must contain a versionId UUID and a percentage; percentages across all objects must total 100. In the cf CLI, pass the entire array as one JSON value to --versions, either inline, for example --versions '[{"versionId":"023e105f-2a42-4f8b-a1c1-73f6a2a30c0f","percentage":100}]', or from a JSON file with --versions @versions.json.
    annotations GetWorkersDeploymentsResultDeploymentAnnotations
    authorEmail String
    createdOn String
    id String
    source String
    strategy String
    Available values: "percentage".
    versions List<GetWorkersDeploymentsResultDeploymentVersion>
    Worker versions included in this deployment. Each object must contain a versionId UUID and a percentage; percentages across all objects must total 100. In the cf CLI, pass the entire array as one JSON value to --versions, either inline, for example --versions '[{"versionId":"023e105f-2a42-4f8b-a1c1-73f6a2a30c0f","percentage":100}]', or from a JSON file with --versions @versions.json.
    annotations GetWorkersDeploymentsResultDeploymentAnnotations
    authorEmail string
    createdOn string
    id string
    source string
    strategy string
    Available values: "percentage".
    versions GetWorkersDeploymentsResultDeploymentVersion[]
    Worker versions included in this deployment. Each object must contain a versionId UUID and a percentage; percentages across all objects must total 100. In the cf CLI, pass the entire array as one JSON value to --versions, either inline, for example --versions '[{"versionId":"023e105f-2a42-4f8b-a1c1-73f6a2a30c0f","percentage":100}]', or from a JSON file with --versions @versions.json.
    annotations GetWorkersDeploymentsResultDeploymentAnnotations
    author_email str
    created_on str
    id str
    source str
    strategy str
    Available values: "percentage".
    versions Sequence[GetWorkersDeploymentsResultDeploymentVersion]
    Worker versions included in this deployment. Each object must contain a versionId UUID and a percentage; percentages across all objects must total 100. In the cf CLI, pass the entire array as one JSON value to --versions, either inline, for example --versions '[{"versionId":"023e105f-2a42-4f8b-a1c1-73f6a2a30c0f","percentage":100}]', or from a JSON file with --versions @versions.json.
    annotations Property Map
    authorEmail String
    createdOn String
    id String
    source String
    strategy String
    Available values: "percentage".
    versions List<Property Map>
    Worker versions included in this deployment. Each object must contain a versionId UUID and a percentage; percentages across all objects must total 100. In the cf CLI, pass the entire array as one JSON value to --versions, either inline, for example --versions '[{"versionId":"023e105f-2a42-4f8b-a1c1-73f6a2a30c0f","percentage":100}]', or from a JSON file with --versions @versions.json.

    GetWorkersDeploymentsResultDeploymentAnnotations

    WorkersMessage string
    Human-readable message about the deployment. Truncated to 1000 bytes if longer.
    WorkersTriggeredBy string
    Operation that triggered the creation of the deployment.
    WorkersMessage string
    Human-readable message about the deployment. Truncated to 1000 bytes if longer.
    WorkersTriggeredBy string
    Operation that triggered the creation of the deployment.
    workers_message string
    Human-readable message about the deployment. Truncated to 1000 bytes if longer.
    workers_triggered_by string
    Operation that triggered the creation of the deployment.
    workersMessage String
    Human-readable message about the deployment. Truncated to 1000 bytes if longer.
    workersTriggeredBy String
    Operation that triggered the creation of the deployment.
    workersMessage string
    Human-readable message about the deployment. Truncated to 1000 bytes if longer.
    workersTriggeredBy string
    Operation that triggered the creation of the deployment.
    workers_message str
    Human-readable message about the deployment. Truncated to 1000 bytes if longer.
    workers_triggered_by str
    Operation that triggered the creation of the deployment.
    workersMessage String
    Human-readable message about the deployment. Truncated to 1000 bytes if longer.
    workersTriggeredBy String
    Operation that triggered the creation of the deployment.

    GetWorkersDeploymentsResultDeploymentVersion

    Percentage double
    Percentage of traffic served by this version.
    VersionId string
    Identifier of the Worker Version.
    Percentage float64
    Percentage of traffic served by this version.
    VersionId string
    Identifier of the Worker Version.
    percentage number
    Percentage of traffic served by this version.
    version_id string
    Identifier of the Worker Version.
    percentage Double
    Percentage of traffic served by this version.
    versionId String
    Identifier of the Worker Version.
    percentage number
    Percentage of traffic served by this version.
    versionId string
    Identifier of the Worker Version.
    percentage float
    Percentage of traffic served by this version.
    version_id str
    Identifier of the Worker Version.
    percentage Number
    Percentage of traffic served by this version.
    versionId String
    Identifier of the Worker Version.

    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 logo
    Viewing docs for Cloudflare v6.23.1
    published on Wednesday, Oct 21, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial