describeStreamConsumer method

Future<DescribeStreamConsumerOutput> describeStreamConsumer({
  1. String? consumerARN,
  2. String? consumerName,
  3. String? streamARN,
})

To get the description of a registered consumer, provide the ARN of the consumer. Alternatively, you can provide the ARN of the data stream and the name you gave the consumer when you registered it. You may also provide all three parameters, as long as they don't conflict with each other. If you don't know the name or ARN of the consumer that you want to describe, you can use the ListStreamConsumers operation to get a list of the descriptions of all the consumers that are currently registered with a given data stream.

This operation has a limit of 20 transactions per second per stream.

May throw LimitExceededException. May throw ResourceNotFoundException. May throw InvalidArgumentException.

Parameter consumerARN : The ARN returned by Kinesis Data Streams when you registered the consumer.

Parameter consumerName : The name that you gave to the consumer.

Parameter streamARN : The ARN of the Kinesis data stream that the consumer is registered with. For more information, see Amazon Resource Names (ARNs) and AWS Service Namespaces.

Implementation

Future<DescribeStreamConsumerOutput> describeStreamConsumer({
  String? consumerARN,
  String? consumerName,
  String? streamARN,
}) async {
  _s.validateStringLength(
    'consumerARN',
    consumerARN,
    1,
    2048,
  );
  _s.validateStringLength(
    'consumerName',
    consumerName,
    1,
    128,
  );
  _s.validateStringLength(
    'streamARN',
    streamARN,
    1,
    2048,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Kinesis_20131202.DescribeStreamConsumer'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (consumerARN != null) 'ConsumerARN': consumerARN,
      if (consumerName != null) 'ConsumerName': consumerName,
      if (streamARN != null) 'StreamARN': streamARN,
    },
  );

  return DescribeStreamConsumerOutput.fromJson(jsonResponse.body);
}