import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as cloudflare from "@pulumi/cloudflare"; * * const exampleAccessRules = cloudflare.getAccessRules({ * accountId: "account_id", * zoneId: "zone_id", * configuration: { * target: "ip", * value: "198.51.100.4", * }, * direction: "desc", * mode: "challenge", * notes: "my note", * order: "mode", * }); * ``` */ export declare function getAccessRules(args?: GetAccessRulesArgs, opts?: pulumi.InvokeOptions): Promise; /** * A collection of arguments for invoking getAccessRules. */ export interface GetAccessRulesArgs { /** * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */ accountId?: string; configuration?: inputs.GetAccessRulesConfiguration; /** * Defines the direction used to sort returned rules. * Available values: "asc", "desc". */ direction?: string; /** * Defines the search requirements. When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match. * Available values: "any", "all". */ match?: string; /** * Max items to fetch, default: 1000 */ maxItems?: number; /** * The action to apply to a matched request. * Available values: "block", "challenge", "whitelist", "js*challenge", "managed*challenge". */ mode?: string; /** * Defines the string to search for in the notes of existing IP Access rules. * Notes: For example, the string 'attack' would match IP Access rules with notes 'Attack 26/02' and 'Attack 27/02'. The search is case insensitive. */ notes?: string; /** * Defines the field used to sort returned rules. * Available values: "configuration.target", "configuration.value", "mode". */ order?: string; /** * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */ zoneId?: string; } /** * A collection of values returned by getAccessRules. */ export interface GetAccessRulesResult { /** * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */ readonly accountId?: string; readonly configuration?: outputs.GetAccessRulesConfiguration; /** * Defines the direction used to sort returned rules. * Available values: "asc", "desc". */ readonly direction?: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; /** * Defines the search requirements. When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match. * Available values: "any", "all". */ readonly match: string; /** * Max items to fetch, default: 1000 */ readonly maxItems?: number; /** * The action to apply to a matched request. * Available values: "block", "challenge", "whitelist", "js*challenge", "managed*challenge". */ readonly mode?: string; /** * Defines the string to search for in the notes of existing IP Access rules. * Notes: For example, the string 'attack' would match IP Access rules with notes 'Attack 26/02' and 'Attack 27/02'. The search is case insensitive. */ readonly notes?: string; /** * Defines the field used to sort returned rules. * Available values: "configuration.target", "configuration.value", "mode". */ readonly order?: string; /** * The items returned by the data source */ readonly results: outputs.GetAccessRulesResult[]; /** * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */ readonly zoneId?: string; } /** * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as cloudflare from "@pulumi/cloudflare"; * * const exampleAccessRules = cloudflare.getAccessRules({ * accountId: "account_id", * zoneId: "zone_id", * configuration: { * target: "ip", * value: "198.51.100.4", * }, * direction: "desc", * mode: "challenge", * notes: "my note", * order: "mode", * }); * ``` */ export declare function getAccessRulesOutput(args?: GetAccessRulesOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output; /** * A collection of arguments for invoking getAccessRules. */ export interface GetAccessRulesOutputArgs { /** * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */ accountId?: pulumi.Input; configuration?: pulumi.Input; /** * Defines the direction used to sort returned rules. * Available values: "asc", "desc". */ direction?: pulumi.Input; /** * Defines the search requirements. When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match. * Available values: "any", "all". */ match?: pulumi.Input; /** * Max items to fetch, default: 1000 */ maxItems?: pulumi.Input; /** * The action to apply to a matched request. * Available values: "block", "challenge", "whitelist", "js*challenge", "managed*challenge". */ mode?: pulumi.Input; /** * Defines the string to search for in the notes of existing IP Access rules. * Notes: For example, the string 'attack' would match IP Access rules with notes 'Attack 26/02' and 'Attack 27/02'. The search is case insensitive. */ notes?: pulumi.Input; /** * Defines the field used to sort returned rules. * Available values: "configuration.target", "configuration.value", "mode". */ order?: pulumi.Input; /** * The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */ zoneId?: pulumi.Input; }