Skip to content

list_target_domains

list_target_domains(
    *,
    config_overrides: Optional[SecurityAgentClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListTargetDomainsOutput

Returns a paginated list of target domain summaries in your account.

Parameters:

  • 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.

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

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

Raises:

Source code in docs_src/capo_securityagent/_services/security_agent.py
def list_target_domains(
    self,
    *,
    config_overrides: Optional[SecurityAgentClientConfig] = None,
    next_token: Optional["capo_securityagent.types.next_token.NextToken"] = None,
    max_results: Optional["capo_securityagent.types.max_results.MaxResults"] = None,
) -> "capo_securityagent.types.list_target_domains_output.ListTargetDomainsOutput":
    """<p>Returns a paginated list of target domain summaries in your account.</p>

    Args:
        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>
        max_results: <p>The maximum number of results to return in a single call.</p>

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

    def _handler(
        req: "OperationRequest[capo_securityagent.types.list_target_domains_input.ListTargetDomainsInput]",
    ) -> OperationResponse[
        "capo_securityagent.types.list_target_domains_output.ListTargetDomainsOutput"
    ]:
        import capo_securityagent._operations.security_agent.list_target_domains

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListTargetDomains")
    )
    input_: capo_securityagent.types.list_target_domains_input.ListTargetDomainsInput = {}
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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