Skip to content

describe_workspaces_pool_sessions async

describe_workspaces_pool_sessions(
    pool_id: WorkspacesPoolId,
    *,
    config_overrides: Optional[AsyncWorkSpacesClientConfig] = None,
    user_id: Optional[WorkspacesPoolUserId] = None,
    limit: Optional[Limit50] = None,
    next_token: Optional[PaginationToken] = None,
) -> DescribeWorkspacesPoolSessionsResult

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.

Retrieves a list that describes the streaming sessions for a specified pool.

Parameters:

  • pool_id (WorkspacesPoolId) –

    The identifier of the pool.

  • user_id (Optional[WorkspacesPoolUserId], default: None ) –

    The identifier of the user.

  • limit (Optional[Limit50], default: None ) –

    The maximum size of each page of results. The default value is 20 and the maximum value is 50.

  • next_token (Optional[PaginationToken], default: None ) –

    If you received a NextToken from a previous call that was paginated, provide this token to receive the next set of results.

Raises:

Source code in docs_src/capo_workspaces/_services/async_work_spaces.py
async def describe_workspaces_pool_sessions(
    self,
    pool_id: "capo_workspaces.types.workspaces_pool_id.WorkspacesPoolId",
    *,
    config_overrides: Optional[AsyncWorkSpacesClientConfig] = None,
    user_id: Optional[
        "capo_workspaces.types.workspaces_pool_user_id.WorkspacesPoolUserId"
    ] = None,
    limit: Optional["capo_workspaces.types.limit50.Limit50"] = None,
    next_token: Optional[
        "capo_workspaces.types.pagination_token.PaginationToken"
    ] = None,
) -> "capo_workspaces.types.describe_workspaces_pool_sessions_result.DescribeWorkspacesPoolSessionsResult":
    """<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>Retrieves a list that describes the streaming sessions for a specified pool.</p>

    Args:
        pool_id: <p>The identifier of the pool.</p>
        user_id: <p>The identifier of the user.</p>
        limit: <p>The maximum size of each page of results. The default value is 20 and the maximum value is 50.</p>
        next_token: <p>If you received a <code>NextToken</code> from a previous call that was paginated, provide this token to receive the next set of results.</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.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.describe_workspaces_pool_sessions_request.DescribeWorkspacesPoolSessionsRequest]",
    ) -> AsyncOperationResponse[
        "capo_workspaces.types.describe_workspaces_pool_sessions_result.DescribeWorkspacesPoolSessionsResult"
    ]:
        import capo_workspaces._operations.workspaces_service.describe_workspaces_pool_sessions

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeWorkspacesPoolSessions")
    )
    input_: capo_workspaces.types.describe_workspaces_pool_sessions_request.DescribeWorkspacesPoolSessionsRequest = {
        "pool_id": pool_id
    }
    if user_id is not None:
        input_["user_id"] = user_id
    if limit is not None:
        input_["limit"] = limit
    if next_token is not None:
        input_["next_token"] = next_token

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