import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Provides a Datadog AppsecWafCustomRule resource. This can be used to create and manage Datadog appsec_waf_custom_rule. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as datadog from "@pulumi/datadog"; * * // Create a new WAF custom rule to block a custom IoC * const ioc000 = new datadog.AppsecWafCustomRule("ioc000", { * name: "Block requests from a bad actor", * blocking: true, * enabled: true, * tags: { * category: "attack_attempt", * type: "custom_ioc", * }, * pathGlob: "/db/*", * conditions: [{ * operator: "match_regex", * parameters: [{ * inputs: [{ * address: "server.db.statement", * }], * regex: "stmt.*", * }], * }], * action: [{ * action: "redirect_request", * parameters: [{ * statusCode: 302, * location: "/blocking", * }], * }], * }); * // Create a WAF custom rule to track business logic events * const biz000 = new datadog.AppsecWafCustomRule("biz000", { * name: "Track payments", * blocking: false, * enabled: true, * tags: { * category: "business_logic", * type: "payment.checkout", * }, * pathGlob: "/cart/*", * conditions: [{ * operator: "capture_data", * parameters: [{ * inputs: [{ * address: "server.request.query", * keyPaths: ["payment_id"], * }], * value: "payment", * }], * }], * scopes: [{ * env: "prod", * service: "paymentsvc", * }], * }); * ``` * * ## Import * * The `pulumi import` command can be used, for example: * * ```sh * $ pulumi import datadog:index/appsecWafCustomRule:AppsecWafCustomRule new_list "" * ``` */ export declare class AppsecWafCustomRule extends pulumi.CustomResource { /** * Get an existing AppsecWafCustomRule 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?: AppsecWafCustomRuleState, opts?: pulumi.CustomResourceOptions): AppsecWafCustomRule; /** * Returns true if the given object is an instance of AppsecWafCustomRule. 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 AppsecWafCustomRule; readonly action: pulumi.Output; /** * Indicates whether the WAF custom rule will block the request. */ readonly blocking: pulumi.Output; readonly conditions: pulumi.Output; /** * Indicates whether the WAF custom rule is enabled. */ readonly enabled: pulumi.Output; /** * The Name of the WAF custom rule. */ readonly name: pulumi.Output; /** * The path glob for the WAF custom rule. */ readonly pathGlob: pulumi.Output; readonly scopes: pulumi.Output; /** * Tags associated with the WAF custom rule. `category` and `type` tags are required. Supported categories include `businessLogic`, `attackAttempt` and `securityResponse`. */ readonly tags: pulumi.Output<{ [key: string]: string; }>; /** * Create a AppsecWafCustomRule 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: AppsecWafCustomRuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering AppsecWafCustomRule resources. */ export interface AppsecWafCustomRuleState { action?: pulumi.Input; /** * Indicates whether the WAF custom rule will block the request. */ blocking?: pulumi.Input; conditions?: pulumi.Input[]>; /** * Indicates whether the WAF custom rule is enabled. */ enabled?: pulumi.Input; /** * The Name of the WAF custom rule. */ name?: pulumi.Input; /** * The path glob for the WAF custom rule. */ pathGlob?: pulumi.Input; scopes?: pulumi.Input[]>; /** * Tags associated with the WAF custom rule. `category` and `type` tags are required. Supported categories include `businessLogic`, `attackAttempt` and `securityResponse`. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; } /** * The set of arguments for constructing a AppsecWafCustomRule resource. */ export interface AppsecWafCustomRuleArgs { action?: pulumi.Input; /** * Indicates whether the WAF custom rule will block the request. */ blocking: pulumi.Input; conditions?: pulumi.Input[]>; /** * Indicates whether the WAF custom rule is enabled. */ enabled: pulumi.Input; /** * The Name of the WAF custom rule. */ name: pulumi.Input; /** * The path glob for the WAF custom rule. */ pathGlob?: pulumi.Input; scopes?: pulumi.Input[]>; /** * Tags associated with the WAF custom rule. `category` and `type` tags are required. Supported categories include `businessLogic`, `attackAttempt` and `securityResponse`. */ tags: pulumi.Input<{ [key: string]: pulumi.Input; }>; }