deleteBucketMetadataConfiguration method

Future<void> deleteBucketMetadataConfiguration({
  1. required String bucket,
  2. String? expectedBucketOwner,
})

Deletes an S3 Metadata configuration from a general purpose bucket. For more information, see Accelerating data discovery with S3 Metadata in the Amazon S3 User Guide.

Permissions
To use this operation, you must have the s3:DeleteBucketMetadataTableConfiguration permission. For more information, see Setting up permissions for configuring metadata tables in the Amazon S3 User Guide.
The following operations are related to DeleteBucketMetadataConfiguration:

Parameter bucket : The general purpose bucket that you want to remove the metadata configuration from.

Parameter expectedBucketOwner : The expected bucket owner of the general purpose bucket that you want to remove the metadata table configuration from.

Implementation

Future<void> deleteBucketMetadataConfiguration({
  required String bucket,
  String? expectedBucketOwner,
}) async {
  final headers = <String, String>{
    if (expectedBucketOwner != null)
      'x-amz-expected-bucket-owner': expectedBucketOwner.toString(),
  };
  await _protocol.send(
    method: 'DELETE',
    requestUri: '/${Uri.encodeComponent(bucket)}?metadataConfiguration',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
}