AwsWafv2RuleGroupArgs

interface AwsWafv2RuleGroupArgs extends Omit<aws.wafv2.RuleGroupArgs, 'name' | 'rulesJson' | 'tags' | 'visibilityConfig'> { capacity: Input<number>; customResponseBodies?: Input<Input<RuleGroupCustomResponseBody>[] | undefined>; description?: Input<string | undefined>; name: string; namePrefix?: Input<string | undefined>; region?: Input<string | undefined>; rules?: Input<Input<RuleGroupRule>[] | undefined>; rulesTemplate: AwsWafv2RuleGroupRulesTemplate; scope: Input<string>; tags?: Input<Record<string, Input<string>>>; visibilityConfig: Input<AwsWafv2RuleGroupVisibilityConfigInput>; }

Input arguments for the WAFv2 rule-group capability.

Remarks

Rules are accepted from a JSON template file only through rulesTemplate. Inline rules JSON is intentionally not part of this API.

visibilityConfig.metricName is derived from the resolved AWS name built from args.ruleGroup.name and is not consumer-settable.

Example

CODE
const ruleGroupArgs: AwsWafv2RuleGroupArgs = {
  name: 'applicationGuardrails',
  scope: 'REGIONAL',
  capacity: 100,
  visibilityConfig: {
    cloudwatchMetricsEnabled: true,
    sampledRequestsEnabled: true,
  },
  rulesTemplate: {
    path: 'templates/waf/rule-group-rules.json',
  },
};

Hierarchy

  • RuleGroupArgs, "name" | "rulesJson" | "tags" | "visibilityConfig">
  • AwsWafv2RuleGroupArgs

Properties

capacity: Input<number>

Inherited from capacity

The web ACL capacity units (WCUs) required for this rule group. See here for general information and here for capacity specific information.

customResponseBodies: Input<Input<RuleGroupCustomResponseBody>[] | undefined>

Inherited from customResponseBodies

Defines custom response bodies that can be referenced by customResponse actions. See Custom Response Body below for details.

description: Input<string | undefined>

Inherited from description

A friendly description of the rule group.

name: string

Required purpose name used to derive the AWS resource name.

Remarks

This value is also used as the Pulumi logical identity and must be a plain, non-empty synchronous value resolved at preview time (not Input/Output/promise-derived).

namePrefix: Input<string | undefined>

Inherited from namePrefix

Creates a unique name beginning with the specified prefix. Conflicts with name.

region: Input<string | undefined>

Inherited from region

Region where this resource will be managed. Defaults to the Region set in the provider configuration.

rules: Input<Input<RuleGroupRule>[] | undefined>

Inherited from rules

The rule blocks used to identify the web requests that you want to allow, block, or count. See Rules below for details.

rulesTemplate: AwsWafv2RuleGroupRulesTemplate

JSON template input used to render the final rules array.

scope: Input<string>

Inherited from scope

Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are CLOUDFRONT or REGIONAL. To work with CloudFront, you must also specify the region us-east-1 (N. Virginia) on the AWS provider.

tags: Input<Record<string, Input<string>>>

Additional tags merged with default project/environment tags.

visibilityConfig: Input<AwsWafv2RuleGroupVisibilityConfigInput>

Visibility configuration; metricName is derived from args.ruleGroup.name and cannot be set by consumers.