list_tasks
¶
list_tasks(
agent_context_id: AgentContextIdentifier,
*,
config_overrides: Optional[ContextClientConfig] = 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/context.py
3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 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 | |