@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
100 lines • 4.54 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.Namespace = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a resource to manage cloudfs namespace
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as volcengine from "@volcengine/pulumi";
*
* const foo = new volcengine.cloudfs.Namespace("foo", {
* fsName: "tf-test-fs",
* readOnly: true,
* tosBucket: "tf-test",
* });
* ```
*
* ## Import
*
* CloudfsNamespace can be imported using the FsName:NsId, e.g.
*
* ```sh
* $ pulumi import volcengine:cloudfs/namespace:Namespace default tfname:1801439850948****
* ```
*/
class Namespace extends pulumi.CustomResource {
/**
* Get an existing Namespace 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 Namespace(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Namespace. 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'] === Namespace.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["createdTime"] = state ? state.createdTime : undefined;
resourceInputs["fsName"] = state ? state.fsName : undefined;
resourceInputs["isMyBucket"] = state ? state.isMyBucket : undefined;
resourceInputs["nsId"] = state ? state.nsId : undefined;
resourceInputs["readOnly"] = state ? state.readOnly : undefined;
resourceInputs["serviceManaged"] = state ? state.serviceManaged : undefined;
resourceInputs["status"] = state ? state.status : undefined;
resourceInputs["tosAccountId"] = state ? state.tosAccountId : undefined;
resourceInputs["tosAk"] = state ? state.tosAk : undefined;
resourceInputs["tosBucket"] = state ? state.tosBucket : undefined;
resourceInputs["tosPrefix"] = state ? state.tosPrefix : undefined;
resourceInputs["tosSk"] = state ? state.tosSk : undefined;
}
else {
const args = argsOrState;
if ((!args || args.fsName === undefined) && !opts.urn) {
throw new Error("Missing required property 'fsName'");
}
if ((!args || args.tosBucket === undefined) && !opts.urn) {
throw new Error("Missing required property 'tosBucket'");
}
resourceInputs["fsName"] = args ? args.fsName : undefined;
resourceInputs["readOnly"] = args ? args.readOnly : undefined;
resourceInputs["tosAccountId"] = args ? args.tosAccountId : undefined;
resourceInputs["tosAk"] = args ? args.tosAk : undefined;
resourceInputs["tosBucket"] = args ? args.tosBucket : undefined;
resourceInputs["tosPrefix"] = args ? args.tosPrefix : undefined;
resourceInputs["tosSk"] = args ? args.tosSk : undefined;
resourceInputs["createdTime"] = undefined /*out*/;
resourceInputs["isMyBucket"] = undefined /*out*/;
resourceInputs["nsId"] = undefined /*out*/;
resourceInputs["serviceManaged"] = undefined /*out*/;
resourceInputs["status"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Namespace.__pulumiType, name, resourceInputs, opts);
}
}
exports.Namespace = Namespace;
/** @internal */
Namespace.__pulumiType = 'volcengine:cloudfs/namespace:Namespace';
//# sourceMappingURL=namespace.js.map