updateApplication method

Future<UpdateApplicationResponse> updateApplication({
  1. required String id,
  2. List<AppConfig>? appConfigs,
  3. List<DataSource>? dataSources,
})

Updates the configuration and settings of an existing OpenSearch application.

May throw AccessDeniedException. May throw BaseException. May throw ConflictException. May throw DisabledOperationException. May throw InternalException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter id : The unique identifier for the OpenSearch application to be updated.

Parameter appConfigs : The configuration settings to modify for the OpenSearch application.

Parameter dataSources : The data sources to associate with the OpenSearch application.

Implementation

Future<UpdateApplicationResponse> updateApplication({
  required String id,
  List<AppConfig>? appConfigs,
  List<DataSource>? dataSources,
}) async {
  final $payload = <String, dynamic>{
    if (appConfigs != null) 'appConfigs': appConfigs,
    if (dataSources != null) 'dataSources': dataSources,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/2021-01-01/opensearch/application/${Uri.encodeComponent(id)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateApplicationResponse.fromJson(response);
}