1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. getWorker
Cloudflare v6.11.0 published on Friday, Oct 31, 2025 by Pulumi

cloudflare.getWorker

Start a Neo task
Explain and create a cloudflare.getWorker resource
cloudflare logo
Cloudflare v6.11.0 published on Friday, Oct 31, 2025 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleWorker = cloudflare.getWorker({
        accountId: "023e105f4ecef8ad9ca31a8372d0c353",
        workerId: "worker_id",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_worker = cloudflare.get_worker(account_id="023e105f4ecef8ad9ca31a8372d0c353",
        worker_id="worker_id")
    
    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.LookupWorker(ctx, &cloudflare.LookupWorkerArgs{
    			AccountId: "023e105f4ecef8ad9ca31a8372d0c353",
    			WorkerId:  pulumi.StringRef("worker_id"),
    		}, 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 exampleWorker = Cloudflare.GetWorker.Invoke(new()
        {
            AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
            WorkerId = "worker_id",
        });
    
    });
    
    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.GetWorkerArgs;
    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 exampleWorker = CloudflareFunctions.getWorker(GetWorkerArgs.builder()
                .accountId("023e105f4ecef8ad9ca31a8372d0c353")
                .workerId("worker_id")
                .build());
    
        }
    }
    
    variables:
      exampleWorker:
        fn::invoke:
          function: cloudflare:getWorker
          arguments:
            accountId: 023e105f4ecef8ad9ca31a8372d0c353
            workerId: worker_id
    

    Using getWorker

    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 getWorker(args: GetWorkerArgs, opts?: InvokeOptions): Promise<GetWorkerResult>
    function getWorkerOutput(args: GetWorkerOutputArgs, opts?: InvokeOptions): Output<GetWorkerResult>
    def get_worker(account_id: Optional[str] = None,
                   worker_id: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetWorkerResult
    def get_worker_output(account_id: Optional[pulumi.Input[str]] = None,
                   worker_id: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetWorkerResult]
    func LookupWorker(ctx *Context, args *LookupWorkerArgs, opts ...InvokeOption) (*LookupWorkerResult, error)
    func LookupWorkerOutput(ctx *Context, args *LookupWorkerOutputArgs, opts ...InvokeOption) LookupWorkerResultOutput

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

    public static class GetWorker 
    {
        public static Task<GetWorkerResult> InvokeAsync(GetWorkerArgs args, InvokeOptions? opts = null)
        public static Output<GetWorkerResult> Invoke(GetWorkerInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetWorkerResult> getWorker(GetWorkerArgs args, InvokeOptions options)
    public static Output<GetWorkerResult> getWorker(GetWorkerArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudflare:index/getWorker:getWorker
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AccountId string
    Identifier.
    WorkerId string
    Identifier for the Worker, which can be ID or name.
    AccountId string
    Identifier.
    WorkerId string
    Identifier for the Worker, which can be ID or name.
    accountId String
    Identifier.
    workerId String
    Identifier for the Worker, which can be ID or name.
    accountId string
    Identifier.
    workerId string
    Identifier for the Worker, which can be ID or name.
    account_id str
    Identifier.
    worker_id str
    Identifier for the Worker, which can be ID or name.
    accountId String
    Identifier.
    workerId String
    Identifier for the Worker, which can be ID or name.

    getWorker Result

    The following output properties are available:

    AccountId string
    Identifier.
    CreatedOn string
    When the Worker was created.
    Id string
    Identifier for the Worker, which can be ID or name.
    Logpush bool
    Whether logpush is enabled for the Worker.
    Name string
    Name of the Worker.
    Observability GetWorkerObservability
    Observability settings for the Worker.
    References GetWorkerReferences
    Other resources that reference the Worker and depend on it existing.
    Subdomain GetWorkerSubdomain
    Subdomain settings for the Worker.
    Tags List<string>
    Tags associated with the Worker.
    TailConsumers List<GetWorkerTailConsumer>
    Other Workers that should consume logs from the Worker.
    UpdatedOn string
    When the Worker was most recently updated.
    WorkerId string
    Identifier for the Worker, which can be ID or name.
    AccountId string
    Identifier.
    CreatedOn string
    When the Worker was created.
    Id string
    Identifier for the Worker, which can be ID or name.
    Logpush bool
    Whether logpush is enabled for the Worker.
    Name string
    Name of the Worker.
    Observability GetWorkerObservability
    Observability settings for the Worker.
    References GetWorkerReferences
    Other resources that reference the Worker and depend on it existing.
    Subdomain GetWorkerSubdomain
    Subdomain settings for the Worker.
    Tags []string
    Tags associated with the Worker.
    TailConsumers []GetWorkerTailConsumer
    Other Workers that should consume logs from the Worker.
    UpdatedOn string
    When the Worker was most recently updated.
    WorkerId string
    Identifier for the Worker, which can be ID or name.
    accountId String
    Identifier.
    createdOn String
    When the Worker was created.
    id String
    Identifier for the Worker, which can be ID or name.
    logpush Boolean
    Whether logpush is enabled for the Worker.
    name String
    Name of the Worker.
    observability GetWorkerObservability
    Observability settings for the Worker.
    references GetWorkerReferences
    Other resources that reference the Worker and depend on it existing.
    subdomain GetWorkerSubdomain
    Subdomain settings for the Worker.
    tags List<String>
    Tags associated with the Worker.
    tailConsumers List<GetWorkerTailConsumer>
    Other Workers that should consume logs from the Worker.
    updatedOn String
    When the Worker was most recently updated.
    workerId String
    Identifier for the Worker, which can be ID or name.
    accountId string
    Identifier.
    createdOn string
    When the Worker was created.
    id string
    Identifier for the Worker, which can be ID or name.
    logpush boolean
    Whether logpush is enabled for the Worker.
    name string
    Name of the Worker.
    observability GetWorkerObservability
    Observability settings for the Worker.
    references GetWorkerReferences
    Other resources that reference the Worker and depend on it existing.
    subdomain GetWorkerSubdomain
    Subdomain settings for the Worker.
    tags string[]
    Tags associated with the Worker.
    tailConsumers GetWorkerTailConsumer[]
    Other Workers that should consume logs from the Worker.
    updatedOn string
    When the Worker was most recently updated.
    workerId string
    Identifier for the Worker, which can be ID or name.
    account_id str
    Identifier.
    created_on str
    When the Worker was created.
    id str
    Identifier for the Worker, which can be ID or name.
    logpush bool
    Whether logpush is enabled for the Worker.
    name str
    Name of the Worker.
    observability GetWorkerObservability
    Observability settings for the Worker.
    references GetWorkerReferences
    Other resources that reference the Worker and depend on it existing.
    subdomain GetWorkerSubdomain
    Subdomain settings for the Worker.
    tags Sequence[str]
    Tags associated with the Worker.
    tail_consumers Sequence[GetWorkerTailConsumer]
    Other Workers that should consume logs from the Worker.
    updated_on str
    When the Worker was most recently updated.
    worker_id str
    Identifier for the Worker, which can be ID or name.
    accountId String
    Identifier.
    createdOn String
    When the Worker was created.
    id String
    Identifier for the Worker, which can be ID or name.
    logpush Boolean
    Whether logpush is enabled for the Worker.
    name String
    Name of the Worker.
    observability Property Map
    Observability settings for the Worker.
    references Property Map
    Other resources that reference the Worker and depend on it existing.
    subdomain Property Map
    Subdomain settings for the Worker.
    tags List<String>
    Tags associated with the Worker.
    tailConsumers List<Property Map>
    Other Workers that should consume logs from the Worker.
    updatedOn String
    When the Worker was most recently updated.
    workerId String
    Identifier for the Worker, which can be ID or name.

    Supporting Types

    GetWorkerObservability

    Enabled bool
    Whether observability is enabled for the Worker.
    HeadSamplingRate double
    The sampling rate for observability. From 0 to 1 (1 = 100%, 0.1 = 10%).
    Logs GetWorkerObservabilityLogs
    Log settings for the Worker.
    Enabled bool
    Whether observability is enabled for the Worker.
    HeadSamplingRate float64
    The sampling rate for observability. From 0 to 1 (1 = 100%, 0.1 = 10%).
    Logs GetWorkerObservabilityLogs
    Log settings for the Worker.
    enabled Boolean
    Whether observability is enabled for the Worker.
    headSamplingRate Double
    The sampling rate for observability. From 0 to 1 (1 = 100%, 0.1 = 10%).
    logs GetWorkerObservabilityLogs
    Log settings for the Worker.
    enabled boolean
    Whether observability is enabled for the Worker.
    headSamplingRate number
    The sampling rate for observability. From 0 to 1 (1 = 100%, 0.1 = 10%).
    logs GetWorkerObservabilityLogs
    Log settings for the Worker.
    enabled bool
    Whether observability is enabled for the Worker.
    head_sampling_rate float
    The sampling rate for observability. From 0 to 1 (1 = 100%, 0.1 = 10%).
    logs GetWorkerObservabilityLogs
    Log settings for the Worker.
    enabled Boolean
    Whether observability is enabled for the Worker.
    headSamplingRate Number
    The sampling rate for observability. From 0 to 1 (1 = 100%, 0.1 = 10%).
    logs Property Map
    Log settings for the Worker.

    GetWorkerObservabilityLogs

    Enabled bool
    Whether logs are enabled for the Worker.
    HeadSamplingRate double
    The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%).
    InvocationLogs bool
    Whether invocation logs are enabled for the Worker.
    Enabled bool
    Whether logs are enabled for the Worker.
    HeadSamplingRate float64
    The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%).
    InvocationLogs bool
    Whether invocation logs are enabled for the Worker.
    enabled Boolean
    Whether logs are enabled for the Worker.
    headSamplingRate Double
    The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%).
    invocationLogs Boolean
    Whether invocation logs are enabled for the Worker.
    enabled boolean
    Whether logs are enabled for the Worker.
    headSamplingRate number
    The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%).
    invocationLogs boolean
    Whether invocation logs are enabled for the Worker.
    enabled bool
    Whether logs are enabled for the Worker.
    head_sampling_rate float
    The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%).
    invocation_logs bool
    Whether invocation logs are enabled for the Worker.
    enabled Boolean
    Whether logs are enabled for the Worker.
    headSamplingRate Number
    The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%).
    invocationLogs Boolean
    Whether invocation logs are enabled for the Worker.

    GetWorkerReferences

    DispatchNamespaceOutbounds List<GetWorkerReferencesDispatchNamespaceOutbound>
    Other Workers that reference the Worker as an outbound for a dispatch namespace.
    Domains List<GetWorkerReferencesDomain>
    Custom domains connected to the Worker.
    DurableObjects List<GetWorkerReferencesDurableObject>
    Other Workers that reference Durable Object classes implemented by the Worker.
    Queues List<GetWorkerReferencesQueue>
    Queues that send messages to the Worker.
    Workers List<GetWorkerReferencesWorker>
    Other Workers that reference the Worker using service bindings.
    DispatchNamespaceOutbounds []GetWorkerReferencesDispatchNamespaceOutbound
    Other Workers that reference the Worker as an outbound for a dispatch namespace.
    Domains []GetWorkerReferencesDomain
    Custom domains connected to the Worker.
    DurableObjects []GetWorkerReferencesDurableObject
    Other Workers that reference Durable Object classes implemented by the Worker.
    Queues []GetWorkerReferencesQueue
    Queues that send messages to the Worker.
    Workers []GetWorkerReferencesWorker
    Other Workers that reference the Worker using service bindings.
    dispatchNamespaceOutbounds List<GetWorkerReferencesDispatchNamespaceOutbound>
    Other Workers that reference the Worker as an outbound for a dispatch namespace.
    domains List<GetWorkerReferencesDomain>
    Custom domains connected to the Worker.
    durableObjects List<GetWorkerReferencesDurableObject>
    Other Workers that reference Durable Object classes implemented by the Worker.
    queues List<GetWorkerReferencesQueue>
    Queues that send messages to the Worker.
    workers List<GetWorkerReferencesWorker>
    Other Workers that reference the Worker using service bindings.
    dispatchNamespaceOutbounds GetWorkerReferencesDispatchNamespaceOutbound[]
    Other Workers that reference the Worker as an outbound for a dispatch namespace.
    domains GetWorkerReferencesDomain[]
    Custom domains connected to the Worker.
    durableObjects GetWorkerReferencesDurableObject[]
    Other Workers that reference Durable Object classes implemented by the Worker.
    queues GetWorkerReferencesQueue[]
    Queues that send messages to the Worker.
    workers GetWorkerReferencesWorker[]
    Other Workers that reference the Worker using service bindings.
    dispatch_namespace_outbounds Sequence[GetWorkerReferencesDispatchNamespaceOutbound]
    Other Workers that reference the Worker as an outbound for a dispatch namespace.
    domains Sequence[GetWorkerReferencesDomain]
    Custom domains connected to the Worker.
    durable_objects Sequence[GetWorkerReferencesDurableObject]
    Other Workers that reference Durable Object classes implemented by the Worker.
    queues Sequence[GetWorkerReferencesQueue]
    Queues that send messages to the Worker.
    workers Sequence[GetWorkerReferencesWorker]
    Other Workers that reference the Worker using service bindings.
    dispatchNamespaceOutbounds List<Property Map>
    Other Workers that reference the Worker as an outbound for a dispatch namespace.
    domains List<Property Map>
    Custom domains connected to the Worker.
    durableObjects List<Property Map>
    Other Workers that reference Durable Object classes implemented by the Worker.
    queues List<Property Map>
    Queues that send messages to the Worker.
    workers List<Property Map>
    Other Workers that reference the Worker using service bindings.

    GetWorkerReferencesDispatchNamespaceOutbound

    NamespaceId string
    ID of the dispatch namespace.
    NamespaceName string
    Name of the dispatch namespace.
    WorkerId string
    ID of the Worker using the dispatch namespace.
    WorkerName string
    Name of the Worker using the dispatch namespace.
    NamespaceId string
    ID of the dispatch namespace.
    NamespaceName string
    Name of the dispatch namespace.
    WorkerId string
    ID of the Worker using the dispatch namespace.
    WorkerName string
    Name of the Worker using the dispatch namespace.
    namespaceId String
    ID of the dispatch namespace.
    namespaceName String
    Name of the dispatch namespace.
    workerId String
    ID of the Worker using the dispatch namespace.
    workerName String
    Name of the Worker using the dispatch namespace.
    namespaceId string
    ID of the dispatch namespace.
    namespaceName string
    Name of the dispatch namespace.
    workerId string
    ID of the Worker using the dispatch namespace.
    workerName string
    Name of the Worker using the dispatch namespace.
    namespace_id str
    ID of the dispatch namespace.
    namespace_name str
    Name of the dispatch namespace.
    worker_id str
    ID of the Worker using the dispatch namespace.
    worker_name str
    Name of the Worker using the dispatch namespace.
    namespaceId String
    ID of the dispatch namespace.
    namespaceName String
    Name of the dispatch namespace.
    workerId String
    ID of the Worker using the dispatch namespace.
    workerName String
    Name of the Worker using the dispatch namespace.

    GetWorkerReferencesDomain

    CertificateId string
    ID of the TLS certificate issued for the custom domain.
    Hostname string
    Full hostname of the custom domain, including the zone name.
    Id string
    ID of the custom domain.
    ZoneId string
    ID of the zone.
    ZoneName string
    Name of the zone.
    CertificateId string
    ID of the TLS certificate issued for the custom domain.
    Hostname string
    Full hostname of the custom domain, including the zone name.
    Id string
    ID of the custom domain.
    ZoneId string
    ID of the zone.
    ZoneName string
    Name of the zone.
    certificateId String
    ID of the TLS certificate issued for the custom domain.
    hostname String
    Full hostname of the custom domain, including the zone name.
    id String
    ID of the custom domain.
    zoneId String
    ID of the zone.
    zoneName String
    Name of the zone.
    certificateId string
    ID of the TLS certificate issued for the custom domain.
    hostname string
    Full hostname of the custom domain, including the zone name.
    id string
    ID of the custom domain.
    zoneId string
    ID of the zone.
    zoneName string
    Name of the zone.
    certificate_id str
    ID of the TLS certificate issued for the custom domain.
    hostname str
    Full hostname of the custom domain, including the zone name.
    id str
    ID of the custom domain.
    zone_id str
    ID of the zone.
    zone_name str
    Name of the zone.
    certificateId String
    ID of the TLS certificate issued for the custom domain.
    hostname String
    Full hostname of the custom domain, including the zone name.
    id String
    ID of the custom domain.
    zoneId String
    ID of the zone.
    zoneName String
    Name of the zone.

    GetWorkerReferencesDurableObject

    NamespaceId string
    ID of the Durable Object namespace being used.
    NamespaceName string
    Name of the Durable Object namespace being used.
    WorkerId string
    ID of the Worker using the Durable Object implementation.
    WorkerName string
    Name of the Worker using the Durable Object implementation.
    NamespaceId string
    ID of the Durable Object namespace being used.
    NamespaceName string
    Name of the Durable Object namespace being used.
    WorkerId string
    ID of the Worker using the Durable Object implementation.
    WorkerName string
    Name of the Worker using the Durable Object implementation.
    namespaceId String
    ID of the Durable Object namespace being used.
    namespaceName String
    Name of the Durable Object namespace being used.
    workerId String
    ID of the Worker using the Durable Object implementation.
    workerName String
    Name of the Worker using the Durable Object implementation.
    namespaceId string
    ID of the Durable Object namespace being used.
    namespaceName string
    Name of the Durable Object namespace being used.
    workerId string
    ID of the Worker using the Durable Object implementation.
    workerName string
    Name of the Worker using the Durable Object implementation.
    namespace_id str
    ID of the Durable Object namespace being used.
    namespace_name str
    Name of the Durable Object namespace being used.
    worker_id str
    ID of the Worker using the Durable Object implementation.
    worker_name str
    Name of the Worker using the Durable Object implementation.
    namespaceId String
    ID of the Durable Object namespace being used.
    namespaceName String
    Name of the Durable Object namespace being used.
    workerId String
    ID of the Worker using the Durable Object implementation.
    workerName String
    Name of the Worker using the Durable Object implementation.

    GetWorkerReferencesQueue

    QueueConsumerId string
    ID of the queue consumer configuration.
    QueueId string
    ID of the queue.
    QueueName string
    Name of the queue.
    QueueConsumerId string
    ID of the queue consumer configuration.
    QueueId string
    ID of the queue.
    QueueName string
    Name of the queue.
    queueConsumerId String
    ID of the queue consumer configuration.
    queueId String
    ID of the queue.
    queueName String
    Name of the queue.
    queueConsumerId string
    ID of the queue consumer configuration.
    queueId string
    ID of the queue.
    queueName string
    Name of the queue.
    queue_consumer_id str
    ID of the queue consumer configuration.
    queue_id str
    ID of the queue.
    queue_name str
    Name of the queue.
    queueConsumerId String
    ID of the queue consumer configuration.
    queueId String
    ID of the queue.
    queueName String
    Name of the queue.

    GetWorkerReferencesWorker

    Id string
    ID of the referencing Worker.
    Name string
    Name of the referencing Worker.
    Id string
    ID of the referencing Worker.
    Name string
    Name of the referencing Worker.
    id String
    ID of the referencing Worker.
    name String
    Name of the referencing Worker.
    id string
    ID of the referencing Worker.
    name string
    Name of the referencing Worker.
    id str
    ID of the referencing Worker.
    name str
    Name of the referencing Worker.
    id String
    ID of the referencing Worker.
    name String
    Name of the referencing Worker.

    GetWorkerSubdomain

    Enabled bool
    Whether the *.workers.dev subdomain is enabled for the Worker.
    PreviewsEnabled bool
    Whether preview URLs are enabled for the Worker.
    Enabled bool
    Whether the *.workers.dev subdomain is enabled for the Worker.
    PreviewsEnabled bool
    Whether preview URLs are enabled for the Worker.
    enabled Boolean
    Whether the *.workers.dev subdomain is enabled for the Worker.
    previewsEnabled Boolean
    Whether preview URLs are enabled for the Worker.
    enabled boolean
    Whether the *.workers.dev subdomain is enabled for the Worker.
    previewsEnabled boolean
    Whether preview URLs are enabled for the Worker.
    enabled bool
    Whether the *.workers.dev subdomain is enabled for the Worker.
    previews_enabled bool
    Whether preview URLs are enabled for the Worker.
    enabled Boolean
    Whether the *.workers.dev subdomain is enabled for the Worker.
    previewsEnabled Boolean
    Whether preview URLs are enabled for the Worker.

    GetWorkerTailConsumer

    Name string
    Name of the consumer Worker.
    Name string
    Name of the consumer Worker.
    name String
    Name of the consumer Worker.
    name string
    Name of the consumer Worker.
    name str
    Name of the consumer Worker.
    name String
    Name of the consumer Worker.

    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.11.0 published on Friday, Oct 31, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate