UNPKG

@ediri/vultr

Version:

A Pulumi package for creating and managing Vultr cloud resources.

83 lines 3.18 kB
"use strict"; // *** 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.DnsDomain = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Provides a Vultr DNS Domain resource. This can be used to create, read, modify, and delete DNS Domains. * * ## Example Usage * * Create a new DNS Domain * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vultr from "@ediri/vultr"; * * const myDomain = new vultr.DnsDomain("myDomain", { * domain: "domain.com", * ip: "66.42.94.227", * }); * ``` * * ## Import * * DNS Domains can be imported using the Dns Domain `domain`, e.g. * * ```sh * $ pulumi import vultr:index/dnsDomain:DnsDomain name domain.com * ``` */ class DnsDomain extends pulumi.CustomResource { /** * Get an existing DnsDomain 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 DnsDomain(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of DnsDomain. 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'] === DnsDomain.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["dateCreated"] = state ? state.dateCreated : undefined; resourceInputs["dnsSec"] = state ? state.dnsSec : undefined; resourceInputs["domain"] = state ? state.domain : undefined; resourceInputs["ip"] = state ? state.ip : undefined; } else { const args = argsOrState; if ((!args || args.domain === undefined) && !opts.urn) { throw new Error("Missing required property 'domain'"); } resourceInputs["dnsSec"] = args ? args.dnsSec : undefined; resourceInputs["domain"] = args ? args.domain : undefined; resourceInputs["ip"] = args ? args.ip : undefined; resourceInputs["dateCreated"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(DnsDomain.__pulumiType, name, resourceInputs, opts); } } exports.DnsDomain = DnsDomain; /** @internal */ DnsDomain.__pulumiType = 'vultr:index/dnsDomain:DnsDomain'; //# sourceMappingURL=dnsDomain.js.map