deleteStream method
Deletes a stream from a cluster.
May throw ConflictException.
May throw ResourceNotFoundException.
Parameter clusterIdentifier :
The ID of the cluster containing the stream to delete.
Parameter streamIdentifier :
The ID of the stream to delete.
Parameter clientToken :
A unique, case-sensitive identifier that you provide to ensure the
idempotency of the request. Idempotency ensures that an API request
completes only once. With an idempotent request, if the original request
completes successfully, the subsequent retries with the same client token
return the result from the original successful request and they have no
additional effect.
If you don't specify a client token, the Amazon Web Services SDK automatically generates one.
Implementation
Future<DeleteStreamOutput> deleteStream({
required String clusterIdentifier,
required String streamIdentifier,
String? clientToken,
}) async {
final $query = <String, List<String>>{
if (clientToken != null) 'client-token': [clientToken],
};
final response = await _protocol.send(
payload: null,
method: 'DELETE',
requestUri:
'/stream/${Uri.encodeComponent(clusterIdentifier)}/${Uri.encodeComponent(streamIdentifier)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return DeleteStreamOutput.fromJson(response);
}