@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
184 lines • 7.3 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConfigurationSetEventDestination = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for managing an AWS SESv2 (Simple Email V2) Configuration Set Event Destination.
*
* ## Example Usage
*
* ### CloudWatch Destination
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.sesv2.ConfigurationSet("example", {configurationSetName: "example"});
* const exampleConfigurationSetEventDestination = new aws.sesv2.ConfigurationSetEventDestination("example", {
* configurationSetName: example.configurationSetName,
* eventDestinationName: "example",
* eventDestination: {
* cloudWatchDestination: {
* dimensionConfigurations: [{
* defaultDimensionValue: "example",
* dimensionName: "example",
* dimensionValueSource: "MESSAGE_TAG",
* }],
* },
* enabled: true,
* matchingEventTypes: ["SEND"],
* },
* });
* ```
*
* ### EventBridge Destination
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const _default = aws.cloudwatch.getEventBus({
* name: "default",
* });
* const example = new aws.sesv2.ConfigurationSetEventDestination("example", {
* configurationSetName: exampleAwsSesv2ConfigurationSet.configurationSetName,
* eventDestinationName: "example",
* eventDestination: {
* eventBridgeDestination: {
* eventBusArn: _default.then(_default => _default.arn),
* },
* enabled: true,
* matchingEventTypes: ["SEND"],
* },
* });
* ```
*
* ### Kinesis Firehose Destination
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.sesv2.ConfigurationSet("example", {configurationSetName: "example"});
* const exampleConfigurationSetEventDestination = new aws.sesv2.ConfigurationSetEventDestination("example", {
* configurationSetName: example.configurationSetName,
* eventDestinationName: "example",
* eventDestination: {
* kinesisFirehoseDestination: {
* deliveryStreamArn: exampleAwsKinesisFirehoseDeliveryStream.arn,
* iamRoleArn: exampleAwsIamRole.arn,
* },
* enabled: true,
* matchingEventTypes: ["SEND"],
* },
* });
* ```
*
* ### Pinpoint Destination
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.sesv2.ConfigurationSet("example", {configurationSetName: "example"});
* const exampleConfigurationSetEventDestination = new aws.sesv2.ConfigurationSetEventDestination("example", {
* configurationSetName: example.configurationSetName,
* eventDestinationName: "example",
* eventDestination: {
* pinpointDestination: {
* applicationArn: exampleAwsPinpointApp.arn,
* },
* enabled: true,
* matchingEventTypes: ["SEND"],
* },
* });
* ```
*
* ### SNS Destination
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.sesv2.ConfigurationSet("example", {configurationSetName: "example"});
* const exampleConfigurationSetEventDestination = new aws.sesv2.ConfigurationSetEventDestination("example", {
* configurationSetName: example.configurationSetName,
* eventDestinationName: "example",
* eventDestination: {
* snsDestination: {
* topicArn: exampleAwsSnsTopic.arn,
* },
* enabled: true,
* matchingEventTypes: ["SEND"],
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import SESv2 (Simple Email V2) Configuration Set Event Destination using the `id` (`configuration_set_name|event_destination_name`). For example:
*
* ```sh
* $ pulumi import aws:sesv2/configurationSetEventDestination:ConfigurationSetEventDestination example example_configuration_set|example_event_destination
* ```
*/
class ConfigurationSetEventDestination extends pulumi.CustomResource {
/**
* Get an existing ConfigurationSetEventDestination resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, state, opts) {
return new ConfigurationSetEventDestination(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of ConfigurationSetEventDestination. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === ConfigurationSetEventDestination.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["configurationSetName"] = state?.configurationSetName;
resourceInputs["eventDestination"] = state?.eventDestination;
resourceInputs["eventDestinationName"] = state?.eventDestinationName;
resourceInputs["region"] = state?.region;
}
else {
const args = argsOrState;
if (args?.configurationSetName === undefined && !opts.urn) {
throw new Error("Missing required property 'configurationSetName'");
}
if (args?.eventDestination === undefined && !opts.urn) {
throw new Error("Missing required property 'eventDestination'");
}
if (args?.eventDestinationName === undefined && !opts.urn) {
throw new Error("Missing required property 'eventDestinationName'");
}
resourceInputs["configurationSetName"] = args?.configurationSetName;
resourceInputs["eventDestination"] = args?.eventDestination;
resourceInputs["eventDestinationName"] = args?.eventDestinationName;
resourceInputs["region"] = args?.region;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ConfigurationSetEventDestination.__pulumiType, name, resourceInputs, opts);
}
}
exports.ConfigurationSetEventDestination = ConfigurationSetEventDestination;
/** @internal */
ConfigurationSetEventDestination.__pulumiType = 'aws:sesv2/configurationSetEventDestination:ConfigurationSetEventDestination';
//# sourceMappingURL=configurationSetEventDestination.js.map