Skip to content

batch_get_pentest_job_tasks

batch_get_pentest_job_tasks(
    agent_space_id: str,
    task_ids: TaskIdList,
    *,
    config_overrides: Optional[SecurityAgentClientConfig] = None,
) -> BatchGetPentestJobTasksOutput

Retrieves information about one or more tasks within a pentest job.

Parameters:

  • agent_space_id (str) –

    The unique identifier of the agent space that contains the tasks.

  • task_ids (TaskIdList) –

    The list of task identifiers to retrieve.

Raises:

Source code in docs_src/capo_securityagent/_services/security_agent.py
def batch_get_pentest_job_tasks(
    self,
    agent_space_id: str,
    task_ids: "capo_securityagent.types.task_id_list.TaskIdList",
    *,
    config_overrides: Optional[SecurityAgentClientConfig] = None,
) -> "capo_securityagent.types.batch_get_pentest_job_tasks_output.BatchGetPentestJobTasksOutput":
    """<p>Retrieves information about one or more tasks within a pentest job.</p>

    Args:
        agent_space_id: <p>The unique identifier of the agent space that contains the tasks.</p>
        task_ids: <p>The list of task identifiers to retrieve.</p>

    Raises:
        capo_securityagent.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_securityagent.types.batch_get_pentest_job_tasks_input.BatchGetPentestJobTasksInput]",
    ) -> OperationResponse[
        "capo_securityagent.types.batch_get_pentest_job_tasks_output.BatchGetPentestJobTasksOutput"
    ]:
        import capo_securityagent._operations.security_agent.batch_get_pentest_job_tasks

        output, http_response = (
            capo_securityagent._operations.security_agent.batch_get_pentest_job_tasks.batch_get_pentest_job_tasks(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("BatchGetPentestJobTasks")
    )
    input_: capo_securityagent.types.batch_get_pentest_job_tasks_input.BatchGetPentestJobTasksInput = {
        "agent_space_id": agent_space_id,
        "task_ids": task_ids,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output