1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. getZoneLockdowns
Cloudflare v6.1.1 published on Monday, Apr 21, 2025 by Pulumi

cloudflare.getZoneLockdowns

Explore with Pulumi AI

Cloudflare v6.1.1 published on Monday, Apr 21, 2025 by Pulumi

Example Usage

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

const exampleZoneLockdowns = cloudflare.getZoneLockdowns({
    zoneId: "023e105f4ecef8ad9ca31a8372d0c353",
    createdOn: "2014-01-01T05:20:00.12345Z",
    description: "endpoints",
    descriptionSearch: "endpoints",
    ip: "1.2.3.4",
    ipRangeSearch: "1.2.3.0/16",
    ipSearch: "1.2.3.4",
    modifiedOn: "2014-01-01T05:20:00.12345Z",
    priority: 5,
    uriSearch: "/some/path",
});
Copy
import pulumi
import pulumi_cloudflare as cloudflare

example_zone_lockdowns = cloudflare.get_zone_lockdowns(zone_id="023e105f4ecef8ad9ca31a8372d0c353",
    created_on="2014-01-01T05:20:00.12345Z",
    description="endpoints",
    description_search="endpoints",
    ip="1.2.3.4",
    ip_range_search="1.2.3.0/16",
    ip_search="1.2.3.4",
    modified_on="2014-01-01T05:20:00.12345Z",
    priority=5,
    uri_search="/some/path")
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.LookupZoneLockdowns(ctx, &cloudflare.LookupZoneLockdownsArgs{
			ZoneId:            "023e105f4ecef8ad9ca31a8372d0c353",
			CreatedOn:         pulumi.StringRef("2014-01-01T05:20:00.12345Z"),
			Description:       pulumi.StringRef("endpoints"),
			DescriptionSearch: pulumi.StringRef("endpoints"),
			Ip:                pulumi.StringRef("1.2.3.4"),
			IpRangeSearch:     pulumi.StringRef("1.2.3.0/16"),
			IpSearch:          pulumi.StringRef("1.2.3.4"),
			ModifiedOn:        pulumi.StringRef("2014-01-01T05:20:00.12345Z"),
			Priority:          pulumi.Float64Ref(5),
			UriSearch:         pulumi.StringRef("/some/path"),
		}, 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 exampleZoneLockdowns = Cloudflare.GetZoneLockdowns.Invoke(new()
    {
        ZoneId = "023e105f4ecef8ad9ca31a8372d0c353",
        CreatedOn = "2014-01-01T05:20:00.12345Z",
        Description = "endpoints",
        DescriptionSearch = "endpoints",
        Ip = "1.2.3.4",
        IpRangeSearch = "1.2.3.0/16",
        IpSearch = "1.2.3.4",
        ModifiedOn = "2014-01-01T05:20:00.12345Z",
        Priority = 5,
        UriSearch = "/some/path",
    });

});
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.GetZoneLockdownsArgs;
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 exampleZoneLockdowns = CloudflareFunctions.getZoneLockdowns(GetZoneLockdownsArgs.builder()
            .zoneId("023e105f4ecef8ad9ca31a8372d0c353")
            .createdOn("2014-01-01T05:20:00.12345Z")
            .description("endpoints")
            .descriptionSearch("endpoints")
            .ip("1.2.3.4")
            .ipRangeSearch("1.2.3.0/16")
            .ipSearch("1.2.3.4")
            .modifiedOn("2014-01-01T05:20:00.12345Z")
            .priority(5)
            .uriSearch("/some/path")
            .build());

    }
}
Copy
variables:
  exampleZoneLockdowns:
    fn::invoke:
      function: cloudflare:getZoneLockdowns
      arguments:
        zoneId: 023e105f4ecef8ad9ca31a8372d0c353
        createdOn: 2014-01-01T05:20:00.12345Z
        description: endpoints
        descriptionSearch: endpoints
        ip: 1.2.3.4
        ipRangeSearch: 1.2.3.0/16
        ipSearch: 1.2.3.4
        modifiedOn: 2014-01-01T05:20:00.12345Z
        priority: 5
        uriSearch: /some/path
Copy

