list_tasks
async
¶
list_tasks(
agent_context_id: AgentContextIdentifier,
*,
config_overrides: Optional[AsyncContextClientConfig] = None,
status: Optional[TaskStatus] = None,
type: Optional[TaskType] = None,
max_results: Optional[MaxResults] = None,
next_token: Optional[PaginationToken] = None,
) -> ListTasksResponse
Lists an agent context's tasks, newest first.
Parameters:
-
agent_context_id(AgentContextIdentifier) –The agent context, as an ID or ARN.
-
status(Optional[TaskStatus], default:None) –Specify a status to list only the tasks with that status.
-
type(Optional[TaskType], default:None) –Specify a type to list only the tasks of that type.
-
max_results(Optional[MaxResults], default:None) –The maximum number of tasks to return in one page, from 1–100. The service can return fewer. Defaults to 20. A value outside 1–100 fails with
ValidationException. -
next_token(Optional[PaginationToken], default:None) –The pagination token from a previous ListTasks response. Omit it for the first page, and keep the
statusandtypefilters the same on every page.
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:
List the tasks of an agent context The following example lists the tasks of an agent context, newest first.
Source code in docs_src/capo_context/_services/async_context.py
3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 | |