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

cloudflare.getWorkersRoute

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 exampleWorkersRoute = cloudflare.getWorkersRoute({
        zoneId: "023e105f4ecef8ad9ca31a8372d0c353",
        routeId: "023e105f4ecef8ad9ca31a8372d0c353",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_workers_route = cloudflare.get_workers_route(zone_id="023e105f4ecef8ad9ca31a8372d0c353",
        route_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.LookupWorkersRoute(ctx, &cloudflare.LookupWorkersRouteArgs{
    			ZoneId:  "023e105f4ecef8ad9ca31a8372d0c353",
    			RouteId: "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 exampleWorkersRoute = Cloudflare.GetWorkersRoute.Invoke(new()
        {
            ZoneId = "023e105f4ecef8ad9ca31a8372d0c353",
            RouteId = "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.GetWorkersRouteArgs;
    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 exampleWorkersRoute = CloudflareFunctions.getWorkersRoute(GetWorkersRouteArgs.builder()
                .zoneId("023e105f4ecef8ad9ca31a8372d0c353")
                .routeId("023e105f4ecef8ad9ca31a8372d0c353")
                .build());
    
        }
    }
    
    variables:
      exampleWorkersRoute:
        fn::invoke:
          function: cloudflare:getWorkersRoute
          arguments:
            zoneId: 023e105f4ecef8ad9ca31a8372d0c353
            routeId: 023e105f4ecef8ad9ca31a8372d0c353
    

    Using getWorkersRoute

    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 getWorkersRoute(args: GetWorkersRouteArgs, opts?: InvokeOptions): Promise<GetWorkersRouteResult>
    function getWorkersRouteOutput(args: GetWorkersRouteOutputArgs, opts?: InvokeOptions): Output<GetWorkersRouteResult>
    def get_workers_route(route_id: Optional[str] = None,
                          zone_id: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetWorkersRouteResult
    def get_workers_route_output(route_id: Optional[pulumi.Input[str]] = None,
                          zone_id: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetWorkersRouteResult]
    func LookupWorkersRoute(ctx *Context, args *LookupWorkersRouteArgs, opts ...InvokeOption) (*LookupWorkersRouteResult, error)
    func LookupWorkersRouteOutput(ctx *Context, args *LookupWorkersRouteOutputArgs, opts ...InvokeOption) LookupWorkersRouteResultOutput

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

    public static class GetWorkersRoute 
    {
        public static Task<GetWorkersRouteResult> InvokeAsync(GetWorkersRouteArgs args, InvokeOptions? opts = null)
        public static Output<GetWorkersRouteResult> Invoke(GetWorkersRouteInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetWorkersRouteResult> getWorkersRoute(GetWorkersRouteArgs args, InvokeOptions options)
    public static Output<GetWorkersRouteResult> getWorkersRoute(GetWorkersRouteArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudflare:index/getWorkersRoute:getWorkersRoute
      arguments:
        # arguments dictionary

    The following arguments are supported:

    RouteId string
    Identifier.
    ZoneId string
    Identifier.
    RouteId string
    Identifier.
    ZoneId string
    Identifier.
    routeId String
    Identifier.
    zoneId String
    Identifier.
    routeId string
    Identifier.
    zoneId string
    Identifier.
    route_id str
    Identifier.
    zone_id str
    Identifier.
    routeId String
    Identifier.
    zoneId String
    Identifier.

    getWorkersRoute Result

    The following output properties are available:

    Id string
    Identifier.
    Pattern string
    RouteId string
    Identifier.
    Script string
    Name of the script, used in URLs and route configuration.
    ZoneId string
    Identifier.
    Id string
    Identifier.
    Pattern string
    RouteId string
    Identifier.
    Script string
    Name of the script, used in URLs and route configuration.
    ZoneId string
    Identifier.
    id String
    Identifier.
    pattern String
    routeId String
    Identifier.
    script String
    Name of the script, used in URLs and route configuration.
    zoneId String
    Identifier.
    id string
    Identifier.
    pattern string
    routeId string
    Identifier.
    script string
    Name of the script, used in URLs and route configuration.
    zoneId string
    Identifier.
    id str
    Identifier.
    pattern str
    route_id str
    Identifier.
    script str
    Name of the script, used in URLs and route configuration.
    zone_id str
    Identifier.
    id String
    Identifier.
    pattern String
    routeId String
    Identifier.
    script String
    Name of the script, used in URLs and route configuration.
    zoneId String
    Identifier.

    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