1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. getZone
Cloudflare v6.3.0 published on Tuesday, Jun 10, 2025 by Pulumi

cloudflare.getZone

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.3.0 published on Tuesday, Jun 10, 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:

    Account GetZoneAccount
    ActivatedOn string
    CnameSuffix string
    CreatedOn string
    DevelopmentMode double
    Id string
    Meta GetZoneMeta
    ModifiedOn string
    Name string
    NameServers List<string>
    OriginalDnshost string
    OriginalNameServers List<string>
    OriginalRegistrar string
    Owner GetZoneOwner
    Paused bool
    Permissions List<string>

    Deprecated: This attribute is deprecated.

    Plan GetZonePlan

    Deprecated: This attribute is deprecated.

    Status string
    Tenant GetZoneTenant
    TenantUnit GetZoneTenantUnit
    Type string
    VanityNameServers List<string>
    VerificationKey string
    Filter GetZoneFilter
    ZoneId string
    Account GetZoneAccount
    ActivatedOn string
    CnameSuffix string
    CreatedOn string
    DevelopmentMode float64
    Id string
    Meta GetZoneMeta
    ModifiedOn string
    Name string
    NameServers []string
    OriginalDnshost string
    OriginalNameServers []string
    OriginalRegistrar string
    Owner GetZoneOwner
    Paused bool
    Permissions []string

    Deprecated: This attribute is deprecated.

    Plan GetZonePlan

    Deprecated: This attribute is deprecated.

    Status string
    Tenant GetZoneTenant
    TenantUnit GetZoneTenantUnit
    Type string
    VanityNameServers []string
    VerificationKey string
    Filter GetZoneFilter
    ZoneId string
    account GetZoneAccount
    activatedOn String
    cnameSuffix String
    createdOn String
    developmentMode Double
    id String
    meta GetZoneMeta
    modifiedOn String
    name String
    nameServers List<String>
    originalDnshost String
    originalNameServers List<String>
    originalRegistrar String
    owner GetZoneOwner
    paused Boolean
    permissions List<String>

    Deprecated: This attribute is deprecated.

    plan GetZonePlan

    Deprecated: This attribute is deprecated.

    status String
    tenant GetZoneTenant
    tenantUnit GetZoneTenantUnit
    type String
    vanityNameServers List<String>
    verificationKey String
    filter GetZoneFilter
    zoneId String
    account GetZoneAccount
    activatedOn string
    cnameSuffix string
    createdOn string
    developmentMode number
    id string
    meta GetZoneMeta
    modifiedOn string
    name string
    nameServers string[]
    originalDnshost string
    originalNameServers string[]
    originalRegistrar string
    owner GetZoneOwner
    paused boolean
    permissions string[]

    Deprecated: This attribute is deprecated.

    plan GetZonePlan

    Deprecated: This attribute is deprecated.

    status string
    tenant GetZoneTenant
    tenantUnit GetZoneTenantUnit
    type string
    vanityNameServers string[]
    verificationKey string
    filter GetZoneFilter
    zoneId string
    account Property Map
    activatedOn String
    cnameSuffix String
    createdOn String
    developmentMode Number
    id String
    meta Property Map
    modifiedOn String
    name String
    nameServers List<String>
    originalDnshost String
    originalNameServers List<String>
    originalRegistrar String
    owner Property Map
    paused Boolean
    permissions List<String>

    Deprecated: This attribute is deprecated.

    plan Property Map

    Deprecated: This attribute is deprecated.

    status String
    tenant Property Map
    tenantUnit Property Map
    type String
    vanityNameServers List<String>
    verificationKey String
    filter Property Map
    zoneId String

    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", "plan.id".
    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", "plan.id".
    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", "plan.id".
    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", "plan.id".
    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", "plan.id".
    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", "plan.id".
    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

    GetZonePlan

    CanSubscribe bool
    States if the subscription can be activated.
    Currency string
    The denomination of the customer.
    ExternallyManaged bool
    If this Zone is managed by another company.
    Frequency string
    How often the customer is billed.
    Id string
    Identifier
    IsSubscribed bool
    States if the subscription active.
    LegacyDiscount bool
    If the legacy discount applies to this Zone.
    LegacyId string
    The legacy name of the plan.
    Name string
    Name of the owner
    Price double
    How much the customer is paying.
    CanSubscribe bool
    States if the subscription can be activated.
    Currency string
    The denomination of the customer.
    ExternallyManaged bool
    If this Zone is managed by another company.
    Frequency string
    How often the customer is billed.
    Id string
    Identifier
    IsSubscribed bool
    States if the subscription active.
    LegacyDiscount bool
    If the legacy discount applies to this Zone.
    LegacyId string
    The legacy name of the plan.
    Name string
    Name of the owner
    Price float64
    How much the customer is paying.
    canSubscribe Boolean
    States if the subscription can be activated.
    currency String
    The denomination of the customer.
    externallyManaged Boolean
    If this Zone is managed by another company.
    frequency String
    How often the customer is billed.
    id String
    Identifier
    isSubscribed Boolean
    States if the subscription active.
    legacyDiscount Boolean
    If the legacy discount applies to this Zone.
    legacyId String
    The legacy name of the plan.
    name String
    Name of the owner
    price Double
    How much the customer is paying.
    canSubscribe boolean
    States if the subscription can be activated.
    currency string
    The denomination of the customer.
    externallyManaged boolean
    If this Zone is managed by another company.
    frequency string
    How often the customer is billed.
    id string
    Identifier
    isSubscribed boolean
    States if the subscription active.
    legacyDiscount boolean
    If the legacy discount applies to this Zone.
    legacyId string
    The legacy name of the plan.
    name string
    Name of the owner
    price number
    How much the customer is paying.
    can_subscribe bool
    States if the subscription can be activated.
    currency str
    The denomination of the customer.
    externally_managed bool
    If this Zone is managed by another company.
    frequency str
    How often the customer is billed.
    id str
    Identifier
    is_subscribed bool
    States if the subscription active.
    legacy_discount bool
    If the legacy discount applies to this Zone.
    legacy_id str
    The legacy name of the plan.
    name str
    Name of the owner
    price float
    How much the customer is paying.
    canSubscribe Boolean
    States if the subscription can be activated.
    currency String
    The denomination of the customer.
    externallyManaged Boolean
    If this Zone is managed by another company.
    frequency String
    How often the customer is billed.
    id String
    Identifier
    isSubscribed Boolean
    States if the subscription active.
    legacyDiscount Boolean
    If the legacy discount applies to this Zone.
    legacyId String
    The legacy name of the plan.
    name String
    Name of the owner
    price Number
    How much the customer is paying.

    GetZoneTenant

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

    GetZoneTenantUnit

    Id string
    Identifier
    Id string
    Identifier
    id String
    Identifier
    id string
    Identifier
    id str
    Identifier
    id 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.3.0 published on Tuesday, Jun 10, 2025 by Pulumi