getBucketMetadataConfiguration method
Retrieves the S3 Metadata configuration for 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:GetBucketMetadataTableConfigurationpermission. For more information, see Setting up permissions for configuring metadata tables in the Amazon S3 User Guide.
GetBucketMetadataConfiguration:
- CreateBucketMetadataConfiguration
- DeleteBucketMetadataConfiguration
- UpdateBucketMetadataInventoryTableConfiguration
- UpdateBucketMetadataJournalTableConfiguration
Parameter bucket :
The general purpose bucket that corresponds to the metadata configuration
that you want to retrieve.
Parameter expectedBucketOwner :
The expected owner of the general purpose bucket that you want to retrieve
the metadata table configuration for.
Implementation
Future<GetBucketMetadataConfigurationOutput> getBucketMetadataConfiguration({
required String bucket,
String? expectedBucketOwner,
}) async {
final headers = <String, String>{
if (expectedBucketOwner != null)
'x-amz-expected-bucket-owner': expectedBucketOwner.toString(),
};
final $result = await _protocol.sendRaw(
method: 'GET',
requestUri: '/${Uri.encodeComponent(bucket)}?metadataConfiguration',
headers: headers,
exceptionFnMap: _exceptionFns,
);
final $elem = await _s.xmlFromResponse($result);
return GetBucketMetadataConfigurationOutput(
getBucketMetadataConfigurationResult:
GetBucketMetadataConfigurationResult.fromXml($elem),
);
}