UpdateFileCacheCommand

Updates the configuration of an existing Amazon File Cache resource. You can update multiple properties in a single request.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { FSxClient, UpdateFileCacheCommand } from "@aws-sdk/client-fsx"; // ES Modules import
// const { FSxClient, UpdateFileCacheCommand } = require("@aws-sdk/client-fsx"); // CommonJS import
const client = new FSxClient(config);
const input = { // UpdateFileCacheRequest
  FileCacheId: "STRING_VALUE", // required
  ClientRequestToken: "STRING_VALUE",
  LustreConfiguration: { // UpdateFileCacheLustreConfiguration
    WeeklyMaintenanceStartTime: "STRING_VALUE",
  },
};
const command = new UpdateFileCacheCommand(input);
const response = await client.send(command);
// { // UpdateFileCacheResponse
//   FileCache: { // FileCache
//     OwnerId: "STRING_VALUE",
//     CreationTime: new Date("TIMESTAMP"),
//     FileCacheId: "STRING_VALUE",
//     FileCacheType: "LUSTRE",
//     FileCacheTypeVersion: "STRING_VALUE",
//     Lifecycle: "AVAILABLE" || "CREATING" || "DELETING" || "UPDATING" || "FAILED",
//     FailureDetails: { // FileCacheFailureDetails
//       Message: "STRING_VALUE",
//     },
//     StorageCapacity: Number("int"),
//     VpcId: "STRING_VALUE",
//     SubnetIds: [ // SubnetIds
//       "STRING_VALUE",
//     ],
//     NetworkInterfaceIds: [ // NetworkInterfaceIds
//       "STRING_VALUE",
//     ],
//     DNSName: "STRING_VALUE",
//     KmsKeyId: "STRING_VALUE",
//     ResourceARN: "STRING_VALUE",
//     LustreConfiguration: { // FileCacheLustreConfiguration
//       PerUnitStorageThroughput: Number("int"),
//       DeploymentType: "CACHE_1",
//       MountName: "STRING_VALUE",
//       WeeklyMaintenanceStartTime: "STRING_VALUE",
//       MetadataConfiguration: { // FileCacheLustreMetadataConfiguration
//         StorageCapacity: Number("int"), // required
//       },
//       LogConfiguration: { // LustreLogConfiguration
//         Level: "DISABLED" || "WARN_ONLY" || "ERROR_ONLY" || "WARN_ERROR", // required
//         Destination: "STRING_VALUE",
//       },
//     },
//     DataRepositoryAssociationIds: [ // DataRepositoryAssociationIds
//       "STRING_VALUE",
//     ],
//   },
// };

UpdateFileCacheCommand Input

See UpdateFileCacheCommandInput for more details

Parameter
Type
Description
FileCacheId
Required
string | undefined

The ID of the cache that you are updating.

ClientRequestToken
string | undefined

(Optional) An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.

LustreConfiguration
UpdateFileCacheLustreConfiguration | undefined

The configuration updates for an Amazon File Cache resource.

UpdateFileCacheCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
FileCache
FileCache | undefined

A description of the cache that was updated.

Throws

Name
Fault
Details
BadRequest
client

A generic error indicating a failure with a client request.

FileCacheNotFound
client

No caches were found based upon supplied parameters.

IncompatibleParameterError
client

The error returned when a second request is received with the same client request token but different parameters settings. A client request token should always uniquely identify a single request.

InternalServerError
server

A generic error indicating a server-side failure.

MissingFileCacheConfiguration
client

A cache configuration is required for this operation.

ServiceLimitExceeded
client

An error indicating that a particular service limit was exceeded. You can increase some service limits by contacting Amazon Web Services Support.

UnsupportedOperation
client

The requested operation is not supported for this resource or API.

FSxServiceException
Base exception class for all service exceptions from FSx service.