Skip to content

batch_get_agent_spaces async

batch_get_agent_spaces(
    agent_space_ids: AgentSpaceIdList,
    *,
    config_overrides: Optional[AsyncSecurityAgentClientConfig] = None,
) -> BatchGetAgentSpacesOutput

Retrieves information about one or more agent spaces.

Parameters:

  • agent_space_ids (AgentSpaceIdList) –

    The list of agent space identifiers to retrieve.

Raises:

Source code in docs_src/capo_securityagent/_services/async_security_agent.py
async def batch_get_agent_spaces(
    self,
    agent_space_ids: "capo_securityagent.types.agent_space_id_list.AgentSpaceIdList",
    *,
    config_overrides: Optional[AsyncSecurityAgentClientConfig] = None,
) -> "capo_securityagent.types.batch_get_agent_spaces_output.BatchGetAgentSpacesOutput":
    """<p>Retrieves information about one or more agent spaces.</p>

    Args:
        agent_space_ids: <p>The list of agent space 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_agent_spaces_input.BatchGetAgentSpacesInput]",
    ) -> AsyncOperationResponse[
        "capo_securityagent.types.batch_get_agent_spaces_output.BatchGetAgentSpacesOutput"
    ]:
        import capo_securityagent._operations.security_agent.batch_get_agent_spaces

        (
            output,
            http_response,
        ) = await capo_securityagent._operations.security_agent.batch_get_agent_spaces.async_batch_get_agent_spaces(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("BatchGetAgentSpaces")
    )
    input_: capo_securityagent.types.batch_get_agent_spaces_input.BatchGetAgentSpacesInput = {
        "agent_space_ids": agent_space_ids
    }

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