Assurance / Client / batch_get_task
batch_get_task¶
- Assurance.Client.batch_get_task(**kwargs)¶
Retrieves multiple tasks in a single request. Use it instead of calling
GetTaskfor each task. If the operation can’t return a task, it lists the task inerrorsand still succeeds.See also: AWS API Documentation
Request Syntax
response = client.batch_get_task( environmentArn='string', project='string', keys=[ { 'framework': 'string', 'frameworkVersion': 'string', 'controlId': 'string', 'taskId': 'string' }, ] )
- Parameters:
environmentArn (string) –
[REQUIRED]
The ARN of this governance environment.
project (string) –
[REQUIRED]
The name of the project.
keys (list) –
[REQUIRED]
The tasks to retrieve, 1 to 100 per request. Keys must be unique within a request.
(dict) –
Identifying key for a single task in a batch request (within the environment and project named in the request).
framework (string) – [REQUIRED]
The name of the compliance framework.
frameworkVersion (string) – [REQUIRED]
The version of the compliance framework.
controlId (string) – [REQUIRED]
The control identifier. Optional. If omitted, the operation applies to the full framework.
taskId (string) – [REQUIRED]
The identifier of the task.
- Return type:
dict
- Returns:
Response Syntax
{ 'tasks': [ { 'environment': 'string', 'project': 'string', 'framework': 'string', 'frameworkVersion': 'string', 'controlId': 'string', 'taskId': 'string', 'title': 'string', 'description': 'string', 'status': 'OPEN'|'PENDING'|'COMPLETED'|'CANCELLED', 'createdBy': 'string', 'dueAt': datetime(2015, 1, 1), 'priority': 'HIGH'|'MEDIUM'|'LOW', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1) }, ], 'errors': [ { 'key': { 'framework': 'string', 'frameworkVersion': 'string', 'controlId': 'string', 'taskId': 'string' }, 'code': 'string', 'message': 'string' }, ] }
Response Structure
(dict) –
tasks (list) –
The list of tasks.
(dict) –
Full task structure returned in responses.
environment (string) –
The name of the governance environment the task belongs to.
project (string) –
The name of the project.
framework (string) –
The name of the compliance framework.
frameworkVersion (string) –
The version of the compliance framework.
controlId (string) –
The control identifier. Optional. If omitted, the operation applies to the full framework.
taskId (string) –
The identifier of the task.
title (string) –
The human-readable title of the task.
description (string) –
A description of the task.
status (string) –
The current lifecycle state of the task.
createdBy (string) –
The identity of the principal who created the task.
dueAt (datetime) –
The deadline for the task.
priority (string) –
The relative priority of the item.
createdAt (datetime) –
The timestamp when the task was created.
updatedAt (datetime) –
The timestamp when the task was last updated.
errors (list) –
The entries for requested tasks that the operation could not return. Empty when the operation returned all of them; a request in which every task failed still succeeds.
(dict) –
A requested task that the operation could not return, along with the reason.
key (dict) –
The identifier of the task that the operation could not retrieve.
framework (string) –
The name of the compliance framework.
frameworkVersion (string) –
The version of the compliance framework.
controlId (string) –
The control identifier. Optional. If omitted, the operation applies to the full framework.
taskId (string) –
The identifier of the task.
code (string) –
The error code. Known values: NOT_FOUND, ACCESS_DENIED, THROTTLED, INTERNAL_ERROR.
message (string) –
A human-readable explanation of why the operation could not return this task. Intended for display and logging; match on
codefor programmatic handling.
Exceptions