Skip to content

list_audit_mitigation_actions_tasks async

list_audit_mitigation_actions_tasks(
    start_time: Timestamp,
    end_time: Timestamp,
    *,
    config_overrides: Optional[AsyncIoTClientConfig] = None,
    audit_task_id: Optional[AuditTaskId] = None,
    finding_id: Optional[FindingId] = None,
    task_status: Optional[AuditMitigationActionsTaskStatus] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListAuditMitigationActionsTasksResponse

Gets a list of audit mitigation action tasks that match the specified filters.

Requires permission to access the ListAuditMitigationActionsTasks action.

Parameters:

  • audit_task_id (Optional[AuditTaskId], default: None ) –

    Specify this filter to limit results to tasks that were applied to results for a specific audit.

  • finding_id (Optional[FindingId], default: None ) –

    Specify this filter to limit results to tasks that were applied to a specific audit finding.

  • task_status (Optional[AuditMitigationActionsTaskStatus], default: None ) –

    Specify this filter to limit results to tasks that are in a specific state.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of results to return at one time. The default is 25.

  • next_token (Optional[NextToken], default: None ) –

    The token for the next set of results.

  • start_time (Timestamp) –

    Specify this filter to limit results to tasks that began on or after a specific date and time.

  • end_time (Timestamp) –

    Specify this filter to limit results to tasks that were completed or canceled on or before a specific date and time.

Raises:

Source code in docs_src/capo_iot/_services/async_io_t.py
async def list_audit_mitigation_actions_tasks(
    self,
    start_time: "capo_iot.types.timestamp.Timestamp",
    end_time: "capo_iot.types.timestamp.Timestamp",
    *,
    config_overrides: Optional[AsyncIoTClientConfig] = None,
    audit_task_id: Optional["capo_iot.types.audit_task_id.AuditTaskId"] = None,
    finding_id: Optional["capo_iot.types.finding_id.FindingId"] = None,
    task_status: Optional[
        "capo_iot.types.audit_mitigation_actions_task_status.AuditMitigationActionsTaskStatus"
    ] = None,
    max_results: Optional["capo_iot.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_iot.types.next_token.NextToken"] = None,
) -> "capo_iot.types.list_audit_mitigation_actions_tasks_response.ListAuditMitigationActionsTasksResponse":
    """<p>Gets a list of audit mitigation action tasks that match the specified filters.</p> <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">ListAuditMitigationActionsTasks</a> action.</p>

    Args:
        audit_task_id: <p>Specify this filter to limit results to tasks that were applied to results for a specific audit.</p>
        finding_id: <p>Specify this filter to limit results to tasks that were applied to a specific audit finding.</p>
        task_status: <p>Specify this filter to limit results to tasks that are in a specific state.</p>
        max_results: <p>The maximum number of results to return at one time. The default is 25.</p>
        next_token: <p>The token for the next set of results.</p>
        start_time: <p>Specify this filter to limit results to tasks that began on or after a specific date and time.</p>
        end_time: <p>Specify this filter to limit results to tasks that were completed or canceled on or before a specific date and time.</p>

    Raises:
        capo_iot.errors.internal_failure_exception.InternalFailureException: <p>An unexpected error has occurred.</p>
        capo_iot.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
        capo_iot.errors.throttling_exception.ThrottlingException: <p>The rate exceeds the limit.</p>
        capo_iot.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_iot.types.list_audit_mitigation_actions_tasks_request.ListAuditMitigationActionsTasksRequest]",
    ) -> AsyncOperationResponse[
        "capo_iot.types.list_audit_mitigation_actions_tasks_response.ListAuditMitigationActionsTasksResponse"
    ]:
        import capo_iot._operations.aws_iot_service.list_audit_mitigation_actions_tasks

        (
            output,
            http_response,
        ) = await capo_iot._operations.aws_iot_service.list_audit_mitigation_actions_tasks.async_list_audit_mitigation_actions_tasks(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListAuditMitigationActionsTasks")
    )
    input_: capo_iot.types.list_audit_mitigation_actions_tasks_request.ListAuditMitigationActionsTasksRequest = {
        "start_time": start_time,
        "end_time": end_time,
    }
    if audit_task_id is not None:
        input_["audit_task_id"] = audit_task_id
    if finding_id is not None:
        input_["finding_id"] = finding_id
    if task_status is not None:
        input_["task_status"] = task_status
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output