UNPKG

@pulumi/aws

Version:

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

118 lines 4.9 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.ReceiptRule = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides an SES receipt rule resource * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * // Add a header to the email and store it in S3 * const store = new aws.ses.ReceiptRule("store", { * name: "store", * ruleSetName: "default-rule-set", * recipients: ["karen@example.com"], * enabled: true, * scanEnabled: true, * addHeaderActions: [{ * headerName: "Custom-Header", * headerValue: "Added by SES", * position: 1, * }], * s3Actions: [{ * bucketName: "emails", * position: 2, * }], * }); * ``` * * ## Import * * Using `pulumi import`, import SES receipt rules using the ruleset name and rule name separated by `:`. For example: * * ```sh * $ pulumi import aws:ses/receiptRule:ReceiptRule my_rule my_rule_set:my_rule * ``` */ class ReceiptRule extends pulumi.CustomResource { /** * Get an existing ReceiptRule 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 ReceiptRule(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of ReceiptRule. 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'] === ReceiptRule.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["addHeaderActions"] = state?.addHeaderActions; resourceInputs["after"] = state?.after; resourceInputs["arn"] = state?.arn; resourceInputs["bounceActions"] = state?.bounceActions; resourceInputs["enabled"] = state?.enabled; resourceInputs["lambdaActions"] = state?.lambdaActions; resourceInputs["name"] = state?.name; resourceInputs["recipients"] = state?.recipients; resourceInputs["region"] = state?.region; resourceInputs["ruleSetName"] = state?.ruleSetName; resourceInputs["s3Actions"] = state?.s3Actions; resourceInputs["scanEnabled"] = state?.scanEnabled; resourceInputs["snsActions"] = state?.snsActions; resourceInputs["stopActions"] = state?.stopActions; resourceInputs["tlsPolicy"] = state?.tlsPolicy; resourceInputs["workmailActions"] = state?.workmailActions; } else { const args = argsOrState; if (args?.ruleSetName === undefined && !opts.urn) { throw new Error("Missing required property 'ruleSetName'"); } resourceInputs["addHeaderActions"] = args?.addHeaderActions; resourceInputs["after"] = args?.after; resourceInputs["bounceActions"] = args?.bounceActions; resourceInputs["enabled"] = args?.enabled; resourceInputs["lambdaActions"] = args?.lambdaActions; resourceInputs["name"] = args?.name; resourceInputs["recipients"] = args?.recipients; resourceInputs["region"] = args?.region; resourceInputs["ruleSetName"] = args?.ruleSetName; resourceInputs["s3Actions"] = args?.s3Actions; resourceInputs["scanEnabled"] = args?.scanEnabled; resourceInputs["snsActions"] = args?.snsActions; resourceInputs["stopActions"] = args?.stopActions; resourceInputs["tlsPolicy"] = args?.tlsPolicy; resourceInputs["workmailActions"] = args?.workmailActions; resourceInputs["arn"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ReceiptRule.__pulumiType, name, resourceInputs, opts); } } exports.ReceiptRule = ReceiptRule; /** @internal */ ReceiptRule.__pulumiType = 'aws:ses/receiptRule:ReceiptRule'; //# sourceMappingURL=receiptRule.js.map