- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
AddWorkingStorageCommand
Configures one or more gateway local disks as working storage for a gateway. This operation is only supported in the stored volume gateway type. This operation is deprecated in cached volume API version 20120630. Use AddUploadBuffer instead.
Working storage is also referred to as upload buffer. You can also use the AddUploadBuffer operation to add upload buffer to a stored volume gateway.
In the request, you specify the gateway Amazon Resource Name (ARN) to which you want to add working storage, and one or more disk IDs that you want to configure as working storage.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { StorageGatewayClient, AddWorkingStorageCommand } from "@aws-sdk/client-storage-gateway"; // ES Modules import
// const { StorageGatewayClient, AddWorkingStorageCommand } = require("@aws-sdk/client-storage-gateway"); // CommonJS import
const client = new StorageGatewayClient(config);
const input = { // AddWorkingStorageInput
GatewayARN: "STRING_VALUE", // required
DiskIds: [ // DiskIds // required
"STRING_VALUE",
],
};
const command = new AddWorkingStorageCommand(input);
const response = await client.send(command);
// { // AddWorkingStorageOutput
// GatewayARN: "STRING_VALUE",
// };
Example Usage
AddWorkingStorageCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
DiskIds Required | string[] | undefined | An array of strings that identify disks that are to be configured as working storage. Each string has a minimum length of 1 and maximum length of 300. You can get the disk IDs from the ListLocalDisks API. |
GatewayARN Required | string | undefined | The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation to return a list of gateways for your account and Amazon Web Services Region. |
AddWorkingStorageCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
GatewayARN | string | undefined | The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation to return a list of gateways for your account and Amazon Web Services Region. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalServerError | server | An internal server error has occurred during the request. For more information, see the error and message fields. |
InvalidGatewayRequestException | client | An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields. |
StorageGatewayServiceException | Base exception class for all service exceptions from StorageGateway service. |