Skip to content

list_publishing_destinations async

list_publishing_destinations(
    detector_id: DetectorId,
    *,
    config_overrides: Optional[AsyncGuardDutyClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[String] = None,
) -> ListPublishingDestinationsResponse

Returns a list of publishing destinations associated with the specified detectorId.

Parameters:

  • detector_id (DetectorId) –

    The detector ID for which you want to retrieve the publishing destination.

    To find the detectorId in the current Region, see the Settings page in the GuardDuty console, or run the ListDetectors API.

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

    The maximum number of results to return in the response.

  • next_token (Optional[String], 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 to a list action. For subsequent calls, use the NextToken value returned from the previous request to continue listing results after the first page.

Raises:

Source code in docs_src/capo_guardduty/_services/async_guard_duty.py
async def list_publishing_destinations(
    self,
    detector_id: "capo_guardduty.types.detector_id.DetectorId",
    *,
    config_overrides: Optional[AsyncGuardDutyClientConfig] = None,
    max_results: Optional["capo_guardduty.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_guardduty.types.string.String"] = None,
) -> "capo_guardduty.types.list_publishing_destinations_response.ListPublishingDestinationsResponse":
    """<p>Returns a list of publishing destinations associated with the specified <code>detectorId</code>.</p>

    Args:
        detector_id: <p>The detector ID for which you want to retrieve the publishing destination.</p> <p>To find the <code>detectorId</code> in the current Region, see the Settings page in the GuardDuty console, or run the <a href="https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html">ListDetectors</a> API.</p>
        max_results: <p>The maximum number of results to return in the response.</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 to a list action. For subsequent calls, use the <code>NextToken</code> value returned from the previous request to continue listing results after the first page.</p>

    Raises:
        capo_guardduty.errors.bad_request_exception.BadRequestException: <p>A bad request exception object.</p>
        capo_guardduty.errors.internal_server_error_exception.InternalServerErrorException: <p>An internal server error exception object.</p>
        capo_guardduty.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_guardduty.types.list_publishing_destinations_request.ListPublishingDestinationsRequest]",
    ) -> AsyncOperationResponse[
        "capo_guardduty.types.list_publishing_destinations_response.ListPublishingDestinationsResponse"
    ]:
        import capo_guardduty._operations.guard_duty_api_service.list_publishing_destinations

        (
            output,
            http_response,
        ) = await capo_guardduty._operations.guard_duty_api_service.list_publishing_destinations.async_list_publishing_destinations(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListPublishingDestinations")
    )
    input_: capo_guardduty.types.list_publishing_destinations_request.ListPublishingDestinationsRequest = {
        "detector_id": detector_id
    }
    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