deleteBucketTagging method
Deletes the tags from the bucket.
To use this operation, you must have permission to perform the
s3:PutBucketTagging
action. By default, the bucket owner has
this permission and can grant this permission to others.
The following operations are related to DeleteBucketTagging
:
Parameter bucket
:
The bucket that has the tag set to be removed.
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
Future<void> deleteBucketTagging({
required String bucket,
String? expectedBucketOwner,
}) async {
ArgumentError.checkNotNull(bucket, 'bucket');
final headers = <String, String>{
if (expectedBucketOwner != null)
'x-amz-expected-bucket-owner': expectedBucketOwner.toString(),
};
await _protocol.send(
method: 'DELETE',
requestUri: '/${Uri.encodeComponent(bucket)}?tagging',
headers: headers,
exceptionFnMap: _exceptionFns,
);
}