updateQAppPermissions method
Updates read permissions for a Amazon Q App in Amazon Q Business application environment instance.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw UnauthorizedException.
May throw ValidationException.
Parameter appId :
The unique identifier of the Amazon Q App for which permissions are being
updated.
Parameter instanceId :
The unique identifier of the Amazon Q Business application environment
instance.
Parameter grantPermissions :
The list of permissions to grant for the Amazon Q App.
Parameter revokePermissions :
The list of permissions to revoke for the Amazon Q App.
Implementation
Future<UpdateQAppPermissionsOutput> updateQAppPermissions({
required String appId,
required String instanceId,
List<PermissionInput>? grantPermissions,
List<PermissionInput>? revokePermissions,
}) async {
final headers = <String, String>{
'instance-id': instanceId.toString(),
};
final $payload = <String, dynamic>{
'appId': appId,
if (grantPermissions != null) 'grantPermissions': grantPermissions,
if (revokePermissions != null) 'revokePermissions': revokePermissions,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/apps.updateQAppPermissions',
headers: headers,
exceptionFnMap: _exceptionFns,
);
return UpdateQAppPermissionsOutput.fromJson(response);
}