def get_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.get_session_response.GetSessionResponse":
"""<p>Gets information for a 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.</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.get_session_request.GetSessionRequest]",
) -> OperationResponse[
"capo_workspaces_web.types.get_session_response.GetSessionResponse"
]:
import capo_workspaces_web._operations.aws_ermine_control_plane_service.get_session
output, http_response = (
capo_workspaces_web._operations.aws_ermine_control_plane_service.get_session.get_session(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_workspaces_web.types.get_session_response.GetSessionResponse",
) -> dict[str, Any]:
import capo_workspaces_web.types.get_session_response
return capo_workspaces_web.types.get_session_response.redact_sensitive(
output
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("GetSession", redact_output=_redact_output),
)
input_: capo_workspaces_web.types.get_session_request.GetSessionRequest = {
"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