aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
1,057 lines • 466 kB
TypeScript
import * as cdk from "../../core/lib";
import * as constructs from "constructs";
import * as cfn_parse from "../../core/lib/helpers-internal";
import { IIPSetRef, ILoggingConfigurationRef, IPSetReference, IRegexPatternSetRef, IRuleGroupRef, IWebACLAssociationRef, IWebACLRef, LoggingConfigurationReference, RegexPatternSetReference, RuleGroupReference, WebACLAssociationReference, WebACLReference } from "../../interfaces/generated/aws-wafv2-interfaces.generated";
import { aws_appsync as appSyncRefs, aws_elasticloadbalancingv2 as elasticLoadBalancingV2Refs, aws_kinesisfirehose as kinesisFirehoseRefs, aws_logs as logsRefs, aws_s3 as s3Refs, aws_wafv2 as waFv2Refs } from "../../interfaces";
/**
* > This is the latest version of *AWS WAF* , named AWS WAF V2, released in November, 2019.
*
* For information, including how to migrate your AWS WAF resources from the prior release, see the [AWS WAF developer guide](https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) .
*
* Use an `IPSet` to identify web requests that originate from specific IP addresses or ranges of IP addresses. For example, if you're receiving a lot of requests from a ranges of IP addresses, you can configure AWS WAF to block them using an IP set that lists those IP addresses.
*
* You use an IP set by providing its Amazon Resource Name (ARN) to the rule statement `IPSetReferenceStatement` , when you add a rule to a rule group or web ACL.
*
* @cloudformationResource AWS::WAFv2::IPSet
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-ipset.html
*/
export declare class CfnIPSet extends cdk.CfnResource implements cdk.IInspectable, IIPSetRef, cdk.ITaggable {
/**
* The CloudFormation resource type name for this resource class.
*/
static readonly CFN_RESOURCE_TYPE_NAME: string;
/**
* Build a CfnIPSet from CloudFormation properties
*
* A factory method that creates a new instance of this class from an object
* containing the CloudFormation properties of this resource.
* Used in the @aws-cdk/cloudformation-include module.
*
* @internal
*/
static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnIPSet;
/**
* Checks whether the given object is a CfnIPSet
*/
static isCfnIPSet(x: any): x is CfnIPSet;
static arnForIPSet(resource: IIPSetRef): string;
/**
* Contains an array of strings that specifies zero or more IP addresses or blocks of IP addresses that you want AWS WAF to inspect for in incoming requests.
*/
private _addresses;
/**
* A description of the IP set that helps with identification.
*/
private _description?;
/**
* The version of the IP addresses, either `IPV4` or `IPV6` .
*/
private _ipAddressVersion;
/**
* The name of the IP set.
*/
private _name?;
/**
* Specifies whether this is for an Amazon CloudFront distribution or for a regional application.
*/
private _scope;
/**
* Tag Manager which manages the tags for this resource
*/
readonly tags: cdk.TagManager;
/**
* Key:value pairs associated with an AWS resource.
*/
private _tagsRaw?;
/**
* Create a new `AWS::WAFv2::IPSet`.
*
* @param scope Scope in which this resource is defined
* @param id Construct identifier for this resource (unique in its scope)
* @param props Resource properties
*/
constructor(scope: constructs.Construct, id: string, props: CfnIPSetProps);
get ipSetRef(): IPSetReference;
/**
* Contains an array of strings that specifies zero or more IP addresses or blocks of IP addresses that you want AWS WAF to inspect for in incoming requests.
*/
get addresses(): Array<string>;
/**
* Contains an array of strings that specifies zero or more IP addresses or blocks of IP addresses that you want AWS WAF to inspect for in incoming requests.
*/
set addresses(value: Array<string>);
/**
* A description of the IP set that helps with identification.
*/
get description(): string | undefined;
/**
* A description of the IP set that helps with identification.
*/
set description(value: string | undefined);
/**
* The version of the IP addresses, either `IPV4` or `IPV6` .
*/
get ipAddressVersion(): string;
/**
* The version of the IP addresses, either `IPV4` or `IPV6` .
*/
set ipAddressVersion(value: string);
/**
* The name of the IP set.
*/
get name(): string | undefined;
/**
* The name of the IP set.
*/
set name(value: string | undefined);
/**
* Specifies whether this is for an Amazon CloudFront distribution or for a regional application.
*/
get scope(): string;
/**
* Specifies whether this is for an Amazon CloudFront distribution or for a regional application.
*/
set scope(value: string);
/**
* Key:value pairs associated with an AWS resource.
*/
get tagsRaw(): Array<cdk.CfnTag> | undefined;
/**
* Key:value pairs associated with an AWS resource.
*/
set tagsRaw(value: Array<cdk.CfnTag> | undefined);
/**
* The Amazon Resource Name (ARN) of the IP set.
*
* @cloudformationAttribute Arn
*/
get attrArn(): string;
/**
* The ID of the IP set.
*
* @cloudformationAttribute Id
*/
get attrId(): string;
protected get cfnProperties(): Record<string, any>;
/**
* Examines the CloudFormation resource and discloses attributes
*
* @param inspector tree inspector to collect and process attributes
*/
inspect(inspector: cdk.TreeInspector): void;
protected renderProperties(props: Record<string, any>): Record<string, any>;
}
/**
* Properties for defining a `CfnIPSet`
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-ipset.html
*/
export interface CfnIPSetProps {
/**
* Contains an array of strings that specifies zero or more IP addresses or blocks of IP addresses that you want AWS WAF to inspect for in incoming requests.
*
* All addresses must be specified using Classless Inter-Domain Routing (CIDR) notation. AWS WAF supports all IPv4 and IPv6 CIDR ranges except for `/0` .
*
* Example address strings:
*
* - For requests that originated from the IP address 192.0.2.44, specify `192.0.2.44/32` .
* - For requests that originated from IP addresses from 192.0.2.0 to 192.0.2.255, specify `192.0.2.0/24` .
* - For requests that originated from the IP address 1111:0000:0000:0000:0000:0000:0000:0111, specify `1111:0000:0000:0000:0000:0000:0000:0111/128` .
* - For requests that originated from IP addresses 1111:0000:0000:0000:0000:0000:0000:0000 to 1111:0000:0000:0000:ffff:ffff:ffff:ffff, specify `1111:0000:0000:0000:0000:0000:0000:0000/64` .
*
* For more information about CIDR notation, see the Wikipedia entry [Classless Inter-Domain Routing](https://docs.aws.amazon.com/https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) .
*
* Example JSON `Addresses` specifications:
*
* - Empty array: `"Addresses": []`
* - Array with one address: `"Addresses": ["192.0.2.44/32"]`
* - Array with three addresses: `"Addresses": ["192.0.2.44/32", "192.0.2.0/24", "192.0.0.0/16"]`
* - INVALID specification: `"Addresses": [""]` INVALID
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-ipset.html#cfn-wafv2-ipset-addresses
*/
readonly addresses: Array<string>;
/**
* A description of the IP set that helps with identification.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-ipset.html#cfn-wafv2-ipset-description
*/
readonly description?: string;
/**
* The version of the IP addresses, either `IPV4` or `IPV6` .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-ipset.html#cfn-wafv2-ipset-ipaddressversion
*/
readonly ipAddressVersion: string;
/**
* The name of the IP set.
*
* You cannot change the name of an `IPSet` after you create it.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-ipset.html#cfn-wafv2-ipset-name
*/
readonly name?: string;
/**
* Specifies whether this is for an Amazon CloudFront distribution or for a regional application.
*
* A regional application can be an Application Load Balancer (ALB), an REST API, an AWS AppSync GraphQL API, an Amazon Cognito user pool, an AWS App Runner service, or an AWS Verified Access instance. Valid Values are `CLOUDFRONT` and `REGIONAL` .
*
* > For `CLOUDFRONT` , you must create your WAFv2 resources in the US East (N. Virginia) Region, `us-east-1` .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-ipset.html#cfn-wafv2-ipset-scope
*/
readonly scope: string;
/**
* Key:value pairs associated with an AWS resource.
*
* The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each AWS resource.
*
* > To modify tags on existing resources, use the AWS WAF APIs or command line interface. With AWS CloudFormation , you can only add tags to AWS WAF resources during resource creation.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-ipset.html#cfn-wafv2-ipset-tags
*/
readonly tags?: Array<cdk.CfnTag>;
}
/**
* Defines an association between logging destinations and a web ACL resource, for logging from AWS WAF .
*
* As part of the association, you can specify parts of the standard logging fields to keep out of the logs and you can specify filters so that you log only a subset of the logging records.
*
* If you configure data protection for the web ACL, the protection applies to the data that AWS WAF sends to the logs.
*
* > You can define one logging destination per web ACL.
*
* You can access information about the traffic that AWS WAF inspects using the following steps:
*
* - Create your logging destination. You can use an Amazon CloudWatch Logs log group, an Amazon Simple Storage Service (Amazon S3) bucket, or an Amazon Kinesis Data Firehose.
*
* The name that you give the destination must start with `aws-waf-logs-` . Depending on the type of destination, you might need to configure additional settings or permissions.
*
* For configuration requirements and pricing information for each destination type, see [Logging web ACL traffic](https://docs.aws.amazon.com/waf/latest/developerguide/logging.html) in the *AWS WAF Developer Guide* .
* - Associate your logging destination to your web ACL using a `PutLoggingConfiguration` request.
*
* When you successfully enable logging using a `PutLoggingConfiguration` request, AWS WAF creates an additional role or policy that is required to write logs to the logging destination. For an Amazon CloudWatch Logs log group, AWS WAF creates a resource policy on the log group. For an Amazon S3 bucket, AWS WAF creates a bucket policy. For an Amazon Kinesis Data Firehose, AWS WAF creates a service-linked role.
*
* For additional information about web ACL logging, see [Logging web ACL traffic information](https://docs.aws.amazon.com/waf/latest/developerguide/logging.html) in the *AWS WAF Developer Guide* .
*
* @cloudformationResource AWS::WAFv2::LoggingConfiguration
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-loggingconfiguration.html
*/
export declare class CfnLoggingConfiguration extends cdk.CfnResource implements cdk.IInspectable, ILoggingConfigurationRef {
/**
* The CloudFormation resource type name for this resource class.
*/
static readonly CFN_RESOURCE_TYPE_NAME: string;
/**
* Build a CfnLoggingConfiguration from CloudFormation properties
*
* A factory method that creates a new instance of this class from an object
* containing the CloudFormation properties of this resource.
* Used in the @aws-cdk/cloudformation-include module.
*
* @internal
*/
static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnLoggingConfiguration;
/**
* Checks whether the given object is a CfnLoggingConfiguration
*/
static isCfnLoggingConfiguration(x: any): x is CfnLoggingConfiguration;
/**
* The logging destination configuration that you want to associate with the web ACL.
*/
private _logDestinationConfigs;
/**
* Filtering that specifies which web requests are kept in the logs and which are dropped.
*/
private _loggingFilter?;
/**
* The parts of the request that you want to keep out of the logs.
*/
private _redactedFields?;
/**
* The Amazon Resource Name (ARN) of the web ACL that you want to associate with `LogDestinationConfigs` .
*/
private _resourceArn;
/**
* Create a new `AWS::WAFv2::LoggingConfiguration`.
*
* @param scope Scope in which this resource is defined
* @param id Construct identifier for this resource (unique in its scope)
* @param props Resource properties
*/
constructor(scope: constructs.Construct, id: string, props: CfnLoggingConfigurationProps);
get loggingConfigurationRef(): LoggingConfigurationReference;
/**
* The logging destination configuration that you want to associate with the web ACL.
*/
get logDestinationConfigs(): Array<string>;
/**
* The logging destination configuration that you want to associate with the web ACL.
*/
set logDestinationConfigs(value: Array<string>);
/**
* Filtering that specifies which web requests are kept in the logs and which are dropped.
*/
get loggingFilter(): any | cdk.IResolvable | undefined;
/**
* Filtering that specifies which web requests are kept in the logs and which are dropped.
*/
set loggingFilter(value: any | cdk.IResolvable | undefined);
/**
* The parts of the request that you want to keep out of the logs.
*/
get redactedFields(): Array<CfnLoggingConfiguration.FieldToMatchProperty | cdk.IResolvable> | cdk.IResolvable | undefined;
/**
* The parts of the request that you want to keep out of the logs.
*/
set redactedFields(value: Array<CfnLoggingConfiguration.FieldToMatchProperty | cdk.IResolvable> | cdk.IResolvable | undefined);
/**
* The Amazon Resource Name (ARN) of the web ACL that you want to associate with `LogDestinationConfigs` .
*/
get resourceArn(): string;
/**
* The Amazon Resource Name (ARN) of the web ACL that you want to associate with `LogDestinationConfigs` .
*/
set resourceArn(value: string);
/**
* Indicates whether the logging configuration was created by AWS Firewall Manager , as part of an AWS WAF policy configuration. If true, only Firewall Manager can modify or delete the configuration.
*
* @cloudformationAttribute ManagedByFirewallManager
*/
get attrManagedByFirewallManager(): cdk.IResolvable;
protected get cfnProperties(): Record<string, any>;
/**
* Examines the CloudFormation resource and discloses attributes
*
* @param inspector tree inspector to collect and process attributes
*/
inspect(inspector: cdk.TreeInspector): void;
protected renderProperties(props: Record<string, any>): Record<string, any>;
}
export declare namespace CfnLoggingConfiguration {
/**
* The parts of the request that you want to keep out of the logs.
*
* This is used in the logging configuration `RedactedFields` specification.
*
* Example JSON for a `QueryString` field to match:
*
* `"FieldToMatch": { "QueryString": {} }`
*
* Example JSON for a `Method` field to match specification:
*
* `"FieldToMatch": { "Method": { "Name": "DELETE" } }`
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-fieldtomatch.html
*/
interface FieldToMatchProperty {
/**
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-fieldtomatch.html#cfn-wafv2-loggingconfiguration-fieldtomatch-jsonbody
*/
readonly jsonBody?: any | cdk.IResolvable;
/**
* Redact the indicated HTTP method.
*
* The method indicates the type of operation that the request is asking the origin to perform.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-fieldtomatch.html#cfn-wafv2-loggingconfiguration-fieldtomatch-method
*/
readonly method?: any | cdk.IResolvable;
/**
* Redact the query string.
*
* This is the part of a URL that appears after a `?` character, if any.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-fieldtomatch.html#cfn-wafv2-loggingconfiguration-fieldtomatch-querystring
*/
readonly queryString?: any | cdk.IResolvable;
/**
* Redact a single header.
*
* Provide the name of the header to inspect, for example, `User-Agent` or `Referer` . This setting isn't case sensitive.
*
* Example JSON: `"SingleHeader": { "Name": "haystack" }`
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-fieldtomatch.html#cfn-wafv2-loggingconfiguration-fieldtomatch-singleheader
*/
readonly singleHeader?: any | cdk.IResolvable;
/**
* Redact the request URI path.
*
* This is the part of the web request that identifies a resource, for example, `/images/daily-ad.jpg` .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-fieldtomatch.html#cfn-wafv2-loggingconfiguration-fieldtomatch-uripath
*/
readonly uriPath?: any | cdk.IResolvable;
}
/**
* Filtering that specifies which web requests are kept in the logs and which are dropped, defined for a web ACL's `LoggingConfiguration` .
*
* You can filter on the rule action and on the web request labels that were applied by matching rules during web ACL evaluation.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-loggingfilter.html
*/
interface LoggingFilterProperty {
/**
* Default handling for logs that don't match any of the specified filtering conditions.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-loggingfilter.html#cfn-wafv2-loggingconfiguration-loggingfilter-defaultbehavior
*/
readonly defaultBehavior: string;
/**
* The filters that you want to apply to the logs.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-loggingfilter.html#cfn-wafv2-loggingconfiguration-loggingfilter-filters
*/
readonly filters: Array<CfnLoggingConfiguration.FilterProperty | cdk.IResolvable> | cdk.IResolvable;
}
/**
* A single logging filter, used in `LoggingFilter` .
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-filter.html
*/
interface FilterProperty {
/**
* How to handle logs that satisfy the filter's conditions and requirement.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-filter.html#cfn-wafv2-loggingconfiguration-filter-behavior
*/
readonly behavior: string;
/**
* Match conditions for the filter.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-filter.html#cfn-wafv2-loggingconfiguration-filter-conditions
*/
readonly conditions: Array<CfnLoggingConfiguration.ConditionProperty | cdk.IResolvable> | cdk.IResolvable;
/**
* Logic to apply to the filtering conditions.
*
* You can specify that, in order to satisfy the filter, a log must match all conditions or must match at least one condition.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-filter.html#cfn-wafv2-loggingconfiguration-filter-requirement
*/
readonly requirement: string;
}
/**
* A single match condition for a log filter.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-condition.html
*/
interface ConditionProperty {
/**
* A single action condition.
*
* This is the action setting that a log record must contain in order to meet the condition.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-condition.html#cfn-wafv2-loggingconfiguration-condition-actioncondition
*/
readonly actionCondition?: CfnLoggingConfiguration.ActionConditionProperty | cdk.IResolvable;
/**
* A single label name condition.
*
* This is the fully qualified label name that a log record must contain in order to meet the condition. Fully qualified labels have a prefix, optional namespaces, and label name. The prefix identifies the rule group or web ACL context of the rule that added the label.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-condition.html#cfn-wafv2-loggingconfiguration-condition-labelnamecondition
*/
readonly labelNameCondition?: cdk.IResolvable | CfnLoggingConfiguration.LabelNameConditionProperty;
}
/**
* A single label name condition for a condition in a logging filter.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-labelnamecondition.html
*/
interface LabelNameConditionProperty {
/**
* The label name that a log record must contain in order to meet the condition.
*
* This must be a fully qualified label name. Fully qualified labels have a prefix, optional namespaces, and label name. The prefix identifies the rule group or web ACL context of the rule that added the label.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-labelnamecondition.html#cfn-wafv2-loggingconfiguration-labelnamecondition-labelname
*/
readonly labelName: string;
}
/**
* A single action condition for a condition in a logging filter.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-actioncondition.html
*/
interface ActionConditionProperty {
/**
* The action setting that a log record must contain in order to meet the condition.
*
* This is the action that AWS WAF applied to the web request.
*
* For rule groups, this is either the configured rule action setting, or if you've applied a rule action override to the rule, it's the override action. The value `EXCLUDED_AS_COUNT` matches on excluded rules and also on rules that have a rule action override of Count.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-actioncondition.html#cfn-wafv2-loggingconfiguration-actioncondition-action
*/
readonly action: string;
}
/**
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-jsonbody.html
*/
interface JsonBodyProperty {
/**
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-jsonbody.html#cfn-wafv2-loggingconfiguration-jsonbody-invalidfallbackbehavior
*/
readonly invalidFallbackBehavior?: string;
/**
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-jsonbody.html#cfn-wafv2-loggingconfiguration-jsonbody-matchpattern
*/
readonly matchPattern: cdk.IResolvable | CfnLoggingConfiguration.MatchPatternProperty;
/**
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-jsonbody.html#cfn-wafv2-loggingconfiguration-jsonbody-matchscope
*/
readonly matchScope: string;
}
/**
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-matchpattern.html
*/
interface MatchPatternProperty {
/**
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-matchpattern.html#cfn-wafv2-loggingconfiguration-matchpattern-all
*/
readonly all?: any | cdk.IResolvable;
/**
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-matchpattern.html#cfn-wafv2-loggingconfiguration-matchpattern-includedpaths
*/
readonly includedPaths?: Array<string>;
}
/**
* Inspect one of the headers in the web request, identified by name, for example, `User-Agent` or `Referer` .
*
* The name isn't case sensitive.
*
* You can filter and inspect all headers with the `FieldToMatch` setting `Headers` .
*
* This is used to indicate the web request component to inspect, in the `FieldToMatch` specification.
*
* Example JSON: `"SingleHeader": { "Name": "haystack" }`
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-singleheader.html
*/
interface SingleHeaderProperty {
/**
* The name of the query header to inspect.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-loggingconfiguration-singleheader.html#cfn-wafv2-loggingconfiguration-singleheader-name
*/
readonly name: string;
}
}
/**
* Properties for defining a `CfnLoggingConfiguration`
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-loggingconfiguration.html
*/
export interface CfnLoggingConfigurationProps {
/**
* The logging destination configuration that you want to associate with the web ACL.
*
* > You can associate one logging destination to a web ACL.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-loggingconfiguration.html#cfn-wafv2-loggingconfiguration-logdestinationconfigs
*/
readonly logDestinationConfigs: Array<kinesisFirehoseRefs.IDeliveryStreamRef | logsRefs.ILogGroupRef | s3Refs.IBucketRef | string>;
/**
* Filtering that specifies which web requests are kept in the logs and which are dropped.
*
* You can filter on the rule action and on the web request labels that were applied by matching rules during web ACL evaluation.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-loggingconfiguration.html#cfn-wafv2-loggingconfiguration-loggingfilter
*/
readonly loggingFilter?: any | cdk.IResolvable;
/**
* The parts of the request that you want to keep out of the logs.
*
* For example, if you redact the `SingleHeader` field, the `HEADER` field in the logs will be `REDACTED` for all rules that use the `SingleHeader` `FieldToMatch` setting.
*
* If you configure data protection for the web ACL, the protection applies to the data that AWS WAF sends to the logs.
*
* Redaction applies only to the component that's specified in the rule's `FieldToMatch` setting, so the `SingleHeader` redaction doesn't apply to rules that use the `Headers` `FieldToMatch` .
*
* > You can specify only the following fields for redaction: `UriPath` , `QueryString` , `SingleHeader` , and `Method` . > This setting has no impact on request sampling. You can only exclude fields from request sampling by disabling sampling in the web ACL visibility configuration or by configuring data protection for the web ACL.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-loggingconfiguration.html#cfn-wafv2-loggingconfiguration-redactedfields
*/
readonly redactedFields?: Array<CfnLoggingConfiguration.FieldToMatchProperty | cdk.IResolvable> | cdk.IResolvable;
/**
* The Amazon Resource Name (ARN) of the web ACL that you want to associate with `LogDestinationConfigs` .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-loggingconfiguration.html#cfn-wafv2-loggingconfiguration-resourcearn
*/
readonly resourceArn: string | waFv2Refs.IWebACLRef;
}
/**
* > This is the latest version of *AWS WAF* , named AWS WAF V2, released in November, 2019.
*
* For information, including how to migrate your AWS WAF resources from the prior release, see the [AWS WAF developer guide](https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) .
*
* Use an `RegexPatternSet` to have AWS WAF inspect a web request component for a specific set of regular expression patterns.
*
* You use a regex pattern set by providing its Amazon Resource Name (ARN) to the rule statement `RegexPatternSetReferenceStatement` , when you add a rule to a rule group or web ACL.
*
* @cloudformationResource AWS::WAFv2::RegexPatternSet
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-regexpatternset.html
*/
export declare class CfnRegexPatternSet extends cdk.CfnResource implements cdk.IInspectable, IRegexPatternSetRef, cdk.ITaggable {
/**
* The CloudFormation resource type name for this resource class.
*/
static readonly CFN_RESOURCE_TYPE_NAME: string;
/**
* Build a CfnRegexPatternSet from CloudFormation properties
*
* A factory method that creates a new instance of this class from an object
* containing the CloudFormation properties of this resource.
* Used in the @aws-cdk/cloudformation-include module.
*
* @internal
*/
static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnRegexPatternSet;
/**
* Checks whether the given object is a CfnRegexPatternSet
*/
static isCfnRegexPatternSet(x: any): x is CfnRegexPatternSet;
static arnForRegexPatternSet(resource: IRegexPatternSetRef): string;
/**
* A description of the set that helps with identification.
*/
private _description?;
/**
* The name of the set.
*/
private _name?;
/**
* The regular expression patterns in the set.
*/
private _regularExpressionList;
/**
* Specifies whether this is for an Amazon CloudFront distribution or for a regional application.
*/
private _scope;
/**
* Tag Manager which manages the tags for this resource
*/
readonly tags: cdk.TagManager;
/**
* Key:value pairs associated with an AWS resource.
*/
private _tagsRaw?;
/**
* Create a new `AWS::WAFv2::RegexPatternSet`.
*
* @param scope Scope in which this resource is defined
* @param id Construct identifier for this resource (unique in its scope)
* @param props Resource properties
*/
constructor(scope: constructs.Construct, id: string, props: CfnRegexPatternSetProps);
get regexPatternSetRef(): RegexPatternSetReference;
/**
* A description of the set that helps with identification.
*/
get description(): string | undefined;
/**
* A description of the set that helps with identification.
*/
set description(value: string | undefined);
/**
* The name of the set.
*/
get name(): string | undefined;
/**
* The name of the set.
*/
set name(value: string | undefined);
/**
* The regular expression patterns in the set.
*/
get regularExpressionList(): Array<string>;
/**
* The regular expression patterns in the set.
*/
set regularExpressionList(value: Array<string>);
/**
* Specifies whether this is for an Amazon CloudFront distribution or for a regional application.
*/
get scope(): string;
/**
* Specifies whether this is for an Amazon CloudFront distribution or for a regional application.
*/
set scope(value: string);
/**
* Key:value pairs associated with an AWS resource.
*/
get tagsRaw(): Array<cdk.CfnTag> | undefined;
/**
* Key:value pairs associated with an AWS resource.
*/
set tagsRaw(value: Array<cdk.CfnTag> | undefined);
/**
* The Amazon Resource Name (ARN) of the regex pattern set.
*
* @cloudformationAttribute Arn
*/
get attrArn(): string;
/**
* The ID of the regex pattern set.
*
* @cloudformationAttribute Id
*/
get attrId(): string;
protected get cfnProperties(): Record<string, any>;
/**
* Examines the CloudFormation resource and discloses attributes
*
* @param inspector tree inspector to collect and process attributes
*/
inspect(inspector: cdk.TreeInspector): void;
protected renderProperties(props: Record<string, any>): Record<string, any>;
}
/**
* Properties for defining a `CfnRegexPatternSet`
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-regexpatternset.html
*/
export interface CfnRegexPatternSetProps {
/**
* A description of the set that helps with identification.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-regexpatternset.html#cfn-wafv2-regexpatternset-description
*/
readonly description?: string;
/**
* The name of the set.
*
* You cannot change the name after you create the set.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-regexpatternset.html#cfn-wafv2-regexpatternset-name
*/
readonly name?: string;
/**
* The regular expression patterns in the set.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-regexpatternset.html#cfn-wafv2-regexpatternset-regularexpressionlist
*/
readonly regularExpressionList: Array<string>;
/**
* Specifies whether this is for an Amazon CloudFront distribution or for a regional application.
*
* For an AWS Amplify application, use `CLOUDFRONT` . A regional application can be an Application Load Balancer (ALB), an REST API, an AWS AppSync GraphQL API, an Amazon Cognito user pool, an AWS App Runner service, or an AWS Verified Access instance. Valid Values are `CLOUDFRONT` and `REGIONAL` .
*
* > For `CLOUDFRONT` , you must create your WAFv2 resources in the US East (N. Virginia) Region, `us-east-1` .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-regexpatternset.html#cfn-wafv2-regexpatternset-scope
*/
readonly scope: string;
/**
* Key:value pairs associated with an AWS resource.
*
* The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each AWS resource.
*
* > To modify tags on existing resources, use the AWS WAF APIs or command line interface. With AWS CloudFormation , you can only add tags to AWS WAF resources during resource creation.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-regexpatternset.html#cfn-wafv2-regexpatternset-tags
*/
readonly tags?: Array<cdk.CfnTag>;
}
/**
* > This is the latest version of *AWS WAF* , named AWS WAF V2, released in November, 2019.
*
* For information, including how to migrate your AWS WAF resources from the prior release, see the [AWS WAF developer guide](https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) .
*
* Use an `RuleGroup` to define a collection of rules for inspecting and controlling web requests. You use a rule group in an `WebACL` by providing its Amazon Resource Name (ARN) to the rule statement `RuleGroupReferenceStatement` , when you add rules to the web ACL.
*
* When you create a rule group, you define an immutable capacity limit. If you update a rule group, you must stay within the capacity. This allows others to reuse the rule group with confidence in its capacity requirements.
*
* @cloudformationResource AWS::WAFv2::RuleGroup
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-rulegroup.html
*/
export declare class CfnRuleGroup extends cdk.CfnResource implements cdk.IInspectable, IRuleGroupRef, cdk.ITaggable {
/**
* The CloudFormation resource type name for this resource class.
*/
static readonly CFN_RESOURCE_TYPE_NAME: string;
/**
* Build a CfnRuleGroup from CloudFormation properties
*
* A factory method that creates a new instance of this class from an object
* containing the CloudFormation properties of this resource.
* Used in the @aws-cdk/cloudformation-include module.
*
* @internal
*/
static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnRuleGroup;
/**
* Checks whether the given object is a CfnRuleGroup
*/
static isCfnRuleGroup(x: any): x is CfnRuleGroup;
static arnForRuleGroup(resource: IRuleGroupRef): string;
/**
* The labels that one or more rules in this rule group add to matching web requests.
*/
private _availableLabels?;
/**
* The web ACL capacity units (WCUs) required for this rule group.
*/
private _capacity;
/**
* The labels that one or more rules in this rule group match against in label match statements.
*/
private _consumedLabels?;
/**
* A map of custom response keys and content bodies.
*/
private _customResponseBodies?;
/**
* A description of the rule group that helps with identification.
*/
private _description?;
/**
* The name of the rule group.
*/
private _name?;
/**
* The rule statements used to identify the web requests that you want to allow, block, or count.
*/
private _rules?;
/**
* Specifies whether this is for an Amazon CloudFront distribution or for a regional application.
*/
private _scope;
/**
* Tag Manager which manages the tags for this resource
*/
readonly tags: cdk.TagManager;
/**
* Key:value pairs associated with an AWS resource.
*/
private _tagsRaw?;
/**
* Defines and enables Amazon CloudWatch metrics and web request sample collection.
*/
private _visibilityConfig;
/**
* Create a new `AWS::WAFv2::RuleGroup`.
*
* @param scope Scope in which this resource is defined
* @param id Construct identifier for this resource (unique in its scope)
* @param props Resource properties
*/
constructor(scope: constructs.Construct, id: string, props: CfnRuleGroupProps);
get ruleGroupRef(): RuleGroupReference;
/**
* The labels that one or more rules in this rule group add to matching web requests.
*/
get availableLabels(): Array<cdk.IResolvable | CfnRuleGroup.LabelSummaryProperty> | cdk.IResolvable | undefined;
/**
* The labels that one or more rules in this rule group add to matching web requests.
*/
set availableLabels(value: Array<cdk.IResolvable | CfnRuleGroup.LabelSummaryProperty> | cdk.IResolvable | undefined);
/**
* The web ACL capacity units (WCUs) required for this rule group.
*/
get capacity(): number;
/**
* The web ACL capacity units (WCUs) required for this rule group.
*/
set capacity(value: number);
/**
* The labels that one or more rules in this rule group match against in label match statements.
*/
get consumedLabels(): Array<cdk.IResolvable | CfnRuleGroup.LabelSummaryProperty> | cdk.IResolvable | undefined;
/**
* The labels that one or more rules in this rule group match against in label match statements.
*/
set consumedLabels(value: Array<cdk.IResolvable | CfnRuleGroup.LabelSummaryProperty> | cdk.IResolvable | undefined);
/**
* A map of custom response keys and content bodies.
*/
get customResponseBodies(): cdk.IResolvable | Record<string, CfnRuleGroup.CustomResponseBodyProperty | cdk.IResolvable> | undefined;
/**
* A map of custom response keys and content bodies.
*/
set customResponseBodies(value: cdk.IResolvable | Record<string, CfnRuleGroup.CustomResponseBodyProperty | cdk.IResolvable> | undefined);
/**
* A description of the rule group that helps with identification.
*/
get description(): string | undefined;
/**
* A description of the rule group that helps with identification.
*/
set description(value: string | undefined);
/**
* The name of the rule group.
*/
get name(): string | undefined;
/**
* The name of the rule group.
*/
set name(value: string | undefined);
/**
* The rule statements used to identify the web requests that you want to allow, block, or count.
*/
get rules(): Array<cdk.IResolvable | CfnRuleGroup.RuleProperty> | cdk.IResolvable | undefined;
/**
* The rule statements used to identify the web requests that you want to allow, block, or count.
*/
set rules(value: Array<cdk.IResolvable | CfnRuleGroup.RuleProperty> | cdk.IResolvable | undefined);
/**
* Specifies whether this is for an Amazon CloudFront distribution or for a regional application.
*/
get scope(): string;
/**
* Specifies whether this is for an Amazon CloudFront distribution or for a regional application.
*/
set scope(value: string);
/**
* Key:value pairs associated with an AWS resource.
*/
get tagsRaw(): Array<cdk.CfnTag> | undefined;
/**
* Key:value pairs associated with an AWS resource.
*/
set tagsRaw(value: Array<cdk.CfnTag> | undefined);
/**
* Defines and enables Amazon CloudWatch metrics and web request sample collection.
*/
get visibilityConfig(): cdk.IResolvable | CfnRuleGroup.VisibilityConfigProperty;
/**
* Defines and enables Amazon CloudWatch metrics and web request sample collection.
*/
set visibilityConfig(value: cdk.IResolvable | CfnRuleGroup.VisibilityConfigProperty);
/**
* The Amazon Resource Name (ARN) of the rule group.
*
* @cloudformationAttribute Arn
*/
get attrArn(): string;
/**
* The ID of the rule group.
*
* @cloudformationAttribute Id
*/
get attrId(): string;
/**
* The label namespace prefix for this rule group. All labels added by rules in this rule group have this prefix.
*
* The syntax for the label namespace prefix for a rule group is the following: `awswaf:<account ID>:rule group:<rule group name>:`
*
* When a rule with a label matches a web request, AWS WAF adds the fully qualified label to the request. A fully qualified label is made up of the label namespace from the rule group or web ACL where the rule is defined and the label from the rule, separated by a colon.
*
* @cloudformationAttribute LabelNamespace
*/
get attrLabelNamespace(): string;
protected get cfnProperties(): Record<string, any>;
/**
* Examines the CloudFormation resource and discloses attributes
*
* @param inspector tree inspector to collect and process attributes
*/
inspect(inspector: cdk.TreeInspector): void;
protected renderProperties(props: Record<string, any>): Record<string, any>;
}
export declare namespace CfnRuleGroup {
/**
* List of labels used by one or more of the rules of a `RuleGroup` .
*
* This summary object is used for the following rule group lists:
*
* - `AvailableLabels` - Labels that rules add to matching requests. These labels are defined in the `RuleLabels` for a rule.
* - `ConsumedLabels` - Labels that rules match against. These labels are defined in a `LabelMatchStatement` specification, in the `Statement` definition of a rule.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-labelsummary.html
*/
interface LabelSummaryProperty {
/**
* An individual label specification.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-labelsummary.html#cfn-wafv2-rulegroup-labelsummary-name
*/
readonly name?: string;
}
/**
* The response body to use in a custom response to a web request.
*
* This is referenced by key from `CustomResponse` `CustomResponseBodyKey` .
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-customresponsebody.html
*/
interface CustomResponseBodyProperty {
/**
* The payload of the custom response.
*
* You can use JSON escape strings in JSON content. To do this, you must specify JSON content in the `ContentType` setting.
*
* For information about the limits on count and size for custom request and response settings, see [AWS WAF quotas](https://docs.aws.amazon.com/waf/latest/developerguide/limits.html) in the *AWS WAF Developer Guide* .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-customresponsebody.html#cfn-wafv2-rulegroup-customresponsebody-content
*/
readonly content: string;
/**
* The type of content in the payload that you are defining in the `Content` string.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-customresponsebody.html#cfn-wafv2-rulegroup-customresponsebody-contenttype
*/
readonly contentType: string;
}
/**
* A single rule, which you can use in a `WebACL` or `RuleGroup` to identify web requests that you want to manage in some way.
*
* Each rule includes one top-level `Statement` that AWS WAF uses to identify matching web requests, and parameters that govern how AWS WAF handles them.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-rule.html
*/
interface RuleProperty {
/**
* The action that AWS WAF should take on a web request when it matches the rule statement.
*
* Settings at the web ACL level can override the rule action setting.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-rule.html#cfn-wafv2-rulegroup-rule-action
*/
readonly action?: cdk.IResolvable | CfnRuleGroup.RuleActionProperty;
/**
* Specifies how AWS WAF should handle `CAPTCHA` evaluations.
*
* If you don't specify this, AWS WAF uses the `CAPTCHA` configuration that's defined for the web ACL.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-rulegroup-rule.html#cfn-wafv2-rulegroup-rule-captchaconfig
*/
readonly captchaConfig?: CfnRuleGroup.CaptchaConfigProperty | cdk.IResolvable;
/**
* Sp