Retrieves information about one or more threats.
Parameters:
-
threat_ids
(ThreatIdList)
–
The list of threat identifiers to retrieve.
-
agent_space_id
(str)
–
The unique identifier of the agent space.
Raises:
Source code in docs_src/capo_securityagent/_services/security_agent.py
| def batch_get_threats(
self,
threat_ids: "capo_securityagent.types.threat_id_list.ThreatIdList",
agent_space_id: str,
*,
config_overrides: Optional[SecurityAgentClientConfig] = None,
) -> "capo_securityagent.types.batch_get_threats_output.BatchGetThreatsOutput":
"""<p>Retrieves information about one or more threats.</p>
Args:
threat_ids: <p>The list of threat identifiers to retrieve.</p>
agent_space_id: <p>The unique identifier of the agent space.</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_threats_input.BatchGetThreatsInput]",
) -> OperationResponse[
"capo_securityagent.types.batch_get_threats_output.BatchGetThreatsOutput"
]:
import capo_securityagent._operations.security_agent.batch_get_threats
output, http_response = (
capo_securityagent._operations.security_agent.batch_get_threats.batch_get_threats(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("BatchGetThreats")
)
input_: capo_securityagent.types.batch_get_threats_input.BatchGetThreatsInput = {
"threat_ids": threat_ids,
"agent_space_id": agent_space_id,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|