UNPKG

@lbrlabs/pulumi-scaleway

Version:

A Pulumi package for creating and managing scaleway cloud resources.

126 lines 5.91 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.Webhosting = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Creates and manages Scaleway Web Hostings. * For more information, see [the documentation](https://www.scaleway.com/en/developers/api/webhosting/). * * ## Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@lbrlabs/pulumi-scaleway"; * import * as scaleway from "@pulumi/scaleway"; * * const byName = scaleway.getWebHostOffer({ * name: "lite", * }); * const main = new scaleway.Webhosting("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. bash * * ```sh * $ pulumi import scaleway:index/webhosting:Webhosting hosting01 fr-par/11111111-1111-1111-1111-111111111111 * ``` */ 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) { return new Webhosting(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * 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; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["cpanelUrls"] = state ? state.cpanelUrls : undefined; resourceInputs["createdAt"] = state ? state.createdAt : undefined; resourceInputs["dnsStatus"] = state ? state.dnsStatus : undefined; resourceInputs["domain"] = state ? state.domain : undefined; resourceInputs["email"] = state ? state.email : undefined; resourceInputs["offerId"] = state ? state.offerId : undefined; resourceInputs["offerName"] = state ? state.offerName : undefined; resourceInputs["optionIds"] = state ? state.optionIds : undefined; resourceInputs["options"] = state ? state.options : undefined; resourceInputs["organizationId"] = state ? state.organizationId : undefined; resourceInputs["platformHostname"] = state ? state.platformHostname : undefined; resourceInputs["platformNumber"] = state ? state.platformNumber : undefined; resourceInputs["projectId"] = state ? state.projectId : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["updatedAt"] = state ? state.updatedAt : undefined; resourceInputs["username"] = state ? state.username : undefined; } else { const args = argsOrState; if ((!args || args.domain === undefined) && !opts.urn) { throw new Error("Missing required property 'domain'"); } if ((!args || args.email === undefined) && !opts.urn) { throw new Error("Missing required property 'email'"); } if ((!args || args.offerId === undefined) && !opts.urn) { throw new Error("Missing required property 'offerId'"); } resourceInputs["domain"] = args ? args.domain : undefined; resourceInputs["email"] = args ? args.email : undefined; resourceInputs["offerId"] = args ? args.offerId : undefined; resourceInputs["optionIds"] = args ? args.optionIds : undefined; resourceInputs["projectId"] = args ? args.projectId : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["cpanelUrls"] = undefined /*out*/; resourceInputs["createdAt"] = undefined /*out*/; resourceInputs["dnsStatus"] = undefined /*out*/; resourceInputs["offerName"] = undefined /*out*/; resourceInputs["options"] = undefined /*out*/; resourceInputs["organizationId"] = undefined /*out*/; resourceInputs["platformHostname"] = undefined /*out*/; resourceInputs["platformNumber"] = 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; /** @internal */ Webhosting.__pulumiType = 'scaleway:index/webhosting:Webhosting'; //# sourceMappingURL=webhosting.js.map