Skip to content

terminate_workspaces_pool async

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

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.

Terminates the specified pool.

Parameters:

Raises:

Source code in docs_src/capo_workspaces/_services/async_work_spaces.py
async def terminate_workspaces_pool(
    self,
    pool_id: "capo_workspaces.types.workspaces_pool_id.WorkspacesPoolId",
    *,
    config_overrides: Optional[AsyncWorkSpacesClientConfig] = None,
) -> "capo_workspaces.types.terminate_workspaces_pool_result.TerminateWorkspacesPoolResult":
    """<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>Terminates the specified pool.</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.terminate_workspaces_pool_request.TerminateWorkspacesPoolRequest]",
    ) -> AsyncOperationResponse[
        "capo_workspaces.types.terminate_workspaces_pool_result.TerminateWorkspacesPoolResult"
    ]:
        import capo_workspaces._operations.workspaces_service.terminate_workspaces_pool

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("TerminateWorkspacesPool")
    )
    input_: capo_workspaces.types.terminate_workspaces_pool_request.TerminateWorkspacesPoolRequest = {
        "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