1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. getWorkersDeployment
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

cloudflare.getWorkersDeployment

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleWorkersDeployment = cloudflare.getWorkersDeployment({
        accountId: "023e105f4ecef8ad9ca31a8372d0c353",
        scriptName: "this-is_my_script-01",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_workers_deployment = cloudflare.get_workers_deployment(account_id="023e105f4ecef8ad9ca31a8372d0c353",
        script_name="this-is_my_script-01")
    
    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.LookupWorkersDeployment(ctx, &cloudflare.LookupWorkersDeploymentArgs{
    			AccountId:  "023e105f4ecef8ad9ca31a8372d0c353",
    			ScriptName: "this-is_my_script-01",
    		}, 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 exampleWorkersDeployment = Cloudflare.GetWorkersDeployment.Invoke(new()
        {
            AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
            ScriptName = "this-is_my_script-01",
        });
    
    });
    
    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.GetWorkersDeploymentArgs;
    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 exampleWorkersDeployment = CloudflareFunctions.getWorkersDeployment(GetWorkersDeploymentArgs.builder()
                .accountId("023e105f4ecef8ad9ca31a8372d0c353")
                .scriptName("this-is_my_script-01")
                .build());
    
        }
    }
    
    variables:
      exampleWorkersDeployment:
        fn::invoke:
          function: cloudflare:getWorkersDeployment
          arguments:
            accountId: 023e105f4ecef8ad9ca31a8372d0c353
            scriptName: this-is_my_script-01
    

    Using getWorkersDeployment

    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 getWorkersDeployment(args: GetWorkersDeploymentArgs, opts?: InvokeOptions): Promise<GetWorkersDeploymentResult>
    function getWorkersDeploymentOutput(args: GetWorkersDeploymentOutputArgs, opts?: InvokeOptions): Output<GetWorkersDeploymentResult>
    def get_workers_deployment(account_id: Optional[str] = None,
                               script_name: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetWorkersDeploymentResult
    def get_workers_deployment_output(account_id: Optional[pulumi.Input[str]] = None,
                               script_name: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetWorkersDeploymentResult]
    func LookupWorkersDeployment(ctx *Context, args *LookupWorkersDeploymentArgs, opts ...InvokeOption) (*LookupWorkersDeploymentResult, error)
    func LookupWorkersDeploymentOutput(ctx *Context, args *LookupWorkersDeploymentOutputArgs, opts ...InvokeOption) LookupWorkersDeploymentResultOutput

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

    public static class GetWorkersDeployment 
    {
        public static Task<GetWorkersDeploymentResult> InvokeAsync(GetWorkersDeploymentArgs args, InvokeOptions? opts = null)
        public static Output<GetWorkersDeploymentResult> Invoke(GetWorkersDeploymentInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetWorkersDeploymentResult> getWorkersDeployment(GetWorkersDeploymentArgs args, InvokeOptions options)
    public static Output<GetWorkersDeploymentResult> getWorkersDeployment(GetWorkersDeploymentArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudflare:index/getWorkersDeployment:getWorkersDeployment
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AccountId string
    Identifier.
    ScriptName string
    Name of the script.
    AccountId string
    Identifier.
    ScriptName string
    Name of the script.
    accountId String
    Identifier.
    scriptName String
    Name of the script.
    accountId string
    Identifier.
    scriptName string
    Name of the script.
    account_id str
    Identifier.
    script_name str
    Name of the script.
    accountId String
    Identifier.
    scriptName String
    Name of the script.

    getWorkersDeployment Result

    The following output properties are available:

    AccountId string
    Identifier.
    Deployments List<GetWorkersDeploymentDeployment>
    Id string
    The provider-assigned unique ID for this managed resource.
    ScriptName string
    Name of the script.
    AccountId string
    Identifier.
    Deployments []GetWorkersDeploymentDeployment
    Id string
    The provider-assigned unique ID for this managed resource.
    ScriptName string
    Name of the script.
    accountId String
    Identifier.
    deployments List<GetWorkersDeploymentDeployment>
    id String
    The provider-assigned unique ID for this managed resource.
    scriptName String
    Name of the script.
    accountId string
    Identifier.
    deployments GetWorkersDeploymentDeployment[]
    id string
    The provider-assigned unique ID for this managed resource.
    scriptName string
    Name of the script.
    account_id str
    Identifier.
    deployments Sequence[GetWorkersDeploymentDeployment]
    id str
    The provider-assigned unique ID for this managed resource.
    script_name str
    Name of the script.
    accountId String
    Identifier.
    deployments List<Property Map>
    id String
    The provider-assigned unique ID for this managed resource.
    scriptName String
    Name of the script.

    Supporting Types

    GetWorkersDeploymentDeployment

    annotations Property Map
    authorEmail String
    createdOn String
    id String
    source String
    strategy String
    Available values: "percentage".
    versions List<Property Map>

    GetWorkersDeploymentDeploymentAnnotations

    WorkersMessage string
    Human-readable message about the deployment. Truncated to 100 bytes.
    WorkersMessage string
    Human-readable message about the deployment. Truncated to 100 bytes.
    workersMessage String
    Human-readable message about the deployment. Truncated to 100 bytes.
    workersMessage string
    Human-readable message about the deployment. Truncated to 100 bytes.
    workers_message str
    Human-readable message about the deployment. Truncated to 100 bytes.
    workersMessage String
    Human-readable message about the deployment. Truncated to 100 bytes.

    GetWorkersDeploymentDeploymentVersion

    Percentage double
    VersionId string
    Percentage float64
    VersionId string
    percentage Double
    versionId String
    percentage number
    versionId string
    percentage Number
    versionId 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 v6.1.2 published on Monday, Apr 28, 2025 by Pulumi