UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

147 lines 5.42 kB
"use strict"; // *** 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.EventDestination = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides an SES event destination * * ## Example Usage * * ### CloudWatch Destination * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const cloudwatch = new aws.ses.EventDestination("cloudwatch", { * name: "event-destination-cloudwatch", * configurationSetName: example.name, * enabled: true, * matchingTypes: [ * "bounce", * "send", * ], * cloudwatchDestinations: [{ * defaultValue: "default", * dimensionName: "dimension", * valueSource: "emailHeader", * }], * }); * ``` * * ### Kinesis Destination * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const kinesis = new aws.ses.EventDestination("kinesis", { * name: "event-destination-kinesis", * configurationSetName: exampleAwsSesConfigurationSet.name, * enabled: true, * matchingTypes: [ * "bounce", * "send", * ], * kinesisDestination: { * streamArn: exampleAwsKinesisFirehoseDeliveryStream.arn, * roleArn: example.arn, * }, * }); * ``` * * ### SNS Destination * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const sns = new aws.ses.EventDestination("sns", { * name: "event-destination-sns", * configurationSetName: exampleAwsSesConfigurationSet.name, * enabled: true, * matchingTypes: [ * "bounce", * "send", * ], * snsDestination: { * topicArn: example.arn, * }, * }); * ``` * * ## Import * * Using `pulumi import`, import SES event destinations using `configuration_set_name` together with the event destination's `name`. For example: * * ```sh * $ pulumi import aws:ses/eventDestination:EventDestination sns some-configuration-set-test/event-destination-sns * ``` */ class EventDestination extends pulumi.CustomResource { /** * Get an existing EventDestination 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 EventDestination(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of EventDestination. 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'] === EventDestination.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["cloudwatchDestinations"] = state?.cloudwatchDestinations; resourceInputs["configurationSetName"] = state?.configurationSetName; resourceInputs["enabled"] = state?.enabled; resourceInputs["kinesisDestination"] = state?.kinesisDestination; resourceInputs["matchingTypes"] = state?.matchingTypes; resourceInputs["name"] = state?.name; resourceInputs["region"] = state?.region; resourceInputs["snsDestination"] = state?.snsDestination; } else { const args = argsOrState; if (args?.configurationSetName === undefined && !opts.urn) { throw new Error("Missing required property 'configurationSetName'"); } if (args?.matchingTypes === undefined && !opts.urn) { throw new Error("Missing required property 'matchingTypes'"); } resourceInputs["cloudwatchDestinations"] = args?.cloudwatchDestinations; resourceInputs["configurationSetName"] = args?.configurationSetName; resourceInputs["enabled"] = args?.enabled; resourceInputs["kinesisDestination"] = args?.kinesisDestination; resourceInputs["matchingTypes"] = args?.matchingTypes; resourceInputs["name"] = args?.name; resourceInputs["region"] = args?.region; resourceInputs["snsDestination"] = args?.snsDestination; resourceInputs["arn"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(EventDestination.__pulumiType, name, resourceInputs, opts); } } exports.EventDestination = EventDestination; /** @internal */ EventDestination.__pulumiType = 'aws:ses/eventDestination:EventDestination'; //# sourceMappingURL=eventDestination.js.map