:doc:`BedrockAgentCore <../../bedrock-agentcore>` / Client / batch_update_memory_records

***************************
batch_update_memory_records
***************************



.. py:method:: 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 <https://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/BatchUpdateMemoryRecords>`_  


  **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'
            },
        ]
    )
    
  :type memoryId: string
  :param memoryId: **[REQUIRED]** 

    The unique ID of the memory resource where records will be updated.

    

  
  :type records: list
  :param records: **[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.

        

      
    

  
  :rtype: 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**
  
  *   :py:class:`BedrockAgentCore.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`BedrockAgentCore.Client.exceptions.ThrottledException`

  
  *   :py:class:`BedrockAgentCore.Client.exceptions.ServiceException`

  
  *   :py:class:`BedrockAgentCore.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`BedrockAgentCore.Client.exceptions.ValidationException`

  
  *   :py:class:`BedrockAgentCore.Client.exceptions.ResourceNotFoundException`

  