@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
135 lines • 6.7 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.RegisteredDomain = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a resource to manage a domain that has been [registered](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar-tld-list.html) and associated with the current AWS account. To register, renew and deregister a domain use the `aws.route53domains.Domain` resource instead.
*
* **This is an advanced resource** and has special caveats to be aware of when using it. Please read this document in its entirety before using this resource.
*
* The `aws.route53domains.RegisteredDomain` resource behaves differently from normal resources in that if a domain has been registered, the provider does not _register_ this domain, but instead "adopts" it into management. A destroy does not delete the domain but does remove the resource from state.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.route53domains.RegisteredDomain("example", {
* domainName: "example.com",
* nameServers: [
* {
* name: "ns-195.awsdns-24.com",
* },
* {
* name: "ns-874.awsdns-45.net",
* },
* ],
* tags: {
* Environment: "test",
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import domains using the domain name. For example:
*
* ```sh
* $ pulumi import aws:route53domains/registeredDomain:RegisteredDomain example example.com
* ```
*/
class RegisteredDomain extends pulumi.CustomResource {
/**
* Get an existing RegisteredDomain 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 RegisteredDomain(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of RegisteredDomain. 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'] === RegisteredDomain.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["abuseContactEmail"] = state?.abuseContactEmail;
resourceInputs["abuseContactPhone"] = state?.abuseContactPhone;
resourceInputs["adminContact"] = state?.adminContact;
resourceInputs["adminPrivacy"] = state?.adminPrivacy;
resourceInputs["autoRenew"] = state?.autoRenew;
resourceInputs["billingContact"] = state?.billingContact;
resourceInputs["billingPrivacy"] = state?.billingPrivacy;
resourceInputs["creationDate"] = state?.creationDate;
resourceInputs["domainName"] = state?.domainName;
resourceInputs["expirationDate"] = state?.expirationDate;
resourceInputs["nameServers"] = state?.nameServers;
resourceInputs["registrantContact"] = state?.registrantContact;
resourceInputs["registrantPrivacy"] = state?.registrantPrivacy;
resourceInputs["registrarName"] = state?.registrarName;
resourceInputs["registrarUrl"] = state?.registrarUrl;
resourceInputs["reseller"] = state?.reseller;
resourceInputs["statusLists"] = state?.statusLists;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["techContact"] = state?.techContact;
resourceInputs["techPrivacy"] = state?.techPrivacy;
resourceInputs["transferLock"] = state?.transferLock;
resourceInputs["updatedDate"] = state?.updatedDate;
resourceInputs["whoisServer"] = state?.whoisServer;
}
else {
const args = argsOrState;
if (args?.domainName === undefined && !opts.urn) {
throw new Error("Missing required property 'domainName'");
}
resourceInputs["adminContact"] = args?.adminContact;
resourceInputs["adminPrivacy"] = args?.adminPrivacy;
resourceInputs["autoRenew"] = args?.autoRenew;
resourceInputs["billingContact"] = args?.billingContact;
resourceInputs["billingPrivacy"] = args?.billingPrivacy;
resourceInputs["domainName"] = args?.domainName;
resourceInputs["nameServers"] = args?.nameServers;
resourceInputs["registrantContact"] = args?.registrantContact;
resourceInputs["registrantPrivacy"] = args?.registrantPrivacy;
resourceInputs["tags"] = args?.tags;
resourceInputs["techContact"] = args?.techContact;
resourceInputs["techPrivacy"] = args?.techPrivacy;
resourceInputs["transferLock"] = args?.transferLock;
resourceInputs["abuseContactEmail"] = undefined /*out*/;
resourceInputs["abuseContactPhone"] = undefined /*out*/;
resourceInputs["creationDate"] = undefined /*out*/;
resourceInputs["expirationDate"] = undefined /*out*/;
resourceInputs["registrarName"] = undefined /*out*/;
resourceInputs["registrarUrl"] = undefined /*out*/;
resourceInputs["reseller"] = undefined /*out*/;
resourceInputs["statusLists"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
resourceInputs["updatedDate"] = undefined /*out*/;
resourceInputs["whoisServer"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(RegisteredDomain.__pulumiType, name, resourceInputs, opts);
}
}
exports.RegisteredDomain = RegisteredDomain;
/** @internal */
RegisteredDomain.__pulumiType = 'aws:route53domains/registeredDomain:RegisteredDomain';
//# sourceMappingURL=registeredDomain.js.map