batch_get_task
¶
batch_get_task(
environment_arn: EnvironmentArn,
project: ProjectName,
keys: TaskKeyList,
*,
config_overrides: Optional[AssuranceClientConfig] = None,
) -> BatchGetTaskOutput
Retrieves multiple tasks in a single request. Use it instead of calling GetTask for each task. If the operation can't return a task, it lists the task in errors and still succeeds.
Parameters:
-
environment_arn(EnvironmentArn) –The ARN of this governance environment.
-
project(ProjectName) –The name of the project.
-
keys(TaskKeyList) –The tasks to retrieve, 1 to 100 per request. Keys must be unique within a request.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action. This error occurs when the request is unauthenticated, or is authenticated but lacks permission to invoke the operation.
-
InternalServerException–An internal server error occurred.
-
ResourceNotFoundException–The requested resource was not found.
-
ThrottlingException–The request was throttled.
-
ValidationException–The request failed validation.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Get multiple tasks Retrieves several payments-prod PCI-DSS remediation tasks in one request instead of calling GetTask for each.
>>> client.batch_get_task(environment_arn='arn:aws:assurance:us-east-1:111122223333:environment/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111', project='payments-prod', keys=[{'framework': 'AWS:PCI-DSS', 'frameworkVersion': '4', 'controlId': '8.2.1', 'taskId': 'a1b2c3d4-5678-90ab-cdef-EXAMPLE66666'}, {'framework': 'AWS:PCI-DSS', 'frameworkVersion': '4', 'controlId': '8.2.1', 'taskId': 'a1b2c3d4-5678-90ab-cdef-EXAMPLE88888'}])