Skip to content

list_topic_rule_destinations

list_topic_rule_destinations(
    *,
    config_overrides: Optional[IoTClientConfig] = None,
    max_results: Optional[TopicRuleDestinationMaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListTopicRuleDestinationsResponse

Lists all the topic rule destinations in your Amazon Web Services account.

Requires permission to access the ListTopicRuleDestinations action.

Parameters:

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

    The maximum number of results to return at one time.

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

    To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.

Raises:

Source code in docs_src/capo_iot/_services/io_t.py
def list_topic_rule_destinations(
    self,
    *,
    config_overrides: Optional[IoTClientConfig] = None,
    max_results: Optional[
        "capo_iot.types.topic_rule_destination_max_results.TopicRuleDestinationMaxResults"
    ] = None,
    next_token: Optional["capo_iot.types.next_token.NextToken"] = None,
) -> "capo_iot.types.list_topic_rule_destinations_response.ListTopicRuleDestinationsResponse":
    """<p>Lists all the topic rule destinations in your Amazon Web Services account.</p> <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">ListTopicRuleDestinations</a> action.</p>

    Args:
        max_results: <p>The maximum number of results to return at one time.</p>
        next_token: <p>To retrieve the next set of results, the <code>nextToken</code> value from a previous response; otherwise <b>null</b> to receive the first set of results.</p>

    Raises:
        capo_iot.errors.internal_exception.InternalException: <p>An unexpected error has occurred.</p>
        capo_iot.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
        capo_iot.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is temporarily unavailable.</p>
        capo_iot.errors.unauthorized_exception.UnauthorizedException: <p>You are not authorized to perform this operation.</p>
        capo_iot.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_iot.types.list_topic_rule_destinations_request.ListTopicRuleDestinationsRequest]",
    ) -> OperationResponse[
        "capo_iot.types.list_topic_rule_destinations_response.ListTopicRuleDestinationsResponse"
    ]:
        import capo_iot._operations.aws_iot_service.list_topic_rule_destinations

        output, http_response = (
            capo_iot._operations.aws_iot_service.list_topic_rule_destinations.list_topic_rule_destinations(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListTopicRuleDestinations")
    )
    input_: capo_iot.types.list_topic_rule_destinations_request.ListTopicRuleDestinationsRequest = {}
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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