setBucketNotification method

Future<void> setBucketNotification(
  1. String bucket,
  2. NotificationConfiguration config
)

Implementation

Future<void> setBucketNotification(
  String bucket,
  NotificationConfiguration config,
) async {
  MinioInvalidBucketNameError.check(bucket);

  final resp = await _client.request(
    method: 'PUT',
    bucket: bucket,
    resource: 'notification',
    payload: config.toXml().toString(),
  );

  validate(resp, expect: 200);
}