getBucketNotification method

  1. @Deprecated('Deprecated')
Future<NotificationConfigurationDeprecated> getBucketNotification({
  1. required String bucket,
  2. String? expectedBucketOwner,
})

No longer used, see GetBucketNotificationConfiguration.

Parameter bucket : The name of the bucket for which to get the notification configuration.

Parameter expectedBucketOwner : The account id of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

Implementation

@Deprecated('Deprecated')
Future<NotificationConfigurationDeprecated> getBucketNotification({
  required String bucket,
  String? expectedBucketOwner,
}) async {
  ArgumentError.checkNotNull(bucket, 'bucket');
  final headers = <String, String>{
    if (expectedBucketOwner != null)
      'x-amz-expected-bucket-owner': expectedBucketOwner.toString(),
  };
  final $result = await _protocol.send(
    method: 'GET',
    requestUri: '/${Uri.encodeComponent(bucket)}?notification',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return NotificationConfigurationDeprecated.fromXml($result.body);
}