Skip to content

describe_destinations

describe_destinations(
    *,
    config_overrides: Optional[CloudWatchLogsClientConfig] = None,
    destination_name_prefix: Optional[DestinationName] = None,
    next_token: Optional[NextToken] = None,
    limit: Optional[DescribeLimit] = None,
) -> DescribeDestinationsResponse

Lists all your destinations. The results are ASCII-sorted by destination name.

Parameters:

  • destination_name_prefix (Optional[DestinationName], default: None ) –

    The prefix to match. If you don't specify a value, no prefix filter is applied.

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

    The token for the next set of items to return. (You received this token from a previous call.)

  • limit (Optional[DescribeLimit], default: None ) –

    The maximum number of items returned. If you don't specify a value, the default maximum value of 50 items is used.

Raises:

Source code in docs_src/capo_cloudwatch_logs/_services/cloud_watch_logs.py
def describe_destinations(
    self,
    *,
    config_overrides: Optional[CloudWatchLogsClientConfig] = None,
    destination_name_prefix: Optional[
        "capo_cloudwatch_logs.types.destination_name.DestinationName"
    ] = None,
    next_token: Optional["capo_cloudwatch_logs.types.next_token.NextToken"] = None,
    limit: Optional[
        "capo_cloudwatch_logs.types.describe_limit.DescribeLimit"
    ] = None,
) -> "capo_cloudwatch_logs.types.describe_destinations_response.DescribeDestinationsResponse":
    """<p>Lists all your destinations. The results are ASCII-sorted by destination name.</p>

    Args:
        destination_name_prefix: <p>The prefix to match. If you don't specify a value, no prefix filter is applied.</p>
        next_token: <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
        limit: <p>The maximum number of items returned. If you don't specify a value, the default maximum value of 50 items is used.</p>

    Raises:
        capo_cloudwatch_logs.errors.invalid_parameter_exception.InvalidParameterException: <p>A parameter is specified incorrectly.</p>
        capo_cloudwatch_logs.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service cannot complete the request.</p>
        capo_cloudwatch_logs.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_cloudwatch_logs.types.describe_destinations_request.DescribeDestinationsRequest]",
    ) -> OperationResponse[
        "capo_cloudwatch_logs.types.describe_destinations_response.DescribeDestinationsResponse"
    ]:
        import capo_cloudwatch_logs._operations.logs_20140328.describe_destinations

        output, http_response = (
            capo_cloudwatch_logs._operations.logs_20140328.describe_destinations.describe_destinations(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeDestinations")
    )
    input_: capo_cloudwatch_logs.types.describe_destinations_request.DescribeDestinationsRequest = {}
    if destination_name_prefix is not None:
        input_["destination_name_prefix"] = destination_name_prefix
    if next_token is not None:
        input_["next_token"] = next_token
    if limit is not None:
        input_["limit"] = limit

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