UNPKG

@lbrlabs/pulumi-scaleway

Version:

A Pulumi package for creating and managing scaleway cloud resources.

95 lines 4.17 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.DomainZone = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Creates and manages Scaleway Domain zone.\ * For more information, see [the documentation](https://www.scaleway.com/en/docs/network/domains-and-dns/how-to/configure-dns-zones/). * * ## Examples * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@lbrlabs/pulumi-scaleway"; * * const test = new scaleway.DomainZone("test", { * domain: "scaleway-terraform.com", * subdomain: "test", * }); * ``` * * ## Import * * Zone can be imported using the `{subdomain}.{domain}`, e.g. bash * * ```sh * $ pulumi import scaleway:index/domainZone:DomainZone test test.scaleway-terraform.com * ``` */ class DomainZone extends pulumi.CustomResource { /** * Get an existing DomainZone 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 DomainZone(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of DomainZone. 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'] === DomainZone.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["domain"] = state ? state.domain : undefined; resourceInputs["message"] = state ? state.message : undefined; resourceInputs["ns"] = state ? state.ns : undefined; resourceInputs["nsDefaults"] = state ? state.nsDefaults : undefined; resourceInputs["nsMasters"] = state ? state.nsMasters : undefined; resourceInputs["projectId"] = state ? state.projectId : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["subdomain"] = state ? state.subdomain : undefined; resourceInputs["updatedAt"] = state ? state.updatedAt : undefined; } else { const args = argsOrState; if ((!args || args.domain === undefined) && !opts.urn) { throw new Error("Missing required property 'domain'"); } if ((!args || args.subdomain === undefined) && !opts.urn) { throw new Error("Missing required property 'subdomain'"); } resourceInputs["domain"] = args ? args.domain : undefined; resourceInputs["projectId"] = args ? args.projectId : undefined; resourceInputs["subdomain"] = args ? args.subdomain : undefined; resourceInputs["message"] = undefined /*out*/; resourceInputs["ns"] = undefined /*out*/; resourceInputs["nsDefaults"] = undefined /*out*/; resourceInputs["nsMasters"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; resourceInputs["updatedAt"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(DomainZone.__pulumiType, name, resourceInputs, opts); } } exports.DomainZone = DomainZone; /** @internal */ DomainZone.__pulumiType = 'scaleway:index/domainZone:DomainZone'; //# sourceMappingURL=domainZone.js.map