BedrockAgentCore / Client / batch_update_memory_records
batch_update_memory_records¶
- BedrockAgentCore.Client.batch_update_memory_records(**kwargs)¶
Updates multiple memory records with custom content in a single batch operation within the specified memory.
See also: AWS API Documentation
Request Syntax
response = client.batch_update_memory_records( memoryId='string', records=[ { 'memoryRecordId': 'string', 'timestamp': datetime(2015, 1, 1), 'content': { 'text': 'string' }, 'namespaces': [ 'string', ], 'memoryStrategyId': 'string' }, ] )
- Parameters:
memoryId (string) –
[REQUIRED]
The unique ID of the memory resource where records will be updated.
records (list) –
[REQUIRED]
A list of memory record update inputs to be processed in the batch operation.
(dict) –
Input structure to update an existing memory record.
memoryRecordId (string) – [REQUIRED]
The unique ID of the memory record to be updated.
timestamp (datetime) – [REQUIRED]
Time at which the memory record was updated
content (dict) –
The content to be stored within the memory record.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
text.text (string) –
The text content of the memory record.
namespaces (list) –
The updated list of namespace identifiers for categorizing the memory record.
(string) –
memoryStrategyId (string) –
The updated ID of the memory strategy that defines how this memory record is grouped.
- Return type:
dict
- Returns:
Response Syntax
{ 'successfulRecords': [ { 'memoryRecordId': 'string', 'status': 'SUCCEEDED'|'FAILED', 'requestIdentifier': 'string', 'errorCode': 123, 'errorMessage': 'string' }, ], 'failedRecords': [ { 'memoryRecordId': 'string', 'status': 'SUCCEEDED'|'FAILED', 'requestIdentifier': 'string', 'errorCode': 123, 'errorMessage': 'string' }, ] }
Response Structure
(dict) –
successfulRecords (list) –
A list of memory records that were successfully updated during the batch operation.
(dict) –
Output information returned after processing a memory record operation.
memoryRecordId (string) –
The unique ID associated to the memory record.
status (string) –
The status of the memory record operation (e.g., SUCCEEDED, FAILED).
requestIdentifier (string) –
The client-provided identifier that was used to track this record operation.
errorCode (integer) –
The error code returned when the memory record operation fails.
errorMessage (string) –
A human-readable error message describing why the memory record operation failed.
failedRecords (list) –
A list of memory records that failed to be updated, including error details for each failure.
(dict) –
Output information returned after processing a memory record operation.
memoryRecordId (string) –
The unique ID associated to the memory record.
status (string) –
The status of the memory record operation (e.g., SUCCEEDED, FAILED).
requestIdentifier (string) –
The client-provided identifier that was used to track this record operation.
errorCode (integer) –
The error code returned when the memory record operation fails.
errorMessage (string) –
A human-readable error message describing why the memory record operation failed.
Exceptions
BedrockAgentCore.Client.exceptions.ServiceQuotaExceededExceptionBedrockAgentCore.Client.exceptions.ThrottledExceptionBedrockAgentCore.Client.exceptions.ServiceExceptionBedrockAgentCore.Client.exceptions.AccessDeniedExceptionBedrockAgentCore.Client.exceptions.ValidationExceptionBedrockAgentCore.Client.exceptions.ResourceNotFoundException