amazonka-wafv2-2.0: Amazon WAFV2 SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.WAFV2.CreateRuleGroup

Description

Creates a RuleGroup per the specifications provided.

A rule group defines a collection of rules to inspect and control web requests that you can use in a WebACL. 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.

Synopsis

Creating a Request

data CreateRuleGroup Source #

See: newCreateRuleGroup smart constructor.

Constructors

CreateRuleGroup' 

Fields

  • customResponseBodies :: Maybe (HashMap Text CustomResponseBody)

    A map of custom response keys and content bodies. When you create a rule with a block action, you can send a custom response to the web request. You define these for the rule group, and then use them in the rules that you define in the rule group.

    For information about customizing web requests and responses, see Customizing web requests and responses in WAF in the WAF Developer Guide.

    For information about the limits on count and size for custom request and response settings, see WAF quotas in the WAF Developer Guide.

  • description :: Maybe Text

    A description of the rule group that helps with identification.

  • rules :: Maybe [Rule]

    The Rule statements used to identify the web requests that you want to allow, block, or count. Each rule includes one top-level statement that WAF uses to identify matching web requests, and parameters that govern how WAF handles them.

  • tags :: Maybe (NonEmpty Tag)

    An array of key:value pairs to associate with the resource.

  • name :: Text

    The name of the rule group. You cannot change the name of a rule group after you create it.

  • scope :: Scope

    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 Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.

    To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:

    • CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.
    • API and SDKs - For all calls, use the Region endpoint us-east-1.
  • capacity :: Natural

    The web ACL capacity units (WCUs) required for this rule group.

    When you create your own rule group, you define this, and you cannot change it after creation. When you add or modify the rules in a rule group, WAF enforces this limit. You can check the capacity for a set of rules using CheckCapacity.

    WAF uses WCUs to calculate and control the operating resources that are used to run your rules, rule groups, and web ACLs. WAF calculates capacity differently for each rule type, to reflect the relative cost of each rule. Simple rules that cost little to run use fewer WCUs than more complex rules that use more processing power. Rule group capacity is fixed at creation, which helps users plan their web ACL WCU usage when they use a rule group. The WCU limit for web ACLs is 1,500.

  • visibilityConfig :: VisibilityConfig

    Defines and enables Amazon CloudWatch metrics and web request sample collection.

Instances

Instances details
ToJSON CreateRuleGroup Source # 
Instance details

Defined in Amazonka.WAFV2.CreateRuleGroup

ToHeaders CreateRuleGroup Source # 
Instance details

Defined in Amazonka.WAFV2.CreateRuleGroup

ToPath CreateRuleGroup Source # 
Instance details

Defined in Amazonka.WAFV2.CreateRuleGroup

ToQuery CreateRuleGroup Source # 
Instance details

Defined in Amazonka.WAFV2.CreateRuleGroup

AWSRequest CreateRuleGroup Source # 
Instance details

Defined in Amazonka.WAFV2.CreateRuleGroup

Associated Types

type AWSResponse CreateRuleGroup #

Generic CreateRuleGroup Source # 
Instance details

Defined in Amazonka.WAFV2.CreateRuleGroup

Associated Types

type Rep CreateRuleGroup :: Type -> Type #

Read CreateRuleGroup Source # 
Instance details

Defined in Amazonka.WAFV2.CreateRuleGroup

Show CreateRuleGroup Source # 
Instance details

Defined in Amazonka.WAFV2.CreateRuleGroup

NFData CreateRuleGroup Source # 
Instance details

Defined in Amazonka.WAFV2.CreateRuleGroup

Methods

rnf :: CreateRuleGroup -> () #

Eq CreateRuleGroup Source # 
Instance details

Defined in Amazonka.WAFV2.CreateRuleGroup

Hashable CreateRuleGroup Source # 
Instance details

Defined in Amazonka.WAFV2.CreateRuleGroup

type AWSResponse CreateRuleGroup Source # 
Instance details

Defined in Amazonka.WAFV2.CreateRuleGroup

type Rep CreateRuleGroup Source # 
Instance details

Defined in Amazonka.WAFV2.CreateRuleGroup

newCreateRuleGroup Source #

Create a value of CreateRuleGroup with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

CreateRuleGroup, createRuleGroup_customResponseBodies - A map of custom response keys and content bodies. When you create a rule with a block action, you can send a custom response to the web request. You define these for the rule group, and then use them in the rules that you define in the rule group.

For information about customizing web requests and responses, see Customizing web requests and responses in WAF in the WAF Developer Guide.

For information about the limits on count and size for custom request and response settings, see WAF quotas in the WAF Developer Guide.

CreateRuleGroup, createRuleGroup_description - A description of the rule group that helps with identification.

CreateRuleGroup, createRuleGroup_rules - The Rule statements used to identify the web requests that you want to allow, block, or count. Each rule includes one top-level statement that WAF uses to identify matching web requests, and parameters that govern how WAF handles them.

CreateRuleGroup, createRuleGroup_tags - An array of key:value pairs to associate with the resource.

CreateRuleGroup, createRuleGroup_name - The name of the rule group. You cannot change the name of a rule group after you create it.

CreateRuleGroup, createRuleGroup_scope - 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 Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.

To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:

  • CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.
  • API and SDKs - For all calls, use the Region endpoint us-east-1.

CreateRuleGroup, createRuleGroup_capacity - The web ACL capacity units (WCUs) required for this rule group.

When you create your own rule group, you define this, and you cannot change it after creation. When you add or modify the rules in a rule group, WAF enforces this limit. You can check the capacity for a set of rules using CheckCapacity.

