# EventParametersProperty

*[Event-based policies only]* Specifies an event that activates an event-based policy.

- 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_dlm as dlm } from 'aws-cdk-lib';
const eventParametersProperty: dlm.CfnLifecyclePolicy.EventParametersProperty = {
  eventType: 'eventType',
  snapshotOwner: ['snapshotOwner'],

  // the properties below are optional
  descriptionRegex: 'descriptionRegex',
};
```

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_dlm as dlm

event_parameters_property = dlm.CfnLifecyclePolicy.EventParametersProperty(
    event_type="eventType",
    snapshot_owner=["snapshotOwner"],

    # the properties below are optional
    description_regex="descriptionRegex"
)
```

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.dlm.*;

EventParametersProperty eventParametersProperty = EventParametersProperty.builder()
        .eventType("eventType")
        .snapshotOwner(List.of("snapshotOwner"))

        // the properties below are optional
        .descriptionRegex("descriptionRegex")
        .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.DLM;

var eventParametersProperty = new EventParametersProperty {
    EventType = "eventType",
    SnapshotOwner = new [] { "snapshotOwner" },

    // the properties below are optional
    DescriptionRegex = "descriptionRegex"
};
```

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"

eventParametersProperty := &EventParametersProperty{
	EventType: jsii.String("eventType"),
	SnapshotOwner: []*string{
		jsii.String("snapshotOwner"),
	},

	// the properties below are optional
	DescriptionRegex: jsii.String("descriptionRegex"),
}
```

## Properties

- `descriptionRegex`: string — The snapshot description that can trigger the policy.

  The description pattern is specified using a regular expression. The policy runs only if a snapshot with a description that matches the specified pattern is shared with your account.

  For example, specifying `^.*Created for policy: policy-1234567890abcdef0.*$` configures the policy to run only if snapshots created by policy `policy-1234567890abcdef0` are shared with your account.

- `eventType`: string (required) — The type of event.

  Currently, only snapshot sharing events are supported.

- `snapshotOwner`: string[] (required) — The IDs of the AWS accounts that can trigger policy by sharing snapshots with your account.

  The policy only runs if one of the specified AWS accounts shares a snapshot with your account.
