# ActionDefinitionProperty

A custom action to use in stateless rule actions settings.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```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:

```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:

```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();
```

C# / .NET:

```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"
        } }
    }
};
```

Golang:

```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

- `publishMetricAction`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFirewallPolicy.PublishMetricActionProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_networkfirewall.CfnFirewallPolicy.PublishMetricActionProperty.html) — Stateless inspection criteria that publishes the specified metrics to Amazon CloudWatch for the matching packet.

  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.
