import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * This resource provides the Protection Rule resource in Oracle Cloud Infrastructure Web Application Acceleration and Security service. * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/waas/latest/ProtectionRule * * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/web_application_acceleration_and_security * * Updates the action for each specified protection rule. Requests can either be allowed, blocked, or trigger an alert if they meet the parameters of an applied rule. For more information on protection rules, see [WAF Protection Rules](https://docs.cloud.oracle.com/iaas/Content/WAF/Tasks/wafprotectionrules.htm). * This operation can update or disable protection rules depending on the structure of the request body. * Protection rules can be updated by changing the properties of the protection rule object with the rule's key specified in the key field. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as oci from "@pulumi/oci"; * * const testProtectionRule = new oci.waas.ProtectionRule("test_protection_rule", { * waasPolicyId: testWaasPolicy.id, * key: key, * action: "DETECT", * exclusions: { * exclusions: ["example.com"], * target: "REQUEST_COOKIES", * }, * }); * ``` * * ## Import * * ProtectionRules can be imported using the `id`, e.g. * ```sh * $ pulumi import oci:Waas/protectionRule:ProtectionRule test_protection_rule "waasPolicyId/{waasPolicyId}/key/{key}" * ``` */ export declare class ProtectionRule extends pulumi.CustomResource { /** * Get an existing ProtectionRule 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?: ProtectionRuleState, opts?: pulumi.CustomResourceOptions): ProtectionRule; /** * Returns true if the given object is an instance of ProtectionRule. 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 ProtectionRule; /** * (Updatable) The action to take when the traffic is detected as malicious. If unspecified, defaults to `OFF`. */ readonly action: pulumi.Output; /** * The description of the protection rule. */ readonly description: pulumi.Output; /** * (Updatable) */ readonly exclusions: pulumi.Output; /** * (Updatable) The unique key of the protection rule. */ readonly key: pulumi.Output; /** * The list of labels for the protection rule. */ readonly labels: pulumi.Output; /** * The list of the ModSecurity rule IDs that apply to this protection rule. For more information about ModSecurity's open source WAF rules, see [Mod Security's documentation](https://www.modsecurity.org/CRS/Documentation/index.html). */ readonly modSecurityRuleIds: pulumi.Output; /** * The name of the protection rule. */ readonly name: pulumi.Output; /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the WAAS policy. */ readonly waasPolicyId: pulumi.Output; /** * Create a ProtectionRule 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: ProtectionRuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ProtectionRule resources. */ export interface ProtectionRuleState { /** * (Updatable) The action to take when the traffic is detected as malicious. If unspecified, defaults to `OFF`. */ action?: pulumi.Input; /** * The description of the protection rule. */ description?: pulumi.Input; /** * (Updatable) */ exclusions?: pulumi.Input[] | undefined>; /** * (Updatable) The unique key of the protection rule. */ key?: pulumi.Input; /** * The list of labels for the protection rule. */ labels?: pulumi.Input[] | undefined>; /** * The list of the ModSecurity rule IDs that apply to this protection rule. For more information about ModSecurity's open source WAF rules, see [Mod Security's documentation](https://www.modsecurity.org/CRS/Documentation/index.html). */ modSecurityRuleIds?: pulumi.Input[] | undefined>; /** * The name of the protection rule. */ name?: pulumi.Input; /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the WAAS policy. */ waasPolicyId?: pulumi.Input; } /** * The set of arguments for constructing a ProtectionRule resource. */ export interface ProtectionRuleArgs { /** * (Updatable) The action to take when the traffic is detected as malicious. If unspecified, defaults to `OFF`. */ action?: pulumi.Input; /** * (Updatable) */ exclusions?: pulumi.Input[] | undefined>; /** * (Updatable) The unique key of the protection rule. */ key: pulumi.Input; /** * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the WAAS policy. */ waasPolicyId: pulumi.Input; } //# sourceMappingURL=protectionRule.d.ts.map