1. Registry
  2. Packages
  3. Cloudflare Provider
  4. API Docs
  5. getWorkflow
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 exampleWorkflow = cloudflare.getWorkflow({
        accountId: "account_id",
        workflowName: "x",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_workflow = cloudflare.get_workflow(account_id="account_id",
        workflow_name="x")
    
    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.GetWorkflow(ctx, &cloudflare.LookupWorkflowArgs{
    			AccountId:    pulumi.StringRef("account_id"),
    			WorkflowName: pulumi.StringRef("x"),
    		}, 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 exampleWorkflow = Cloudflare.GetWorkflow.Invoke(new()
        {
            AccountId = "account_id",
            WorkflowName = "x",
        });
    
    });
    
    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.GetWorkflowArgs;
    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 exampleWorkflow = CloudflareFunctions.getWorkflow(GetWorkflowArgs.builder()
                .accountId("account_id")
                .workflowName("x")
                .build());
    
        }
    }
    
    variables:
      exampleWorkflow:
        fn::invoke:
          function: cloudflare:getWorkflow
          arguments:
            accountId: account_id
            workflowName: x
    
    terraform {
      required_providers {
        cloudflare = {
          source = "pulumi/cloudflare"
        }
      }
    }
    
    data "cloudflare_workflow" "exampleWorkflow" {
      account_id    = "account_id"
      workflow_name = "x"
    }
    

    Using getWorkflow

    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 getWorkflow(args: GetWorkflowArgs, opts?: InvokeOptions): Promise<GetWorkflowResult>
    function getWorkflowOutput(args: GetWorkflowOutputArgs, opts?: InvokeOutputOptions): Output<GetWorkflowResult>
    def get_workflow(account_id: Optional[str] = None,
                     filter: Optional[GetWorkflowFilter] = None,
                     workflow_name: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetWorkflowResult
    def get_workflow_output(account_id: pulumi.Input[Optional[str]] = None,
                     filter: pulumi.Input[Optional[GetWorkflowFilterArgs]] = None,
                     workflow_name: pulumi.Input[Optional[str]] = None,
                     opts: Optional[InvokeOutputOptions] = None) -> Output[GetWorkflowResult]
    func LookupWorkflow(ctx *Context, args *LookupWorkflowArgs, opts ...InvokeOption) (*LookupWorkflowResult, error)
    func LookupWorkflowOutput(ctx *Context, args *LookupWorkflowOutputArgs, opts ...InvokeOption) LookupWorkflowResultOutput

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

    public static class GetWorkflow 
    {
        public static Task<GetWorkflowResult> InvokeAsync(GetWorkflowArgs args, InvokeOptions? opts = null)
        public static Output<GetWorkflowResult> Invoke(GetWorkflowInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetWorkflowResult> Invoke(GetWorkflowInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetWorkflowResult> getWorkflow(GetWorkflowArgs args, InvokeOptions options)
    public static Output<GetWorkflowResult> getWorkflow(GetWorkflowArgs args, InvokeOptions options)
    public static Output<GetWorkflowResult> getWorkflow(GetWorkflowArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: cloudflare:index/getWorkflow:getWorkflow
      arguments:
        # arguments dictionary
    data "cloudflare_get_workflow" "name" {
        # arguments
    }

    The following arguments are supported:

    getWorkflow Result

    The following output properties are available:

    ClassName string
    CreatedOn string
    Id string
    The ID of this resource.
    Instances Dictionary<string, double>
    ModifiedOn string
    Name string
    Schedules List<GetWorkflowSchedule>
    ScriptDeleted bool
    Whether the bound Worker was deleted, leaving this Workflow inactive.
    ScriptName string
    TriggeredOn string
    AccountId string
    Filter GetWorkflowFilter
    WorkflowName string
    ClassName string
    CreatedOn string
    Id string
    The ID of this resource.
    Instances map[string]float64
    ModifiedOn string
    Name string
    Schedules []GetWorkflowSchedule
    ScriptDeleted bool
    Whether the bound Worker was deleted, leaving this Workflow inactive.
    ScriptName string
    TriggeredOn string
    AccountId string
    Filter GetWorkflowFilter
    WorkflowName string
    class_name string
    created_on string
    id string
    The ID of this resource.
    instances map(number)
    modified_on string
    name string
    schedules list(object)
    script_deleted bool
    Whether the bound Worker was deleted, leaving this Workflow inactive.
    script_name string
    triggered_on string
    account_id string
    filter object
    workflow_name string
    className String
    createdOn String
    id String
    The ID of this resource.
    instances Map<String,Double>
    modifiedOn String
    name String
    schedules List<GetWorkflowSchedule>
    scriptDeleted Boolean
    Whether the bound Worker was deleted, leaving this Workflow inactive.
    scriptName String
    triggeredOn String
    accountId String
    filter GetWorkflowFilter
    workflowName String
    className string
    createdOn string
    id string
    The ID of this resource.
    instances {[key: string]: number}
    modifiedOn string
    name string
    schedules GetWorkflowSchedule[]
    scriptDeleted boolean
    Whether the bound Worker was deleted, leaving this Workflow inactive.
    scriptName string
    triggeredOn string
    accountId string
    filter GetWorkflowFilter
    workflowName string
    class_name str
    created_on str
    id str
    The ID of this resource.
    instances Mapping[str, float]
    modified_on str
    name str
    schedules Sequence[GetWorkflowSchedule]
    script_deleted bool
    Whether the bound Worker was deleted, leaving this Workflow inactive.
    script_name str
    triggered_on str
    account_id str
    filter GetWorkflowFilter
    workflow_name str
    className String
    createdOn String
    id String
    The ID of this resource.
    instances Map<Number>
    modifiedOn String
    name String
    schedules List<Property Map>
    scriptDeleted Boolean
    Whether the bound Worker was deleted, leaving this Workflow inactive.
    scriptName String
    triggeredOn String
    accountId String
    filter Property Map
    workflowName String

    Supporting Types

    GetWorkflowFilter

    Search string
    Allows filtering workflows` name.
    Search string
    Allows filtering workflows` name.
    search string
    Allows filtering workflows` name.
    search String
    Allows filtering workflows` name.
    search string
    Allows filtering workflows` name.
    search str
    Allows filtering workflows` name.
    search String
    Allows filtering workflows` name.

    GetWorkflowSchedule

    Cron string
    NextInstance string
    Cron string
    NextInstance string
    cron string
    next_instance string
    cron String
    nextInstance String
    cron string
    nextInstance string
    cron String
    nextInstance String

    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