@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
168 lines • 7.28 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.Domain = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.route53domains.Domain("example", {
* domainName: "example.com",
* autoRenew: false,
* adminContact: {
* addressLine1: "101 Main Street",
* city: "San Francisco",
* contactType: "COMPANY",
* countryCode: "US",
* email: "pulumi-acctest@example.com",
* fax: "+1.4155551234",
* firstName: "Terraform",
* lastName: "Team",
* organizationName: "HashiCorp",
* phoneNumber: "+1.4155551234",
* state: "CA",
* zipCode: "94105",
* },
* registrantContact: {
* addressLine1: "101 Main Street",
* city: "San Francisco",
* contactType: "COMPANY",
* countryCode: "US",
* email: "pulumi-acctest@example.com",
* fax: "+1.4155551234",
* firstName: "Terraform",
* lastName: "Team",
* organizationName: "HashiCorp",
* phoneNumber: "+1.4155551234",
* state: "CA",
* zipCode: "94105",
* },
* techContact: {
* addressLine1: "101 Main Street",
* city: "San Francisco",
* contactType: "COMPANY",
* countryCode: "US",
* email: "pulumi-acctest@example.com",
* fax: "+1.4155551234",
* firstName: "Terraform",
* lastName: "Team",
* organizationName: "HashiCorp",
* phoneNumber: "+1.4155551234",
* state: "CA",
* zipCode: "94105",
* },
* tags: {
* Environment: "test",
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import domains using the `domain_name`. For example:
*
* ```sh
* $ pulumi import aws:route53domains/domain:Domain example example.com
* ```
*/
class Domain extends pulumi.CustomResource {
/**
* Get an existing Domain 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 Domain(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of Domain. 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'] === Domain.__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["billingContacts"] = state?.billingContacts;
resourceInputs["billingPrivacy"] = state?.billingPrivacy;
resourceInputs["creationDate"] = state?.creationDate;
resourceInputs["domainName"] = state?.domainName;
resourceInputs["durationInYears"] = state?.durationInYears;
resourceInputs["expirationDate"] = state?.expirationDate;
resourceInputs["hostedZoneId"] = state?.hostedZoneId;
resourceInputs["nameServers"] = state?.nameServers;
resourceInputs["registrantContact"] = state?.registrantContact;
resourceInputs["registrantPrivacy"] = state?.registrantPrivacy;
resourceInputs["registrarName"] = state?.registrarName;
resourceInputs["registrarUrl"] = state?.registrarUrl;
resourceInputs["statusLists"] = state?.statusLists;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["techContact"] = state?.techContact;
resourceInputs["techPrivacy"] = state?.techPrivacy;
resourceInputs["timeouts"] = state?.timeouts;
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["billingContacts"] = args?.billingContacts;
resourceInputs["billingPrivacy"] = args?.billingPrivacy;
resourceInputs["domainName"] = args?.domainName;
resourceInputs["durationInYears"] = args?.durationInYears;
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["timeouts"] = args?.timeouts;
resourceInputs["transferLock"] = args?.transferLock;
resourceInputs["abuseContactEmail"] = undefined /*out*/;
resourceInputs["abuseContactPhone"] = undefined /*out*/;
resourceInputs["creationDate"] = undefined /*out*/;
resourceInputs["expirationDate"] = undefined /*out*/;
resourceInputs["hostedZoneId"] = undefined /*out*/;
resourceInputs["registrarName"] = undefined /*out*/;
resourceInputs["registrarUrl"] = 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(Domain.__pulumiType, name, resourceInputs, opts);
}
}
exports.Domain = Domain;
/** @internal */
Domain.__pulumiType = 'aws:route53domains/domain:Domain';
//# sourceMappingURL=domain.js.map