@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
117 lines • 4.71 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.DomainVerification = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource for managing an AWS VPC Lattice Domain Verification.
*
* Starts the domain verification process for a custom domain name. Use this resource to verify ownership of a domain before associating it with VPC Lattice resources.
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.vpclattice.DomainVerification("example", {domainName: "example.com"});
* // Create DNS TXT record for domain verification
* const exampleRecord = new aws.route53.Record("example", {
* zoneId: exampleAwsRoute53Zone.zoneId,
* name: example.txtRecordName,
* type: aws.route53.RecordType.TXT,
* ttl: 300,
* records: [example.txtRecordValue],
* });
* ```
*
* ### With Tags
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.vpclattice.DomainVerification("example", {
* domainName: "example.com",
* tags: {
* Environment: "production",
* Purpose: "domain-verification",
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import VPC Lattice Domain Verification using the `id`. For example:
*
* ```sh
* $ pulumi import aws:vpclattice/domainVerification:DomainVerification example dv-0a1b2c3d4e5f
* ```
*/
class DomainVerification extends pulumi.CustomResource {
/**
* Get an existing DomainVerification 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 DomainVerification(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of DomainVerification. 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'] === DomainVerification.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["createdAt"] = state?.createdAt;
resourceInputs["domainName"] = state?.domainName;
resourceInputs["lastVerifiedTime"] = state?.lastVerifiedTime;
resourceInputs["region"] = state?.region;
resourceInputs["status"] = state?.status;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["txtRecordName"] = state?.txtRecordName;
resourceInputs["txtRecordValue"] = state?.txtRecordValue;
}
else {
const args = argsOrState;
if (args?.domainName === undefined && !opts.urn) {
throw new Error("Missing required property 'domainName'");
}
resourceInputs["domainName"] = args?.domainName;
resourceInputs["region"] = args?.region;
resourceInputs["tags"] = args?.tags;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["createdAt"] = undefined /*out*/;
resourceInputs["lastVerifiedTime"] = undefined /*out*/;
resourceInputs["status"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
resourceInputs["txtRecordName"] = undefined /*out*/;
resourceInputs["txtRecordValue"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(DomainVerification.__pulumiType, name, resourceInputs, opts);
}
}
exports.DomainVerification = DomainVerification;
/** @internal */
DomainVerification.__pulumiType = 'aws:vpclattice/domainVerification:DomainVerification';
//# sourceMappingURL=domainVerification.js.map