import { ResourceBase , ResourceTag } from '../resource' ; import { Value , List } from '../dataTypes' ; export class CustomRequestHandling { InsertHeaders ! : List < CustomHTTPHeader > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class ManagedRuleGroupStatement { Name ! : Value < string > ; VendorName ! : Value < string > ; ExcludedRules ? : List < ExcludedRule > ; ScopeDownStatement ? : Statement ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class TextTransformation { Priority ! : Value < number > ; Type ! : Value < string > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class AllowAction { CustomRequestHandling ? : CustomRequestHandling ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class DefaultAction { Allow ? : AllowAction ; Block ? : BlockAction ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class XssMatchStatement { FieldToMatch ! : FieldToMatch ; TextTransformations ! : List < TextTransformation > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class ByteMatchStatement { SearchString ? : Value < string > ; SearchStringBase64 ? : Value < string > ; FieldToMatch ! : FieldToMatch ; TextTransformations ! : List < TextTransformation > ; PositionalConstraint ! : Value < string > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class ForwardedIPConfiguration { HeaderName ! : Value < string > ; FallbackBehavior ! : Value < string > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class OrStatement { Statements ! : List < Statement > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class Label { Name ! : Value < string > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class CustomHTTPHeader { Name ! : Value < string > ; Value ! : Value < string > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class RegexPatternSetReferenceStatement { Arn ! : Value < string > ; FieldToMatch ! : FieldToMatch ; TextTransformations ! : List < TextTransformation > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class IPSetForwardedIPConfiguration { HeaderName ! : Value < string > ; FallbackBehavior ! : Value < string > ; Position ! : Value < string > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class CustomResponseBody { ContentType ! : Value < string > ; Content ! : Value < string > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class Statement { ByteMatchStatement ? : ByteMatchStatement ; SqliMatchStatement ? : SqliMatchStatement ; XssMatchStatement ? : XssMatchStatement ; SizeConstraintStatement ? : SizeConstraintStatement ; GeoMatchStatement ? : GeoMatchStatement ; RuleGroupReferenceStatement ? : RuleGroupReferenceStatement ; IPSetReferenceStatement ? : IPSetReferenceStatement ; RegexPatternSetReferenceStatement ? : RegexPatternSetReferenceStatement ; ManagedRuleGroupStatement ? : ManagedRuleGroupStatement ; RateBasedStatement ? : RateBasedStatement ; AndStatement ? : AndStatement ; OrStatement ? : OrStatement ; NotStatement ? : NotStatement ; LabelMatchStatement ? : LabelMatchStatement ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class BlockAction { CustomResponse ? : CustomResponse ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class RuleGroupReferenceStatement { Arn ! : Value < string > ; ExcludedRules ? : List < ExcludedRule > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class LabelMatchStatement { Scope ! : Value < string > ; Key ! : Value < string > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class JsonMatchPattern { All ? : { [ key ] : any ; } ; IncludedPaths ? : List < Value < string > > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class AndStatement { Statements ! : List < Statement > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class CountAction { CustomRequestHandling ? : CustomRequestHandling ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class SizeConstraintStatement { FieldToMatch ! : FieldToMatch ; ComparisonOperator ! : Value < string > ; Size ! : Value < number > ; TextTransformations ! : List < TextTransformation > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class FieldToMatch { SingleHeader ? : { [ key ] : any ; } ; SingleQueryArgument ? : { [ key ] : any ; } ; AllQueryArguments ? : { [ key ] : any ; } ; UriPath ? : { [ key ] : any ; } ; QueryString ? : { [ key ] : any ; } ; Body ? : { [ key ] : any ; } ; Method ? : { [ key ] : any ; } ; JsonBody ? : JsonBody ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class SqliMatchStatement { FieldToMatch ! : FieldToMatch ; TextTransformations ! : List < TextTransformation > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class GeoMatchStatement { CountryCodes ? : List < Value < string > > ; ForwardedIPConfig ? : ForwardedIPConfiguration ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class RuleAction { Allow ? : AllowAction ; Block ? : BlockAction ; Count ? : CountAction ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class JsonBody { MatchPattern ! : JsonMatchPattern ; MatchScope ! : Value < string > ; InvalidFallbackBehavior ? : Value < string > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class NotStatement { Statement ! : Statement ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class OverrideAction { Count ? : { [ key ] : any ; } ; None ? : { [ key ] : any ; } ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class Rule { Name ! : Value < string > ; Priority ! : Value < number > ; Statement ! : Statement ; Action ? : RuleAction ; OverrideAction ? : OverrideAction ; RuleLabels ? : List < Label > ; VisibilityConfig ! : VisibilityConfig ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class CustomResponse { ResponseCode ! : Value < number > ; CustomResponseBodyKey ? : Value < string > ; ResponseHeaders ? : List < CustomHTTPHeader > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class RateBasedStatement { Limit ! : Value < number > ; AggregateKeyType ! : Value < string > ; ScopeDownStatement ? : Statement ; ForwardedIPConfig ? : ForwardedIPConfiguration ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class ExcludedRule { Name ! : Value < string > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class VisibilityConfig { SampledRequestsEnabled ! : Value < boolean > ; CloudWatchMetricsEnabled ! : Value < boolean > ; MetricName ! : Value < string > ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export class IPSetReferenceStatement { Arn ! : Value < string > ; IPSetForwardedIPConfig ? : IPSetForwardedIPConfiguration ; constructor ( properties ) { Object . assign ( this , properties ) ; } } export interface WebACLProperties { DefaultAction : DefaultAction ; Description ? : Value < string > ; Name ? : Value < string > ; Scope : Value < string > ; Rules ? : List < Rule > ; VisibilityConfig : VisibilityConfig ; Tags ? : List < ResourceTag > ; CustomResponseBodies ? : { [ key ] : CustomResponseBody ; } ; } export default class WebACL extends ResourceBase < WebACLProperties > { static CustomRequestHandling = CustomRequestHandling ; static ManagedRuleGroupStatement = ManagedRuleGroupStatement ; static TextTransformation = TextTransformation ; static AllowAction = AllowAction ; static DefaultAction = DefaultAction ; static XssMatchStatement = XssMatchStatement ; static ByteMatchStatement = ByteMatchStatement ; static ForwardedIPConfiguration = ForwardedIPConfiguration ; static OrStatement = OrStatement ; static Label = Label ; static CustomHTTPHeader = CustomHTTPHeader ; static RegexPatternSetReferenceStatement = RegexPatternSetReferenceStatement ; static IPSetForwardedIPConfiguration = IPSetForwardedIPConfiguration ; static CustomResponseBody = CustomResponseBody ; static Statement = Statement ; static BlockAction = BlockAction ; static RuleGroupReferenceStatement = RuleGroupReferenceStatement ; static LabelMatchStatement = LabelMatchStatement ; static JsonMatchPattern = JsonMatchPattern ; static AndStatement = AndStatement ; static CountAction = CountAction ; static SizeConstraintStatement = SizeConstraintStatement ; static FieldToMatch = FieldToMatch ; static SqliMatchStatement = SqliMatchStatement ; static GeoMatchStatement = GeoMatchStatement ; static RuleAction = RuleAction ; static JsonBody = JsonBody ; static NotStatement = NotStatement ; static OverrideAction = OverrideAction ; static Rule = Rule ; static CustomResponse = CustomResponse ; static RateBasedStatement = RateBasedStatement ; static ExcludedRule = ExcludedRule ; static VisibilityConfig = VisibilityConfig ; static IPSetReferenceStatement = IPSetReferenceStatement ; constructor ( properties ) { super ( 'AWS::WAFv2::WebACL' , properties ) ; } }