Skip to content

batch_get_pentest_job_tasks async

batch_get_pentest_job_tasks(
    agent_space_id: str,
    task_ids: TaskIdList,
    *,
    config_overrides: Optional[AsyncSecurityAgentClientConfig] = 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/async_security_agent.py
async def batch_get_pentest_job_tasks(
    self,
    agent_space_id: str,
    task_ids: "capo_securityagent.types.task_id_list.TaskIdList",
    *,
    config_overrides: Optional[AsyncSecurityAgentClientConfig] = 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.
    """

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

        (
            output,
            http_response,
        ) = await capo_securityagent._operations.security_agent.batch_get_pentest_job_tasks.async_batch_get_pentest_job_tasks(
            req.options, req.input
        )
        return AsyncOperationResponse(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 = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output