@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
131 lines • 5.11 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.EmailIdentity = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for managing an AWS SESv2 (Simple Email V2) Email Identity.
*
* ## Example Usage
*
* ### Basic Usage
*
* ### Email Address Identity
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.sesv2.EmailIdentity("example", {emailIdentity: "testing@example.com"});
* ```
*
* ### Domain Identity
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.sesv2.EmailIdentity("example", {emailIdentity: "example.com"});
* ```
*
* ### Configuration Set
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.sesv2.ConfigurationSet("example", {configurationSetName: "example"});
* const exampleEmailIdentity = new aws.sesv2.EmailIdentity("example", {
* emailIdentity: "example.com",
* configurationSetName: example.configurationSetName,
* });
* ```
*
* ### DKIM Signing Attributes (BYODKIM)
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.sesv2.EmailIdentity("example", {
* emailIdentity: "example.com",
* dkimSigningAttributes: {
* domainSigningPrivateKey: "MIIJKAIBAAKCAgEA2Se7p8zvnI4yh+Gh9j2rG5e2aRXjg03Y8saiupLnadPH9xvM...",
* domainSigningSelector: "example",
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import SESv2 (Simple Email V2) Email Identity using the `email_identity`. For example:
*
* ```sh
* $ pulumi import aws:sesv2/emailIdentity:EmailIdentity example example.com
* ```
*/
class EmailIdentity extends pulumi.CustomResource {
/**
* Get an existing EmailIdentity 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 EmailIdentity(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of EmailIdentity. 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'] === EmailIdentity.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["configurationSetName"] = state?.configurationSetName;
resourceInputs["dkimSigningAttributes"] = state?.dkimSigningAttributes;
resourceInputs["emailIdentity"] = state?.emailIdentity;
resourceInputs["identityType"] = state?.identityType;
resourceInputs["region"] = state?.region;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["verificationStatus"] = state?.verificationStatus;
resourceInputs["verifiedForSendingStatus"] = state?.verifiedForSendingStatus;
}
else {
const args = argsOrState;
if (args?.emailIdentity === undefined && !opts.urn) {
throw new Error("Missing required property 'emailIdentity'");
}
resourceInputs["configurationSetName"] = args?.configurationSetName;
resourceInputs["dkimSigningAttributes"] = args?.dkimSigningAttributes;
resourceInputs["emailIdentity"] = args?.emailIdentity;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["identityType"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
resourceInputs["verificationStatus"] = undefined /*out*/;
resourceInputs["verifiedForSendingStatus"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(EmailIdentity.__pulumiType, name, resourceInputs, opts);
}
}
exports.EmailIdentity = EmailIdentity;
/** @internal */
EmailIdentity.__pulumiType = 'aws:sesv2/emailIdentity:EmailIdentity';
//# sourceMappingURL=emailIdentity.js.map