UNPKG

@pulumiverse/scaleway

Version:

A Pulumi package for creating and managing Scaleway cloud resources.

137 lines 6.09 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.IotNetwork = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("./utilities")); /** * > **Note:** This terraform resource is currently in beta and might include breaking change in future releases. * * Creates and manages Scaleway IoT Networks. For more information, see the following: * * - [API documentation](https://www.scaleway.com/en/developers/api/iot/). * - [Product documentation](https://www.scaleway.com/en/docs/iot-hub/) * * For more step-by-step instructions on how to setup the networks on the external providers backends, you can follow these guides: * * - [Configuring the Sigfox backend](https://www.scaleway.com/en/docs/iot-hub/how-to/setup-use-sigfox-network/) * - [Using the Rest Network](https://www.scaleway.com/en/docs/iot-hub/how-to/setup-use-rest-network/) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const mainHub = new scaleway.iot.Hub("main", { * name: "main", * productPlan: "plan_shared", * }); * const main = new scaleway.iot.Network("main", { * name: "main", * hubId: mainHub.id, * type: "sigfox", * }); * ``` * * ## Import * * IoT Networks can be imported using the `{region}/{id}`, e.g. * * ```sh * $ pulumi import scaleway:index/iotNetwork:IotNetwork net01 fr-par/11111111-1111-1111-1111-111111111111 * ``` * * @deprecated scaleway.index/iotnetwork.IotNetwork has been deprecated in favor of scaleway.iot/network.Network */ class IotNetwork extends pulumi.CustomResource { /** * Get an existing IotNetwork 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("IotNetwork is deprecated: scaleway.index/iotnetwork.IotNetwork has been deprecated in favor of scaleway.iot/network.Network"); return new IotNetwork(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'scaleway:index/iotNetwork:IotNetwork'; /** * Returns true if the given object is an instance of IotNetwork. 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'] === IotNetwork.__pulumiType; } /** @deprecated scaleway.index/iotnetwork.IotNetwork has been deprecated in favor of scaleway.iot/network.Network */ constructor(name, argsOrState, opts) { pulumi.log.warn("IotNetwork is deprecated: scaleway.index/iotnetwork.IotNetwork has been deprecated in favor of scaleway.iot/network.Network"); let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["createdAt"] = state?.createdAt; resourceInputs["endpoint"] = state?.endpoint; resourceInputs["hubId"] = state?.hubId; resourceInputs["name"] = state?.name; resourceInputs["region"] = state?.region; resourceInputs["secret"] = state?.secret; resourceInputs["topicPrefix"] = state?.topicPrefix; resourceInputs["type"] = state?.type; } else { const args = argsOrState; if (args?.hubId === undefined && !opts.urn) { throw new Error("Missing required property 'hubId'"); } if (args?.type === undefined && !opts.urn) { throw new Error("Missing required property 'type'"); } resourceInputs["hubId"] = args?.hubId; resourceInputs["name"] = args?.name; resourceInputs["region"] = args?.region; resourceInputs["topicPrefix"] = args?.topicPrefix; resourceInputs["type"] = args?.type; resourceInputs["createdAt"] = undefined /*out*/; resourceInputs["endpoint"] = undefined /*out*/; resourceInputs["secret"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["secret"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(IotNetwork.__pulumiType, name, resourceInputs, opts); } } exports.IotNetwork = IotNetwork; //# sourceMappingURL=iotNetwork.js.map