@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
126 lines • 5.83 kB
JavaScript
;
// *** 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.MongoDbSnapshot = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(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.
*
* ```sh
* $ pulumi import scaleway:index/mongoDbSnapshot:MongoDbSnapshot main fr-par/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, { ...opts, id: id });
}
/** @internal */
static __pulumiType = 'scaleway:index/mongoDbSnapshot:MongoDbSnapshot';
/**
* 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?.createdAt;
resourceInputs["expiresAt"] = state?.expiresAt;
resourceInputs["instanceId"] = state?.instanceId;
resourceInputs["instanceName"] = state?.instanceName;
resourceInputs["name"] = state?.name;
resourceInputs["nodeType"] = state?.nodeType;
resourceInputs["region"] = state?.region;
resourceInputs["size"] = state?.size;
resourceInputs["updatedAt"] = state?.updatedAt;
resourceInputs["volumeType"] = state?.volumeType;
}
else {
const args = argsOrState;
if (args?.expiresAt === undefined && !opts.urn) {
throw new Error("Missing required property 'expiresAt'");
}
if (args?.instanceId === undefined && !opts.urn) {
throw new Error("Missing required property 'instanceId'");
}
resourceInputs["expiresAt"] = args?.expiresAt;
resourceInputs["instanceId"] = args?.instanceId;
resourceInputs["name"] = args?.name;
resourceInputs["region"] = args?.region;
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;
//# sourceMappingURL=mongoDbSnapshot.js.map