associate_q_app_with_user(
instance_id: InstanceId,
app_id: UUID,
*,
config_overrides: Optional[AsyncQAppsClientConfig] = None,
) -> None
This operation creates a link between the user's identity calling the operation and a specific Q App. This is useful to mark the Q App as a favorite for the user if the user doesn't own the Amazon Q App so they can still run it and see it in their inventory of Q Apps.
Parameters:
-
instance_id
(InstanceId)
–
The unique identifier of the Amazon Q Business application environment instance.
-
app_id
(UUID)
–
The ID of the Amazon Q App to associate with the user.
Raises:
Examples:
Links an Amazon Q App to the invoker's list of apps
>>> await client.associate_q_app_with_user(app_id='393e77fb-0a30-4f47-ad30-75d71aeaed8a', instance_id='0b95c9c4-89cc-4aa8-9aae-aa91cbec699f')
Source code in docs_src/capo_qapps/_services/async_q_apps.py
| async def associate_q_app_with_user(
self,
instance_id: "capo_qapps.types.instance_id.InstanceId",
app_id: "capo_qapps.types.uuid.UUID",
*,
config_overrides: Optional[AsyncQAppsClientConfig] = None,
) -> None:
"""<p>This operation creates a link between the user's identity calling the operation and a specific Q App. This is useful to mark the Q App as a <i>favorite</i> for the user if the user doesn't own the Amazon Q App so they can still run it and see it in their inventory of Q Apps.</p>
Args:
instance_id: <p>The unique identifier of the Amazon Q Business application environment instance.</p>
app_id: <p>The ID of the Amazon Q App to associate with the user.</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.
Examples:
Links an Amazon Q App to the invoker's list of apps
>>> await client.associate_q_app_with_user(app_id='393e77fb-0a30-4f47-ad30-75d71aeaed8a', instance_id='0b95c9c4-89cc-4aa8-9aae-aa91cbec699f')
"""
async def _handler(
req: "AsyncOperationRequest[capo_qapps.types.associate_q_app_with_user_input.AssociateQAppWithUserInput]",
) -> AsyncOperationResponse[None]:
import capo_qapps._operations.q_apps_service.associate_q_app_with_user
(
output,
http_response,
) = await capo_qapps._operations.q_apps_service.associate_q_app_with_user.async_associate_q_app_with_user(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("AssociateQAppWithUser")
)
input_: capo_qapps.types.associate_q_app_with_user_input.AssociateQAppWithUserInput = {
"instance_id": instance_id,
"app_id": app_id,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|