getBucketPolicy method
Get the bucket policy associated with the specified bucket. If objectPrefix
is not empty, the bucket policy will be filtered based on object permissions
as well.
Implementation
Future<Map<String, dynamic>?> getBucketPolicy(bucket) async {
MinioInvalidBucketNameError.check(bucket);
final resp = await _client.request(
method: 'GET',
bucket: bucket,
resource: 'policy',
);
validate(resp, expect: 200);
return json.decode(resp.body);
}