Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi
cloudflare.getWorkersScripts
Explore with Pulumi AI
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:
- account_
id str - Identifier.
- max_
items int - Max items to fetch, default: 1000
getWorkersScripts Result
The following output properties are available:
- Account
Id string - Identifier.
- Id string
- The provider-assigned unique ID for this managed resource.
- Results
List<Get
Workers Scripts Result> - The items returned by the data source
- Max
Items int - Max items to fetch, default: 1000
- Account
Id string - Identifier.
- Id string
- The provider-assigned unique ID for this managed resource.
- Results
[]Get
Workers Scripts Result - The items returned by the data source
- Max
Items int - Max items to fetch, default: 1000
- account
Id String - Identifier.
- id String
- The provider-assigned unique ID for this managed resource.
- results
List<Get
Workers Scripts Result> - The items returned by the data source
- max
Items Integer - Max items to fetch, default: 1000
- account
Id string - Identifier.
- id string
- The provider-assigned unique ID for this managed resource.
- results
Get
Workers Scripts Result[] - The items returned by the data source
- max
Items number - Max items to fetch, default: 1000
- account_
id str - Identifier.
- id str
- The provider-assigned unique ID for this managed resource.
- results
Sequence[Get
Workers Scripts Result] - The items returned by the data source
- max_
items int - Max items to fetch, default: 1000
- account
Id String - Identifier.
- id String
- The provider-assigned unique ID for this managed resource.
- results List<Property Map>
- The items returned by the data source
- max
Items Number - Max items to fetch, default: 1000
Supporting Types
GetWorkersScriptsResult
- Created
On string - When the script was created.
- Etag string
- 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 string
- 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 string - When the script was last modified.
- Placement
Get
Workers Scripts Result Placement - Configuration for Smart Placement.
- Placement
Mode string - Enables Smart Placement. Available values: "smart".
- Placement
Status string - Status of Smart Placement. Available values: "SUCCESS", "UNSUPPORTEDAPPLICATION", "INSUFFICIENTINVOCATIONS".
- Tail
Consumers List<GetWorkers Scripts Result Tail Consumer> - List of Workers that will consume logs from the attached Worker.
- Usage
Model string - Usage model for the Worker invocations. Available values: "standard".
- Created
On string - When the script was created.
- Etag string
- 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 string
- 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 string - When the script was last modified.
- Placement
Get
Workers Scripts Result Placement - Configuration for Smart Placement.
- Placement
Mode string - Enables Smart Placement. Available values: "smart".
- Placement
Status string - Status of Smart Placement. Available values: "SUCCESS", "UNSUPPORTEDAPPLICATION", "INSUFFICIENTINVOCATIONS".
- Tail
Consumers []GetWorkers Scripts Result Tail Consumer - List of Workers that will consume logs from the attached Worker.
- Usage
Model string - Usage model for the Worker invocations. Available values: "standard".
- created
On String - When the script was created.
- etag String
- Hashed script content, can be used in a If-None-Match header when updating.
- has
Assets Boolean - Whether a Worker contains assets.
- has
Modules 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.
- modified
On String - When the script was last modified.
- placement
Get
Workers Scripts Result Placement - Configuration for Smart Placement.
- placement
Mode String - Enables Smart Placement. Available values: "smart".
- placement
Status String - Status of Smart Placement. Available values: "SUCCESS", "UNSUPPORTEDAPPLICATION", "INSUFFICIENTINVOCATIONS".
- tail
Consumers List<GetWorkers Scripts Result Tail Consumer> - List of Workers that will consume logs from the attached Worker.
- usage
Model String - Usage model for the Worker invocations. Available values: "standard".
- created
On string - When the script was created.
- etag string
- Hashed script content, can be used in a If-None-Match header when updating.
- has
Assets boolean - Whether a Worker contains assets.
- has
Modules 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.
- modified
On string - When the script was last modified.
- placement
Get
Workers Scripts Result Placement - Configuration for Smart Placement.
- placement
Mode string - Enables Smart Placement. Available values: "smart".
- placement
Status string - Status of Smart Placement. Available values: "SUCCESS", "UNSUPPORTEDAPPLICATION", "INSUFFICIENTINVOCATIONS".
- tail
Consumers GetWorkers Scripts Result Tail Consumer[] - List of Workers that will consume logs from the attached Worker.
- usage
Model 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
Get
Workers Scripts Result Placement - Configuration for Smart Placement.
- placement_
mode str - Enables Smart Placement. Available values: "smart".
- placement_
status str - Status of Smart Placement. Available values: "SUCCESS", "UNSUPPORTEDAPPLICATION", "INSUFFICIENTINVOCATIONS".
- tail_
consumers Sequence[GetWorkers Scripts Result Tail Consumer] - List of Workers that will consume logs from the attached Worker.
- usage_
model str - Usage model for the Worker invocations. Available values: "standard".
- created
On String - When the script was created.
- etag String
- Hashed script content, can be used in a If-None-Match header when updating.
- has
Assets Boolean - Whether a Worker contains assets.
- has
Modules 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.
- modified
On String - When the script was last modified.
- placement Property Map
- Configuration for Smart Placement.
- placement
Mode String - Enables Smart Placement. Available values: "smart".
- placement
Status String - Status of Smart Placement. Available values: "SUCCESS", "UNSUPPORTEDAPPLICATION", "INSUFFICIENTINVOCATIONS".
- tail
Consumers List<Property Map> - List of Workers that will consume logs from the attached Worker.
- usage
Model 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.