Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi
cloudflare.getZone
Explore with Pulumi AI
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:
- Filter
Get
Zone Filter - Zone
Id string
- Filter
Get
Zone Filter - Zone
Id string
- filter
Get
Zone Filter - zone
Id String
- filter
Get
Zone Filter - zone
Id string
- filter Property Map
- zone
Id String
getZone Result
The following output properties are available:
- Account
Get
Zone Account - Activated
On string - Created
On string - Development
Mode double - Id string
- Meta
Get
Zone Meta - Modified
On string - Name string
- Name
Servers List<string> - Original
Dnshost string - Original
Name List<string>Servers - Original
Registrar string - Owner
Get
Zone Owner - Paused bool
- Status string
- Type string
- Vanity
Name List<string>Servers - Verification
Key string - Filter
Get
Zone Filter - Zone
Id string
- Account
Get
Zone Account - Activated
On string - Created
On string - Development
Mode float64 - Id string
- Meta
Get
Zone Meta - Modified
On string - Name string
- Name
Servers []string - Original
Dnshost string - Original
Name []stringServers - Original
Registrar string - Owner
Get
Zone Owner - Paused bool
- Status string
- Type string
- Vanity
Name []stringServers - Verification
Key string - Filter
Get
Zone Filter - Zone
Id string
- account
Get
Zone Account - activated
On String - created
On String - development
Mode Double - id String
- meta
Get
Zone Meta - modified
On String - name String
- name
Servers List<String> - original
Dnshost String - original
Name List<String>Servers - original
Registrar String - owner
Get
Zone Owner - paused Boolean
- status String
- type String
- vanity
Name List<String>Servers - verification
Key String - filter
Get
Zone Filter - zone
Id String
- account
Get
Zone Account - activated
On string - created
On string - development
Mode number - id string
- meta
Get
Zone Meta - modified
On string - name string
- name
Servers string[] - original
Dnshost string - original
Name string[]Servers - original
Registrar string - owner
Get
Zone Owner - paused boolean
- status string
- type string
- vanity
Name string[]Servers - verification
Key string - filter
Get
Zone Filter - zone
Id string
- account
Get
Zone Account - activated_
on str - created_
on str - development_
mode float - id str
- meta
Get
Zone Meta - modified_
on str - name str
- name_
servers Sequence[str] - original_
dnshost str - original_
name_ Sequence[str]servers - original_
registrar str - owner
Get
Zone Owner - paused bool
- status str
- type str
- vanity_
name_ Sequence[str]servers - verification_
key str - filter
Get
Zone Filter - zone_
id str
- account Property Map
- activated
On String - created
On String - development
Mode Number - id String
- meta Property Map
- modified
On String - name String
- name
Servers List<String> - original
Dnshost String - original
Name List<String>Servers - original
Registrar String - owner Property Map
- paused Boolean
- status String
- type String
- vanity
Name List<String>Servers - verification
Key String - filter Property Map
- zone
Id String
Supporting Types
GetZoneAccount
GetZoneFilter
- Match string
- Whether to match all search requirements or at least one (any). Available values: "any", "all".
- Account
Get
Zone Filter Account - 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
Get
Zone Filter Account - 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
Get
Zone Filter Account - 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
Get
Zone Filter Account - 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
Get
Zone Filter Account - 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
GetZoneMeta
- 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
GetZoneOwner
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.