Expires an active secure browser session.
Parameters:
-
portal_id
(PortalId)
–
The ID of the web portal for the session.
-
session_id
(SessionId)
–
The ID of the session to expire.
Raises:
Source code in docs_src/capo_workspaces_web/_services/work_spaces_web.py
| def expire_session(
self,
portal_id: "capo_workspaces_web.types.portal_id.PortalId",
session_id: "capo_workspaces_web.types.session_id.SessionId",
*,
config_overrides: Optional[WorkSpacesWebClientConfig] = None,
) -> "capo_workspaces_web.types.expire_session_response.ExpireSessionResponse":
"""<p>Expires an active secure browser session.</p>
Args:
portal_id: <p>The ID of the web portal for the session.</p>
session_id: <p>The ID of the session to expire.</p>
Raises:
capo_workspaces_web.errors.access_denied_exception.AccessDeniedException: <p>Access is denied.</p>
capo_workspaces_web.errors.internal_server_exception.InternalServerException: <p>There is an internal server error.</p>
capo_workspaces_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource cannot be found.</p>
capo_workspaces_web.errors.throttling_exception.ThrottlingException: <p>There is a throttling error.</p>
capo_workspaces_web.errors.validation_exception.ValidationException: <p>There is a validation error.</p>
capo_workspaces_web.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_workspaces_web.types.expire_session_request.ExpireSessionRequest]",
) -> OperationResponse[
"capo_workspaces_web.types.expire_session_response.ExpireSessionResponse"
]:
import capo_workspaces_web._operations.aws_ermine_control_plane_service.expire_session
output, http_response = (
capo_workspaces_web._operations.aws_ermine_control_plane_service.expire_session.expire_session(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ExpireSession")
)
input_: capo_workspaces_web.types.expire_session_request.ExpireSessionRequest = {
"portal_id": portal_id,
"session_id": session_id,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|