sendDataSetNotification method

Future<void> sendDataSetNotification({
  1. required String dataSetId,
  2. required NotificationType type,
  3. String? clientToken,
  4. String? comment,
  5. NotificationDetails? details,
  6. ScopeDetails? scope,
})

The type of event associated with the data set.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter dataSetId : Affected data set of the notification.

Parameter type : The type of the notification. Describing the kind of event the notification is alerting you to.

Parameter clientToken : Idempotency key for the notification, this key allows us to deduplicate notifications that are sent in quick succession erroneously.

Parameter comment : Free-form text field for providers to add information about their notifications.

Parameter details : Extra details specific to this notification type.

Parameter scope : Affected scope of this notification such as the underlying resources affected by the notification event.

Implementation

Future<void> sendDataSetNotification({
  required String dataSetId,
  required NotificationType type,
  String? clientToken,
  String? comment,
  NotificationDetails? details,
  ScopeDetails? scope,
}) async {
  final $payload = <String, dynamic>{
    'Type': type.value,
    'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (comment != null) 'Comment': comment,
    if (details != null) 'Details': details,
    if (scope != null) 'Scope': scope,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/v1/data-sets/${Uri.encodeComponent(dataSetId)}/notification',
    exceptionFnMap: _exceptionFns,
  );
}