@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
96 lines • 3.55 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.DomainIdentity = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides an SES domain identity resource
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.ses.DomainIdentity("example", {domain: "example.com"});
* ```
*
* ### With Route53 Record
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.ses.DomainIdentity("example", {domain: "example.com"});
* const exampleAmazonsesVerificationRecord = new aws.route53.Record("example_amazonses_verification_record", {
* zoneId: "ABCDEFGHIJ123",
* name: "_amazonses.example.com",
* type: aws.route53.RecordType.TXT,
* ttl: 600,
* records: [example.verificationToken],
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import SES domain identities using the domain name. For example:
*
* ```sh
* $ pulumi import aws:ses/domainIdentity:DomainIdentity example example.com
* ```
*/
class DomainIdentity extends pulumi.CustomResource {
/**
* Get an existing DomainIdentity 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 DomainIdentity(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of DomainIdentity. 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'] === DomainIdentity.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["domain"] = state?.domain;
resourceInputs["region"] = state?.region;
resourceInputs["verificationToken"] = state?.verificationToken;
}
else {
const args = argsOrState;
if (args?.domain === undefined && !opts.urn) {
throw new Error("Missing required property 'domain'");
}
resourceInputs["domain"] = args?.domain;
resourceInputs["region"] = args?.region;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["verificationToken"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(DomainIdentity.__pulumiType, name, resourceInputs, opts);
}
}
exports.DomainIdentity = DomainIdentity;
/** @internal */
DomainIdentity.__pulumiType = 'aws:ses/domainIdentity:DomainIdentity';
//# sourceMappingURL=domainIdentity.js.map
;