describeDeliveryStream method

Future<DescribeDeliveryStreamOutput> describeDeliveryStream({
  1. required String deliveryStreamName,
  2. String? exclusiveStartDestinationId,
  3. int? limit,
})

Describes the specified Firehose stream and its status. For example, after your Firehose stream is created, call DescribeDeliveryStream to see whether the Firehose stream is ACTIVE and therefore ready for data to be sent to it.

If the status of a Firehose stream is CREATING_FAILED, this status doesn't change, and you can't invoke CreateDeliveryStream again on it. However, you can invoke the DeleteDeliveryStream operation to delete it. If the status is DELETING_FAILED, you can force deletion by invoking DeleteDeliveryStream again but with DeleteDeliveryStreamInput$AllowForceDelete set to true.

May throw ResourceNotFoundException.

Parameter deliveryStreamName : The name of the Firehose stream.

Parameter exclusiveStartDestinationId : The ID of the destination to start returning the destination information. Firehose supports one destination per Firehose stream.

Parameter limit : The limit on the number of destinations to return. You can have one destination per Firehose stream.

Implementation

Future<DescribeDeliveryStreamOutput> describeDeliveryStream({
  required String deliveryStreamName,
  String? exclusiveStartDestinationId,
  int? limit,
}) async {
  _s.validateNumRange(
    'limit',
    limit,
    1,
    10000,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Firehose_20150804.DescribeDeliveryStream'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DeliveryStreamName': deliveryStreamName,
      if (exclusiveStartDestinationId != null)
        'ExclusiveStartDestinationId': exclusiveStartDestinationId,
      if (limit != null) 'Limit': limit,
    },
  );

  return DescribeDeliveryStreamOutput.fromJson(jsonResponse.body);
}