- 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.
StartCacheReportCommand
Starts generating a report of the file metadata currently cached by an S3 File Gateway for a specific file share. You can use this report to identify and resolve issues if you have files failing upload from your gateway to Amazon S3. The report is a CSV file containing a list of files which match the set of filter parameters you specify in the request.
The Files Failing Upload flag is reset every 24 hours and during gateway reboot. If this report captures the files after the reset, but before they become flagged again, they will not be reported as Files Failing Upload.
The following requirements must be met to successfully generate a cache report:
-
You must have permissions to list the entire Amazon S3 bucket associated with the specified file share.
-
No other cache reports can currently be in-progress for the specified file share.
-
There must be fewer than 10 existing cache reports for the specified file share.
-
The gateway must be online and connected to Amazon Web Services.
-
The root disk must have at least 20GB of free space when report generation starts.
-
You must specify at least one value for
InclusionFilters
orExclusionFilters
in the request.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { StorageGatewayClient, StartCacheReportCommand } from "@aws-sdk/client-storage-gateway"; // ES Modules import
// const { StorageGatewayClient, StartCacheReportCommand } = require("@aws-sdk/client-storage-gateway"); // CommonJS import
const client = new StorageGatewayClient(config);
const input = { // StartCacheReportInput
FileShareARN: "STRING_VALUE", // required
Role: "STRING_VALUE", // required
LocationARN: "STRING_VALUE", // required
BucketRegion: "STRING_VALUE", // required
VPCEndpointDNSName: "STRING_VALUE",
InclusionFilters: [ // CacheReportFilterList
{ // CacheReportFilter
Name: "UploadState" || "UploadFailureReason", // required
Values: [ // CacheReportFilterValues // required
"STRING_VALUE",
],
},
],
ExclusionFilters: [
{
Name: "UploadState" || "UploadFailureReason", // required
Values: [ // required
"STRING_VALUE",
],
},
],
ClientToken: "STRING_VALUE", // required
Tags: [ // Tags
{ // Tag
Key: "STRING_VALUE", // required
Value: "STRING_VALUE", // required
},
],
};
const command = new StartCacheReportCommand(input);
const response = await client.send(command);
// { // StartCacheReportOutput
// CacheReportARN: "STRING_VALUE",
// };
StartCacheReportCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
BucketRegion Required | string | undefined | The Amazon Web Services Region of the Amazon S3 bucket associated with the file share for which you want to generate the cache report. |
ClientToken Required | string | undefined | A unique identifier that you use to ensure idempotent report generation if you need to retry an unsuccessful |
FileShareARN Required | string | undefined | The Amazon Resource Name (ARN) of the file share. |
LocationARN Required | string | undefined | The ARN of the Amazon S3 bucket where the cache report will be saved. We do not recommend saving the cache report to the same Amazon S3 bucket for which you are generating the report. This field does not accept access point ARNs. |
Role Required | string | undefined | The ARN of the IAM role used when saving the cache report to Amazon S3. |
ExclusionFilters | CacheReportFilter[] | undefined | The list of filters and parameters that determine which files are excluded from the report. You must specify at least one value for |
InclusionFilters | CacheReportFilter[] | undefined | The list of filters and parameters that determine which files are included in the report. You must specify at least one value for |
Tags | Tag[] | undefined | A list of up to 50 key/value tags that you can assign to the cache report. Using tags can help you categorize your reports and more easily locate them in search results. |
VPCEndpointDNSName | string | undefined | The DNS name of the VPC endpoint associated with the Amazon S3 where you want to save the cache report. Optional. |
StartCacheReportCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
CacheReportARN | string | undefined | The Amazon Resource Name (ARN) of the cache report generated by the |
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. |