Registry / storage / oci-filestorage

oci-filestorage

JSON →
library2.132.0jsnpmunverified

Official Oracle Cloud Infrastructure SDK for managing File Storage service resources (file systems, mount targets, exports, snapshots) in Node.js. Current stable version 2.132.0. Released as part of the OCI TypeScript SDK monorepo with frequent updates aligning to OCI API changes. Key differentiator: full type safety with generated TypeScript definitions, supports both ESM and CJS, and requires OCI authentication via API keys or instance principals. Compared to REST API calls, this SDK handles signing, retries, and serialization automatically.

storage
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SDK ships with TypeScript definitions; ESM-style import is recommended but CJS require also works.

import { FilestorageClient } from 'oci-filestorage'

The 'models' module is a namespace export, not a default export.

import * as models from 'oci-filestorage'

Model types are exported from a subpath 'lib/model'. Direct top-level export may not include all model types.

import { CreateFileSystemDetails } from 'oci-filestorage/lib/model'

Creates an OCI File Storage client using config file authentication and lists all file systems in a compartment.

import { FilestorageClient } from 'oci-filestorage'; import { common } from 'oci-common'; const provider = new common.ConfigFileAuthenticationDetailsProvider(); async function listFileSystems(compartmentId: string) { const client = new FilestorageClient({ authenticationDetailsProvider: provider }); const request = { compartmentId }; try { const response = await client.listFileSystems(request); console.log('File systems:', response.items); } catch (error) { console.error('Error listing file systems:', error); } } const compartmentId = process.env.COMPARTMENT_ID ?? ''; listFileSystems(compartmentId);
Debug
Known footguns
breakingIn version 2.x, region is required in the client configuration if not set in the config file.
deprecatedThe 'oci-common' package previously included authentication providers from the SDK; these are now available via 'oci-common' as exported classes.
gotchaFirewall rules: The SDK makes outbound HTTPS calls to OCI endpoints. Ensure network firewall allows traffic to *.oraclecloud.com.
gotchaSensitive data exposure: Hard-coding API credentials in code can lead to compromise.
deprecatedThe 'oci-common' package formerly included 'Region' and 'Realm' classes directly; they are now in a separate submodule.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
15 hits · last 30 days
gptbot
3
amazonbot
3
bytedance
3
Resources