# EventDestinationProperty

In Amazon Pinpoint, *events* include message sends, deliveries, opens, clicks, bounces, and complaints.

*Event destinations* are places that you can send information about these events to. For example, you can send event data to Amazon SNS to receive notifications when you receive bounces or complaints, or you can use Amazon Kinesis Data Firehose to stream data to Amazon S3 for long-term storage.

- 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_pinpointemail as pinpointemail } from 'aws-cdk-lib';
const eventDestinationProperty: pinpointemail.CfnConfigurationSetEventDestination.EventDestinationProperty = {
  matchingEventTypes: ['matchingEventTypes'],

  // the properties below are optional
  cloudWatchDestination: {
    dimensionConfigurations: [{
      defaultDimensionValue: 'defaultDimensionValue',
      dimensionName: 'dimensionName',
      dimensionValueSource: 'dimensionValueSource',
    }],
  },
  enabled: false,
  kinesisFirehoseDestination: {
    deliveryStreamArn: 'deliveryStreamArn',
    iamRoleArn: 'iamRoleArn',
  },
  pinpointDestination: {
    applicationArn: 'applicationArn',
  },
  snsDestination: {
    topicArn: 'topicArn',
  },
};
```

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_pinpointemail as pinpointemail

event_destination_property = pinpointemail.CfnConfigurationSetEventDestination.EventDestinationProperty(
    matching_event_types=["matchingEventTypes"],

    # the properties below are optional
    cloud_watch_destination=pinpointemail.CfnConfigurationSetEventDestination.CloudWatchDestinationProperty(
        dimension_configurations=[pinpointemail.CfnConfigurationSetEventDestination.DimensionConfigurationProperty(
            default_dimension_value="defaultDimensionValue",
            dimension_name="dimensionName",
            dimension_value_source="dimensionValueSource"
        )]
    ),
    enabled=False,
    kinesis_firehose_destination=pinpointemail.CfnConfigurationSetEventDestination.KinesisFirehoseDestinationProperty(
        delivery_stream_arn="deliveryStreamArn",
        iam_role_arn="iamRoleArn"
    ),
    pinpoint_destination=pinpointemail.CfnConfigurationSetEventDestination.PinpointDestinationProperty(
        application_arn="applicationArn"
    ),
    sns_destination=pinpointemail.CfnConfigurationSetEventDestination.SnsDestinationProperty(
        topic_arn="topicArn"
    )
)
```

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

EventDestinationProperty eventDestinationProperty = EventDestinationProperty.builder()
        .matchingEventTypes(List.of("matchingEventTypes"))

        // the properties below are optional
        .cloudWatchDestination(CloudWatchDestinationProperty.builder()
                .dimensionConfigurations(List.of(DimensionConfigurationProperty.builder()
                        .defaultDimensionValue("defaultDimensionValue")
                        .dimensionName("dimensionName")
                        .dimensionValueSource("dimensionValueSource")
                        .build()))
                .build())
        .enabled(false)
        .kinesisFirehoseDestination(KinesisFirehoseDestinationProperty.builder()
                .deliveryStreamArn("deliveryStreamArn")
                .iamRoleArn("iamRoleArn")
                .build())
        .pinpointDestination(PinpointDestinationProperty.builder()
                .applicationArn("applicationArn")
                .build())
        .snsDestination(SnsDestinationProperty.builder()
                .topicArn("topicArn")
                .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.PinpointEmail;

var eventDestinationProperty = new EventDestinationProperty {
    MatchingEventTypes = new [] { "matchingEventTypes" },

    // the properties below are optional
    CloudWatchDestination = new CloudWatchDestinationProperty {
        DimensionConfigurations = new [] { new DimensionConfigurationProperty {
            DefaultDimensionValue = "defaultDimensionValue",
            DimensionName = "dimensionName",
            DimensionValueSource = "dimensionValueSource"
        } }
    },
    Enabled = false,
    KinesisFirehoseDestination = new KinesisFirehoseDestinationProperty {
        DeliveryStreamArn = "deliveryStreamArn",
        IamRoleArn = "iamRoleArn"
    },
    PinpointDestination = new PinpointDestinationProperty {
        ApplicationArn = "applicationArn"
    },
    SnsDestination = new SnsDestinationProperty {
        TopicArn = "topicArn"
    }
};
```

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"

eventDestinationProperty := &EventDestinationProperty{
	MatchingEventTypes: []*string{
		jsii.String("matchingEventTypes"),
	},

	// the properties below are optional
	CloudWatchDestination: &CloudWatchDestinationProperty{
		DimensionConfigurations: []interface{}{
			&DimensionConfigurationProperty{
				DefaultDimensionValue: jsii.String("defaultDimensionValue"),
				DimensionName: jsii.String("dimensionName"),
				DimensionValueSource: jsii.String("dimensionValueSource"),
			},
		},
	},
	Enabled: jsii.Boolean(false),
	KinesisFirehoseDestination: &KinesisFirehoseDestinationProperty{
		DeliveryStreamArn: jsii.String("deliveryStreamArn"),
		IamRoleArn: jsii.String("iamRoleArn"),
	},
	PinpointDestination: &PinpointDestinationProperty{
		ApplicationArn: jsii.String("applicationArn"),
	},
	SnsDestination: &SnsDestinationProperty{
		TopicArn: jsii.String("topicArn"),
	},
}
```

## Properties

- `cloudWatchDestination`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnConfigurationSetEventDestination.CloudWatchDestinationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_pinpointemail.CfnConfigurationSetEventDestination.CloudWatchDestinationProperty.html) — An object that defines an Amazon CloudWatch destination for email events.

  You can use Amazon CloudWatch to monitor and gain insights on your email sending metrics.

- `enabled`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — If `true` , the event destination is enabled.

  When the event destination is enabled, the specified event types are sent to the destinations in this `EventDestinationDefinition` .

  If `false` , the event destination is disabled. When the event destination is disabled, events aren't sent to the specified destinations.

- `kinesisFirehoseDestination`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnConfigurationSetEventDestination.KinesisFirehoseDestinationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_pinpointemail.CfnConfigurationSetEventDestination.KinesisFirehoseDestinationProperty.html) — An object that defines an Amazon Kinesis Data Firehose destination for email events.

  You can use Amazon Kinesis Data Firehose to stream data to other services, such as Amazon S3 and Amazon Redshift.

- `matchingEventTypes`: string[] (required) — The types of events that Amazon Pinpoint sends to the specified event destinations.

  Acceptable values: `SEND` , `REJECT` , `BOUNCE` , `COMPLAINT` , `DELIVERY` , `OPEN` , `CLICK` , and `RENDERING_FAILURE` .

- `pinpointDestination`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnConfigurationSetEventDestination.PinpointDestinationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_pinpointemail.CfnConfigurationSetEventDestination.PinpointDestinationProperty.html) — An object that defines a Amazon Pinpoint destination for email events.

  You can use Amazon Pinpoint events to create attributes in Amazon Pinpoint projects. You can use these attributes to create segments for your campaigns.

- `snsDestination`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnConfigurationSetEventDestination.SnsDestinationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_pinpointemail.CfnConfigurationSetEventDestination.SnsDestinationProperty.html) — An object that defines an Amazon SNS destination for email events.

  You can use Amazon SNS to send notification when certain email events occur.
