import * as pulumi from "@pulumi/pulumi"; import { input as inputs, output as outputs } from "./types"; /** * Provides a Cloudflare Zone Lockdown resource. Zone Lockdown allows you to define one or more URLs (with wildcard matching on the domain or path) that will only permit access if the request originates from an IP address that matches a safelist of one or more IP addresses and/or IP ranges. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as cloudflare from "@pulumi/cloudflare"; * * // Restrict access to these endpoints to requests from a known IP address range. * const endpointLockdown = new cloudflare.ZoneLockdown("endpoint_lockdown", { * configurations: [{ * target: "ip_range", * value: "198.51.100.0/16", * }], * description: "Restrict access to these endpoints to requests from a known IP address range", * paused: false, * urls: ["api.mysite.com/some/endpoint*"], * zoneId: "d41d8cd98f00b204e9800998ecf8427e", * }); * ``` * * ## Import * * Records can be imported using a composite ID formed of zone name and record ID, e.g. * * ```sh * $ pulumi import cloudflare:index/zoneLockdown:ZoneLockdown cloudflare_zone_lockdown d41d8cd98f00b204e9800998ecf8427e/37cb64fe4a90adb5ca3afc04f2c82a2f * ``` * * where* `d41d8cd98f00b204e9800998ecf8427e` - zone ID * `37cb64fe4a90adb5ca3afc04f2c82a2f` - zone lockdown ID as returned by [API](https://api.cloudflare.com/#zone-lockdown-list-lockdown-rules) */ export declare class ZoneLockdown extends pulumi.CustomResource { /** * Get an existing ZoneLockdown resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ZoneLockdownState, opts?: pulumi.CustomResourceOptions): ZoneLockdown; /** * Returns true if the given object is an instance of ZoneLockdown. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ZoneLockdown; /** * A list of IP addresses or IP ranges to match the request against specified in target, value pairs. It's a complex value. See description below. The order of the configuration entries is unimportant. */ readonly configurations: pulumi.Output; /** * A description about the lockdown entry. Typically used as a reminder or explanation for the lockdown. */ readonly description: pulumi.Output; /** * Boolean of whether this zone lockdown is currently paused. Default: false. */ readonly paused: pulumi.Output; readonly priority: pulumi.Output; /** * A list of simple wildcard patterns to match requests against. The order of the urls is unimportant. */ readonly urls: pulumi.Output; /** * The DNS zone ID to which the access rule should be added. */ readonly zoneId: pulumi.Output; /** * Create a ZoneLockdown resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ZoneLockdownArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ZoneLockdown resources. */ export interface ZoneLockdownState { /** * A list of IP addresses or IP ranges to match the request against specified in target, value pairs. It's a complex value. See description below. The order of the configuration entries is unimportant. */ configurations?: pulumi.Input[]>; /** * A description about the lockdown entry. Typically used as a reminder or explanation for the lockdown. */ description?: pulumi.Input; /** * Boolean of whether this zone lockdown is currently paused. Default: false. */ paused?: pulumi.Input; priority?: pulumi.Input; /** * A list of simple wildcard patterns to match requests against. The order of the urls is unimportant. */ urls?: pulumi.Input[]>; /** * The DNS zone ID to which the access rule should be added. */ zoneId?: pulumi.Input; } /** * The set of arguments for constructing a ZoneLockdown resource. */ export interface ZoneLockdownArgs { /** * A list of IP addresses or IP ranges to match the request against specified in target, value pairs. It's a complex value. See description below. The order of the configuration entries is unimportant. */ configurations: pulumi.Input[]>; /** * A description about the lockdown entry. Typically used as a reminder or explanation for the lockdown. */ description?: pulumi.Input; /** * Boolean of whether this zone lockdown is currently paused. Default: false. */ paused?: pulumi.Input; priority?: pulumi.Input; /** * A list of simple wildcard patterns to match requests against. The order of the urls is unimportant. */ urls: pulumi.Input[]>; /** * The DNS zone ID to which the access rule should be added. */ zoneId: pulumi.Input; }