create_file_system
¶
create_file_system(
bucket: BucketArn,
role_arn: RoleArn,
*,
config_overrides: Optional[S3FilesClientConfig] = None,
prefix: Optional[str] = None,
client_token: Optional[CreationToken] = None,
kms_key_id: Optional[KmsKeyId] = None,
tags: Optional[TagList] = None,
accept_bucket_warning: Optional[bool] = None,
) -> CreateFileSystemResponse
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.
Parameters:
-
bucket(BucketArn) –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(Optional[str], default:None) –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.
-
client_token(Optional[CreationToken], default:None) –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.
-
kms_key_id(Optional[KmsKeyId], default:None) –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. -
role_arn(RoleArn) –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(Optional[TagList], default:None) –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.
-
accept_bucket_warning(Optional[bool], default:None) –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.
Raises:
-
ThrottlingException–The request was throttled. Retry your request using exponential backoff.
-
ConflictException–The request conflicts with the current state of the resource. This can occur when trying to create a resource that already exists or delete a resource that is in use.
-
InternalServerException–An internal server error occurred. Retry your request.
-
ResourceNotFoundException–The specified resource was not found. Verify that the resource exists and that you have permission to access it.
-
ServiceQuotaExceededException–The request would exceed a service quota. Review your service quotas and either delete resources or request a quota increase.
-
ValidationException–The input parameters are not valid. Check the parameter values and try again.
-
UnknownServiceError–The service returned an error code this client does not model.