WAF uses WCUs to calculate and control the operating resources that are used to run your rules, rule groups, and web ACLs. WAF calculates capacity differently for each rule type, to reflect the relative cost of each rule. Simple rules that cost little to run use fewer WCUs than more complex rules that use more processing power. Rule group capacity is fixed at creation, which helps users plan their web ACL WCU usage when they use a rule group. The WCU limit for web ACLs is 1,500.

CreateRuleGroup, createRuleGroup_visibilityConfig - Defines and enables Amazon CloudWatch metrics and web request sample collection.

Request Lenses

createRuleGroup_customResponseBodies :: Lens' CreateRuleGroup (Maybe (HashMap Text CustomResponseBody)) Source #

A map of custom response keys and content bodies. When you create a rule with a block action, you can send a custom response to the web request. You define these for the rule group, and then use them in the rules that you define in the rule group.

For information about customizing web requests and responses, see Customizing web requests and responses in WAF in the WAF Developer Guide.

For information about the limits on count and size for custom request and response settings, see WAF quotas in the WAF Developer Guide.

createRuleGroup_description :: Lens' CreateRuleGroup (Maybe Text) Source #

A description of the rule group that helps with identification.

createRuleGroup_rules :: Lens' CreateRuleGroup (Maybe [Rule]) Source #

The Rule statements used to identify the web requests that you want to allow, block, or count. Each rule includes one top-level statement that WAF uses to identify matching web requests, and parameters that govern how WAF handles them.

createRuleGroup_tags :: Lens' CreateRuleGroup (Maybe (NonEmpty Tag)) Source #

An array of key:value pairs to associate with the resource.

createRuleGroup_name :: Lens' CreateRuleGroup Text Source #

The name of the rule group. You cannot change the name of a rule group after you create it.

createRuleGroup_scope :: Lens' CreateRuleGroup Scope Source #

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 Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.

To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:

  • CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.
  • API and SDKs - For all calls, use the Region endpoint us-east-1.

createRuleGroup_capacity :: Lens' CreateRuleGroup Natural Source #

The web ACL capacity units (WCUs) required for this rule group.

When you create your own rule group, you define this, and you cannot change it after creation. When you add or modify the rules in a rule group, WAF enforces this limit. You can check the capacity for a set of rules using CheckCapacity.

WAF uses WCUs to calculate and control the operating resources that are used to run your rules, rule groups, and web ACLs. WAF calculates capacity differently for each rule type, to reflect the relative cost of each rule. Simple rules that cost little to run use fewer WCUs than more complex rules that use more processing power. Rule group capacity is fixed at creation, which helps users plan their web ACL WCU usage when they use a rule group. The WCU limit for web ACLs is 1,500.

createRuleGroup_visibilityConfig :: Lens' CreateRuleGroup VisibilityConfig Source #

Defines and enables Amazon CloudWatch metrics and web request sample collection.

Destructuring the Response

data CreateRuleGroupResponse Source #

See: newCreateRuleGroupResponse smart constructor.

Constructors

CreateRuleGroupResponse' 

Fields

  • summary :: Maybe RuleGroupSummary

    High-level information about a RuleGroup, returned by operations like create and list. This provides information like the ID, that you can use to retrieve and manage a RuleGroup, and the ARN, that you provide to the RuleGroupReferenceStatement to use the rule group in a Rule.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic CreateRuleGroupResponse Source # 
Instance details

Defined in Amazonka.WAFV2.CreateRuleGroup

Associated Types

type Rep CreateRuleGroupResponse :: Type -> Type #

Read CreateRuleGroupResponse Source # 
Instance details

Defined in Amazonka.WAFV2.CreateRuleGroup

Show CreateRuleGroupResponse Source # 
Instance details

Defined in Amazonka.WAFV2.CreateRuleGroup

NFData CreateRuleGroupResponse Source # 
Instance details

Defined in Amazonka.WAFV2.CreateRuleGroup

Methods

rnf :: CreateRuleGroupResponse -> () #

Eq CreateRuleGroupResponse Source # 
Instance details

Defined in Amazonka.WAFV2.CreateRuleGroup

type Rep CreateRuleGroupResponse Source # 
Instance details

Defined in Amazonka.WAFV2.CreateRuleGroup

type Rep CreateRuleGroupResponse = D1 ('MetaData "CreateRuleGroupResponse" "Amazonka.WAFV2.CreateRuleGroup" "amazonka-wafv2-2.0-3v3WgpYn7RT5hSd6MsT5dN" 'False) (C1 ('MetaCons "CreateRuleGroupResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "summary") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe RuleGroupSummary)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newCreateRuleGroupResponse Source #

Create a value of CreateRuleGroupResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:summary:CreateRuleGroupResponse', createRuleGroupResponse_summary - High-level information about a RuleGroup, returned by operations like create and list. This provides information like the ID, that you can use to retrieve and manage a RuleGroup, and the ARN, that you provide to the RuleGroupReferenceStatement to use the rule group in a Rule.

$sel:httpStatus:CreateRuleGroupResponse', createRuleGroupResponse_httpStatus - The response's http status code.

Response Lenses

createRuleGroupResponse_summary :: Lens' CreateRuleGroupResponse (Maybe RuleGroupSummary) Source #

High-level information about a RuleGroup, returned by operations like create and list. This provides information like the ID, that you can use to retrieve and manage a RuleGroup, and the ARN, that you provide to the RuleGroupReferenceStatement to use the rule group in a Rule.