Updates the session for a given Q App sessionId. This is only valid when at least one card of the session is in the WAITING state. Data for each WAITING card can be provided as input. If inputs are not provided, the call will be accepted but session will not move forward. Inputs for cards that are not in the WAITING status will be ignored.
Parameters:
-
instance_id
(InstanceId)
–
The unique identifier of the Amazon Q Business application environment instance.
-
session_id
(UUID)
–
The unique identifier of the Q App session to provide input for.
-
values
(Optional[CardValueList], default:
None
)
–
The input values to provide for the current state of the Q App session.
Raises:
Source code in docs_src/capo_qapps/_services/async_q_apps.py
| async def update_q_app_session(
self,
instance_id: "capo_qapps.types.instance_id.InstanceId",
session_id: "capo_qapps.types.uuid.UUID",
*,
config_overrides: Optional[AsyncQAppsClientConfig] = None,
values: Optional["capo_qapps.types.card_value_list.CardValueList"] = None,
) -> "capo_qapps.types.update_q_app_session_output.UpdateQAppSessionOutput":
"""<p>Updates the session for a given Q App <code>sessionId</code>. This is only valid when at least one card of the session is in the <code>WAITING</code> state. Data for each <code>WAITING</code> card can be provided as input. If inputs are not provided, the call will be accepted but session will not move forward. Inputs for cards that are not in the <code>WAITING</code> status will be ignored.</p>
Args:
instance_id: <p>The unique identifier of the Amazon Q Business application environment instance.</p>
session_id: <p>The unique identifier of the Q App session to provide input for.</p>
values: <p>The input values to provide for the current state of the Q App session.</p>
Raises:
capo_qapps.errors.access_denied_exception.AccessDeniedException: <p>The client is not authorized to perform the requested operation.</p>
capo_qapps.errors.internal_server_exception.InternalServerException: <p>An internal service error occurred while processing the request.</p>
capo_qapps.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
capo_qapps.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The requested operation could not be completed because it would exceed the service's quota or limit.</p>
capo_qapps.errors.throttling_exception.ThrottlingException: <p>The requested operation could not be completed because too many requests were sent at once. Wait a bit and try again later.</p>
capo_qapps.errors.unauthorized_exception.UnauthorizedException: <p>The client is not authenticated or authorized to perform the requested operation.</p>
capo_qapps.errors.validation_exception.ValidationException: <p>The input failed to satisfy the constraints specified by the service.</p>
capo_qapps.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_qapps.types.update_q_app_session_input.UpdateQAppSessionInput]",
) -> AsyncOperationResponse[
"capo_qapps.types.update_q_app_session_output.UpdateQAppSessionOutput"
]:
import capo_qapps._operations.q_apps_service.update_q_app_session
(
output,
http_response,
) = await capo_qapps._operations.q_apps_service.update_q_app_session.async_update_q_app_session(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateQAppSession")
)
input_: capo_qapps.types.update_q_app_session_input.UpdateQAppSessionInput = {
"instance_id": instance_id,
"session_id": session_id,
}
if values is not None:
input_["values"] = values
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|