associateQAppWithUser method

Future<void> associateQAppWithUser({
  1. required String appId,
  2. required String instanceId,
})

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.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw UnauthorizedException. May throw ValidationException.

Parameter appId : The ID of the Amazon Q App to associate with the user.

Parameter instanceId : The unique identifier of the Amazon Q Business application environment instance.

Implementation

Future<void> associateQAppWithUser({
  required String appId,
  required String instanceId,
}) async {
  final headers = <String, String>{
    'instance-id': instanceId.toString(),
  };
  final $payload = <String, dynamic>{
    'appId': appId,
  };
  await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/apps.install',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
}