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
5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 | |