get_task
async
¶
get_task(
agent_context_id: AgentContextIdentifier,
task_id: TaskId,
*,
config_overrides: Optional[AsyncContextClientConfig] = None,
) -> GetTaskResponse
Returns a task's configuration, status, and results.
Parameters:
-
agent_context_id(AgentContextIdentifier) –The agent context, as an ID or ARN.
-
task_id(TaskId) –The ID of the task to return.
Raises:
-
AccessDeniedException–You don't have sufficient access to perform this operation. Verify that you have permission to perform the operation on the resource.
-
InternalServerException–The request failed because of an internal error. Retry the request.
-
ThrottlingException–The request was denied because it exceeded a request rate quota. Wait, then retry the request.
-
ValidationException–The input fails to satisfy the constraints of the operation. Correct the input before you retry the request.
-
ResourceNotFoundException–The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Get a completed task The following example gets a data dictionary import task that has completed and lists the change sets that it created.
>>> await client.get_task(agent_context_id='ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53', task_id='task-6e2b9f1c4a7d4e38b5c0a9f2d7e1b364')
Source code in docs_src/capo_context/_services/async_context.py
2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 | |