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

cloudflare.getZone

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 exampleZone = cloudflare.getZone({
        zoneId: "023e105f4ecef8ad9ca31a8372d0c353",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_zone = cloudflare.get_zone(zone_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.LookupZone(ctx, &cloudflare.LookupZoneArgs{
    			ZoneId: pulumi.StringRef("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 exampleZone = Cloudflare.GetZone.Invoke(new()
        {
            ZoneId = "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.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());
    
        }
    }
    
    variables:
      exampleZone:
        fn::invoke:
          function: cloudflare:getZone
          arguments:
            zoneId: 023e105f4ecef8ad9ca31a8372d0c353
    

    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>
    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]
    func LookupZone(ctx *Context, args *LookupZoneArgs, opts ...InvokeOption) (*LookupZoneResult, error)
    func LookupZoneOutput(ctx *Context, args *LookupZoneOutputArgs, opts ...InvokeOption) LookupZoneResultOutput

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

    The following arguments are supported:

    getZone Result

    The following output properties are available:

    Supporting Types

    GetZoneAccount

    Id string
    Identifier
    Name string
    The name of the account
    Id string
    Identifier
    Name string
    The name of the account
    id String
    Identifier
    name String
    The name of the account
    id string
    Identifier
    name string
    The name of the account
    id str
    Identifier
    name str
    The name of the account
    id String
    Identifier
    name String
    The name of the account

    GetZoneFilter

    Match 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 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 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 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 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 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 bool
    The zone is only configured for CDN
    CustomCertificateQuota int
    Number of Custom Certificates the zone can have
    DnsOnly bool
    The zone is only configured for DNS
    FoundationDns bool
    The zone is setup with Foundation DNS
    PageRuleQuota int
    Number of Page Rules a zone can have
    PhishingDetected bool
    The zone has been flagged for phishing
    Step int
    CdnOnly bool
    The zone is only configured for CDN
    CustomCertificateQuota int
    Number of Custom Certificates the zone can have
    DnsOnly bool
    The zone is only configured for DNS
    FoundationDns bool
    The zone is setup with Foundation DNS
    PageRuleQuota int
    Number of Page Rules a zone can have
    PhishingDetected bool
    The zone has been flagged for phishing
    Step int
    cdnOnly Boolean
    The zone is only configured for CDN
    customCertificateQuota Integer
    Number of Custom Certificates the zone can have
    dnsOnly Boolean
    The zone is only configured for DNS
    foundationDns Boolean
    The zone is setup with Foundation DNS
    pageRuleQuota Integer
    Number of Page Rules a zone can have
    phishingDetected Boolean
    The zone has been flagged for phishing
    step Integer
    cdnOnly boolean
    The zone is only configured for CDN
    customCertificateQuota number
    Number of Custom Certificates the zone can have
    dnsOnly boolean
    The zone is only configured for DNS
    foundationDns boolean
    The zone is setup with Foundation DNS
    pageRuleQuota number
    Number of Page Rules a zone can have
    phishingDetected boolean
    The zone has been flagged for phishing
    step number
    cdn_only bool
    The zone is only configured for CDN
    custom_certificate_quota int
    Number of Custom Certificates the zone can have
    dns_only bool
    The zone is only configured for DNS
    foundation_dns bool
    The zone is setup with Foundation DNS
    page_rule_quota int
    Number of Page Rules a zone can have
    phishing_detected bool
    The zone has been flagged for phishing
    step int
    cdnOnly Boolean
    The zone is only configured for CDN
    customCertificateQuota Number
    Number of Custom Certificates the zone can have
    dnsOnly Boolean
    The zone is only configured for DNS
    foundationDns Boolean
    The zone is setup with Foundation DNS
    pageRuleQuota Number
    Number of Page Rules a zone can have
    phishingDetected Boolean
    The zone has been flagged for phishing
    step Number

    GetZoneOwner

    Id string
    Identifier
    Name string
    Name of the owner
    Type string
    The type of owner
    Id string
    Identifier
    Name string
    Name of the owner
    Type string
    The type of owner
    id String
    Identifier
    name String
    Name of the owner
    type String
    The type of owner
    id string
    Identifier
    name string
    Name of the owner
    type string
    The type of owner
    id str
    Identifier
    name str
    Name of the owner
    type str
    The type of owner
    id String
    Identifier
    name String
    Name of the owner
    type 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 logo
    Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi