tagDeliveryStream method
Adds or updates tags for the specified delivery stream. A tag is a key-value pair that you can define and assign to AWS resources. If you specify a tag that already exists, the tag value is replaced with the value that you specify in the request. Tags are metadata. For example, you can add friendly names and descriptions or other types of information that can help you distinguish the delivery stream. For more information about tags, see Using Cost Allocation Tags in the AWS Billing and Cost Management User Guide.
Each delivery stream can have up to 50 tags.
This operation has a limit of five transactions per second per account.
May throw ResourceNotFoundException. May throw ResourceInUseException. May throw InvalidArgumentException. May throw LimitExceededException.
Parameter deliveryStreamName
:
The name of the delivery stream to which you want to add the tags.
Parameter tags
:
A set of key-value pairs to use to create the tags.
Implementation
Future<void> tagDeliveryStream({
required String deliveryStreamName,
required List<Tag> tags,
}) async {
ArgumentError.checkNotNull(deliveryStreamName, 'deliveryStreamName');
_s.validateStringLength(
'deliveryStreamName',
deliveryStreamName,
1,
64,
isRequired: true,
);
ArgumentError.checkNotNull(tags, 'tags');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Firehose_20150804.TagDeliveryStream'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DeliveryStreamName': deliveryStreamName,
'Tags': tags,
},
);
}