Deletes multiple memory records in a single batch operation from the specified memory.
Parameters:
-
memory_id
(MemoryId)
–
The unique ID of the memory resource where records will be deleted.
-
records
(MemoryRecordsDeleteInputList)
–
A list of memory record deletion inputs to be processed in the batch operation.
Raises:
-
AccessDeniedException
–
The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
-
ResourceNotFoundException
–
The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
-
ServiceException
–
The service encountered an internal error. Try your request again later.
-
ServiceQuotaExceededException
–
The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
-
ThrottledException
–
The request was denied due to request throttling. Reduce the frequency of requests and try again.
-
ValidationException
–
The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_bedrock_agentcore/_services/async_bedrock_agent_core.py
| async def batch_delete_memory_records(
self,
memory_id: "capo_bedrock_agentcore.types.memory_id.MemoryId",
records: "capo_bedrock_agentcore.types.memory_records_delete_input_list.MemoryRecordsDeleteInputList",
*,
config_overrides: Optional[AsyncBedrockAgentCoreClientConfig] = None,
) -> "capo_bedrock_agentcore.types.batch_delete_memory_records_output.BatchDeleteMemoryRecordsOutput":
"""<p>Deletes multiple memory records in a single batch operation from the specified memory.</p>
Args:
memory_id: <p>The unique ID of the memory resource where records will be deleted.</p>
records: <p>A list of memory record deletion inputs to be processed in the batch operation.</p>
Raises:
capo_bedrock_agentcore.errors.access_denied_exception.AccessDeniedException: <p>The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.</p>
capo_bedrock_agentcore.errors.resource_not_found_exception.ResourceNotFoundException: <p>The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.</p>
capo_bedrock_agentcore.errors.service_exception.ServiceException: <p>The service encountered an internal error. Try your request again later.</p>
capo_bedrock_agentcore.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.</p>
capo_bedrock_agentcore.errors.throttled_exception.ThrottledException: <p>The request was denied due to request throttling. Reduce the frequency of requests and try again.</p>
capo_bedrock_agentcore.errors.validation_exception.ValidationException: <p>The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.</p>
capo_bedrock_agentcore.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_bedrock_agentcore.types.batch_delete_memory_records_input.BatchDeleteMemoryRecordsInput]",
) -> AsyncOperationResponse[
"capo_bedrock_agentcore.types.batch_delete_memory_records_output.BatchDeleteMemoryRecordsOutput"
]:
import capo_bedrock_agentcore._operations.amazon_bedrock_agent_core.batch_delete_memory_records
(
output,
http_response,
) = await capo_bedrock_agentcore._operations.amazon_bedrock_agent_core.batch_delete_memory_records.async_batch_delete_memory_records(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("BatchDeleteMemoryRecords")
)
input_: capo_bedrock_agentcore.types.batch_delete_memory_records_input.BatchDeleteMemoryRecordsInput = {
"memory_id": memory_id,
"records": records,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|