问题描述
var ipSets = new CfnIPSet(scope,"IPSet",new CfnIPSetProps
{
Name = "IPTest",Addresses = new string[] { "1.2.3.4/32" },IpAddressVersion = "IPV4",Scope= "REGIONAL"
});
new CfnWebACL.RuleProperty()
{
Name = "Black-List-Rules",Priority = 5,//statement not properly translated
Statement = new CfnWebACL.StatementOneProperty
{
IpSetReferenceStatement = ipSets.AttrArn
},VisibilityConfig = new CfnWebACL.VisibilityConfigProperty
{
SampledRequestsEnabled = true,CloudWatchMetricsEnabled = true,MetricName = "Black-List-Rules"
},Action = new CfnWebACL.RuleActionProperty
{
Allow = new CfnWebACL.RuleActionProperty { Allow = false}
},}
TestWebACL错误原因:您的语句为需要一个值的字段设置了多个值。字段:STATEMENT,参数:语句(服务:Wafv2,状态代码:400,请求ID:dd0d6492-5aa9-41e2-ac15 -ee7bc133d705,扩展请求ID:null) C:\ Users \ futechz \ AppData \ Local \ Temp \ 1hae5afq.wun \ jsii-runtime.js:7922:49 _ Kernel._wrapSandboxCode(C:\ Users \ futechz \ AppData \ Local \ Temp \ 1hae5afq.wun \ jsii-runtime.js:8395:20) _内核._create(C:\ Users \ futechz \ AppData \ Local \ Temp \ 1hae5afq.wun \ jsii-runtime.js:7922:26) _ Kernel.create(C:\ Users \ futechz \ AppData \ Local \ Temp \ 1hae5afq.wun \ jsii-runtime.js:7666:21) _ KernelHost.processRequest(C:\ Users \ futechz \ AppData \ Local \ Temp \ 1hae5afq.wun \ jsii-runtime.js:7446:28) _ KernelHost.run(C:\ Users \ futechz \ AppData \ Local \ Temp \ 1hae5afq.wun \ jsii-runtime.js:7384:14) _立即_立即(C:\ Users \ futechz \ AppData \ Local \ Temp \ 1hae5afq.wun \ jsii-runtime.js:7387:37) _ processImmediate(internal / timers.js:456:21)
云的形成(cdk合成器)
{
"Action": {
"Block": {
"block": true
}
},"Name": "Black-List-Rules","Priority": 5,"Statement": {},//missing
"VisibilityConfig": {
"CloudWatchMetricsEnabled": true,"MetricName": "Black-List-Rules","SampledRequestsEnabled": true
}
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)