ingest_data
async
¶
ingest_data(
memory_id: MemoryId,
source: ContentSource,
content_timestamp: datetime,
actor_id: ActorId,
*,
config_overrides: Optional[AsyncBedrockAgentCoreClientConfig] = 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/async_bedrock_agent_core.py
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 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 | |