CfnFirewallPolicyProps Struct
Properties for defining a CfnFirewallPolicy.
| Source |
|---|
Example
ts
// 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 cfnFirewallPolicyProps: networkfirewall.CfnFirewallPolicyProps = {
firewallPolicy: {
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',
},
firewallPolicyName: 'firewallPolicyName',
// the properties below are optional
description: 'description',
tags: [{
key: 'key',
value: 'value',
}],
};
python
from aws_cdk import CfnTag
# 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
cfn_firewall_policy_props = networkfirewall.CfnFirewallPolicyProps(
firewall_policy=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"
),
firewall_policy_name="firewallPolicyName",
# the properties below are optional
description="description",
tags=[CfnTag(
key="key",
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.networkfirewall.*;
CfnFirewallPolicyProps cfnFirewallPolicyProps = CfnFirewallPolicyProps.builder()
.firewallPolicy(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())
.firewallPolicyName("firewallPolicyName")
// the properties below are optional
.description("description")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.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.NetworkFirewall;
var cfnFirewallPolicyProps = new CfnFirewallPolicyProps {
FirewallPolicy = 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"
},
FirewallPolicyName = "firewallPolicyName",
// the properties below are optional
Description = "description",
Tags = new [] { new CfnTag {
Key = "key",
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"
cfnFirewallPolicyProps := &CfnFirewallPolicyProps{
FirewallPolicy: &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"),
},
FirewallPolicyName: jsii.String("firewallPolicyName"),
// the properties below are optional
Description: jsii.String("description"),
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
}
Properties
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #A description of the firewall policy.
firewallPolicyIResolvable | CfnFirewallPolicy.firewall_policytyping.Union[IResolvable, FirewallPolicyProperty]firewallPolicyIResolvableFirewallPolicyIResolvableFirewallPolicyinterface{} required #The traffic filtering behavior of a firewall policy, defined in a collection of stateless and stateful rule groups and other settings.
firewallPolicyNamestringfirewall_policy_namestrfirewallPolicyNameStringFirewallPolicyNamestringFirewallPolicyName*string required #The descriptive name of the firewall policy.
You can't change the name of a firewall policy after you create it.