S3Files / Client / create_file_system
create_file_system¶
- S3Files.Client.create_file_system(**kwargs)¶
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.
See also: AWS API Documentation
Request Syntax
response = client.create_file_system( bucket='string', prefix='string', clientToken='string', kmsKeyId='string', roleArn='string', tags=[ { 'key': 'string', 'value': 'string' }, ], acceptBucketWarning=True|False )
- Parameters:
bucket (string) –
[REQUIRED]
The Amazon Resource Name (ARN) of the S3 bucket that will be accessible through the file system. The bucket must exist and be in the same Amazon Web Services Region as the file system.
prefix (string) – An optional prefix within the S3 bucket to scope the file system access. If specified, the file system provides access only to objects with keys that begin with this prefix. If not specified, the file system provides access to the entire bucket.
clientToken (string) –
A unique, case-sensitive identifier that you provide to ensure idempotent creation. Up to 64 ASCII characters are allowed. If you don’t specify a client token, the Amazon Web Services SDK automatically generates one.
This field is autopopulated if not provided.
kmsKeyId (string) – The ARN, key ID, or alias of the KMS key to use for encryption. If not specified, the service uses a service-owned key for encryption. You can specify a KMS key using the following formats: key ID, ARN, key alias, or key alias ARN. If you use
KmsKeyId, the file system will be encrypted.roleArn (string) –
[REQUIRED]
The ARN of the IAM role that grants the S3 Files service permission to read and write data between the file system and the S3 bucket. This role must have the necessary permissions to access the specified bucket and prefix.
tags (list) –
An array of key-value pairs to apply as tags to the file system resource. Each tag is a user-defined key-value pair. You can use tags to categorize and manage your file systems. Each key must be unique for the resource.
(dict) –
A key-value pair for resource tagging.
key (string) – [REQUIRED]
The tag key. The key can’t start with
aws:.value (string) – [REQUIRED]
The tag value.
acceptBucketWarning (boolean) – Set to true to acknowledge and accept any warnings about the bucket configuration. If not specified, the operation may fail if there are bucket configuration warnings.
- Return type:
dict
- Returns:
Response Syntax
{ 'creationTime': datetime(2015, 1, 1), 'fileSystemArn': 'string', 'fileSystemId': 'string', 'bucket': 'string', 'prefix': 'string', 'clientToken': 'string', 'kmsKeyId': 'string', 'status': 'available'|'creating'|'deleting'|'deleted'|'error'|'updating', 'statusMessage': 'string', 'roleArn': 'string', 'ownerId': 'string', 'tags': [ { 'key': 'string', 'value': 'string' }, ], 'name': 'string' }
Response Structure
(dict) –
creationTime (datetime) –
The time when the file system was created, in seconds since 1970-01-01T00:00:00Z (Unix epoch time).
fileSystemArn (string) –
The ARN for the S3 file system, in the format
arn:aws:s3files:region:account-id:file-system/file-system-id.fileSystemId (string) –
The ID of the file system, assigned by S3 Files. This ID is used to reference the file system in subsequent API calls.
bucket (string) –
The Amazon Resource Name (ARN) of the S3 bucket associated with the file system.
prefix (string) –
The prefix within the S3 bucket that scopes the file system access.
clientToken (string) –
The client token used for idempotency.
kmsKeyId (string) –
The ARN or alias of the KMS key used for encryption.
status (string) –
The lifecycle state of the file system. Valid values are:
AVAILABLE(the file system is available for use),CREATING(the file system is being created),DELETING(the file system is being deleted),DELETED(the file system has been deleted),ERROR(the file system is in an error state), orUPDATING(the file system is being updated).statusMessage (string) –
Additional information about the file system status. This field provides more details when the status is
ERROR, or during state transitions.roleArn (string) –
The ARN of the IAM role used for S3 access.
ownerId (string) –
The Amazon Web Services account ID of the file system owner.
tags (list) –
The tags associated with the file system.
(dict) –
A key-value pair for resource tagging.
key (string) –
The tag key. The key can’t start with
aws:.value (string) –
The tag value.
name (string) –
The name of the file system, derived from the
Nametag if present.
Exceptions
S3Files.Client.exceptions.InternalServerExceptionS3Files.Client.exceptions.ResourceNotFoundExceptionS3Files.Client.exceptions.ThrottlingExceptionS3Files.Client.exceptions.ServiceQuotaExceededExceptionS3Files.Client.exceptions.ValidationExceptionS3Files.Client.exceptions.ConflictException