@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
84 lines • 3.79 kB
JavaScript
;
// *** 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.Zone = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* ## Import
*
* This section explains how to import a zone using the `{subdomain}.{domain}` format.
*
* bash
*
* ```sh
* $ pulumi import scaleway:domain/zone:Zone test test.scaleway-terraform.com
* ```
*/
class Zone extends pulumi.CustomResource {
/**
* Get an existing Zone 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 Zone(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Zone. 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'] === Zone.__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);
const aliasOpts = { aliases: [{ type: "scaleway:index/domainZone:DomainZone" }] };
opts = pulumi.mergeOptions(opts, aliasOpts);
super(Zone.__pulumiType, name, resourceInputs, opts);
}
}
exports.Zone = Zone;
/** @internal */
Zone.__pulumiType = 'scaleway:domain/zone:Zone';
//# sourceMappingURL=zone.js.map