unsubscribe method

Future<UnsubscribeResult> unsubscribe(
  1. {required String arn,
  2. required String targetAddress}
)

Removes an association between a notification rule and an Amazon SNS topic so that subscribers to that topic stop receiving notifications when the events described in the rule are triggered.

May throw ValidationException.

Parameter arn : The Amazon Resource Name (ARN) of the notification rule.

Parameter targetAddress : The ARN of the SNS topic to unsubscribe from the notification rule.

Implementation

Future<UnsubscribeResult> unsubscribe({
  required String arn,
  required String targetAddress,
}) async {
  ArgumentError.checkNotNull(arn, 'arn');
  ArgumentError.checkNotNull(targetAddress, 'targetAddress');
  _s.validateStringLength(
    'targetAddress',
    targetAddress,
    1,
    320,
    isRequired: true,
  );
  final $payload = <String, dynamic>{
    'Arn': arn,
    'TargetAddress': targetAddress,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/unsubscribe',
    exceptionFnMap: _exceptionFns,
  );
  return UnsubscribeResult.fromJson(response);
}