Skip to content

list_actor_messages async

list_actor_messages(
    agent_space_id: str,
    pentest_id: str,
    actor_identifier: str,
    *,
    config_overrides: Optional[AsyncSecurityAgentClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListActorMessagesOutput

Returns a paginated list of the email MFA messages received for an actor at its server-generated email address, most recent first.

Parameters:

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

    The maximum number of results to return in a single call.

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

    A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request. For subsequent calls, use the nextToken value returned from the previous request.

  • agent_space_id (str) –

    The unique identifier of the agent space that owns the pentest.

  • pentest_id (str) –

    The unique identifier of the pentest that the actor belongs to.

  • actor_identifier (str) –

    The identifier of the actor whose messages to list. The identifier is case-insensitive.

Raises:

Source code in docs_src/capo_securityagent/_services/async_security_agent.py
async def list_actor_messages(
    self,
    agent_space_id: str,
    pentest_id: str,
    actor_identifier: str,
    *,
    config_overrides: Optional[AsyncSecurityAgentClientConfig] = None,
    max_results: Optional["capo_securityagent.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_securityagent.types.next_token.NextToken"] = None,
) -> "capo_securityagent.types.list_actor_messages_output.ListActorMessagesOutput":
    """<p>Returns a paginated list of the email MFA messages received for an actor at its server-generated email address, most recent first.</p>

    Args:
        max_results: <p>The maximum number of results to return in a single call.</p>
        next_token: <p>A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request. For subsequent calls, use the nextToken value returned from the previous request.</p>
        agent_space_id: <p>The unique identifier of the agent space that owns the pentest.</p>
        pentest_id: <p>The unique identifier of the pentest that the actor belongs to.</p>
        actor_identifier: <p>The identifier of the actor whose messages to list. The identifier is case-insensitive.</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.list_actor_messages_input.ListActorMessagesInput]",
    ) -> AsyncOperationResponse[
        "capo_securityagent.types.list_actor_messages_output.ListActorMessagesOutput"
    ]:
        import capo_securityagent._operations.security_agent.list_actor_messages

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

    def _redact_output(
        output: "capo_securityagent.types.list_actor_messages_output.ListActorMessagesOutput",
    ) -> dict[str, Any]:
        import capo_securityagent.types.list_actor_messages_output

        return capo_securityagent.types.list_actor_messages_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("ListActorMessages", redact_output=_redact_output),
    )
    input_: capo_securityagent.types.list_actor_messages_input.ListActorMessagesInput = {
        "agent_space_id": agent_space_id,
        "pentest_id": pentest_id,
        "actor_identifier": actor_identifier,
    }
    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