@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
89 lines • 3.6 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.DomainDkim = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides an SES domain DKIM generation resource.
*
* Domain ownership needs to be confirmed first using sesDomainIdentity Resource
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.ses.DomainIdentity("example", {domain: "example.com"});
* const exampleDomainDkim = new aws.ses.DomainDkim("example", {domain: example.domain});
* const exampleAmazonsesDkimRecord: aws.route53.Record[] = [];
* for (const range = {value: 0}; range.value < 3; range.value++) {
* exampleAmazonsesDkimRecord.push(new aws.route53.Record(`example_amazonses_dkim_record-${range.value}`, {
* zoneId: "ABCDEFGHIJ123",
* name: exampleDomainDkim.dkimTokens.apply(dkimTokens => `${dkimTokens[range.value]}._domainkey`),
* type: aws.route53.RecordType.CNAME,
* ttl: 600,
* records: [exampleDomainDkim.dkimTokens.apply(dkimTokens => `${dkimTokens[range.value]}.dkim.amazonses.com`)],
* }));
* }
* ```
*
* ## Import
*
* Using `pulumi import`, import DKIM tokens using the `domain` attribute. For example:
*
* ```sh
* $ pulumi import aws:ses/domainDkim:DomainDkim example example.com
* ```
*/
class DomainDkim extends pulumi.CustomResource {
/**
* Get an existing DomainDkim 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 DomainDkim(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of DomainDkim. 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'] === DomainDkim.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["dkimTokens"] = state?.dkimTokens;
resourceInputs["domain"] = state?.domain;
resourceInputs["region"] = state?.region;
}
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["dkimTokens"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(DomainDkim.__pulumiType, name, resourceInputs, opts);
}
}
exports.DomainDkim = DomainDkim;
/** @internal */
DomainDkim.__pulumiType = 'aws:ses/domainDkim:DomainDkim';
//# sourceMappingURL=domainDkim.js.map
;