@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
140 lines • 6.61 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.FileSystem = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a resource to manage cloudfs file system
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as volcengine from "@volcengine/pulumi";
*
* const foo = new volcengine.cloudfs.FileSystem("foo", {
* cacheCapacityTib: 10,
* cachePlan: "T2",
* fsName: "tffile",
* mode: "HDFS_MODE",
* readOnly: true,
* securityGroupId: "sg-rrv1klfg5s00v0x578mx14m",
* subnetId: "subnet-13fca1crr5d6o3n6nu46cyb5m",
* tosBucket: "tfacc",
* tosPrefix: "pre/",
* vpcRouteEnabled: true,
* zoneId: "cn-beijing-b",
* });
* const foo1 = new volcengine.cloudfs.FileSystem("foo1", {
* cacheCapacityTib: 15,
* cachePlan: "T2",
* fsName: "tffileu",
* mode: "ACC_MODE",
* readOnly: true,
* securityGroupId: "sg-rrv1klfg5s00v0x578mx14m",
* subnetId: "subnet-13fca1crr5d6o3n6nu46cyb5m",
* tosBucket: "tfacc",
* vpcRouteEnabled: false,
* zoneId: "cn-beijing-b",
* });
* ```
*
* ## Import
*
* CloudFileSystem can be imported using the FsName, e.g.
*
* ```sh
* $ pulumi import volcengine:cloudfs/fileSystem:FileSystem default tfname
* ```
*/
class FileSystem extends pulumi.CustomResource {
/**
* Get an existing FileSystem 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 FileSystem(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of FileSystem. 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'] === FileSystem.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["accessId"] = state ? state.accessId : undefined;
resourceInputs["cacheCapacityTib"] = state ? state.cacheCapacityTib : undefined;
resourceInputs["cachePlan"] = state ? state.cachePlan : undefined;
resourceInputs["createdTime"] = state ? state.createdTime : undefined;
resourceInputs["fsName"] = state ? state.fsName : undefined;
resourceInputs["mode"] = state ? state.mode : undefined;
resourceInputs["mountPoint"] = state ? state.mountPoint : undefined;
resourceInputs["readOnly"] = state ? state.readOnly : undefined;
resourceInputs["securityGroupId"] = state ? state.securityGroupId : undefined;
resourceInputs["status"] = state ? state.status : undefined;
resourceInputs["subnetId"] = state ? state.subnetId : 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;
resourceInputs["vpcId"] = state ? state.vpcId : undefined;
resourceInputs["vpcRouteEnabled"] = state ? state.vpcRouteEnabled : undefined;
resourceInputs["zoneId"] = state ? state.zoneId : undefined;
}
else {
const args = argsOrState;
if ((!args || args.cachePlan === undefined) && !opts.urn) {
throw new Error("Missing required property 'cachePlan'");
}
if ((!args || args.fsName === undefined) && !opts.urn) {
throw new Error("Missing required property 'fsName'");
}
if ((!args || args.mode === undefined) && !opts.urn) {
throw new Error("Missing required property 'mode'");
}
if ((!args || args.zoneId === undefined) && !opts.urn) {
throw new Error("Missing required property 'zoneId'");
}
resourceInputs["cacheCapacityTib"] = args ? args.cacheCapacityTib : undefined;
resourceInputs["cachePlan"] = args ? args.cachePlan : undefined;
resourceInputs["fsName"] = args ? args.fsName : undefined;
resourceInputs["mode"] = args ? args.mode : undefined;
resourceInputs["readOnly"] = args ? args.readOnly : undefined;
resourceInputs["securityGroupId"] = args ? args.securityGroupId : undefined;
resourceInputs["subnetId"] = args ? args.subnetId : 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["vpcRouteEnabled"] = args ? args.vpcRouteEnabled : undefined;
resourceInputs["zoneId"] = args ? args.zoneId : undefined;
resourceInputs["accessId"] = undefined /*out*/;
resourceInputs["createdTime"] = undefined /*out*/;
resourceInputs["mountPoint"] = undefined /*out*/;
resourceInputs["status"] = undefined /*out*/;
resourceInputs["vpcId"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(FileSystem.__pulumiType, name, resourceInputs, opts);
}
}
exports.FileSystem = FileSystem;
/** @internal */
FileSystem.__pulumiType = 'volcengine:cloudfs/fileSystem:FileSystem';
//# sourceMappingURL=fileSystem.js.map