@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
135 lines • 7.43 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, Object.assign(Object.assign({}, 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 ? state.abuseContactEmail : undefined;
resourceInputs["abuseContactPhone"] = state ? state.abuseContactPhone : undefined;
resourceInputs["adminContact"] = state ? state.adminContact : undefined;
resourceInputs["adminPrivacy"] = state ? state.adminPrivacy : undefined;
resourceInputs["autoRenew"] = state ? state.autoRenew : undefined;
resourceInputs["billingContact"] = state ? state.billingContact : undefined;
resourceInputs["billingPrivacy"] = state ? state.billingPrivacy : undefined;
resourceInputs["creationDate"] = state ? state.creationDate : undefined;
resourceInputs["domainName"] = state ? state.domainName : undefined;
resourceInputs["expirationDate"] = state ? state.expirationDate : undefined;
resourceInputs["nameServers"] = state ? state.nameServers : undefined;
resourceInputs["registrantContact"] = state ? state.registrantContact : undefined;
resourceInputs["registrantPrivacy"] = state ? state.registrantPrivacy : undefined;
resourceInputs["registrarName"] = state ? state.registrarName : undefined;
resourceInputs["registrarUrl"] = state ? state.registrarUrl : undefined;
resourceInputs["reseller"] = state ? state.reseller : undefined;
resourceInputs["statusLists"] = state ? state.statusLists : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["tagsAll"] = state ? state.tagsAll : undefined;
resourceInputs["techContact"] = state ? state.techContact : undefined;
resourceInputs["techPrivacy"] = state ? state.techPrivacy : undefined;
resourceInputs["transferLock"] = state ? state.transferLock : undefined;
resourceInputs["updatedDate"] = state ? state.updatedDate : undefined;
resourceInputs["whoisServer"] = state ? state.whoisServer : undefined;
}
else {
const args = argsOrState;
if ((!args || args.domainName === undefined) && !opts.urn) {
throw new Error("Missing required property 'domainName'");
}
resourceInputs["adminContact"] = args ? args.adminContact : undefined;
resourceInputs["adminPrivacy"] = args ? args.adminPrivacy : undefined;
resourceInputs["autoRenew"] = args ? args.autoRenew : undefined;
resourceInputs["billingContact"] = args ? args.billingContact : undefined;
resourceInputs["billingPrivacy"] = args ? args.billingPrivacy : undefined;
resourceInputs["domainName"] = args ? args.domainName : undefined;
resourceInputs["nameServers"] = args ? args.nameServers : undefined;
resourceInputs["registrantContact"] = args ? args.registrantContact : undefined;
resourceInputs["registrantPrivacy"] = args ? args.registrantPrivacy : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["techContact"] = args ? args.techContact : undefined;
resourceInputs["techPrivacy"] = args ? args.techPrivacy : undefined;
resourceInputs["transferLock"] = args ? args.transferLock : undefined;
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