startMemoryExtractionJob method

Future<StartMemoryExtractionJobOutput> startMemoryExtractionJob({
  1. required ExtractionJob extractionJob,
  2. required String memoryId,
  3. String? clientToken,
})

Starts a memory extraction job that processes events that failed extraction previously in an AgentCore Memory resource and produces structured memory records. When earlier extraction attempts have left events unprocessed, this job will pick up and extract those as well.

To use this operation, you must have the bedrock-agentcore:StartMemoryExtractionJob permission.

May throw AccessDeniedException. May throw ResourceNotFoundException. May throw ServiceException. May throw ServiceQuotaExceededException. May throw ThrottledException. May throw ValidationException.

Parameter extractionJob : Extraction job to start in this operation.

Parameter memoryId : The unique identifier of the memory for which to start extraction jobs.

Parameter clientToken : A unique, case-sensitive identifier to ensure idempotent processing of the request.

Implementation

Future<StartMemoryExtractionJobOutput> startMemoryExtractionJob({
  required ExtractionJob extractionJob,
  required String memoryId,
  String? clientToken,
}) async {
  final $payload = <String, dynamic>{
    'extractionJob': extractionJob,
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/memories/${Uri.encodeComponent(memoryId)}/extractionJobs/start',
    exceptionFnMap: _exceptionFns,
  );
  return StartMemoryExtractionJobOutput.fromJson(response);
}