@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
118 lines • 5.52 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.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, Object.assign(Object.assign({}, 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 ? state.addHeaderActions : undefined;
resourceInputs["after"] = state ? state.after : undefined;
resourceInputs["arn"] = state ? state.arn : undefined;
resourceInputs["bounceActions"] = state ? state.bounceActions : undefined;
resourceInputs["enabled"] = state ? state.enabled : undefined;
resourceInputs["lambdaActions"] = state ? state.lambdaActions : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["recipients"] = state ? state.recipients : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["ruleSetName"] = state ? state.ruleSetName : undefined;
resourceInputs["s3Actions"] = state ? state.s3Actions : undefined;
resourceInputs["scanEnabled"] = state ? state.scanEnabled : undefined;
resourceInputs["snsActions"] = state ? state.snsActions : undefined;
resourceInputs["stopActions"] = state ? state.stopActions : undefined;
resourceInputs["tlsPolicy"] = state ? state.tlsPolicy : undefined;
resourceInputs["workmailActions"] = state ? state.workmailActions : undefined;
}
else {
const args = argsOrState;
if ((!args || args.ruleSetName === undefined) && !opts.urn) {
throw new Error("Missing required property 'ruleSetName'");
}
resourceInputs["addHeaderActions"] = args ? args.addHeaderActions : undefined;
resourceInputs["after"] = args ? args.after : undefined;
resourceInputs["bounceActions"] = args ? args.bounceActions : undefined;
resourceInputs["enabled"] = args ? args.enabled : undefined;
resourceInputs["lambdaActions"] = args ? args.lambdaActions : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["recipients"] = args ? args.recipients : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["ruleSetName"] = args ? args.ruleSetName : undefined;
resourceInputs["s3Actions"] = args ? args.s3Actions : undefined;
resourceInputs["scanEnabled"] = args ? args.scanEnabled : undefined;
resourceInputs["snsActions"] = args ? args.snsActions : undefined;
resourceInputs["stopActions"] = args ? args.stopActions : undefined;
resourceInputs["tlsPolicy"] = args ? args.tlsPolicy : undefined;
resourceInputs["workmailActions"] = args ? args.workmailActions : undefined;
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