I'm trying to create WAFv2 WebAcl service using AWS CDK. My programming language is C# (.NET Core). I'm not able to figure out how to set value of CfnWebACL.DefaultActionProperty.Allow or CfnWebACL.DefaultActionProperty.Block property as it is an object type and any value I assign to it result in runtime error.
new CfnWebACL(this, "webacl", new CfnWebACLProps
{
DefaultAction = new CfnWebACL.DefaultActionProperty
{
Allow = new CfnWebACL.RuleActionProperty() { Allow = true }
},
...
});
This model type seems to work for me ^