UNPKG

@pulumi/fastly

Version:

A Pulumi package for creating and managing fastly cloud resources.. Based on terraform-provider-fastly: version v4

205 lines (204 loc) 7.83 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Provides a Fastly Next-Gen WAF Account Rule.\ * Account-level rules apply across one or more workspaces and are useful for defining shared or global WAF logic. * * ## Example Usage * * Basic usage: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fastly from "@pulumi/fastly"; * * const example = new fastly.NgwafAccountRule("example", { * appliesTos: ["*"], * type: "request", * description: "example", * enabled: true, * requestLogging: "sampled", * groupOperator: "all", * actions: [{ * type: "block", * }], * conditions: [{ * field: "ip", * operator: "equals", * value: "1.2.3.4", * }], * groupConditions: [{ * groupOperator: "all", * conditions: [{ * field: "method", * operator: "equals", * value: "POST", * }], * }], * }); * ``` * * ## Import * * Fastly Next-Gen WAF account rules can be imported using just the rule ID, e.g.: * * ```sh * $ pulumi import fastly:index/ngwafAccountRule:NgwafAccountRule demo <ruleID> * ``` */ export declare class NgwafAccountRule extends pulumi.CustomResource { /** * Get an existing NgwafAccountRule 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<pulumi.ID>, state?: NgwafAccountRuleState, opts?: pulumi.CustomResourceOptions): NgwafAccountRule; /** * Returns true if the given object is an instance of NgwafAccountRule. 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 NgwafAccountRule; /** * List of actions to perform when the rule matches. */ readonly actions: pulumi.Output<outputs.NgwafAccountRuleAction[]>; /** * The list of workspace IDs this signal applies to, or the wildcard `*` if it applies to all workspaces. */ readonly appliesTos: pulumi.Output<string[]>; /** * Flat list of individual conditions. Each must include `field`, `operator`, and `value`. */ readonly conditions: pulumi.Output<outputs.NgwafAccountRuleCondition[] | undefined>; /** * The description of the rule. */ readonly description: pulumi.Output<string>; /** * Whether the rule is currently enabled. */ readonly enabled: pulumi.Output<boolean>; /** * List of grouped conditions with nested logic. Each group must define a `groupOperator` and at least one condition. */ readonly groupConditions: pulumi.Output<outputs.NgwafAccountRuleGroupCondition[] | undefined>; /** * Logical operator to apply to group conditions. Accepted values are `any` and `all`. */ readonly groupOperator: pulumi.Output<string | undefined>; /** * List of multival conditions with nested logic. Each multival list must define a `field, operator, groupOperator` and at least one condition. */ readonly multivalConditions: pulumi.Output<outputs.NgwafAccountRuleMultivalCondition[] | undefined>; /** * Logging behavior for matching requests. Accepted values are `sampled` and `none`. */ readonly requestLogging: pulumi.Output<string | undefined>; /** * The type of the rule. Accepted values are `request` and `signal`. */ readonly type: pulumi.Output<string>; /** * Create a NgwafAccountRule 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: NgwafAccountRuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering NgwafAccountRule resources. */ export interface NgwafAccountRuleState { /** * List of actions to perform when the rule matches. */ actions?: pulumi.Input<pulumi.Input<inputs.NgwafAccountRuleAction>[]>; /** * The list of workspace IDs this signal applies to, or the wildcard `*` if it applies to all workspaces. */ appliesTos?: pulumi.Input<pulumi.Input<string>[]>; /** * Flat list of individual conditions. Each must include `field`, `operator`, and `value`. */ conditions?: pulumi.Input<pulumi.Input<inputs.NgwafAccountRuleCondition>[]>; /** * The description of the rule. */ description?: pulumi.Input<string>; /** * Whether the rule is currently enabled. */ enabled?: pulumi.Input<boolean>; /** * List of grouped conditions with nested logic. Each group must define a `groupOperator` and at least one condition. */ groupConditions?: pulumi.Input<pulumi.Input<inputs.NgwafAccountRuleGroupCondition>[]>; /** * Logical operator to apply to group conditions. Accepted values are `any` and `all`. */ groupOperator?: pulumi.Input<string>; /** * List of multival conditions with nested logic. Each multival list must define a `field, operator, groupOperator` and at least one condition. */ multivalConditions?: pulumi.Input<pulumi.Input<inputs.NgwafAccountRuleMultivalCondition>[]>; /** * Logging behavior for matching requests. Accepted values are `sampled` and `none`. */ requestLogging?: pulumi.Input<string>; /** * The type of the rule. Accepted values are `request` and `signal`. */ type?: pulumi.Input<string>; } /** * The set of arguments for constructing a NgwafAccountRule resource. */ export interface NgwafAccountRuleArgs { /** * List of actions to perform when the rule matches. */ actions: pulumi.Input<pulumi.Input<inputs.NgwafAccountRuleAction>[]>; /** * The list of workspace IDs this signal applies to, or the wildcard `*` if it applies to all workspaces. */ appliesTos: pulumi.Input<pulumi.Input<string>[]>; /** * Flat list of individual conditions. Each must include `field`, `operator`, and `value`. */ conditions?: pulumi.Input<pulumi.Input<inputs.NgwafAccountRuleCondition>[]>; /** * The description of the rule. */ description: pulumi.Input<string>; /** * Whether the rule is currently enabled. */ enabled: pulumi.Input<boolean>; /** * List of grouped conditions with nested logic. Each group must define a `groupOperator` and at least one condition. */ groupConditions?: pulumi.Input<pulumi.Input<inputs.NgwafAccountRuleGroupCondition>[]>; /** * Logical operator to apply to group conditions. Accepted values are `any` and `all`. */ groupOperator?: pulumi.Input<string>; /** * List of multival conditions with nested logic. Each multival list must define a `field, operator, groupOperator` and at least one condition. */ multivalConditions?: pulumi.Input<pulumi.Input<inputs.NgwafAccountRuleMultivalCondition>[]>; /** * Logging behavior for matching requests. Accepted values are `sampled` and `none`. */ requestLogging?: pulumi.Input<string>; /** * The type of the rule. Accepted values are `request` and `signal`. */ type: pulumi.Input<string>; }