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

cloudflare.getZone

Explore with Pulumi AI

Cloudflare v6.0.1 published on Wednesday, Apr 16, 2025 by Pulumi

Example Usage

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

const exampleZone = cloudflare.getZone({
    zoneId: "023e105f4ecef8ad9ca31a8372d0c353",
});
Copy
import pulumi
import pulumi_cloudflare as cloudflare

example_zone = cloudflare.get_zone(zone_id="023e105f4ecef8ad9ca31a8372d0c353")
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.LookupZone(ctx, &cloudflare.LookupZoneArgs{
			ZoneId: pulumi.StringRef("023e105f4ecef8ad9ca31a8372d0c353"),
		}, 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 exampleZone = Cloudflare.GetZone.Invoke(new()
    {
        ZoneId = "023e105f4ecef8ad9ca31a8372d0c353",
    });

});
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.GetZoneArgs;
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 exampleZone = CloudflareFunctions.getZone(GetZoneArgs.builder()
            .zoneId("023e105f4ecef8ad9ca31a8372d0c353")
            .build());

    }
}
Copy
variables:
  exampleZone:
    fn::invoke:
      function: cloudflare:getZone
      arguments:
        zoneId: 023e105f4ecef8ad9ca31a8372d0c353
Copy

Using getZone

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 getZone(args: GetZoneArgs, opts?: InvokeOptions): Promise<GetZoneResult>
function getZoneOutput(args: GetZoneOutputArgs, opts?: InvokeOptions): Output<GetZoneResult>
Copy
def get_zone(filter: Optional[GetZoneFilter] = None,
             zone_id: Optional[str] = None,
             opts: Optional[InvokeOptions] = None) -> GetZoneResult