Using getZoneLockdowns

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 getZoneLockdowns(args: GetZoneLockdownsArgs, opts?: InvokeOptions): Promise<GetZoneLockdownsResult>
function getZoneLockdownsOutput(args: GetZoneLockdownsOutputArgs, opts?: InvokeOptions): Output<GetZoneLockdownsResult>
Copy
def get_zone_lockdowns(created_on: Optional[str] = None,
                       description: Optional[str] = None,
                       description_search: Optional[str] = None,
                       ip: Optional[str] = None,
                       ip_range_search: Optional[str] = None,
                       ip_search: Optional[str] = None,
                       max_items: Optional[int] = None,
                       modified_on: Optional[str] = None,
                       priority: Optional[float] = None,
                       uri_search: Optional[str] = None,
                       zone_id: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetZoneLockdownsResult
def get_zone_lockdowns_output(created_on: Optional[pulumi.Input[str]] = None,
                       description: Optional[pulumi.Input[str]] = None,
                       description_search: Optional[pulumi.Input[str]] = None,
                       ip: Optional[pulumi.Input[str]] = None,
                       ip_range_search: Optional[pulumi.Input[str]] = None,
                       ip_search: Optional[pulumi.Input[str]] = None,
                       max_items: Optional[pulumi.Input[int]] = None,
                       modified_on: Optional[pulumi.Input[str]] = None,
                       priority: Optional[pulumi.Input[float]] = None,
                       uri_search: Optional[pulumi.Input[str]] = None,
                       zone_id: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetZoneLockdownsResult]
Copy
func LookupZoneLockdowns(ctx *Context, args *LookupZoneLockdownsArgs, opts ...InvokeOption) (*LookupZoneLockdownsResult, error)
func LookupZoneLockdownsOutput(ctx *Context, args *LookupZoneLockdownsOutputArgs, opts ...InvokeOption) LookupZoneLockdownsResultOutput
Copy

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

public static class GetZoneLockdowns 
{
    public static Task<GetZoneLockdownsResult> InvokeAsync(GetZoneLockdownsArgs args, InvokeOptions? opts = null)
    public static Output<GetZoneLockdownsResult> Invoke(GetZoneLockdownsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetZoneLockdownsResult> getZoneLockdowns(GetZoneLockdownsArgs args, InvokeOptions options)
public static Output<GetZoneLockdownsResult> getZoneLockdowns(GetZoneLockdownsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: cloudflare:index/getZoneLockdowns:getZoneLockdowns
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ZoneId This property is required. string
Identifier
CreatedOn string
The timestamp of when the rule was created.
Description string
A string to search for in the description of existing rules.
DescriptionSearch string
A string to search for in the description of existing rules.
Ip string
A single IP address to search for in existing rules.
IpRangeSearch string
A single IP address range to search for in existing rules.
IpSearch string
A single IP address to search for in existing rules.
MaxItems int
Max items to fetch, default: 1000
ModifiedOn string
The timestamp of when the rule was last modified.
Priority double
The priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules without a priority.
UriSearch string
A single URI to search for in the list of URLs of existing rules.
ZoneId This property is required. string
Identifier
CreatedOn string
The timestamp of when the rule was created.
Description string
A string to search for in the description of existing rules.
DescriptionSearch string
A string to search for in the description of existing rules.
Ip string
A single IP address to search for in existing rules.
IpRangeSearch string
A single IP address range to search for in existing rules.
IpSearch string
A single IP address to search for in existing rules.
MaxItems int
Max items to fetch, default: 1000
ModifiedOn string
The timestamp of when the rule was last modified.
Priority float64
The priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules without a priority.
UriSearch string
A single URI to search for in the list of URLs of existing rules.
zoneId This property is required. String
Identifier
createdOn String
The timestamp of when the rule was created.
description String
A string to search for in the description of existing rules.
descriptionSearch String
A string to search for in the description of existing rules.
ip String
A single IP address to search for in existing rules.
ipRangeSearch String
A single IP address range to search for in existing rules.
ipSearch String
A single IP address to search for in existing rules.
maxItems Integer
Max items to fetch, default: 1000
modifiedOn String
The timestamp of when the rule was last modified.
priority Double
The priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules without a priority.
uriSearch String
A single URI to search for in the list of URLs of existing rules.
zoneId This property is required. string
Identifier
createdOn string
The timestamp of when the rule was created.
description string
A string to search for in the description of existing rules.
descriptionSearch string
A string to search for in the description of existing rules.
ip string
A single IP address to search for in existing rules.
ipRangeSearch string
A single IP address range to search for in existing rules.
ipSearch string
A single IP address to search for in existing rules.
maxItems number
Max items to fetch, default: 1000
modifiedOn string
The timestamp of when the rule was last modified.
priority number
The priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules without a priority.
uriSearch string
A single URI to search for in the list of URLs of existing rules.
zone_id This property is required. str
Identifier
created_on str
The timestamp of when the rule was created.
description str
A string to search for in the description of existing rules.
description_search str
A string to search for in the description of existing rules.
ip str
A single IP address to search for in existing rules.
ip_range_search str
A single IP address range to search for in existing rules.
ip_search str
A single IP address to search for in existing rules.
max_items int
Max items to fetch, default: 1000
modified_on str
The timestamp of when the rule was last modified.
priority float
The priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules without a priority.
uri_search str
A single URI to search for in the list of URLs of existing rules.
zoneId This property is required. String
Identifier
createdOn String
The timestamp of when the rule was created.
description String
A string to search for in the description of existing rules.
descriptionSearch String
A string to search for in the description of existing rules.
ip String
A single IP address to search for in existing rules.
ipRangeSearch String
A single IP address range to search for in existing rules.
ipSearch String
A single IP address to search for in existing rules.
maxItems Number
Max items to fetch, default: 1000
modifiedOn String
The timestamp of when the rule was last modified.
priority Number
The priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules without a priority.
uriSearch String
A single URI to search for in the list of URLs of existing rules.

getZoneLockdowns Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Results List<GetZoneLockdownsResult>
The items returned by the data source
ZoneId string
Identifier
CreatedOn string
The timestamp of when the rule was created.
Description string
A string to search for in the description of existing rules.
DescriptionSearch string
A string to search for in the description of existing rules.
Ip string
A single IP address to search for in existing rules.
IpRangeSearch string
A single IP address range to search for in existing rules.
IpSearch string
A single IP address to search for in existing rules.
MaxItems int
Max items to fetch, default: 1000
ModifiedOn string
The timestamp of when the rule was last modified.
Priority double
The priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules without a priority.
UriSearch string
A single URI to search for in the list of URLs of existing rules.
Id string
The provider-assigned unique ID for this managed resource.
Results []GetZoneLockdownsResult
The items returned by the data source
ZoneId string
Identifier
CreatedOn string
The timestamp of when the rule was created.
Description string
A string to search for in the description of existing rules.
DescriptionSearch string
A string to search for in the description of existing rules.
Ip string
A single IP address to search for in existing rules.
IpRangeSearch string
A single IP address range to search for in existing rules.
IpSearch string
A single IP address to search for in existing rules.
MaxItems int
Max items to fetch, default: 1000
ModifiedOn string
The timestamp of when the rule was last modified.
Priority float64
The priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules without a priority.
UriSearch string
A single URI to search for in the list of URLs of existing rules.
id String
The provider-assigned unique ID for this managed resource.
results List<GetZoneLockdownsResult>
The items returned by the data source
zoneId String
Identifier
createdOn String
The timestamp of when the rule was created.
description String
A string to search for in the description of existing rules.
descriptionSearch String
A string to search for in the description of existing rules.
ip String
A single IP address to search for in existing rules.
ipRangeSearch String
A single IP address range to search for in existing rules.
ipSearch String
A single IP address to search for in existing rules.
maxItems Integer
Max items to fetch, default: 1000
modifiedOn String
The timestamp of when the rule was last modified.
priority Double
The priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules without a priority.
uriSearch String
A single URI to search for in the list of URLs of existing rules.
id string
The provider-assigned unique ID for this managed resource.
results GetZoneLockdownsResult[]
The items returned by the data source
zoneId string
Identifier
createdOn string
The timestamp of when the rule was created.
description string
A string to search for in the description of existing rules.
descriptionSearch string
A string to search for in the description of existing rules.
ip string
A single IP address to search for in existing rules.
ipRangeSearch string
A single IP address range to search for in existing rules.
ipSearch string
A single IP address to search for in existing rules.
maxItems number
Max items to fetch, default: 1000
modifiedOn string
The timestamp of when the rule was last modified.
priority number
The priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules without a priority.
uriSearch string
A single URI to search for in the list of URLs of existing rules.
id str
The provider-assigned unique ID for this managed resource.
results Sequence[GetZoneLockdownsResult]
The items returned by the data source
zone_id str
Identifier
created_on str
The timestamp of when the rule was created.
description str
A string to search for in the description of existing rules.
description_search str
A string to search for in the description of existing rules.
ip str
A single IP address to search for in existing rules.
ip_range_search str
A single IP address range to search for in existing rules.
ip_search str
A single IP address to search for in existing rules.
max_items int
Max items to fetch, default: 1000
modified_on str
The timestamp of when the rule was last modified.
priority float
The priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules without a priority.
uri_search str
A single URI to search for in the list of URLs of existing rules.
id String
The provider-assigned unique ID for this managed resource.
results List<Property Map>
The items returned by the data source
zoneId String
Identifier
createdOn String
The timestamp of when the rule was created.
description String
A string to search for in the description of existing rules.
descriptionSearch String
A string to search for in the description of existing rules.
ip String
A single IP address to search for in existing rules.
ipRangeSearch String
A single IP address range to search for in existing rules.
ipSearch String
A single IP address to search for in existing rules.
maxItems Number
Max items to fetch, default: 1000
modifiedOn String
The timestamp of when the rule was last modified.
priority Number
The priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules without a priority.
uriSearch String
A single URI to search for in the list of URLs of existing rules.

Supporting Types

GetZoneLockdownsResult

Configurations This property is required. List<GetZoneLockdownsResultConfiguration>
A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of ip or ip_range configurations.
CreatedOn This property is required. string
The timestamp of when the rule was created.
Description This property is required. string
An informative summary of the rule.
Id This property is required. string
The unique identifier of the Zone Lockdown rule.
ModifiedOn This property is required. string
The timestamp of when the rule was last modified.
Paused This property is required. bool
When true, indicates that the rule is currently paused.
Urls This property is required. List<string>
The URLs to include in the rule definition. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns.
Configurations This property is required. []GetZoneLockdownsResultConfiguration
A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of ip or ip_range configurations.
CreatedOn This property is required. string
The timestamp of when the rule was created.
Description This property is required. string
An informative summary of the rule.
Id This property is required. string
The unique identifier of the Zone Lockdown rule.
ModifiedOn This property is required. string
The timestamp of when the rule was last modified.
Paused This property is required. bool
When true, indicates that the rule is currently paused.
Urls This property is required. []string
The URLs to include in the rule definition. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns.
configurations This property is required. List<GetZoneLockdownsResultConfiguration>
A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of ip or ip_range configurations.
createdOn This property is required. String
The timestamp of when the rule was created.
description This property is required. String
An informative summary of the rule.
id This property is required. String
The unique identifier of the Zone Lockdown rule.
modifiedOn This property is required. String
The timestamp of when the rule was last modified.
paused This property is required. Boolean
When true, indicates that the rule is currently paused.
urls This property is required. List<String>
The URLs to include in the rule definition. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns.
configurations This property is required. GetZoneLockdownsResultConfiguration[]
A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of ip or ip_range configurations.
createdOn This property is required. string
The timestamp of when the rule was created.
description This property is required. string
An informative summary of the rule.
id This property is required. string
The unique identifier of the Zone Lockdown rule.
modifiedOn This property is required. string
The timestamp of when the rule was last modified.
paused This property is required. boolean
When true, indicates that the rule is currently paused.
urls This property is required. string[]
The URLs to include in the rule definition. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns.
configurations This property is required. Sequence[GetZoneLockdownsResultConfiguration]
A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of ip or ip_range configurations.
created_on This property is required. str
The timestamp of when the rule was created.
description This property is required. str
An informative summary of the rule.
id This property is required. str
The unique identifier of the Zone Lockdown rule.
modified_on This property is required. str
The timestamp of when the rule was last modified.
paused This property is required. bool
When true, indicates that the rule is currently paused.
urls This property is required. Sequence[str]
The URLs to include in the rule definition. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns.
configurations This property is required. List<Property Map>
A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of ip or ip_range configurations.
createdOn This property is required. String
The timestamp of when the rule was created.
description This property is required. String
An informative summary of the rule.
id This property is required. String
The unique identifier of the Zone Lockdown rule.
modifiedOn This property is required. String
The timestamp of when the rule was last modified.
paused This property is required. Boolean
When true, indicates that the rule is currently paused.
urls This property is required. List<String>
The URLs to include in the rule definition. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns.

GetZoneLockdownsResultConfiguration

Target This property is required. string
The configuration target. You must set the target to ip when specifying an IP address in the Zone Lockdown rule. Available values: "ip".
Value This property is required. string
The IP address to match. This address will be compared to the IP address of incoming requests.
Target This property is required. string
The configuration target. You must set the target to ip when specifying an IP address in the Zone Lockdown rule. Available values: "ip".
Value This property is required. string
The IP address to match. This address will be compared to the IP address of incoming requests.
target This property is required. String
The configuration target. You must set the target to ip when specifying an IP address in the Zone Lockdown rule. Available values: "ip".
value This property is required. String
The IP address to match. This address will be compared to the IP address of incoming requests.
target This property is required. string
The configuration target. You must set the target to ip when specifying an IP address in the Zone Lockdown rule. Available values: "ip".
value This property is required. string
The IP address to match. This address will be compared to the IP address of incoming requests.
target This property is required. str
The configuration target. You must set the target to ip when specifying an IP address in the Zone Lockdown rule. Available values: "ip".
value This property is required. str
The IP address to match. This address will be compared to the IP address of incoming requests.
target This property is required. String
The configuration target. You must set the target to ip when specifying an IP address in the Zone Lockdown rule. Available values: "ip".
value This property is required. String
The IP address to match. This address will be compared to the IP address of incoming requests.

Package Details

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