Skip to content
v2.276.0

AllowProperty Struct ​

Allow traffic towards application.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_wafv2 as wafv2 } from 'aws-cdk-lib';
const allowProperty: wafv2.CfnRuleGroup.AllowProperty = {
  customRequestHandling: {
    insertHeaders: [{
      name: 'name',
      value: 'value',
    }],
  },
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_wafv2 as wafv2

allow_property = wafv2.CfnRuleGroup.AllowProperty(
    custom_request_handling=wafv2.CfnRuleGroup.CustomRequestHandlingProperty(
        insert_headers=[wafv2.CfnRuleGroup.CustomHTTPHeaderProperty(
            name="name",
            value="value"
        )]
    )
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.wafv2.*;

AllowProperty allowProperty = AllowProperty.builder()
        .customRequestHandling(CustomRequestHandlingProperty.builder()
                .insertHeaders(List.of(CustomHTTPHeaderProperty.builder()
                        .name("name")
                        .value("value")
                        .build()))
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.WAFv2;

var allowProperty = new AllowProperty {
    CustomRequestHandling = new CustomRequestHandlingProperty {
        InsertHeaders = new [] { new CustomHTTPHeaderProperty {
            Name = "name",
            Value = "value"
        } }
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

allowProperty := &AllowProperty{
	CustomRequestHandling: &CustomRequestHandlingProperty{
		InsertHeaders: []interface{}{
			&CustomHTTPHeaderProperty{
				Name: jsii.String("name"),
				Value: jsii.String("value"),
			},
		},
	},
}

Properties ​

customRequestHandlingoptionalIResolvable | CfnRuleGroup.CustomRequestHandlingPropertycustom_request_handlingoptionaltyping.Union[IResolvable, CustomRequestHandlingProperty]customRequestHandlingoptionalIResolvableCustomRequestHandlingoptionalIResolvableCustomRequestHandlingoptionalinterface{}#
Custom request handling.