FirewallPolicyProperty Struct
The traffic filtering behavior of a firewall policy, defined in a collection of stateless and stateful rule groups and other settings.
| Source | |
|---|---|
| Type last changed |
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_networkfirewall as networkfirewall } from 'aws-cdk-lib';
const firewallPolicyProperty: networkfirewall.CfnFirewallPolicy.FirewallPolicyProperty = {
statelessDefaultActions: ['statelessDefaultActions'],
statelessFragmentDefaultActions: ['statelessFragmentDefaultActions'],
// the properties below are optional
enableTlsSessionHolding: false,
policyVariables: {
ruleVariables: {
ruleVariablesKey: {
definition: ['definition'],
},
},
},
route53ResolvedIpValidation: {
action: 'action',
dnsExpiryExceptionPolicy: 'dnsExpiryExceptionPolicy',
dnsFirewallRuleGroupId: 'dnsFirewallRuleGroupId',
// the properties below are optional
bypassDestinationValidationIpRanges: [{
addressDefinition: 'addressDefinition',
}],
sourceIpRanges: [{
addressDefinition: 'addressDefinition',
}],
},
statefulDefaultActions: ['statefulDefaultActions'],
statefulEngineOptions: {
flowTimeouts: {
tcpIdleTimeoutSeconds: 123,
},
ruleOrder: 'ruleOrder',
streamExceptionPolicy: 'streamExceptionPolicy',
},
statefulRuleGroupReferences: [{
resourceArn: 'resourceArn',
// the properties below are optional
deepThreatInspection: false,
override: {
action: 'action',
},
priority: 123,
}],
statelessCustomActions: [{
actionDefinition: {
publishMetricAction: {
dimensions: [{
value: 'value',
}],
},
},
actionName: 'actionName',
}],
statelessRuleGroupReferences: [{
priority: 123,
resourceArn: 'resourceArn',
}],
tlsInspectionConfigurationArn: 'tlsInspectionConfigurationArn',
};
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_networkfirewall as networkfirewall
firewall_policy_property = networkfirewall.CfnFirewallPolicy.FirewallPolicyProperty(
stateless_default_actions=["statelessDefaultActions"],
stateless_fragment_default_actions=["statelessFragmentDefaultActions"],
# the properties below are optional
enable_tls_session_holding=False,
policy_variables=networkfirewall.CfnFirewallPolicy.PolicyVariablesProperty(
rule_variables={
"rule_variables_key": {
"definition": ["definition"]
}
}
),
route53_resolved_ip_validation=networkfirewall.CfnFirewallPolicy.Route53ResolvedIPValidationProperty(
action="action",
dns_expiry_exception_policy="dnsExpiryExceptionPolicy",
dns_firewall_rule_group_id="dnsFirewallRuleGroupId",
# the properties below are optional
bypass_destination_validation_ip_ranges=[networkfirewall.CfnFirewallPolicy.AddressProperty(
address_definition="addressDefinition"
)],
source_ip_ranges=[networkfirewall.CfnFirewallPolicy.AddressProperty(
address_definition="addressDefinition"
)]
),
stateful_default_actions=["statefulDefaultActions"],
stateful_engine_options=networkfirewall.CfnFirewallPolicy.StatefulEngineOptionsProperty(
flow_timeouts=networkfirewall.CfnFirewallPolicy.FlowTimeoutsProperty(
tcp_idle_timeout_seconds=123
),
rule_order="ruleOrder",
stream_exception_policy="streamExceptionPolicy"
),
stateful_rule_group_references=[networkfirewall.CfnFirewallPolicy.StatefulRuleGroupReferenceProperty(
resource_arn="resourceArn",
# the properties below are optional
deep_threat_inspection=False,
override=networkfirewall.CfnFirewallPolicy.StatefulRuleGroupOverrideProperty(
action="action"
),
priority=123
)],
stateless_custom_actions=[networkfirewall.CfnFirewallPolicy.CustomActionProperty(
action_definition=networkfirewall.CfnFirewallPolicy.ActionDefinitionProperty(
publish_metric_action=networkfirewall.CfnFirewallPolicy.PublishMetricActionProperty(
dimensions=[networkfirewall.CfnFirewallPolicy.DimensionProperty(
value="value"
)]
)
),
action_name="actionName"
)],
stateless_rule_group_references=[networkfirewall.CfnFirewallPolicy.StatelessRuleGroupReferenceProperty(
priority=123,
resource_arn="resourceArn"
)],
tls_inspection_configuration_arn="tlsInspectionConfigurationArn"
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.networkfirewall.*;
FirewallPolicyProperty firewallPolicyProperty = FirewallPolicyProperty.builder()
.statelessDefaultActions(List.of("statelessDefaultActions"))
.statelessFragmentDefaultActions(List.of("statelessFragmentDefaultActions"))
// the properties below are optional
.enableTlsSessionHolding(false)
.policyVariables(PolicyVariablesProperty.builder()
.ruleVariables(Map.of(
"ruleVariablesKey", Map.of(
"definition", List.of("definition"))))
.build())
.route53ResolvedIpValidation(Route53ResolvedIPValidationProperty.builder()
.action("action")
.dnsExpiryExceptionPolicy("dnsExpiryExceptionPolicy")
.dnsFirewallRuleGroupId("dnsFirewallRuleGroupId")
// the properties below are optional
.bypassDestinationValidationIpRanges(List.of(AddressProperty.builder()
.addressDefinition("addressDefinition")
.build()))
.sourceIpRanges(List.of(AddressProperty.builder()
.addressDefinition("addressDefinition")
.build()))
.build())
.statefulDefaultActions(List.of("statefulDefaultActions"))
.statefulEngineOptions(StatefulEngineOptionsProperty.builder()
.flowTimeouts(FlowTimeoutsProperty.builder()
.tcpIdleTimeoutSeconds(123)
.build())
.ruleOrder("ruleOrder")
.streamExceptionPolicy("streamExceptionPolicy")
.build())
.statefulRuleGroupReferences(List.of(StatefulRuleGroupReferenceProperty.builder()
.resourceArn("resourceArn")
// the properties below are optional
.deepThreatInspection(false)
.override(StatefulRuleGroupOverrideProperty.builder()
.action("action")
.build())
.priority(123)
.build()))
.statelessCustomActions(List.of(CustomActionProperty.builder()
.actionDefinition(ActionDefinitionProperty.builder()
.publishMetricAction(PublishMetricActionProperty.builder()
.dimensions(List.of(DimensionProperty.builder()
.value("value")
.build()))
.build())
.build())
.actionName("actionName")
.build()))
.statelessRuleGroupReferences(List.of(StatelessRuleGroupReferenceProperty.builder()
.priority(123)
.resourceArn("resourceArn")
.build()))
.tlsInspectionConfigurationArn("tlsInspectionConfigurationArn")
.build();
// 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.NetworkFirewall;
var firewallPolicyProperty = new FirewallPolicyProperty {
StatelessDefaultActions = new [] { "statelessDefaultActions" },
StatelessFragmentDefaultActions = new [] { "statelessFragmentDefaultActions" },
// the properties below are optional
EnableTlsSessionHolding = false,
PolicyVariables = new PolicyVariablesProperty {
RuleVariables = new Dictionary<string, object> {
{ "ruleVariablesKey", new Dictionary<string, string[]?> {
{ "definition", new [] { "definition" } }
} }
}
},
Route53ResolvedIpValidation = new Route53ResolvedIPValidationProperty {
Action = "action",
DnsExpiryExceptionPolicy = "dnsExpiryExceptionPolicy",
DnsFirewallRuleGroupId = "dnsFirewallRuleGroupId",
// the properties below are optional
BypassDestinationValidationIpRanges = new [] { new AddressProperty {
AddressDefinition = "addressDefinition"
} },
SourceIpRanges = new [] { new AddressProperty {
AddressDefinition = "addressDefinition"
} }
},
StatefulDefaultActions = new [] { "statefulDefaultActions" },
StatefulEngineOptions = new StatefulEngineOptionsProperty {
FlowTimeouts = new FlowTimeoutsProperty {
TcpIdleTimeoutSeconds = 123
},
RuleOrder = "ruleOrder",
StreamExceptionPolicy = "streamExceptionPolicy"
},
StatefulRuleGroupReferences = new [] { new StatefulRuleGroupReferenceProperty {
ResourceArn = "resourceArn",
// the properties below are optional
DeepThreatInspection = false,
Override = new StatefulRuleGroupOverrideProperty {
Action = "action"
},
Priority = 123
} },
StatelessCustomActions = new [] { new CustomActionProperty {
ActionDefinition = new ActionDefinitionProperty {
PublishMetricAction = new PublishMetricActionProperty {
Dimensions = new [] { new DimensionProperty {
Value = "value"
} }
}
},
ActionName = "actionName"
} },
StatelessRuleGroupReferences = new [] { new StatelessRuleGroupReferenceProperty {
Priority = 123,
ResourceArn = "resourceArn"
} },
TlsInspectionConfigurationArn = "tlsInspectionConfigurationArn"
};
// 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"
firewallPolicyProperty := &FirewallPolicyProperty{
StatelessDefaultActions: []*string{
jsii.String("statelessDefaultActions"),
},
StatelessFragmentDefaultActions: []*string{
jsii.String("statelessFragmentDefaultActions"),
},
// the properties below are optional
EnableTlsSessionHolding: jsii.Boolean(false),
PolicyVariables: &PolicyVariablesProperty{
RuleVariables: map[string]interface{}{
"ruleVariablesKey": map[string][]*string{
"definition": []*string{
jsii.String("definition"),
},
},
},
},
Route53ResolvedIpValidation: &Route53ResolvedIPValidationProperty{
Action: jsii.String("action"),
DnsExpiryExceptionPolicy: jsii.String("dnsExpiryExceptionPolicy"),
DnsFirewallRuleGroupId: jsii.String("dnsFirewallRuleGroupId"),
// the properties below are optional
BypassDestinationValidationIpRanges: []interface{}{
&AddressProperty{
AddressDefinition: jsii.String("addressDefinition"),
},
},
SourceIpRanges: []interface{}{
&AddressProperty{
AddressDefinition: jsii.String("addressDefinition"),
},
},
},
StatefulDefaultActions: []*string{
jsii.String("statefulDefaultActions"),
},
StatefulEngineOptions: &StatefulEngineOptionsProperty{
FlowTimeouts: &FlowTimeoutsProperty{
TcpIdleTimeoutSeconds: jsii.Number(123),
},
RuleOrder: jsii.String("ruleOrder"),
StreamExceptionPolicy: jsii.String("streamExceptionPolicy"),
},
StatefulRuleGroupReferences: []interface{}{
&StatefulRuleGroupReferenceProperty{
ResourceArn: jsii.String("resourceArn"),
// the properties below are optional
DeepThreatInspection: jsii.Boolean(false),
Override: &StatefulRuleGroupOverrideProperty{
Action: jsii.String("action"),
},
Priority: jsii.Number(123),
},
},
StatelessCustomActions: []interface{}{
&CustomActionProperty{
ActionDefinition: &ActionDefinitionProperty{
PublishMetricAction: &PublishMetricActionProperty{
Dimensions: []interface{}{
&DimensionProperty{
Value: jsii.String("value"),
},
},
},
},
ActionName: jsii.String("actionName"),
},
},
StatelessRuleGroupReferences: []interface{}{
&StatelessRuleGroupReferenceProperty{
Priority: jsii.Number(123),
ResourceArn: jsii.String("resourceArn"),
},
},
TlsInspectionConfigurationArn: jsii.String("tlsInspectionConfigurationArn"),
}
Properties
enableTlsSessionHoldingoptionalboolean | IResolvableenable_tls_session_holdingoptionaltyping.Union[bool, IResolvable]enableTlsSessionHoldingoptionalBooleanEnableTlsSessionHoldingoptionalboolEnableTlsSessionHoldingoptionalinterface{} #Requires an associated TLS Inspection configuration.
policyVariablesoptionalIResolvable | CfnFirewallPolicy.policy_variablesoptionaltyping.Union[IResolvable, PolicyVariablesProperty]policyVariablesoptionalIResolvablePolicyVariablesoptionalIResolvablePolicyVariablesoptionalinterface{} #route53ResolvedIpValidationoptionalIResolvable | CfnFirewallPolicy.route53_resolved_ip_validationoptionaltyping.Union[IResolvable, Route53ResolvedIPValidationProperty]route53ResolvedIpValidationoptionalIResolvableRoute53ResolvedIpValidationoptionalIResolvableRoute53ResolvedIpValidationoptionalinterface{} #statefulDefaultActionsoptionalstring[]stateful_default_actionsoptionaltyping.List[str]statefulDefaultActionsoptionalList<String>StatefulDefaultActionsoptionalstring[]StatefulDefaultActionsoptional*[]*string #notes
The stateful default action is optional, and is only valid when using the strict rule order.
Valid values of the stateful default action:
- aws:drop_strict
- aws:drop_established
- aws:alert_strict
- aws:alert_established
For more information, see Strict evaluation order in the AWS Network Firewall Developer Guide .
statefulEngineOptionsoptionalIResolvable | CfnFirewallPolicy.stateful_engine_optionsoptionaltyping.Union[IResolvable, StatefulEngineOptionsProperty]statefulEngineOptionsoptionalIResolvableStatefulEngineOptionsoptionalIResolvableStatefulEngineOptionsoptionalinterface{} #The stateful rule groups that you use in your policy must have stateful rule options settings that are compatible with these settings.
statefulRuleGroupReferencesoptionalIResolvable | IResolvable | CfnFirewallPolicy.stateful_rule_group_referencesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, StatefulRuleGroupReferenceProperty]]]statefulRuleGroupReferencesoptionalIResolvableStatefulRuleGroupReferencesoptionalIResolvableStatefulRuleGroupReferencesoptionalinterface{} #These define the inspection criteria in stateful rules.
statelessCustomActionsoptionalIResolvable | IResolvable | CfnFirewallPolicy.stateless_custom_actionsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, CustomActionProperty]]]statelessCustomActionsoptionalIResolvableStatelessCustomActionsoptionalIResolvableStatelessCustomActionsoptionalinterface{} #You name each custom action that you define, and then you can use it by name in your default actions specifications.
statelessDefaultActionsstring[]stateless_default_actionstyping.List[str]statelessDefaultActionsList<String>StatelessDefaultActionsstring[]StatelessDefaultActions*[]*string required #notes
If you want non-matching packets to be forwarded for stateful inspection, specify aws:forward_to_sfe .
You must specify one of the standard actions: aws:pass , aws:drop , or aws:forward_to_sfe . In addition, you can specify custom actions that are compatible with your standard section choice.
For example, you could specify ["aws:pass"] or you could specify ["aws:pass", “customActionName”] . For information about compatibility, see the custom action descriptions.
statelessFragmentDefaultActionsstring[]stateless_fragment_default_actionstyping.List[str]statelessFragmentDefaultActionsList<String>StatelessFragmentDefaultActionsstring[]StatelessFragmentDefaultActions*[]*string required #notes
If you want non-matching fragmented packets to be forwarded for stateful inspection, specify aws:forward_to_sfe .
You must specify one of the standard actions: aws:pass , aws:drop , or aws:forward_to_sfe . In addition, you can specify custom actions that are compatible with your standard section choice.
For example, you could specify ["aws:pass"] or you could specify ["aws:pass", “customActionName”] . For information about compatibility, see the custom action descriptions.
statelessRuleGroupReferencesoptionalIResolvable | IResolvable | CfnFirewallPolicy.stateless_rule_group_referencesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, StatelessRuleGroupReferenceProperty]]]statelessRuleGroupReferencesoptionalIResolvableStatelessRuleGroupReferencesoptionalIResolvableStatelessRuleGroupReferencesoptionalinterface{} #These define the matching criteria in stateless rules.
tlsInspectionConfigurationArnoptionalstringtls_inspection_configuration_arnoptionalstrtlsInspectionConfigurationArnoptionalStringTlsInspectionConfigurationArnoptionalstringTlsInspectionConfigurationArnoptional*string #