Skip to content

stop_workspaces_pool async

stop_workspaces_pool(
    pool_id: WorkspacesPoolId,
    *,
    config_overrides: Optional[AsyncWorkSpacesClientConfig] = None,
) -> StopWorkspacesPoolResult

End of support notice: On December 31, 2027, Amazon Web Services will end support for Amazon WorkSpaces Pools. After December 31, 2027, you will no longer be able to access the Amazon WorkSpaces Pools console or Amazon WorkSpaces Pools resources. For more information, see Amazon WorkSpaces Pools end of support.

Stops the specified pool.

You cannot stop a WorkSpace pool unless it has a running mode of AutoStop and a state of AVAILABLE, IMPAIRED, UNHEALTHY, or ERROR.

Parameters:

Raises:

Source code in docs_src/capo_workspaces/_services/async_work_spaces.py
async def stop_workspaces_pool(
    self,
    pool_id: "capo_workspaces.types.workspaces_pool_id.WorkspacesPoolId",
    *,
    config_overrides: Optional[AsyncWorkSpacesClientConfig] = None,
) -> "capo_workspaces.types.stop_workspaces_pool_result.StopWorkspacesPoolResult":
    """<note> <p>End of support notice: On December 31, 2027, Amazon Web Services will end support for Amazon WorkSpaces Pools. After December 31, 2027, you will no longer be able to access the Amazon WorkSpaces Pools console or Amazon WorkSpaces Pools resources. For more information, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/wsp-pools-end-of-support.html">Amazon WorkSpaces Pools end of support</a>. </p> </note> <p>Stops the specified pool.</p> <p>You cannot stop a WorkSpace pool unless it has a running mode of <code>AutoStop</code> and a state of <code>AVAILABLE</code>, <code>IMPAIRED</code>, <code>UNHEALTHY</code>, or <code>ERROR</code>.</p>

    Args:
        pool_id: <p>The identifier of the pool.</p>

    Raises:
        capo_workspaces.errors.access_denied_exception.AccessDeniedException: <p>The user is not authorized to access a resource.</p>
        capo_workspaces.errors.invalid_parameter_values_exception.InvalidParameterValuesException: <p>One or more parameter values are not valid.</p>
        capo_workspaces.errors.invalid_resource_state_exception.InvalidResourceStateException: <p>The state of the resource is not valid for this operation.</p>
        capo_workspaces.errors.operation_in_progress_exception.OperationInProgressException: <p>The properties of this WorkSpace are currently being modified. Try again in a moment.</p>
        capo_workspaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource could not be found.</p>
        capo_workspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_workspaces.types.stop_workspaces_pool_request.StopWorkspacesPoolRequest]",
    ) -> AsyncOperationResponse[
        "capo_workspaces.types.stop_workspaces_pool_result.StopWorkspacesPoolResult"
    ]:
        import capo_workspaces._operations.workspaces_service.stop_workspaces_pool

        (
            output,
            http_response,
        ) = await capo_workspaces._operations.workspaces_service.stop_workspaces_pool.async_stop_workspaces_pool(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StopWorkspacesPool")
    )
    input_: capo_workspaces.types.stop_workspaces_pool_request.StopWorkspacesPoolRequest = {
        "pool_id": pool_id
    }

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