unsubscribe method
Deletes a subscription. If the subscription requires authentication for
deletion, only the owner of the subscription or the topic's owner can
unsubscribe, and an AWS signature is required. If the
Unsubscribe
call does not require authentication and the
requester is not the subscription owner, a final cancellation message is
delivered to the endpoint, so that the endpoint owner can easily
resubscribe to the topic if the Unsubscribe
request was
unintended.
This action is throttled at 100 transactions per second (TPS).
May throw InvalidParameterException. May throw InternalErrorException. May throw AuthorizationErrorException. May throw NotFoundException. May throw InvalidSecurityException.
Parameter subscriptionArn
:
The ARN of the subscription to be deleted.
Implementation
Future<void> unsubscribe({
required String subscriptionArn,
}) async {
ArgumentError.checkNotNull(subscriptionArn, 'subscriptionArn');
final $request = <String, dynamic>{};
$request['SubscriptionArn'] = subscriptionArn;
await _protocol.send(
$request,
action: 'Unsubscribe',
version: '2010-03-31',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['UnsubscribeInput'],
shapes: shapes,
);
}