listTagsForDeliveryStream method

Future<ListTagsForDeliveryStreamOutput> listTagsForDeliveryStream({
  1. required String deliveryStreamName,
  2. String? exclusiveStartTagKey,
  3. int? limit,
})

Lists the tags for the specified delivery stream. This operation has a limit of five transactions per second per account.

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

Parameter deliveryStreamName : The name of the delivery stream whose tags you want to list.

Parameter exclusiveStartTagKey : The key to use as the starting point for the list of tags. If you set this parameter, ListTagsForDeliveryStream gets all tags that occur after ExclusiveStartTagKey.

Parameter limit : The number of tags to return. If this number is less than the total number of tags associated with the delivery stream, HasMoreTags is set to true in the response. To list additional tags, set ExclusiveStartTagKey to the last key in the response.

Implementation

Future<ListTagsForDeliveryStreamOutput> listTagsForDeliveryStream({
  required String deliveryStreamName,
  String? exclusiveStartTagKey,
  int? limit,
}) async {
  ArgumentError.checkNotNull(deliveryStreamName, 'deliveryStreamName');
  _s.validateStringLength(
    'deliveryStreamName',
    deliveryStreamName,
    1,
    64,
    isRequired: true,
  );
  _s.validateStringLength(
    'exclusiveStartTagKey',
    exclusiveStartTagKey,
    1,
    128,
  );
  _s.validateNumRange(
    'limit',
    limit,
    1,
    50,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Firehose_20150804.ListTagsForDeliveryStream'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DeliveryStreamName': deliveryStreamName,
      if (exclusiveStartTagKey != null)
        'ExclusiveStartTagKey': exclusiveStartTagKey,
      if (limit != null) 'Limit': limit,
    },
  );

  return ListTagsForDeliveryStreamOutput.fromJson(jsonResponse.body);
}