Skip to content
v2.278.0

ActionDefinitionProperty Struct ​

A custom action to use in stateless rule actions settings.

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 actionDefinitionProperty: networkfirewall.CfnFirewallPolicy.ActionDefinitionProperty = {
  publishMetricAction: {
    dimensions: [{
      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_networkfirewall as networkfirewall

action_definition_property = networkfirewall.CfnFirewallPolicy.ActionDefinitionProperty(
    publish_metric_action=networkfirewall.CfnFirewallPolicy.PublishMetricActionProperty(
        dimensions=[networkfirewall.CfnFirewallPolicy.DimensionProperty(
            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.*;

ActionDefinitionProperty actionDefinitionProperty = ActionDefinitionProperty.builder()
        .publishMetricAction(PublishMetricActionProperty.builder()
                .dimensions(List.of(DimensionProperty.builder()
                        .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.NetworkFirewall;

var actionDefinitionProperty = new ActionDefinitionProperty {
    PublishMetricAction = new PublishMetricActionProperty {
        Dimensions = new [] { new DimensionProperty {
            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"

actionDefinitionProperty := &ActionDefinitionProperty{
	PublishMetricAction: &PublishMetricActionProperty{
		Dimensions: []interface{}{
			&DimensionProperty{
				Value: jsii.String("value"),
			},
		},
	},
}

Properties ​

publishMetricActionoptionalIResolvable | CfnFirewallPolicy.PublishMetricActionPropertypublish_metric_actionoptionaltyping.Union[IResolvable, PublishMetricActionProperty]publishMetricActionoptionalIResolvablePublishMetricActionoptionalIResolvablePublishMetricActionoptionalinterface{} #
Stateless inspection criteria that publishes the specified metrics to Amazon CloudWatch for the matching packet.
notes

This setting defines a CloudWatch dimension value to be published.

You can pair this custom action with any of the standard stateless rule actions. For example, you could pair this in a rule action with the standard action that forwards the packet for stateful inspection. Then, when a packet matches the rule, Network Firewall publishes metrics for the packet and forwards it.