file_systems
Creates, updates, deletes, gets or lists a file_systems resource.
Overview
| Name | file_systems |
| Type | Resource |
| Id | aws.s3files.file_systems |
Fields
The following fields are returned by SELECT queries:
- get_file_system
- list_file_systems
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the file system. (pattern: <code>([\p{L}\p{Z}\p{N}_.:/=+-@]*)</code>) |
bucket | string | The Amazon Resource Name (ARN) of the S3 bucket. (pattern: <code>(arn:aws[a-zA-Z0-9-]*:s3:::.+)</code>) |
client_token | string | The client token used for idempotency when the file system was created. (pattern: <code>(.+)</code>) |
creation_time | string (date-time) | The time when the file system was created. |
file_system_arn | string | The 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_id | string | The 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_id | string | The 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_id | string | The Amazon Web Services account ID of the file system owner. (pattern: <code>(\d{12})|(\d{4}-{4}-\d{4})</code>) |
prefix | string | The prefix in the S3 bucket that the file system provides access to. |
role_arn | string | The 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>) |
status | string | The current status of the file system. (available, creating, deleting, deleted, error, updating) |
status_message | string | Additional information about the file system status. |
tags | array | The tags associated with the file system. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the file system. (pattern: <code>([\p{L}\p{Z}\p{N}_.:/=+-@]*)</code>) |
bucket | string | The Amazon Resource Name (ARN) of the S3 bucket. (pattern: <code>(arn:aws[a-zA-Z0-9-]*:s3:::.+)</code>) |
creation_time | string (date-time) | The time when the file system was created. |
file_system_arn | string | The 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_id | string | The 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>) |
owner_id | string | The Amazon Web Services account ID of the file system owner. (pattern: <code>(\d{12})|(\d{4}-{4}-\d{4})</code>) |
role_arn | string | The 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>) |
status | string | The current status of the file system. (available, creating, deleting, deleted, error, updating) |
status_message | string | Additional information about the file system status. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_file_system | select | file_system_id, region | Returns resource information for the specified S3 File System including status, configuration, and metadata. | |
list_file_systems | select | region | bucket, maxResults, nextToken | Returns a list of all S3 File Systems owned by the account with optional filtering by bucket. |
create_file_system | insert | region, bucket, roleArn | 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. | |
delete_file_system | delete | file_system_id, region | forceDelete | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
file_system_id | string | The ID or Amazon Resource Name (ARN) of the S3 File System to delete. |
region | string | AWS region (default: us-east-1) |
bucket | string | Optional 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. |
forceDelete | boolean | If 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. |
maxResults | integer | The maximum number of file systems to return in a single response. If not specified, up to 100 file systems are returned. |
nextToken | string | A pagination token returned from a previous call to continue listing file systems. |
SELECT examples
- get_file_system
- list_file_systems
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
;
Returns a list of all S3 File Systems owned by the account with optional filtering by bucket.
SELECT
name,
bucket,
creation_time,
file_system_arn,
file_system_id,
owner_id,
role_arn,
status,
status_message
FROM aws.s3files.file_systems
WHERE region = '{{ region }}' -- required
AND bucket = '{{ bucket }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_file_system
- Manifest
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
;
# Description fields are for documentation purposes
- name: file_systems
props:
- name: region
value: "{{ region }}"
description: Required parameter for the file_systems resource.
- name: bucket
value: "{{ bucket }}"
- name: prefix
value: "{{ prefix }}"
- name: clientToken
value: "{{ clientToken }}"
- name: kmsKeyId
value: "{{ kmsKeyId }}"
- name: roleArn
value: "{{ roleArn }}"
- name: tags
value:
- key: "{{ key }}"
value: "{{ value }}"
- name: acceptBucketWarning
value: {{ acceptBucketWarning }}
DELETE examples
- delete_file_system
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 }}'
;