modifyEventSubscription method

Future<ModifyEventSubscriptionResult> modifyEventSubscription({
  1. required String subscriptionName,
  2. bool? enabled,
  3. List<String>? eventCategories,
  4. String? snsTopicArn,
  5. String? sourceType,
})

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-01-10',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['ModifyEventSubscriptionMessage'],
    shapes: shapes,
    resultWrapper: 'ModifyEventSubscriptionResult',
  );
  return ModifyEventSubscriptionResult.fromXml($result);
}