Cloudflare v6.8.0 published on Saturday, Aug 30, 2025 by Pulumi
cloudflare.getWorker
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleWorker = cloudflare.getWorker({
accountId: "023e105f4ecef8ad9ca31a8372d0c353",
workerId: "023e105f4ecef8ad9ca31a8372d0c353",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_worker = cloudflare.get_worker(account_id="023e105f4ecef8ad9ca31a8372d0c353",
worker_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.LookupWorker(ctx, &cloudflare.LookupWorkerArgs{
AccountId: "023e105f4ecef8ad9ca31a8372d0c353",
WorkerId: pulumi.StringRef("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 exampleWorker = Cloudflare.GetWorker.Invoke(new()
{
AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
WorkerId = "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.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("023e105f4ecef8ad9ca31a8372d0c353")
.build());
}
}
variables:
exampleWorker:
fn::invoke:
function: cloudflare:getWorker
arguments:
accountId: 023e105f4ecef8ad9ca31a8372d0c353
workerId: 023e105f4ecef8ad9ca31a8372d0c353
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:
- account_
id str - Identifier.
- worker_
id str - Identifier.
getWorker Result
The following output properties are available:
- Account
Id string - Identifier.
- Created
On string - When the Worker was created.
- Id string
- Identifier.
- Logpush bool
- Whether logpush is enabled for the Worker.
- Name string
- Name of the Worker.
- Observability
Get
Worker Observability - Observability settings for the Worker.
- Subdomain
Get
Worker Subdomain - Subdomain settings for the Worker.
- List<string>
- Tags associated with the Worker.
- Tail
Consumers List<GetWorker Tail Consumer> - Other Workers that should consume logs from the Worker.
- Updated
On string - When the Worker was most recently updated.
- Worker
Id string - Identifier.
- Account
Id string - Identifier.
- Created
On string - When the Worker was created.
- Id string
- Identifier.
- Logpush bool
- Whether logpush is enabled for the Worker.
- Name string
- Name of the Worker.
- Observability
Get
Worker Observability - Observability settings for the Worker.
- Subdomain
Get
Worker Subdomain - Subdomain settings for the Worker.
- []string
- Tags associated with the Worker.
- Tail
Consumers []GetWorker Tail Consumer - Other Workers that should consume logs from the Worker.
- Updated
On string - When the Worker was most recently updated.
- Worker
Id string - Identifier.
- account
Id String - Identifier.
- created
On String - When the Worker was created.
- id String
- Identifier.
- logpush Boolean
- Whether logpush is enabled for the Worker.
- name String
- Name of the Worker.
- observability
Get
Worker Observability - Observability settings for the Worker.
- subdomain
Get
Worker Subdomain - Subdomain settings for the Worker.
- List<String>
- Tags associated with the Worker.
- tail
Consumers List<GetWorker Tail Consumer> - Other Workers that should consume logs from the Worker.
- updated
On String - When the Worker was most recently updated.
- worker
Id String - Identifier.
- account
Id string - Identifier.
- created
On string - When the Worker was created.
- id string
- Identifier.
- logpush boolean
- Whether logpush is enabled for the Worker.
- name string
- Name of the Worker.
- observability
Get
Worker Observability - Observability settings for the Worker.
- subdomain
Get
Worker Subdomain - Subdomain settings for the Worker.
- string[]
- Tags associated with the Worker.
- tail
Consumers GetWorker Tail Consumer[] - Other Workers that should consume logs from the Worker.
- updated
On string - When the Worker was most recently updated.
- worker
Id string - Identifier.
- account_
id str - Identifier.
- created_
on str - When the Worker was created.
- id str
- Identifier.
- logpush bool
- Whether logpush is enabled for the Worker.
- name str
- Name of the Worker.
- observability
Get
Worker Observability - Observability settings for the Worker.
- subdomain
Get
Worker Subdomain - Subdomain settings for the Worker.
- Sequence[str]
- Tags associated with the Worker.
- tail_
consumers Sequence[GetWorker Tail Consumer] - Other Workers that should consume logs from the Worker.
- updated_
on str - When the Worker was most recently updated.
- worker_
id str - Identifier.
- account
Id String - Identifier.
- created
On String - When the Worker was created.
- id String
- Identifier.
- logpush Boolean
- Whether logpush is enabled for the Worker.
- name String
- Name of the Worker.
- observability Property Map
- Observability settings for the Worker.
- subdomain Property Map
- Subdomain settings for the Worker.
- List<String>
- Tags associated with the Worker.
- tail
Consumers List<Property Map> - Other Workers that should consume logs from the Worker.
- updated
On String - When the Worker was most recently updated.
- worker
Id String - Identifier.
Supporting Types
GetWorkerObservability
- Enabled bool
- Whether observability is enabled for the Worker.
- Head
Sampling doubleRate - The sampling rate for observability. From 0 to 1 (1 = 100%, 0.1 = 10%).
- Logs
Get
Worker Observability Logs - Log settings for the Worker.
- Enabled bool
- Whether observability is enabled for the Worker.
- Head
Sampling float64Rate - The sampling rate for observability. From 0 to 1 (1 = 100%, 0.1 = 10%).
- Logs
Get
Worker Observability Logs - Log settings for the Worker.
- enabled Boolean
- Whether observability is enabled for the Worker.
- head
Sampling DoubleRate - The sampling rate for observability. From 0 to 1 (1 = 100%, 0.1 = 10%).
- logs
Get
Worker Observability Logs - Log settings for the Worker.
- enabled boolean
- Whether observability is enabled for the Worker.
- head
Sampling numberRate - The sampling rate for observability. From 0 to 1 (1 = 100%, 0.1 = 10%).
- logs
Get
Worker Observability Logs - Log settings for the Worker.
- enabled bool
- Whether observability is enabled for the Worker.
- head_
sampling_ floatrate - The sampling rate for observability. From 0 to 1 (1 = 100%, 0.1 = 10%).
- logs
Get
Worker Observability Logs - Log settings for the Worker.
- enabled Boolean
- Whether observability is enabled for the Worker.
- head
Sampling NumberRate - 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.
- Head
Sampling doubleRate - 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 bool
- Whether logs are enabled for the Worker.
- Head
Sampling float64Rate - 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.
- head
Sampling DoubleRate - The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%).
- invocation
Logs Boolean - Whether invocation logs are enabled for the Worker.
- enabled boolean
- Whether logs are enabled for the Worker.
- head
Sampling numberRate - The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%).
- invocation
Logs boolean - Whether invocation logs are enabled for the Worker.
- enabled bool
- Whether logs are enabled for the Worker.
- head_
sampling_ floatrate - 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.
- head
Sampling NumberRate - The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%).
- invocation
Logs Boolean - Whether invocation logs are enabled for the Worker.
GetWorkerSubdomain
- Enabled bool
- Whether the *.workers.dev subdomain is enabled for the Worker.
- Previews
Enabled bool - 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.
- previews
Enabled Boolean - Whether preview URLs are enabled for the Worker.
- enabled boolean
- Whether the *.workers.dev subdomain is enabled for the Worker.
- previews
Enabled 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.
- previews
Enabled 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.