Immediately stops the specified streaming session.
Parameters:
-
session_id
(Optional[String], default:
None
)
–
The identifier of the streaming session.
Raises:
Source code in docs_src/capo_appstream/_services/async_app_stream.py
| async def expire_session(
self,
*,
config_overrides: Optional[AsyncAppStreamClientConfig] = None,
session_id: Optional["capo_appstream.types.string.String"] = None,
) -> "capo_appstream.types.expire_session_result.ExpireSessionResult":
"""<p>Immediately stops the specified streaming session.</p>
Args:
session_id: <p>The identifier of the streaming session.</p>
Raises:
capo_appstream.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_appstream.types.expire_session_request.ExpireSessionRequest]",
) -> AsyncOperationResponse[
"capo_appstream.types.expire_session_result.ExpireSessionResult"
]:
import capo_appstream._operations.photon_admin_proxy_service.expire_session
(
output,
http_response,
) = await capo_appstream._operations.photon_admin_proxy_service.expire_session.async_expire_session(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ExpireSession")
)
input_: capo_appstream.types.expire_session_request.ExpireSessionRequest = {}
if session_id is not None:
input_["session_id"] = session_id
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|