Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi
cloudflare.getZones
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleZones = cloudflare.getZones({
account: {
id: "id",
name: "name",
},
direction: "desc",
name: "name",
order: "status",
status: "initializing",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_zones = cloudflare.get_zones(account={
"id": "id",
"name": "name",
},
direction="desc",
name="name",
order="status",
status="initializing")
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.LookupZones(ctx, &cloudflare.LookupZonesArgs{
Account: cloudflare.GetZonesAccount{
Id: pulumi.StringRef("id"),
Name: pulumi.StringRef("name"),
},
Direction: pulumi.StringRef("desc"),
Name: pulumi.StringRef("name"),
Order: pulumi.StringRef("status"),
Status: pulumi.StringRef("initializing"),
}, 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 exampleZones = Cloudflare.GetZones.Invoke(new()
{
Account = new Cloudflare.Inputs.GetZonesAccountInputArgs
{
Id = "id",
Name = "name",
},
Direction = "desc",
Name = "name",
Order = "status",
Status = "initializing",
});
});
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.GetZonesArgs;
import com.pulumi.cloudflare.inputs.GetZonesAccountArgs;
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 exampleZones = CloudflareFunctions.getZones(GetZonesArgs.builder()
.account(GetZonesAccountArgs.builder()
.id("id")
.name("name")
.build())
.direction("desc")
.name("name")
.order("status")
.status("initializing")
.build());
}
}
variables:
exampleZones:
fn::invoke:
function: cloudflare:getZones
arguments:
account:
id: id
name: name
direction: desc
name: name
order: status
status: initializing
Using getZones
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 getZones(args: GetZonesArgs, opts?: InvokeOptions): Promise<GetZonesResult>
function getZonesOutput(args: GetZonesOutputArgs, opts?: InvokeOptions): Output<GetZonesResult>
def get_zones(account: Optional[GetZonesAccount] = None,
direction: Optional[str] = None,
match: Optional[str] = None,
max_items: Optional[int] = None,
name: Optional[str] = None,
order: Optional[str] = None,
status: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetZonesResult
def get_zones_output(account: Optional[pulumi.Input[GetZonesAccountArgs]] = None,
direction: Optional[pulumi.Input[str]] = None,
match: Optional[pulumi.Input[str]] = None,
max_items: Optional[pulumi.Input[int]] = None,
name: Optional[pulumi.Input[str]] = None,
order: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetZonesResult]
func LookupZones(ctx *Context, args *LookupZonesArgs, opts ...InvokeOption) (*LookupZonesResult, error)
func LookupZonesOutput(ctx *Context, args *LookupZonesOutputArgs, opts ...InvokeOption) LookupZonesResultOutput
> Note: This function is named LookupZones
in the Go SDK.
public static class GetZones
{
public static Task<GetZonesResult> InvokeAsync(GetZonesArgs args, InvokeOptions? opts = null)
public static Output<GetZonesResult> Invoke(GetZonesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetZonesResult> getZones(GetZonesArgs args, InvokeOptions options)
public static Output<GetZonesResult> getZones(GetZonesArgs args, InvokeOptions options)
fn::invoke:
function: cloudflare:index/getZones:getZones
arguments:
# arguments dictionary
The following arguments are supported:
getZones Result
The following output properties are available:
Supporting Types
GetZonesAccount
GetZonesResult
- Account
Get
Zones Result Account - The account the zone belongs to
- Activated
On string - The last time proof of ownership was detected and the zone was made active
- Created
On string - When the zone was created
- Development
Mode double - The interval (in seconds) from when development mode expires (positive integer) or last expired (negative integer) for the domain. If development mode has never been enabled, this value is 0.
- Id string
- Identifier
- Meta
Get
Zones Result Meta - Metadata about the zone
- Modified
On string - When the zone was last modified
- Name string
- The domain name
- Name
Servers List<string> - The name servers Cloudflare assigns to a zone
- Original
Dnshost string - DNS host at the time of switching to Cloudflare
- Original
Name List<string>Servers - Original name servers before moving to Cloudflare
- Original
Registrar string - Registrar for the domain at the time of switching to Cloudflare
- Owner
Get
Zones Result Owner - The owner of the zone
- Paused bool
- Indicates whether the zone is only using Cloudflare DNS services. A true value means the zone will not receive security or performance benefits.
- Status string
- The zone status on Cloudflare. Available values: "initializing", "pending", "active", "moved".
- Type string
- A full zone implies that DNS is hosted with Cloudflare. A partial zone is typically a partner-hosted zone or a CNAME setup. Available values: "full", "partial", "secondary", "internal".
- Vanity
Name List<string>Servers - An array of domains used for custom name servers. This is only available for Business and Enterprise plans.
- Verification
Key string - Verification key for partial zone setup.
- Account
Get
Zones Result Account - The account the zone belongs to
- Activated
On string - The last time proof of ownership was detected and the zone was made active
- Created
On string - When the zone was created
- Development
Mode float64 - The interval (in seconds) from when development mode expires (positive integer) or last expired (negative integer) for the domain. If development mode has never been enabled, this value is 0.
- Id string
- Identifier
- Meta
Get
Zones Result Meta - Metadata about the zone
- Modified
On string - When the zone was last modified
- Name string
- The domain name
- Name
Servers []string - The name servers Cloudflare assigns to a zone
- Original
Dnshost string - DNS host at the time of switching to Cloudflare
- Original
Name []stringServers - Original name servers before moving to Cloudflare
- Original
Registrar string - Registrar for the domain at the time of switching to Cloudflare
- Owner
Get
Zones Result Owner - The owner of the zone
- Paused bool
- Indicates whether the zone is only using Cloudflare DNS services. A true value means the zone will not receive security or performance benefits.
- Status string
- The zone status on Cloudflare. Available values: "initializing", "pending", "active", "moved".
- Type string
- A full zone implies that DNS is hosted with Cloudflare. A partial zone is typically a partner-hosted zone or a CNAME setup. Available values: "full", "partial", "secondary", "internal".
- Vanity
Name []stringServers - An array of domains used for custom name servers. This is only available for Business and Enterprise plans.
- Verification
Key string - Verification key for partial zone setup.
- account
Get
Zones Result Account - The account the zone belongs to
- activated
On String - The last time proof of ownership was detected and the zone was made active
- created
On String - When the zone was created
- development
Mode Double - The interval (in seconds) from when development mode expires (positive integer) or last expired (negative integer) for the domain. If development mode has never been enabled, this value is 0.
- id String
- Identifier
- meta
Get
Zones Result Meta - Metadata about the zone
- modified
On String - When the zone was last modified
- name String
- The domain name
- name
Servers List<String> - The name servers Cloudflare assigns to a zone
- original
Dnshost String - DNS host at the time of switching to Cloudflare
- original
Name List<String>Servers - Original name servers before moving to Cloudflare
- original
Registrar String - Registrar for the domain at the time of switching to Cloudflare
- owner
Get
Zones Result Owner - The owner of the zone
- paused Boolean
- Indicates whether the zone is only using Cloudflare DNS services. A true value means the zone will not receive security or performance benefits.
- status String
- The zone status on Cloudflare. Available values: "initializing", "pending", "active", "moved".
- type String
- A full zone implies that DNS is hosted with Cloudflare. A partial zone is typically a partner-hosted zone or a CNAME setup. Available values: "full", "partial", "secondary", "internal".
- vanity
Name List<String>Servers - An array of domains used for custom name servers. This is only available for Business and Enterprise plans.
- verification
Key String - Verification key for partial zone setup.
- account
Get
Zones Result Account - The account the zone belongs to
- activated
On string - The last time proof of ownership was detected and the zone was made active
- created
On string - When the zone was created
- development
Mode number - The interval (in seconds) from when development mode expires (positive integer) or last expired (negative integer) for the domain. If development mode has never been enabled, this value is 0.
- id string
- Identifier
- meta
Get
Zones Result Meta - Metadata about the zone
- modified
On string - When the zone was last modified
- name string
- The domain name
- name
Servers string[] - The name servers Cloudflare assigns to a zone
- original
Dnshost string - DNS host at the time of switching to Cloudflare
- original
Name string[]Servers - Original name servers before moving to Cloudflare
- original
Registrar string - Registrar for the domain at the time of switching to Cloudflare
- owner
Get
Zones Result Owner - The owner of the zone
- paused boolean
- Indicates whether the zone is only using Cloudflare DNS services. A true value means the zone will not receive security or performance benefits.
- status string
- The zone status on Cloudflare. Available values: "initializing", "pending", "active", "moved".
- type string
- A full zone implies that DNS is hosted with Cloudflare. A partial zone is typically a partner-hosted zone or a CNAME setup. Available values: "full", "partial", "secondary", "internal".
- vanity
Name string[]Servers - An array of domains used for custom name servers. This is only available for Business and Enterprise plans.
- verification
Key string - Verification key for partial zone setup.
- account
Get
Zones Result Account - The account the zone belongs to
- activated_
on str - The last time proof of ownership was detected and the zone was made active
- created_
on str - When the zone was created
- development_
mode float - The interval (in seconds) from when development mode expires (positive integer) or last expired (negative integer) for the domain. If development mode has never been enabled, this value is 0.
- id str
- Identifier
- meta
Get
Zones Result Meta - Metadata about the zone
- modified_
on str - When the zone was last modified
- name str
- The domain name
- name_
servers Sequence[str] - The name servers Cloudflare assigns to a zone
- original_
dnshost str - DNS host at the time of switching to Cloudflare
- original_
name_ Sequence[str]servers - Original name servers before moving to Cloudflare
- original_
registrar str - Registrar for the domain at the time of switching to Cloudflare
- owner
Get
Zones Result Owner - The owner of the zone
- paused bool
- Indicates whether the zone is only using Cloudflare DNS services. A true value means the zone will not receive security or performance benefits.
- status str
- The zone status on Cloudflare. Available values: "initializing", "pending", "active", "moved".
- type str
- A full zone implies that DNS is hosted with Cloudflare. A partial zone is typically a partner-hosted zone or a CNAME setup. Available values: "full", "partial", "secondary", "internal".
- vanity_
name_ Sequence[str]servers - An array of domains used for custom name servers. This is only available for Business and Enterprise plans.
- verification_
key str - Verification key for partial zone setup.
- account Property Map
- The account the zone belongs to
- activated
On String - The last time proof of ownership was detected and the zone was made active
- created
On String - When the zone was created
- development
Mode Number - The interval (in seconds) from when development mode expires (positive integer) or last expired (negative integer) for the domain. If development mode has never been enabled, this value is 0.
- id String
- Identifier
- meta Property Map
- Metadata about the zone
- modified
On String - When the zone was last modified
- name String
- The domain name
- name
Servers List<String> - The name servers Cloudflare assigns to a zone
- original
Dnshost String - DNS host at the time of switching to Cloudflare
- original
Name List<String>Servers - Original name servers before moving to Cloudflare
- original
Registrar String - Registrar for the domain at the time of switching to Cloudflare
- owner Property Map
- The owner of the zone
- paused Boolean
- Indicates whether the zone is only using Cloudflare DNS services. A true value means the zone will not receive security or performance benefits.
- status String
- The zone status on Cloudflare. Available values: "initializing", "pending", "active", "moved".
- type String
- A full zone implies that DNS is hosted with Cloudflare. A partial zone is typically a partner-hosted zone or a CNAME setup. Available values: "full", "partial", "secondary", "internal".
- vanity
Name List<String>Servers - An array of domains used for custom name servers. This is only available for Business and Enterprise plans.
- verification
Key String - Verification key for partial zone setup.
GetZonesResultAccount
GetZonesResultMeta
- Cdn
Only bool - The zone is only configured for CDN
- Custom
Certificate intQuota - 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 intQuota - Number of Page Rules a zone can have
- Phishing
Detected bool - The zone has been flagged for phishing
- Step int
- Cdn
Only bool - The zone is only configured for CDN
- Custom
Certificate intQuota - 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 intQuota - Number of Page Rules a zone can have
- Phishing
Detected bool - The zone has been flagged for phishing
- Step int
- cdn
Only Boolean - The zone is only configured for CDN
- custom
Certificate IntegerQuota - Number of Custom Certificates the zone can have
- dns
Only Boolean - The zone is only configured for DNS
- foundation
Dns Boolean - The zone is setup with Foundation DNS
- page
Rule IntegerQuota - Number of Page Rules a zone can have
- phishing
Detected Boolean - The zone has been flagged for phishing
- step Integer
- cdn
Only boolean - The zone is only configured for CDN
- custom
Certificate numberQuota - Number of Custom Certificates the zone can have
- dns
Only boolean - The zone is only configured for DNS
- foundation
Dns boolean - The zone is setup with Foundation DNS
- page
Rule numberQuota - Number of Page Rules a zone can have
- phishing
Detected boolean - The zone has been flagged for phishing
- step number
- cdn_
only bool - The zone is only configured for CDN
- custom_
certificate_ intquota - 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_ intquota - Number of Page Rules a zone can have
- phishing_
detected bool - The zone has been flagged for phishing
- step int
- cdn
Only Boolean - The zone is only configured for CDN
- custom
Certificate NumberQuota - Number of Custom Certificates the zone can have
- dns
Only Boolean - The zone is only configured for DNS
- foundation
Dns Boolean - The zone is setup with Foundation DNS
- page
Rule NumberQuota - Number of Page Rules a zone can have
- phishing
Detected Boolean - The zone has been flagged for phishing
- step Number
GetZonesResultOwner
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.