ingest_data
¶
ingest_data(
memory_id: MemoryId,
source: ContentSource,
content_timestamp: datetime,
actor_id: ActorId,
*,
config_overrides: Optional[BedrockAgentCoreClientConfig] = None,
session_id: Optional[SessionId] = None,
extraction_config: Optional[ExtractionConfig] = None,
metadata: Optional[MetadataMap] = None,
client_token: Optional[str] = None,
) -> IngestDataOutput
Submits content directly for ingestion to generate long-term memory records in a AgentCore Memory resource.
To use this operation, you must have the bedrock-agentcore:IngestData permission.
Parameters:
-
memory_id(MemoryId) –The identifier of the AgentCore Memory resource to ingest content into.
-
source(ContentSource) –The content to ingest. Only inline content is supported.
-
content_timestamp(datetime) –The timestamp of when the content occurred.
-
actor_id(ActorId) –The identifier of the actor associated with this content. An actor represents an entity that participates in sessions and generates content.
-
session_id(Optional[SessionId], default:None) –The identifier of the session that the content belongs to. If not provided, a session identifier is generated and returned in the response.
-
extraction_config(Optional[ExtractionConfig], default:None) –The extraction configuration for long-term memory records. Use this parameter to specify namespace variable keys and their values for namespace substitution during extraction.
-
metadata(Optional[MetadataMap], default:None) –The key-value metadata to attach to the content.
-
client_token(Optional[str], default:None) –A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, AgentCore ignores the request, but does not return an error.
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/bedrock_agent_core.py
4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 | |