Lists the available Amazon Bedrock AgentCore Memory resources in the current Amazon Web Services Region.
Parameters:
-
max_results
(Optional[int], default:
None
)
–
The maximum number of results to return in a single call. The default value is 10. The maximum value is 50.
-
next_token
(Optional[str], default:
None
)
–
The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
Raises:
Source code in docs_src/capo_bedrock_agentcore_control/_services/async_bedrock_agent_core_control.py
| async def list_memories(
self,
*,
config_overrides: Optional[AsyncBedrockAgentCoreControlClientConfig] = None,
max_results: Optional[int] = None,
next_token: Optional[str] = None,
) -> "capo_bedrock_agentcore_control.types.list_memories_output.ListMemoriesOutput":
"""<p>Lists the available Amazon Bedrock AgentCore Memory resources in the current Amazon Web Services Region.</p>
Args:
max_results: <p>The maximum number of results to return in a single call. The default value is 10. The maximum value is 50.</p>
next_token: <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
Raises:
capo_bedrock_agentcore_control.errors.access_denied_exception.AccessDeniedException: <p>This exception is thrown when a request is denied per access permissions</p>
capo_bedrock_agentcore_control.errors.resource_not_found_exception.ResourceNotFoundException: <p>This exception is thrown when a resource referenced by the operation does not exist</p>
capo_bedrock_agentcore_control.errors.service_exception.ServiceException: <p>An internal error occurred.</p>
capo_bedrock_agentcore_control.errors.throttled_exception.ThrottledException: <p>API rate limit has been exceeded.</p>
capo_bedrock_agentcore_control.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
capo_bedrock_agentcore_control.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_bedrock_agentcore_control.types.list_memories_input.ListMemoriesInput]",
) -> AsyncOperationResponse[
"capo_bedrock_agentcore_control.types.list_memories_output.ListMemoriesOutput"
]:
import capo_bedrock_agentcore_control._operations.amazon_bedrock_agent_core_control.list_memories
(
output,
http_response,
) = await capo_bedrock_agentcore_control._operations.amazon_bedrock_agent_core_control.list_memories.async_list_memories(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListMemories")
)
input_: capo_bedrock_agentcore_control.types.list_memories_input.ListMemoriesInput = {}
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|