UNPKG

@pulumiverse/scaleway

Version:

A Pulumi package for creating and managing Scaleway cloud resources.

158 lines 7.22 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! *** var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Webhosting = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("./utilities")); /** * Creates and manages Scaleway Web Hostings. * For more information, see the [API documentation](https://www.scaleway.com/en/developers/api/webhosting/hosting-api/). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const byName = scaleway.hosting.getOffer({ * name: "lite", * controlPanel: "Cpanel", * }); * const main = new scaleway.hosting.Hosting("main", { * offerId: byName.then(byName => byName.offerId), * email: "your@email.com", * domain: "yourdomain.com", * tags: [ * "webhosting", * "provider", * "terraform", * ], * }); * ``` * * ## Import * * Hostings can be imported using the `{region}/{id}`, e.g. * * ```sh * $ pulumi import scaleway:index/webhosting:Webhosting hosting01 fr-par/11111111-1111-1111-1111-111111111111 * ``` * * @deprecated scaleway.index/webhosting.Webhosting has been deprecated in favor of scaleway.hosting/hosting.Hosting */ class Webhosting extends pulumi.CustomResource { /** * Get an existing Webhosting 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) { pulumi.log.warn("Webhosting is deprecated: scaleway.index/webhosting.Webhosting has been deprecated in favor of scaleway.hosting/hosting.Hosting"); return new Webhosting(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'scaleway:index/webhosting:Webhosting'; /** * Returns true if the given object is an instance of Webhosting. 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'] === Webhosting.__pulumiType; } /** @deprecated scaleway.index/webhosting.Webhosting has been deprecated in favor of scaleway.hosting/hosting.Hosting */ constructor(name, argsOrState, opts) { pulumi.log.warn("Webhosting is deprecated: scaleway.index/webhosting.Webhosting has been deprecated in favor of scaleway.hosting/hosting.Hosting"); let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["cpanelUrls"] = state?.cpanelUrls; resourceInputs["createdAt"] = state?.createdAt; resourceInputs["dnsStatus"] = state?.dnsStatus; resourceInputs["domain"] = state?.domain; resourceInputs["email"] = state?.email; resourceInputs["nameServers"] = state?.nameServers; resourceInputs["offerId"] = state?.offerId; resourceInputs["offerName"] = state?.offerName; resourceInputs["optionIds"] = state?.optionIds; resourceInputs["options"] = state?.options; resourceInputs["organizationId"] = state?.organizationId; resourceInputs["platformHostname"] = state?.platformHostname; resourceInputs["platformNumber"] = state?.platformNumber; resourceInputs["projectId"] = state?.projectId; resourceInputs["records"] = state?.records; resourceInputs["region"] = state?.region; resourceInputs["status"] = state?.status; resourceInputs["tags"] = state?.tags; resourceInputs["updatedAt"] = state?.updatedAt; resourceInputs["username"] = state?.username; } else { const args = argsOrState; if (args?.domain === undefined && !opts.urn) { throw new Error("Missing required property 'domain'"); } if (args?.email === undefined && !opts.urn) { throw new Error("Missing required property 'email'"); } if (args?.offerId === undefined && !opts.urn) { throw new Error("Missing required property 'offerId'"); } resourceInputs["domain"] = args?.domain; resourceInputs["email"] = args?.email; resourceInputs["offerId"] = args?.offerId; resourceInputs["optionIds"] = args?.optionIds; resourceInputs["projectId"] = args?.projectId; resourceInputs["region"] = args?.region; resourceInputs["tags"] = args?.tags; resourceInputs["cpanelUrls"] = undefined /*out*/; resourceInputs["createdAt"] = undefined /*out*/; resourceInputs["dnsStatus"] = undefined /*out*/; resourceInputs["nameServers"] = undefined /*out*/; resourceInputs["offerName"] = undefined /*out*/; resourceInputs["options"] = undefined /*out*/; resourceInputs["organizationId"] = undefined /*out*/; resourceInputs["platformHostname"] = undefined /*out*/; resourceInputs["platformNumber"] = undefined /*out*/; resourceInputs["records"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; resourceInputs["updatedAt"] = undefined /*out*/; resourceInputs["username"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Webhosting.__pulumiType, name, resourceInputs, opts); } } exports.Webhosting = Webhosting; //# sourceMappingURL=webhosting.js.map