1 回答
- 最新
- 投票最多
- 评论最多
0
【以下的回答经过翻译处理】 你的描述仅描述了规则中的一个规则对象。尽管我们无法确定CloudFormation如何解释它,但最后一个块可能已经将其覆盖。
我认为你应该像下面这样在规则中编写多个规则数组。
"Rules": [
{
"Name": "IPSetDeny",
"Priority": 0,
"Statement": {
"IPSetReferenceStatement": {
"ARN": {
"Fn::GetAtt": [
"SampleIPSetDeny",
"Arn"
]
}
}
},
"Action": {
"Block": {}
},
"VisibilityConfig": {
"SampledRequestsEnabled": true,
"CloudWatchMetricsEnabled": true,
"MetricName": "aws-waf-logs-dev-inf"
}
},
{
"Name": "IPSetAllow",
"Priority": 1,
"Statement": {
"IPSetReferenceStatement": {
"ARN": {
"Fn::GetAtt": [
"SampleIPSetAllow",
"Arn"
]
}
}
},
"Action": {
"Allow": {}
},
"VisibilityConfig": {
"SampledRequestsEnabled": true,
"CloudWatchMetricsEnabled": true,
"MetricName": "aws-waf-logs-dev-inf"
}
},
{
"Name": "restrict-country",
"Priority": 2,
"Statement": {
"GeoMatchStatement": {
"CountryCodes": [
"GB"
]
}
},
"Action": {
"Allow": {}
},
"VisibilityConfig": {
"SampledRequestsEnabled": true,
"CloudWatchMetricsEnabled": true,
"MetricName": "aws-waf-logs-dev-inf"
}
}
]
相关内容
- AWS 官方已更新 1 年前
- AWS 官方已更新 2 年前
- AWS 官方已更新 2 年前
- AWS 官方已更新 2 年前