describe_sessions
async
¶
describe_sessions(
state: SessionState,
*,
config_overrides: Optional[AsyncSSMClientConfig] = None,
max_results: Optional[SessionMaxResults] = None,
next_token: Optional[NextToken] = None,
filters: Optional[SessionFilterList] = None,
) -> DescribeSessionsResponse
Retrieves a list of all active sessions (both connected and disconnected) or terminated sessions from the past 30 days.
Parameters:
-
state(SessionState) –The session status to retrieve a list of sessions for. For example, "Active".
-
max_results(Optional[SessionMaxResults], default:None) –The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.
-
next_token(Optional[NextToken], default:None) –The token for the next set of items to return. (You received this token from a previous call.)
-
filters(Optional[SessionFilterList], default:None) –One or more filters to limit the type of sessions returned by the request.
Raises:
-
InternalServerError–An error occurred on the server side.
-
InvalidFilterKey–The specified key isn't valid.
-
InvalidNextToken–The specified token isn't valid.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ssm/_services/async_ssm.py
5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 | |