UNPKG

@pulumiverse/scaleway

Version:

A Pulumi package for creating and managing Scaleway cloud resources.

105 lines 5.12 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.MongoDbSnapshot = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Creates and manages Scaleway MongoDB® snapshots. * For more information refer to the [product documentation](https://www.scaleway.com/en/docs/managed-mongodb-databases/). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const main = new scaleway.mongodb.Snapshot("main", { * instanceId: mainScalewayMongodbInstance.id, * name: "name-snapshot", * expiresAt: "2024-12-31T23:59:59Z", * }); * ``` * * ## Import * * MongoDB® snapshots can be imported using the `{region}/{id}`, e.g. * * bash * * ```sh * $ pulumi import scaleway:index/mongoDbSnapshot:MongoDbSnapshot main fr-par-1/11111111-1111-1111-1111-111111111111 * ``` * * @deprecated scaleway.index/mongodbsnapshot.MongoDbSnapshot has been deprecated in favor of scaleway.mongodb/snapshot.Snapshot */ class MongoDbSnapshot extends pulumi.CustomResource { /** * Get an existing MongoDbSnapshot 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("MongoDbSnapshot is deprecated: scaleway.index/mongodbsnapshot.MongoDbSnapshot has been deprecated in favor of scaleway.mongodb/snapshot.Snapshot"); return new MongoDbSnapshot(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of MongoDbSnapshot. 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'] === MongoDbSnapshot.__pulumiType; } /** @deprecated scaleway.index/mongodbsnapshot.MongoDbSnapshot has been deprecated in favor of scaleway.mongodb/snapshot.Snapshot */ constructor(name, argsOrState, opts) { pulumi.log.warn("MongoDbSnapshot is deprecated: scaleway.index/mongodbsnapshot.MongoDbSnapshot has been deprecated in favor of scaleway.mongodb/snapshot.Snapshot"); let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["createdAt"] = state ? state.createdAt : undefined; resourceInputs["expiresAt"] = state ? state.expiresAt : undefined; resourceInputs["instanceId"] = state ? state.instanceId : undefined; resourceInputs["instanceName"] = state ? state.instanceName : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["nodeType"] = state ? state.nodeType : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["size"] = state ? state.size : undefined; resourceInputs["updatedAt"] = state ? state.updatedAt : undefined; resourceInputs["volumeType"] = state ? state.volumeType : undefined; } else { const args = argsOrState; if ((!args || args.expiresAt === undefined) && !opts.urn) { throw new Error("Missing required property 'expiresAt'"); } if ((!args || args.instanceId === undefined) && !opts.urn) { throw new Error("Missing required property 'instanceId'"); } resourceInputs["expiresAt"] = args ? args.expiresAt : undefined; resourceInputs["instanceId"] = args ? args.instanceId : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["createdAt"] = undefined /*out*/; resourceInputs["instanceName"] = undefined /*out*/; resourceInputs["nodeType"] = undefined /*out*/; resourceInputs["size"] = undefined /*out*/; resourceInputs["updatedAt"] = undefined /*out*/; resourceInputs["volumeType"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(MongoDbSnapshot.__pulumiType, name, resourceInputs, opts); } } exports.MongoDbSnapshot = MongoDbSnapshot; /** @internal */ MongoDbSnapshot.__pulumiType = 'scaleway:index/mongoDbSnapshot:MongoDbSnapshot'; //# sourceMappingURL=mongoDbSnapshot.js.map