# EventSourceProperty

*[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 eventSourceProperty: dlm.CfnLifecyclePolicy.EventSourceProperty = {
  type: 'type',

  // the properties below are optional
  parameters: {
    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_source_property = dlm.CfnLifecyclePolicy.EventSourceProperty(
    type="type",

    # the properties below are optional
    parameters=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.*;

EventSourceProperty eventSourceProperty = EventSourceProperty.builder()
        .type("type")

        // the properties below are optional
        .parameters(EventParametersProperty.builder()
                .eventType("eventType")
                .snapshotOwner(List.of("snapshotOwner"))

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

var eventSourceProperty = new EventSourceProperty {
    Type = "type",

    // the properties below are optional
    Parameters = 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"

eventSourceProperty := &EventSourceProperty{
	Type: jsii.String("type"),

	// the properties below are optional
	Parameters: &EventParametersProperty{
		EventType: jsii.String("eventType"),
		SnapshotOwner: []*string{
			jsii.String("snapshotOwner"),
		},

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

## Properties

- `parameters`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnLifecyclePolicy.EventParametersProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dlm.CfnLifecyclePolicy.EventParametersProperty.html) — Information about the event.

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

  Currently only managed Amazon EventBridge (formerly known as Amazon CloudWatch) events are supported.
