modifyEventSubscription method
May throw EventSubscriptionQuotaExceededFault. May throw SubscriptionNotFoundFault. May throw SNSInvalidTopicFault. May throw SNSNoAuthorizationFault. May throw SNSTopicArnNotFoundFault. May throw SubscriptionCategoryNotFoundFault.
Implementation
Future<ModifyEventSubscriptionResult> modifyEventSubscription({
required String subscriptionName,
bool? enabled,
List<String>? eventCategories,
String? snsTopicArn,
String? sourceType,
}) async {
ArgumentError.checkNotNull(subscriptionName, 'subscriptionName');
final $request = <String, dynamic>{};
$request['SubscriptionName'] = subscriptionName;
enabled?.also((arg) => $request['Enabled'] = arg);
eventCategories?.also((arg) => $request['EventCategories'] = arg);
snsTopicArn?.also((arg) => $request['SnsTopicArn'] = arg);
sourceType?.also((arg) => $request['SourceType'] = arg);
final $result = await _protocol.send(
$request,
action: 'ModifyEventSubscription',
version: '2013-02-12',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['ModifyEventSubscriptionMessage'],
shapes: shapes,
resultWrapper: 'ModifyEventSubscriptionResult',
);
return ModifyEventSubscriptionResult.fromXml($result);
}