Skip to main content

file_systems

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

Overview

Namefile_systems
TypeResource
Idaws.s3files.file_systems

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the file system. (pattern: <code>([\p{L}\p{Z}\p{N}_.:/=+-@]*)</code>)
bucketstringThe Amazon Resource Name (ARN) of the S3 bucket. (pattern: <code>(arn:aws[a-zA-Z0-9-]*:s3:::.+)</code>)
client_tokenstringThe client token used for idempotency when the file system was created. (pattern: <code>(.+)</code>)
creation_timestring (date-time)The time when the file system was created.
file_system_arnstringThe Amazon Resource Name (ARN) of the file system. (pattern: <code>(arn:aws[-a-z]*:s3files:[0-9a-z-:]+:file-system/fs-[0-9a-f]{17,40})</code>)
file_system_idstringThe ID of the file system. (pattern: <code>(arn:aws[-a-z]*:s3files:[0-9a-z-:]+:file-system/fs-[0-9a-f]{17,40}|fs-[0-9a-f]{17,40})</code>)
kms_key_idstringThe Amazon Resource Name (ARN) of the Amazon Web Services KMS key used for encryption. (pattern: <code>([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|mrk-[0-9a-f]{32}|alias/[a-zA-Z0-9/-]+|(arn:aws[-a-z]*:kms:[a-z0-9-]+:\d{12}:((key/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})|(key/mrk-[0-9a-f]{32})|(alias/[a-zA-Z0-9/-]+))))</code>)
owner_idstringThe Amazon Web Services account ID of the file system owner. (pattern: <code>(\d{12})|(\d{4}-{4}-\d{4})</code>)
prefixstringThe prefix in the S3 bucket that the file system provides access to.
role_arnstringThe Amazon Resource Name (ARN) of the IAM role used for S3 access. (pattern: <code>arn:(aws[a-zA-Z-]*)?:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@-_/]+</code>)
statusstringThe current status of the file system. (available, creating, deleting, deleted, error, updating)
status_messagestringAdditional information about the file system status.
tagsarrayThe tags associated with the file system.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_file_systemselectfile_system_id, regionReturns resource information for the specified S3 File System including status, configuration, and metadata.
list_file_systemsselectregionbucket, maxResults, nextTokenReturns a list of all S3 File Systems owned by the account with optional filtering by bucket.
create_file_systeminsertregion, bucket, roleArnCreates an S3 File System resource scoped to a bucket or prefix within a bucket, enabling file system access to S3 data. To create a file system, you need an S3 bucket and an IAM role that grants the service permission to access the bucket.
delete_file_systemdeletefile_system_id, regionforceDeleteDeletes an S3 File System. You can optionally force deletion of a file system that has pending export data.

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
file_system_idstringThe ID or Amazon Resource Name (ARN) of the S3 File System to delete.
regionstringAWS region (default: us-east-1)
bucketstringOptional filter to list only file systems associated with the specified S3 bucket Amazon Resource Name (ARN). If provided, only file systems that provide access to this bucket will be returned in the response.
forceDeletebooleanIf true, allows deletion of a file system that contains data pending export to S3. If false (the default), the deletion will fail if there is data that has not yet been exported to the S3 bucket. Use this parameter with caution as it may result in data loss.
maxResultsintegerThe maximum number of file systems to return in a single response. If not specified, up to 100 file systems are returned.
nextTokenstringA pagination token returned from a previous call to continue listing file systems.

SELECT examples

Returns resource information for the specified S3 File System including status, configuration, and metadata.

SELECT
name,
bucket,
client_token,
creation_time,
file_system_arn,
file_system_id,
kms_key_id,
owner_id,
prefix,
role_arn,
status,
status_message,
tags
FROM aws.s3files.file_systems
WHERE file_system_id = '{{ file_system_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates an S3 File System resource scoped to a bucket or prefix within a bucket, enabling file system access to S3 data. To create a file system, you need an S3 bucket and an IAM role that grants the service permission to access the bucket.

INSERT INTO aws.s3files.file_systems (
bucket,
prefix,
clientToken,
kmsKeyId,
roleArn,
tags,
acceptBucketWarning,
region
)
SELECT
'{{ bucket }}' /* required */,
'{{ prefix }}',
'{{ clientToken }}',
'{{ kmsKeyId }}',
'{{ roleArn }}' /* required */,
'{{ tags }}',
{{ acceptBucketWarning }},
'{{ region }}'
RETURNING
name,
bucket,
client_token,
creation_time,
file_system_arn,
file_system_id,
kms_key_id,
owner_id,
prefix,
role_arn,
status,
status_message,
tags
;

DELETE examples

Deletes an S3 File System. You can optionally force deletion of a file system that has pending export data.

DELETE FROM aws.s3files.file_systems
WHERE file_system_id = '{{ file_system_id }}' --required
AND region = '{{ region }}' --required
AND forceDelete = '{{ forceDelete }}'
;