delete_file_system(
file_system_id: FileSystemId,
*,
config_overrides: Optional[AsyncS3FilesClientConfig] = None,
force_delete: Optional[bool] = None,
) -> None
Deletes an S3 File System. You can optionally force deletion of a file system that has pending export data.
Parameters:
-
file_system_id
(FileSystemId)
–
The ID or Amazon Resource Name (ARN) of the S3 File System to delete.
-
force_delete
(Optional[bool], default:
None
)
–
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.
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.
-
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
| async def delete_file_system(
self,
file_system_id: "capo_s3files.types.file_system_id.FileSystemId",
*,
config_overrides: Optional[AsyncS3FilesClientConfig] = None,
force_delete: Optional[bool] = None,
) -> None:
"""<p>Deletes an S3 File System. You can optionally force deletion of a file system that has pending export data.</p>
Args:
file_system_id: <p>The ID or Amazon Resource Name (ARN) of the S3 File System to delete.</p>
force_delete: <p>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.</p>
Raises:
capo_s3files.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Retry your request using exponential backoff.</p>
capo_s3files.errors.conflict_exception.ConflictException: <p>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.</p>
capo_s3files.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry your request.</p>
capo_s3files.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify that the resource exists and that you have permission to access it.</p>
capo_s3files.errors.validation_exception.ValidationException: <p>The input parameters are not valid. Check the parameter values and try again.</p>
capo_s3files.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_s3files.types.delete_file_system_request.DeleteFileSystemRequest]",
) -> AsyncOperationResponse[None]:
import capo_s3files._operations.s3_files.delete_file_system
(
output,
http_response,
) = await capo_s3files._operations.s3_files.delete_file_system.async_delete_file_system(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteFileSystem")
)
input_: capo_s3files.types.delete_file_system_request.DeleteFileSystemRequest = {
"file_system_id": file_system_id
}
if force_delete is not None:
input_["force_delete"] = force_delete
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|