Skip to content

update_file_system async

update_file_system(
    file_system_id: FileSystemId,
    *,
    config_overrides: Optional[AsyncEFSClientConfig] = None,
    throughput_mode: Optional[ThroughputMode] = None,
    provisioned_throughput_in_mibps: Optional[ProvisionedThroughputInMibps] = None,
) -> FileSystemDescription

Updates the throughput mode or the amount of provisioned throughput of an existing file system.

Parameters:

  • file_system_id (FileSystemId) –

    The ID of the file system that you want to update.

  • throughput_mode (Optional[ThroughputMode], default: None ) –

    (Optional) Updates the file system's throughput mode. If you're not updating your throughput mode, you don't need to provide this value in your request. If you are changing the ThroughputMode to provisioned, you must also set a value for ProvisionedThroughputInMibps.

  • provisioned_throughput_in_mibps (Optional[ProvisionedThroughputInMibps], default: None ) –

    (Optional) The throughput, measured in mebibytes per second (MiBps), that you want to provision for a file system that you're creating. Required if ThroughputMode is set to provisioned. Valid values are 1-3414 MiBps, with the upper limit depending on Region. To increase this limit, contact Amazon Web Services Support. For more information, see Amazon EFS quotas that you can increase in the Amazon EFS User Guide.

Raises:

  • BadRequest –

    Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.

  • FileSystemNotFound –

    Returned if the specified FileSystemId value doesn't exist in the requester's Amazon Web Services account.

  • IncorrectFileSystemLifeCycleState –

    Returned if the file system's lifecycle state is not "available".

  • InsufficientThroughputCapacity –

    Returned if there's not enough capacity to provision additional throughput. This value might be returned when you try to create a file system in provisioned throughput mode, when you attempt to increase the provisioned throughput of an existing file system, or when you attempt to change an existing file system from Bursting Throughput to Provisioned Throughput mode. Try again later.

  • InternalServerError –

    Returned if an error occurred on the server side.

  • ThroughputLimitExceeded –

    Returned if the throughput mode or amount of provisioned throughput can't be changed because the throughput limit of 1024 MiB/s has been reached.

  • TooManyRequests –

    Returned if you don’t wait at least 24 hours before either changing the throughput mode, or decreasing the Provisioned Throughput value.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_efs/_services/async_efs.py
async def update_file_system(
    self,
    file_system_id: "capo_efs.types.file_system_id.FileSystemId",
    *,
    config_overrides: Optional[AsyncEFSClientConfig] = None,
    throughput_mode: Optional[
        "capo_efs.types.throughput_mode.ThroughputMode"
    ] = None,
    provisioned_throughput_in_mibps: Optional[
        "capo_efs.types.provisioned_throughput_in_mibps.ProvisionedThroughputInMibps"
    ] = None,
) -> "capo_efs.types.file_system_description.FileSystemDescription":
    """<p>Updates the throughput mode or the amount of provisioned throughput of an existing file system.</p>

    Args:
        file_system_id: <p>The ID of the file system that you want to update.</p>
        throughput_mode: <p>(Optional) Updates the file system's throughput mode. If you're not updating your throughput mode, you don't need to provide this value in your request. If you are changing the <code>ThroughputMode</code> to <code>provisioned</code>, you must also set a value for <code>ProvisionedThroughputInMibps</code>.</p>
        provisioned_throughput_in_mibps: <p>(Optional) The throughput, measured in mebibytes per second (MiBps), that you want to provision for a file system that you're creating. Required if <code>ThroughputMode</code> is set to <code>provisioned</code>. Valid values are 1-3414 MiBps, with the upper limit depending on Region. To increase this limit, contact Amazon Web Services Support. For more information, see <a href="https://docs.aws.amazon.com/efs/latest/ug/limits.html#soft-limits">Amazon EFS quotas that you can increase</a> in the <i>Amazon EFS User Guide</i>.</p>

    Raises:
        capo_efs.errors.bad_request.BadRequest: <p>Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.</p>
        capo_efs.errors.file_system_not_found.FileSystemNotFound: <p>Returned if the specified <code>FileSystemId</code> value doesn't exist in the requester's Amazon Web Services account.</p>
        capo_efs.errors.incorrect_file_system_life_cycle_state.IncorrectFileSystemLifeCycleState: <p>Returned if the file system's lifecycle state is not "available".</p>
        capo_efs.errors.insufficient_throughput_capacity.InsufficientThroughputCapacity: <p>Returned if there's not enough capacity to provision additional throughput. This value might be returned when you try to create a file system in provisioned throughput mode, when you attempt to increase the provisioned throughput of an existing file system, or when you attempt to change an existing file system from Bursting Throughput to Provisioned Throughput mode. Try again later.</p>
        capo_efs.errors.internal_server_error.InternalServerError: <p>Returned if an error occurred on the server side.</p>
        capo_efs.errors.throughput_limit_exceeded.ThroughputLimitExceeded: <p>Returned if the throughput mode or amount of provisioned throughput can't be changed because the throughput limit of 1024 MiB/s has been reached.</p>
        capo_efs.errors.too_many_requests.TooManyRequests: <p>Returned if you don’t wait at least 24 hours before either changing the throughput mode, or decreasing the Provisioned Throughput value.</p>
        capo_efs.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_efs.types.update_file_system_request.UpdateFileSystemRequest]",
    ) -> AsyncOperationResponse[
        "capo_efs.types.file_system_description.FileSystemDescription"
    ]:
        import capo_efs._operations.magnolio_api_service_v20150201.update_file_system

        (
            output,
            http_response,
        ) = await capo_efs._operations.magnolio_api_service_v20150201.update_file_system.async_update_file_system(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateFileSystem")
    )
    input_: capo_efs.types.update_file_system_request.UpdateFileSystemRequest = {
        "file_system_id": file_system_id
    }
    if throughput_mode is not None:
        input_["throughput_mode"] = throughput_mode
    if provisioned_throughput_in_mibps is not None:
        input_["provisioned_throughput_in_mibps"] = provisioned_throughput_in_mibps

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output