def get_zone_output(filter: Optional[pulumi.Input[GetZoneFilterArgs]] = None,
             zone_id: Optional[pulumi.Input[str]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetZoneResult]
Copy
func LookupZone(ctx *Context, args *LookupZoneArgs, opts ...InvokeOption) (*LookupZoneResult, error)
func LookupZoneOutput(ctx *Context, args *LookupZoneOutputArgs, opts ...InvokeOption) LookupZoneResultOutput
Copy

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

public static class GetZone 
{
    public static Task<GetZoneResult> InvokeAsync(GetZoneArgs args, InvokeOptions? opts = null)
    public static Output<GetZoneResult> Invoke(GetZoneInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetZoneResult> getZone(GetZoneArgs args, InvokeOptions options)
public static Output<GetZoneResult> getZone(GetZoneArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: cloudflare:index/getZone:getZone
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

getZone Result

The following output properties are available:

Supporting Types

GetZoneAccount

Id This property is required. string
Identifier
Name This property is required. string
The name of the account
Id This property is required. string
Identifier
Name This property is required. string
The name of the account
id This property is required. String
Identifier
name This property is required. String
The name of the account
id This property is required. string
Identifier
name This property is required. string
The name of the account
id This property is required. str
Identifier
name This property is required. str
The name of the account
id This property is required. String
Identifier
name This property is required. String
The name of the account

GetZoneFilter

Match This property is required. string
Whether to match all search requirements or at least one (any). Available values: "any", "all".
Account GetZoneFilterAccount
Direction string
Direction to order zones. Available values: "asc", "desc".
Name string
A domain name. Optional filter operators can be provided to extend refine the search:

  • equal (default)
  • not_equal
  • starts_with
  • ends_with
  • contains
  • starts_with_case_sensitive
  • ends_with_case_sensitive
  • contains_case_sensitive
Order string
Field to order zones by. Available values: "name", "status", "account.id", "account.name".
Status string
A zone status Available values: "initializing", "pending", "active", "moved".
Match This property is required. string
Whether to match all search requirements or at least one (any). Available values: "any", "all".
Account GetZoneFilterAccount
Direction string
Direction to order zones. Available values: "asc", "desc".
Name string
A domain name. Optional filter operators can be provided to extend refine the search:

  • equal (default)
  • not_equal
  • starts_with
  • ends_with
  • contains
  • starts_with_case_sensitive
  • ends_with_case_sensitive
  • contains_case_sensitive
Order string
Field to order zones by. Available values: "name", "status", "account.id", "account.name".
Status string
A zone status Available values: "initializing", "pending", "active", "moved".
match This property is required. String
Whether to match all search requirements or at least one (any). Available values: "any", "all".
account GetZoneFilterAccount
direction String
Direction to order zones. Available values: "asc", "desc".
name String
A domain name. Optional filter operators can be provided to extend refine the search:

  • equal (default)
  • not_equal
  • starts_with
  • ends_with
  • contains
  • starts_with_case_sensitive
  • ends_with_case_sensitive
  • contains_case_sensitive
order String
Field to order zones by. Available values: "name", "status", "account.id", "account.name".
status String
A zone status Available values: "initializing", "pending", "active", "moved".
match This property is required. string
Whether to match all search requirements or at least one (any). Available values: "any", "all".
account GetZoneFilterAccount
direction string
Direction to order zones. Available values: "asc", "desc".
name string
A domain name. Optional filter operators can be provided to extend refine the search:

  • equal (default)
  • not_equal
  • starts_with
  • ends_with
  • contains
  • starts_with_case_sensitive
  • ends_with_case_sensitive
  • contains_case_sensitive
order string
Field to order zones by. Available values: "name", "status", "account.id", "account.name".
status string
A zone status Available values: "initializing", "pending", "active", "moved".
match This property is required. str
Whether to match all search requirements or at least one (any). Available values: "any", "all".
account GetZoneFilterAccount
direction str
Direction to order zones. Available values: "asc", "desc".
name str
A domain name. Optional filter operators can be provided to extend refine the search:

  • equal (default)
  • not_equal
  • starts_with
  • ends_with
  • contains
  • starts_with_case_sensitive
  • ends_with_case_sensitive
  • contains_case_sensitive
order str
Field to order zones by. Available values: "name", "status", "account.id", "account.name".
status str
A zone status Available values: "initializing", "pending", "active", "moved".
match This property is required. String
Whether to match all search requirements or at least one (any). Available values: "any", "all".
account Property Map
direction String
Direction to order zones. Available values: "asc", "desc".
name String
A domain name. Optional filter operators can be provided to extend refine the search:

  • equal (default)
  • not_equal
  • starts_with
  • ends_with
  • contains
  • starts_with_case_sensitive
  • ends_with_case_sensitive
  • contains_case_sensitive
order String
Field to order zones by. Available values: "name", "status", "account.id", "account.name".
status String
A zone status Available values: "initializing", "pending", "active", "moved".

GetZoneFilterAccount

Id string
An account ID
Name string
An account Name. Optional filter operators can be provided to extend refine the search:

  • equal (default)
  • not_equal
  • starts_with
  • ends_with
  • contains
  • starts_with_case_sensitive
  • ends_with_case_sensitive
  • contains_case_sensitive
Id string
An account ID
Name string
An account Name. Optional filter operators can be provided to extend refine the search:

  • equal (default)
  • not_equal
  • starts_with
  • ends_with
  • contains
  • starts_with_case_sensitive
  • ends_with_case_sensitive
  • contains_case_sensitive
id String
An account ID
name String
An account Name. Optional filter operators can be provided to extend refine the search:

  • equal (default)
  • not_equal
  • starts_with
  • ends_with
  • contains
  • starts_with_case_sensitive
  • ends_with_case_sensitive
  • contains_case_sensitive
id string
An account ID
name string
An account Name. Optional filter operators can be provided to extend refine the search:

  • equal (default)
  • not_equal
  • starts_with
  • ends_with
  • contains
  • starts_with_case_sensitive
  • ends_with_case_sensitive
  • contains_case_sensitive
id str
An account ID
name str
An account Name. Optional filter operators can be provided to extend refine the search:

  • equal (default)
  • not_equal
  • starts_with
  • ends_with
  • contains
  • starts_with_case_sensitive
  • ends_with_case_sensitive
  • contains_case_sensitive
id String
An account ID
name String
An account Name. Optional filter operators can be provided to extend refine the search:

  • equal (default)
  • not_equal
  • starts_with
  • ends_with
  • contains
  • starts_with_case_sensitive
  • ends_with_case_sensitive
  • contains_case_sensitive

GetZoneMeta

CdnOnly This property is required. bool
The zone is only configured for CDN
CustomCertificateQuota This property is required. int
Number of Custom Certificates the zone can have
DnsOnly This property is required. bool
The zone is only configured for DNS
FoundationDns This property is required. bool
The zone is setup with Foundation DNS
PageRuleQuota This property is required. int
Number of Page Rules a zone can have
PhishingDetected This property is required. bool
The zone has been flagged for phishing
Step This property is required. int
CdnOnly This property is required. bool
The zone is only configured for CDN
CustomCertificateQuota This property is required. int
Number of Custom Certificates the zone can have
DnsOnly This property is required. bool
The zone is only configured for DNS
FoundationDns This property is required. bool
The zone is setup with Foundation DNS
PageRuleQuota This property is required. int
Number of Page Rules a zone can have
PhishingDetected This property is required. bool
The zone has been flagged for phishing
Step This property is required. int
cdnOnly This property is required. Boolean
The zone is only configured for CDN
customCertificateQuota This property is required. Integer
Number of Custom Certificates the zone can have
dnsOnly This property is required. Boolean
The zone is only configured for DNS
foundationDns This property is required. Boolean
The zone is setup with Foundation DNS
pageRuleQuota This property is required. Integer
Number of Page Rules a zone can have
phishingDetected This property is required. Boolean
The zone has been flagged for phishing
step This property is required. Integer
cdnOnly This property is required. boolean
The zone is only configured for CDN
customCertificateQuota This property is required. number
Number of Custom Certificates the zone can have
dnsOnly This property is required. boolean
The zone is only configured for DNS
foundationDns This property is required. boolean
The zone is setup with Foundation DNS
pageRuleQuota This property is required. number
Number of Page Rules a zone can have
phishingDetected This property is required. boolean
The zone has been flagged for phishing
step This property is required. number
cdn_only This property is required. bool
The zone is only configured for CDN
custom_certificate_quota This property is required. int
Number of Custom Certificates the zone can have
dns_only This property is required. bool
The zone is only configured for DNS
foundation_dns This property is required. bool
The zone is setup with Foundation DNS
page_rule_quota This property is required. int
Number of Page Rules a zone can have
phishing_detected This property is required. bool
The zone has been flagged for phishing
step This property is required. int
cdnOnly This property is required. Boolean
The zone is only configured for CDN
customCertificateQuota This property is required. Number
Number of Custom Certificates the zone can have
dnsOnly This property is required. Boolean
The zone is only configured for DNS
foundationDns This property is required. Boolean
The zone is setup with Foundation DNS
pageRuleQuota This property is required. Number
Number of Page Rules a zone can have
phishingDetected This property is required. Boolean
The zone has been flagged for phishing
step This property is required. Number

GetZoneOwner

Id This property is required. string
Identifier
Name This property is required. string
Name of the owner
Type This property is required. string
The type of owner
Id This property is required. string
Identifier
Name This property is required. string
Name of the owner
Type This property is required. string
The type of owner
id This property is required. String
Identifier
name This property is required. String
Name of the owner
type This property is required. String
The type of owner
id This property is required. string
Identifier
name This property is required. string
Name of the owner
type This property is required. string
The type of owner
id This property is required. str
Identifier
name This property is required. str
Name of the owner
type This property is required. str
The type of owner
id This property is required. String
Identifier
name This property is required. String
Name of the owner
type This property is required. String
The type of owner

Package Details

Repository
Cloudflare pulumi/pulumi-cloudflare
License
Apache-2.0
Notes
This Pulumi package is based on the cloudflare Terraform Provider.
Cloudflare v6.0.1 published on Wednesday, Apr 16, 2025 by Pulumi