@lbrlabs/pulumi-scaleway
Version:
A Pulumi package for creating and managing scaleway cloud resources.
93 lines • 3.97 kB
JavaScript
;
// *** 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.MnqNamespace = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Creates and manages Scaleway Messaging and queuing Namespace.
* For further information please check
* our [documentation](https://pkg.go.dev/github.com/scaleway/scaleway-sdk-go@master/api/mnq/v1alpha1#pkg-index)
*
* > NOTE: This resource refers to the old version of the MNQ API. You should use new resources dedicated to your protocol. SQS, NATS.
*
* ## Examples
*
* ### Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@lbrlabs/pulumi-scaleway";
*
* const main = new scaleway.MnqNamespace("main", {
* protocol: "nats",
* region: "fr-par",
* });
* ```
*
* ## Import
*
* Namespaces can be imported using the `{region}/{id}`, e.g. bash
*
* ```sh
* $ pulumi import scaleway:index/mnqNamespace:MnqNamespace main fr-par/11111111111111111111111111111111
* ```
*/
class MnqNamespace extends pulumi.CustomResource {
/**
* Get an existing MnqNamespace 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 MnqNamespace(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of MnqNamespace. 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'] === MnqNamespace.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["createdAt"] = state ? state.createdAt : undefined;
resourceInputs["endpoint"] = state ? state.endpoint : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["projectId"] = state ? state.projectId : undefined;
resourceInputs["protocol"] = state ? state.protocol : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["updatedAt"] = state ? state.updatedAt : undefined;
}
else {
const args = argsOrState;
if ((!args || args.protocol === undefined) && !opts.urn) {
throw new Error("Missing required property 'protocol'");
}
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["projectId"] = args ? args.projectId : undefined;
resourceInputs["protocol"] = args ? args.protocol : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["createdAt"] = undefined /*out*/;
resourceInputs["endpoint"] = undefined /*out*/;
resourceInputs["updatedAt"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(MnqNamespace.__pulumiType, name, resourceInputs, opts);
}
}
exports.MnqNamespace = MnqNamespace;
/** @internal */
MnqNamespace.__pulumiType = 'scaleway:index/mnqNamespace:MnqNamespace';
//# sourceMappingURL=mnqNamespace.js.map