batchCreateCategory method

Future<void> batchCreateCategory({
  1. required List<BatchCreateCategoryInputCategory> categories,
  2. required String instanceId,
})

Creates Categories for the Amazon Q Business application environment instance. Web experience users use Categories to tag and filter library items. For more information, see Custom labels for Amazon Q Apps.

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

Parameter categories : The list of category objects to be created

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

Implementation

Future<void> batchCreateCategory({
  required List<BatchCreateCategoryInputCategory> categories,
  required String instanceId,
}) async {
  final headers = <String, String>{
    'instance-id': instanceId.toString(),
  };
  final $payload = <String, dynamic>{
    'categories': categories,
  };
  await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/catalog.createCategories',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
}