Skip to main content

file_shares

Creates, updates, deletes, gets or lists a file_shares resource.

Overview

Namefile_shares
TypeResource
Idaws.storagegateway.file_shares

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
file_share_arnstringThe Amazon Resource Name (ARN) of the file share.
file_share_idstringThe ID of the file share.
file_share_statusstringThe status of the file share. Valid Values: CREATING | UPDATING | AVAILABLE | DELETING
file_share_typestringThe type of the file share. (NFS, SMB)
gateway_arnstringThe 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.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_file_sharesselectregionGets a list of the file shares for a specific S3 File Gateway, or the list of file shares that belong to the calling Amazon Web Services account. This operation is only supported for S3 File Gateways.
delete_file_sharedeleteregionDeletes a file share from an S3 File Gateway. This operation is only supported for S3 File Gateways.
evict_files_failing_uploadexecregion, FileShareARNStarts a process that cleans the specified file share's cache of file entries that are failing upload to Amazon S3. This API operation reports success if the request is received with valid arguments, and there are no other cache clean operations currently in-progress for the specified file share. After a successful request, the cache clean operation occurs asynchronously and reports progress using CloudWatch logs and notifications. If ForceRemove is set to True, the cache clean operation will delete file data from the gateway which might otherwise be recoverable. We recommend using this operation only after all other methods to clear files failing upload have been exhausted, and if your business need outweighs the potential data loss.
notify_when_uploadedexecregion, FileShareARNSends you notification through Amazon EventBridge when all files written to your file share have been uploaded to Amazon S3. Storage Gateway can send a notification through Amazon EventBridge when all files written to your file share up to that point in time have been uploaded to Amazon S3. These files include files written to the file share up to the time that you make a request for notification. When the upload is done, Storage Gateway sends you notification through EventBridge. You can configure EventBridge to send the notification through event targets such as Amazon SNS or Lambda function. This operation is only supported for S3 File Gateways. For more information, see Getting file upload notification in the Amazon S3 File Gateway User Guide.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Gets a list of the file shares for a specific S3 File Gateway, or the list of file shares that belong to the calling Amazon Web Services account. This operation is only supported for S3 File Gateways.

SELECT
file_share_arn,
file_share_id,
file_share_status,
file_share_type,
gateway_arn
FROM aws.storagegateway.file_shares
WHERE region = '{{ region }}' -- required
;

DELETE examples

Deletes a file share from an S3 File Gateway. This operation is only supported for S3 File Gateways.

DELETE FROM aws.storagegateway.file_shares
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Starts a process that cleans the specified file share's cache of file entries that are failing upload to Amazon S3. This API operation reports success if the request is received with valid arguments, and there are no other cache clean operations currently in-progress for the specified file share. After a successful request, the cache clean operation occurs asynchronously and reports progress using CloudWatch logs and notifications. If ForceRemove is set to True, the cache clean operation will delete file data from the gateway which might otherwise be recoverable. We recommend using this operation only after all other methods to clear files failing upload have been exhausted, and if your business need outweighs the potential data loss.

EXEC aws.storagegateway.file_shares.evict_files_failing_upload
@region='{{ region }}' --required
@@json=
'{
"FileShareARN": "{{ FileShareARN }}",
"ForceRemove": {{ ForceRemove }}
}'
;