1. Packages
  2. Packages
  3. Cloudflare Provider
  4. API Docs
  5. getWorkersCustomDomains
Viewing docs for Cloudflare v6.15.0
published on Saturday, May 2, 2026 by Pulumi
cloudflare logo
Viewing docs for Cloudflare v6.15.0
published on Saturday, May 2, 2026 by Pulumi

    Accepted Permissions

    • Workers Scripts Read
    • Workers Scripts Write

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleWorkersCustomDomains = cloudflare.getWorkersCustomDomains({
        accountId: "023e105f4ecef8ad9ca31a8372d0c353",
        environment: "production",
        hostname: "app.example.com",
        service: "my-worker",
        zoneId: "593c9c94de529bbbfaac7c53ced0447d",
        zoneName: "example.com",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_workers_custom_domains = cloudflare.get_workers_custom_domains(account_id="023e105f4ecef8ad9ca31a8372d0c353",
        environment="production",
        hostname="app.example.com",
        service="my-worker",
        zone_id="593c9c94de529bbbfaac7c53ced0447d",
        zone_name="example.com")
    
    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.GetWorkersCustomDomains(ctx, &cloudflare.LookupWorkersCustomDomainsArgs{
    			AccountId:   pulumi.StringRef("023e105f4ecef8ad9ca31a8372d0c353"),
    			Environment: pulumi.StringRef("production"),
    			Hostname:    pulumi.StringRef("app.example.com"),
    			Service:     pulumi.StringRef("my-worker"),
    			ZoneId:      pulumi.StringRef("593c9c94de529bbbfaac7c53ced0447d"),
    			ZoneName:    pulumi.StringRef("example.com"),
    		}, 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 exampleWorkersCustomDomains = Cloudflare.Index.GetWorkersCustomDomains.Invoke(new()
        {
            AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
            Environment = "production",
            Hostname = "app.example.com",
            Service = "my-worker",
            ZoneId = "593c9c94de529bbbfaac7c53ced0447d",
            ZoneName = "example.com",
        });
    
    });
    
    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.GetWorkersCustomDomainsArgs;
    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 exampleWorkersCustomDomains = CloudflareFunctions.getWorkersCustomDomains(GetWorkersCustomDomainsArgs.builder()
                .accountId("023e105f4ecef8ad9ca31a8372d0c353")
                .environment("production")
                .hostname("app.example.com")
                .service("my-worker")
                .zoneId("593c9c94de529bbbfaac7c53ced0447d")
                .zoneName("example.com")
                .build());
    
        }
    }
    
    variables:
      exampleWorkersCustomDomains:
        fn::invoke:
          function: cloudflare:getWorkersCustomDomains
          arguments:
            accountId: 023e105f4ecef8ad9ca31a8372d0c353
            environment: production
            hostname: app.example.com
            service: my-worker
            zoneId: 593c9c94de529bbbfaac7c53ced0447d
            zoneName: example.com
    

    Using getWorkersCustomDomains

    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 getWorkersCustomDomains(args: GetWorkersCustomDomainsArgs, opts?: InvokeOptions): Promise<GetWorkersCustomDomainsResult>
    function getWorkersCustomDomainsOutput(args: GetWorkersCustomDomainsOutputArgs, opts?: InvokeOptions): Output<GetWorkersCustomDomainsResult>
    def get_workers_custom_domains(account_id: Optional[str] = None,
                                   environment: Optional[str] = None,
                                   hostname: Optional[str] = None,
                                   max_items: Optional[int] = None,
                                   service: Optional[str] = None,
                                   zone_id: Optional[str] = None,
                                   zone_name: Optional[str] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetWorkersCustomDomainsResult
    def get_workers_custom_domains_output(account_id: Optional[pulumi.Input[str]] = None,
                                   environment: Optional[pulumi.Input[str]] = None,
                                   hostname: Optional[pulumi.Input[str]] = None,
                                   max_items: Optional[pulumi.Input[int]] = None,
                                   service: Optional[pulumi.Input[str]] = None,
                                   zone_id: Optional[pulumi.Input[str]] = None,
                                   zone_name: Optional[pulumi.Input[str]] = None,
                                   opts: Optional[InvokeOptions] = None) -> Output[GetWorkersCustomDomainsResult]
    func LookupWorkersCustomDomains(ctx *Context, args *LookupWorkersCustomDomainsArgs, opts ...InvokeOption) (*LookupWorkersCustomDomainsResult, error)
    func LookupWorkersCustomDomainsOutput(ctx *Context, args *LookupWorkersCustomDomainsOutputArgs, opts ...InvokeOption) LookupWorkersCustomDomainsResultOutput

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

    public static class GetWorkersCustomDomains 
    {
        public static Task<GetWorkersCustomDomainsResult> InvokeAsync(GetWorkersCustomDomainsArgs args, InvokeOptions? opts = null)
        public static Output<GetWorkersCustomDomainsResult> Invoke(GetWorkersCustomDomainsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetWorkersCustomDomainsResult> getWorkersCustomDomains(GetWorkersCustomDomainsArgs args, InvokeOptions options)
    public static Output<GetWorkersCustomDomainsResult> getWorkersCustomDomains(GetWorkersCustomDomainsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudflare:index/getWorkersCustomDomains:getWorkersCustomDomains
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AccountId string
    Identifier.
    Environment string
    Worker environment associated with the domain.
    Hostname string
    Hostname of the domain.
    MaxItems int
    Max items to fetch, default: 1000
    Service string
    Name of the Worker associated with the domain.
    ZoneId string
    ID of the zone containing the domain hostname.
    ZoneName string
    Name of the zone containing the domain hostname.
    AccountId string
    Identifier.
    Environment string
    Worker environment associated with the domain.
    Hostname string
    Hostname of the domain.
    MaxItems int
    Max items to fetch, default: 1000
    Service string
    Name of the Worker associated with the domain.
    ZoneId string
    ID of the zone containing the domain hostname.
    ZoneName string
    Name of the zone containing the domain hostname.
    accountId String
    Identifier.
    environment String
    Worker environment associated with the domain.
    hostname String
    Hostname of the domain.
    maxItems Integer
    Max items to fetch, default: 1000
    service String
    Name of the Worker associated with the domain.
    zoneId String
    ID of the zone containing the domain hostname.
    zoneName String
    Name of the zone containing the domain hostname.
    accountId string
    Identifier.
    environment string
    Worker environment associated with the domain.
    hostname string
    Hostname of the domain.
    maxItems number
    Max items to fetch, default: 1000
    service string
    Name of the Worker associated with the domain.
    zoneId string
    ID of the zone containing the domain hostname.
    zoneName string
    Name of the zone containing the domain hostname.
    account_id str
    Identifier.
    environment str
    Worker environment associated with the domain.
    hostname str
    Hostname of the domain.
    max_items int
    Max items to fetch, default: 1000
    service str
    Name of the Worker associated with the domain.
    zone_id str
    ID of the zone containing the domain hostname.
    zone_name str
    Name of the zone containing the domain hostname.
    accountId String
    Identifier.
    environment String
    Worker environment associated with the domain.
    hostname String
    Hostname of the domain.
    maxItems Number
    Max items to fetch, default: 1000
    service String
    Name of the Worker associated with the domain.
    zoneId String
    ID of the zone containing the domain hostname.
    zoneName String
    Name of the zone containing the domain hostname.

    getWorkersCustomDomains Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Results List<GetWorkersCustomDomainsResult>
    The items returned by the data source
    AccountId string
    Identifier.
    Environment string
    Worker environment associated with the domain.
    Hostname string
    Hostname of the domain.
    MaxItems int
    Max items to fetch, default: 1000
    Service string
    Name of the Worker associated with the domain.
    ZoneId string
    ID of the zone containing the domain hostname.
    ZoneName string
    Name of the zone containing the domain hostname.
    Id string
    The provider-assigned unique ID for this managed resource.
    Results []GetWorkersCustomDomainsResult
    The items returned by the data source
    AccountId string
    Identifier.
    Environment string
    Worker environment associated with the domain.
    Hostname string
    Hostname of the domain.
    MaxItems int
    Max items to fetch, default: 1000
    Service string
    Name of the Worker associated with the domain.
    ZoneId string
    ID of the zone containing the domain hostname.
    ZoneName string
    Name of the zone containing the domain hostname.
    id String
    The provider-assigned unique ID for this managed resource.
    results List<GetWorkersCustomDomainsResult>
    The items returned by the data source
    accountId String
    Identifier.
    environment String
    Worker environment associated with the domain.
    hostname String
    Hostname of the domain.
    maxItems Integer
    Max items to fetch, default: 1000
    service String
    Name of the Worker associated with the domain.
    zoneId String
    ID of the zone containing the domain hostname.
    zoneName String
    Name of the zone containing the domain hostname.
    id string
    The provider-assigned unique ID for this managed resource.
    results GetWorkersCustomDomainsResult[]
    The items returned by the data source
    accountId string
    Identifier.
    environment string
    Worker environment associated with the domain.
    hostname string
    Hostname of the domain.
    maxItems number
    Max items to fetch, default: 1000
    service string
    Name of the Worker associated with the domain.
    zoneId string
    ID of the zone containing the domain hostname.
    zoneName string
    Name of the zone containing the domain hostname.
    id str
    The provider-assigned unique ID for this managed resource.
    results Sequence[GetWorkersCustomDomainsResult]
    The items returned by the data source
    account_id str
    Identifier.
    environment str
    Worker environment associated with the domain.
    hostname str
    Hostname of the domain.
    max_items int
    Max items to fetch, default: 1000
    service str
    Name of the Worker associated with the domain.
    zone_id str
    ID of the zone containing the domain hostname.
    zone_name str
    Name of the zone containing the domain hostname.
    id String
    The provider-assigned unique ID for this managed resource.
    results List<Property Map>
    The items returned by the data source
    accountId String
    Identifier.
    environment String
    Worker environment associated with the domain.
    hostname String
    Hostname of the domain.
    maxItems Number
    Max items to fetch, default: 1000
    service String
    Name of the Worker associated with the domain.
    zoneId String
    ID of the zone containing the domain hostname.
    zoneName String
    Name of the zone containing the domain hostname.

    Supporting Types

    GetWorkersCustomDomainsResult

    CertId string
    ID of the TLS certificate issued for the domain.
    Environment string
    Worker environment associated with the domain.

    Deprecated: This attribute is deprecated.

    Hostname string
    Hostname of the domain. Can be either the zone apex or a subdomain of the zone. Requests to this hostname will be routed to the configured Worker.
    Id string
    Immutable ID of the domain.
    Service string
    Name of the Worker associated with the domain. Requests to the configured hostname will be routed to this Worker.
    ZoneId string
    ID of the zone containing the domain hostname.
    ZoneName string
    Name of the zone containing the domain hostname.
    CertId string
    ID of the TLS certificate issued for the domain.
    Environment string
    Worker environment associated with the domain.

    Deprecated: This attribute is deprecated.

    Hostname string
    Hostname of the domain. Can be either the zone apex or a subdomain of the zone. Requests to this hostname will be routed to the configured Worker.
    Id string
    Immutable ID of the domain.
    Service string
    Name of the Worker associated with the domain. Requests to the configured hostname will be routed to this Worker.
    ZoneId string
    ID of the zone containing the domain hostname.
    ZoneName string
    Name of the zone containing the domain hostname.
    certId String
    ID of the TLS certificate issued for the domain.
    environment String
    Worker environment associated with the domain.

    Deprecated: This attribute is deprecated.

    hostname String
    Hostname of the domain. Can be either the zone apex or a subdomain of the zone. Requests to this hostname will be routed to the configured Worker.
    id String
    Immutable ID of the domain.
    service String
    Name of the Worker associated with the domain. Requests to the configured hostname will be routed to this Worker.
    zoneId String
    ID of the zone containing the domain hostname.
    zoneName String
    Name of the zone containing the domain hostname.
    certId string
    ID of the TLS certificate issued for the domain.
    environment string
    Worker environment associated with the domain.

    Deprecated: This attribute is deprecated.

    hostname string
    Hostname of the domain. Can be either the zone apex or a subdomain of the zone. Requests to this hostname will be routed to the configured Worker.
    id string
    Immutable ID of the domain.
    service string
    Name of the Worker associated with the domain. Requests to the configured hostname will be routed to this Worker.
    zoneId string
    ID of the zone containing the domain hostname.
    zoneName string
    Name of the zone containing the domain hostname.
    cert_id str
    ID of the TLS certificate issued for the domain.
    environment str
    Worker environment associated with the domain.

    Deprecated: This attribute is deprecated.

    hostname str
    Hostname of the domain. Can be either the zone apex or a subdomain of the zone. Requests to this hostname will be routed to the configured Worker.
    id str
    Immutable ID of the domain.
    service str
    Name of the Worker associated with the domain. Requests to the configured hostname will be routed to this Worker.
    zone_id str
    ID of the zone containing the domain hostname.
    zone_name str
    Name of the zone containing the domain hostname.
    certId String
    ID of the TLS certificate issued for the domain.
    environment String
    Worker environment associated with the domain.

    Deprecated: This attribute is deprecated.

    hostname String
    Hostname of the domain. Can be either the zone apex or a subdomain of the zone. Requests to this hostname will be routed to the configured Worker.
    id String
    Immutable ID of the domain.
    service String
    Name of the Worker associated with the domain. Requests to the configured hostname will be routed to this Worker.
    zoneId String
    ID of the zone containing the domain hostname.
    zoneName String
    Name of the zone containing the domain hostname.

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Viewing docs for Cloudflare v6.15.0
    published on Saturday, May 2, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.