deleteTarget method Null safety

Future<void> deleteTarget(
  1. {required String targetAddress,
  2. bool? forceUnsubscribeAll}

Deletes a specified target for notifications.

May throw ValidationException.

Parameter targetAddress : The Amazon Resource Name (ARN) of the SNS topic to delete.

Parameter forceUnsubscribeAll : A Boolean value that can be used to delete all associations with this SNS topic. The default value is FALSE. If set to TRUE, all associations between that target and every notification rule in your AWS account are deleted.


Future<void> deleteTarget({
  required String targetAddress,
  bool? forceUnsubscribeAll,
}) async {
  ArgumentError.checkNotNull(targetAddress, 'targetAddress');
    isRequired: true,
  final $payload = <String, dynamic>{
    'TargetAddress': targetAddress,
    if (forceUnsubscribeAll != null)
      'ForceUnsubscribeAll': forceUnsubscribeAll,
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/deleteTarget',
    exceptionFnMap: _exceptionFns,