file_shares
Creates, updates, deletes, gets or lists a file_shares resource.
Overview
| Name | file_shares |
| Type | Resource |
| Id | aws.storagegateway.file_shares |
Fields
The following fields are returned by SELECT queries:
- list_file_shares
| Name | Datatype | Description |
|---|---|---|
file_share_arn | string | The Amazon Resource Name (ARN) of the file share. |
file_share_id | string | The ID of the file share. |
file_share_status | string | The status of the file share. Valid Values: CREATING | UPDATING | AVAILABLE | DELETING |
file_share_type | string | The type of the file share. (NFS, SMB) |
gateway_arn | string | 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. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_file_shares | select | region | 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. | |
delete_file_share | delete | region | Deletes a file share from an S3 File Gateway. This operation is only supported for S3 File Gateways. | |
evict_files_failing_upload | exec | region, FileShareARN | 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. | |
notify_when_uploaded | exec | region, FileShareARN | Sends 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- list_file_shares
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
- delete_file_share
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
- evict_files_failing_upload
- notify_when_uploaded
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 }}
}'
;
Sends 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.
EXEC aws.storagegateway.file_shares.notify_when_uploaded
@region='{{ region }}' --required
@@json=
'{
"FileShareARN": "{{ FileShareARN }}"
}'
;