listDeliveryStreams method

Future<ListDeliveryStreamsOutput> listDeliveryStreams({
  1. DeliveryStreamType? deliveryStreamType,
  2. String? exclusiveStartDeliveryStreamName,
  3. int? limit,
})

Lists your delivery streams in alphabetical order of their names.

The number of delivery streams might be too large to return using a single call to ListDeliveryStreams. You can limit the number of delivery streams returned, using the Limit parameter. To determine whether there are more delivery streams to list, check the value of HasMoreDeliveryStreams in the output. If there are more delivery streams to list, you can request them by calling this operation again and setting the ExclusiveStartDeliveryStreamName parameter to the name of the last delivery stream returned in the last call.

Parameter deliveryStreamType : The delivery stream type. This can be one of the following values:

  • DirectPut: Provider applications access the delivery stream directly.
  • KinesisStreamAsSource: The delivery stream uses a Kinesis data stream as a source.
This parameter is optional. If this parameter is omitted, delivery streams of all types are returned.

Parameter exclusiveStartDeliveryStreamName : The list of delivery streams returned by this call to ListDeliveryStreams will start with the delivery stream whose name comes alphabetically immediately after the name you specify in ExclusiveStartDeliveryStreamName.

Parameter limit : The maximum number of delivery streams to list. The default value is 10.

Implementation

Future<ListDeliveryStreamsOutput> listDeliveryStreams({
  DeliveryStreamType? deliveryStreamType,
  String? exclusiveStartDeliveryStreamName,
  int? limit,
}) async {
  _s.validateStringLength(
    'exclusiveStartDeliveryStreamName',
    exclusiveStartDeliveryStreamName,
    1,
    64,
  );
  _s.validateNumRange(
    'limit',
    limit,
    1,
    10000,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Firehose_20150804.ListDeliveryStreams'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (deliveryStreamType != null)
        'DeliveryStreamType': deliveryStreamType.toValue(),
      if (exclusiveStartDeliveryStreamName != null)
        'ExclusiveStartDeliveryStreamName': exclusiveStartDeliveryStreamName,
      if (limit != null) 'Limit': limit,
    },
  );

  return ListDeliveryStreamsOutput.fromJson(jsonResponse.body);
}