1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. getWorkersCustomDomains
Cloudflare v6.0.1 published on Wednesday, Apr 16, 2025 by Pulumi

cloudflare.getWorkersCustomDomains

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";

const exampleWorkersCustomDomains = cloudflare.getWorkersCustomDomains({
    accountId: "9a7806061c88ada191ed06f989cc3dac",
    environment: "production",
    hostname: "foo.example.com",
    service: "foo",
    zoneId: "593c9c94de529bbbfaac7c53ced0447d",
    zoneName: "example.com",
});
Copy
import pulumi
import pulumi_cloudflare as cloudflare

example_workers_custom_domains = cloudflare.get_workers_custom_domains(account_id="9a7806061c88ada191ed06f989cc3dac",
    environment="production",
    hostname="foo.example.com",
    service="foo",
    zone_id="593c9c94de529bbbfaac7c53ced0447d",
    zone_name="example.com")
Copy
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.LookupWorkersCustomDomains(ctx, &cloudflare.LookupWorkersCustomDomainsArgs{
			AccountId:   "9a7806061c88ada191ed06f989cc3dac",
			Environment: pulumi.StringRef("production"),
			Hostname:    pulumi.StringRef("foo.example.com"),
			Service:     pulumi.StringRef("foo"),
			ZoneId:      pulumi.StringRef("593c9c94de529bbbfaac7c53ced0447d"),
			ZoneName:    pulumi.StringRef("example.com"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;

return await Deployment.RunAsync(() => 
{
    var exampleWorkersCustomDomains = Cloudflare.GetWorkersCustomDomains.Invoke(new()
    {
        AccountId = "9a7806061c88ada191ed06f989cc3dac",
        Environment = "production",
        Hostname = "foo.example.com",
        Service = "foo",
        ZoneId = "593c9c94de529bbbfaac7c53ced0447d",
        ZoneName = "example.com",
    });

});
Copy
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("9a7806061c88ada191ed06f989cc3dac")
            .environment("production")
            .hostname("foo.example.com")
            .service("foo")
            .zoneId("593c9c94de529bbbfaac7c53ced0447d")
            .zoneName("example.com")
            .build());

    }
}
Copy
variables:
  exampleWorkersCustomDomains:
    fn::invoke:
      function: cloudflare:getWorkersCustomDomains
      arguments:
        accountId: 9a7806061c88ada191ed06f989cc3dac
        environment: production
        hostname: foo.example.com
        service: foo
        zoneId: 593c9c94de529bbbfaac7c53ced0447d
        zoneName: example.com
Copy

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>
Copy
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]
Copy
func LookupWorkersCustomDomains(ctx *Context, args *LookupWorkersCustomDomainsArgs, opts ...InvokeOption) (*LookupWorkersCustomDomainsResult, error)
func LookupWorkersCustomDomainsOutput(ctx *Context, args *LookupWorkersCustomDomainsOutputArgs, opts ...InvokeOption) LookupWorkersCustomDomainsResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetWorkersCustomDomainsResult> getWorkersCustomDomains(GetWorkersCustomDomainsArgs args, InvokeOptions options)
public static Output<GetWorkersCustomDomainsResult> getWorkersCustomDomains(GetWorkersCustomDomainsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: cloudflare:index/getWorkersCustomDomains:getWorkersCustomDomains
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

AccountId This property is required. string
Identifer of the account.
Environment string
Worker environment associated with the zone and hostname.
Hostname string
Hostname of the Worker Domain.
MaxItems int
Max items to fetch, default: 1000
Service string
Worker service associated with the zone and hostname.
ZoneId string
Identifier of the zone.
ZoneName string
Name of the zone.
AccountId This property is required. string
Identifer of the account.
Environment string
Worker environment associated with the zone and hostname.
Hostname string
Hostname of the Worker Domain.
MaxItems int
Max items to fetch, default: 1000
Service string
Worker service associated with the zone and hostname.
ZoneId string
Identifier of the zone.
ZoneName string
Name of the zone.
accountId This property is required. String
Identifer of the account.
environment String
Worker environment associated with the zone and hostname.
hostname String
Hostname of the Worker Domain.
maxItems Integer
Max items to fetch, default: 1000
service String
Worker service associated with the zone and hostname.
zoneId String
Identifier of the zone.
zoneName String
Name of the zone.
accountId This property is required. string
Identifer of the account.
environment string
Worker environment associated with the zone and hostname.
hostname string
Hostname of the Worker Domain.
maxItems number
Max items to fetch, default: 1000
service string
Worker service associated with the zone and hostname.
zoneId string
Identifier of the zone.
zoneName string
Name of the zone.
account_id This property is required. str
Identifer of the account.
environment str
Worker environment associated with the zone and hostname.
hostname str
Hostname of the Worker Domain.
max_items int
Max items to fetch, default: 1000
service str
Worker service associated with the zone and hostname.
zone_id str
Identifier of the zone.
zone_name str
Name of the zone.
accountId This property is required. String
Identifer of the account.
environment String
Worker environment associated with the zone and hostname.
hostname String
Hostname of the Worker Domain.
maxItems Number
Max items to fetch, default: 1000
service String
Worker service associated with the zone and hostname.
zoneId String
Identifier of the zone.
zoneName String
Name of the zone.

getWorkersCustomDomains Result

The following output properties are available:

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

Supporting Types

GetWorkersCustomDomainsResult

Environment This property is required. string
Worker environment associated with the zone and hostname.
Hostname This property is required. string
Hostname of the Worker Domain.
Id This property is required. string
Identifer of the Worker Domain.
Service This property is required. string
Worker service associated with the zone and hostname.
ZoneId This property is required. string
Identifier of the zone.
ZoneName This property is required. string
Name of the zone.
Environment This property is required. string
Worker environment associated with the zone and hostname.
Hostname This property is required. string
Hostname of the Worker Domain.
Id This property is required. string
Identifer of the Worker Domain.
Service This property is required. string
Worker service associated with the zone and hostname.
ZoneId This property is required. string
Identifier of the zone.
ZoneName This property is required. string
Name of the zone.
environment This property is required. String
Worker environment associated with the zone and hostname.
hostname This property is required. String
Hostname of the Worker Domain.
id This property is required. String
Identifer of the Worker Domain.
service This property is required. String
Worker service associated with the zone and hostname.
zoneId This property is required. String
Identifier of the zone.
zoneName This property is required. String
Name of the zone.
environment This property is required. string
Worker environment associated with the zone and hostname.
hostname This property is required. string
Hostname of the Worker Domain.
id This property is required. string
Identifer of the Worker Domain.
service This property is required. string
Worker service associated with the zone and hostname.
zoneId This property is required. string
Identifier of the zone.
zoneName This property is required. string
Name of the zone.
environment This property is required. str
Worker environment associated with the zone and hostname.
hostname This property is required. str
Hostname of the Worker Domain.
id This property is required. str
Identifer of the Worker Domain.
service This property is required. str
Worker service associated with the zone and hostname.
zone_id This property is required. str
Identifier of the zone.
zone_name This property is required. str
Name of the zone.
environment This property is required. String
Worker environment associated with the zone and hostname.
hostname This property is required. String
Hostname of the Worker Domain.
id This property is required. String
Identifer of the Worker Domain.
service This property is required. String
Worker service associated with the zone and hostname.
zoneId This property is required. String
Identifier of the zone.
zoneName This property is required. String
Name of the zone.

Package Details

Repository
Cloudflare pulumi/pulumi-cloudflare
License
Apache-2.0
Notes
This Pulumi package is based on the cloudflare Terraform Provider.