Use the create
method to create a new drive. (subscription required)
try {
const name = "new_drive_name"; // The name of the new drive to create.
const storageClass = "hot"; // (optional) The storage class for the new drive.
const [data, error] = await sdk.drive.create({ name, storageClass });
// Check for success
if (error) {
console.error(error);
} else {
console.log("New drive created:", data);
}
} catch (error) {
console.error(error.message);
}
Params
name
(string): The name of the new drive to create.storageClass
(string): The storage class for the new drive. (hot, warm, or glacier) (optional)
Required API Key Permission
Create Directory