create_file_system
async
¶
create_file_system(
bucket: BucketArn,
role_arn: RoleArn,
*,
config_overrides: Optional[AsyncS3FilesClientConfig] = 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.
Source code in docs_src/capo_s3files/_services/async_s3_files.py
269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 | |