UNPKG

@pulumi/dnsimple

Version:

A Pulumi package for creating and managing dnsimple cloud resources.

86 lines 3.13 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.DomainDelegation = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as dnsimple from "@pulumi/dnsimple"; * * // Create a domain delegation * const foobar = new dnsimple.DomainDelegation("foobar", { * domain: dnsimple.domain, * nameServers: [ * "ns1.example.org", * "ns2.example.com", * ], * }); * ``` * * ## Import * * DNSimple domain delegations can be imported using the domain name. * * **Importing domain delegation for example.com** * * bash * * ```sh * $ pulumi import dnsimple:index/domainDelegation:DomainDelegation resource_name example.com * ``` */ class DomainDelegation extends pulumi.CustomResource { /** * Get an existing DomainDelegation 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 DomainDelegation(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of DomainDelegation. 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'] === DomainDelegation.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["domain"] = state?.domain; resourceInputs["nameServers"] = state?.nameServers; } else { const args = argsOrState; if (args?.domain === undefined && !opts.urn) { throw new Error("Missing required property 'domain'"); } if (args?.nameServers === undefined && !opts.urn) { throw new Error("Missing required property 'nameServers'"); } resourceInputs["domain"] = args?.domain; resourceInputs["nameServers"] = args?.nameServers; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(DomainDelegation.__pulumiType, name, resourceInputs, opts); } } exports.DomainDelegation = DomainDelegation; /** @internal */ DomainDelegation.__pulumiType = 'dnsimple:index/domainDelegation:DomainDelegation'; //# sourceMappingURL=domainDelegation.js.map