AWS WAF(v2) GEO Restrict Rule
This is an AWS CDK WAF Geo Restrict Rule on WAF V2
Install
TypeScript
install by npm
npm install @gammarers/aws-waf-geo-restrict-rule
install by yarn
yarn add @gammarers/aws-waf-geo-restrict-rule
Python
pip install gammarers.aws-waf-geo-restrict-rule
Example
import { WAFGeoRestrictRule } from '@gammarers/aws-waf-geo-restrict-rule';
const geoRestrictRule = new WAFGeoRestrictRule({
allowCountries: ['JP'],
});
new wafv2.CfnWebACL(stack, 'WebACL', {
defaultAction: { allow: {} },
scope: 'CLOUD_FRONT',
name: 'WebAclWithCustomRules',
visibilityConfig: {
cloudWatchMetricsEnabled: true,
metricName: 'WebAclMetric',
sampledRequestsEnabled: true,
},
rules: [
geoRestrictRule.allowRule({
priority: 1,
}),
geoRestrictRule.blockRule({
priority: 2,
}),
],
});
License
This project is licensed under the Apache-2.0 License.
Metadata
Release files for gammarers.aws-waf-geo-restrict-rule 2.0.60
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gammarers_aws_waf_geo_restrict_rule-2.0.60.tar.gz | 28.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gammarers_aws_waf_geo_restrict_rule-2.0.60-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 55.4 kB
Release files / gammarers_aws_waf_geo_restrict_rule-2.0.60.tar.gz
| Download URL | gammarers_aws_waf_geo_restrict_rule-2.0.60.tar.gz |
|---|---|
| Size | 28.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ed8735e7b43d72b9c3a6ead29fefcd5e3edccb3d4de34a72d1bdb664f0860bc4
|
|
BLAKE2b-256 checksum How to use checksums |
5d1c127e637d6568ec9e3b08bd076d03c6f29919f8899a5545fa103d59886d92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.14.2
|
Release files / gammarers_aws_waf_geo_restrict_rule-2.0.60-py3-none-any.whl
| Download URL | gammarers_aws_waf_geo_restrict_rule-2.0.60-py3-none-any.whl |
|---|---|
| Size | 27.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9fbfb08c0e3ec868a2cf6255b5cec4f6f35aff93ff5ff9b18fc211ed8fe84a2e
|
|
BLAKE2b-256 checksum How to use checksums |
5863995706d22164f607b81c75547c5b66cdf1a3119a2d406f43843a21de7e37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.14.2
|