updateCallAnalyticsCategory method

Future<UpdateCallAnalyticsCategoryResponse> updateCallAnalyticsCategory({
  1. required String categoryName,
  2. required List<Rule> rules,
  3. InputType? inputType,
})

Updates the specified Call Analytics category with new rules. Note that the UpdateCallAnalyticsCategory operation overwrites all existing rules contained in the specified category. You cannot append additional rules onto an existing category.

To create a new category, see .

May throw BadRequestException. May throw ConflictException. May throw InternalFailureException. May throw LimitExceededException. May throw NotFoundException.

Parameter categoryName : The name of the Call Analytics category you want to update. Category names are case sensitive.

Parameter rules : The rules used for the updated Call Analytics category. The rules you provide in this field replace the ones that are currently being used in the specified category.

Parameter inputType : Choose whether you want to update a real-time or a post-call category. The input type you specify must match the input type specified when the category was created. For example, if you created a category with the POST_CALL input type, you must use POST_CALL as the input type when updating this category.

Implementation

Future<UpdateCallAnalyticsCategoryResponse> updateCallAnalyticsCategory({
  required String categoryName,
  required List<Rule> rules,
  InputType? inputType,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Transcribe.UpdateCallAnalyticsCategory'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'CategoryName': categoryName,
      'Rules': rules,
      if (inputType != null) 'InputType': inputType.value,
    },
  );

  return UpdateCallAnalyticsCategoryResponse.fromJson(jsonResponse.body);
}