updateQApp method

Future<UpdateQAppOutput> updateQApp({
  1. required String appId,
  2. required String instanceId,
  3. AppDefinitionInput? appDefinition,
  4. String? description,
  5. String? title,
})

Updates an existing Amazon Q App, allowing modifications to its title, description, and definition.

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

Parameter appId : The unique identifier of the Q App to update.

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

Parameter appDefinition : The new definition specifying the cards and flow for the Q App.

Parameter description : The new description for the Q App.

Parameter title : The new title for the Q App.

Implementation

Future<UpdateQAppOutput> updateQApp({
  required String appId,
  required String instanceId,
  AppDefinitionInput? appDefinition,
  String? description,
  String? title,
}) async {
  final headers = <String, String>{
    'instance-id': instanceId.toString(),
  };
  final $payload = <String, dynamic>{
    'appId': appId,
    if (appDefinition != null) 'appDefinition': appDefinition,
    if (description != null) 'description': description,
    if (title != null) 'title': title,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/apps.update',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return UpdateQAppOutput.fromJson(response);
}