minio / minio-py

MinIO Client SDK for Python
https://docs.min.io/docs/python-client-quickstart-guide.html
Apache License 2.0
822 stars 318 forks source link

How to Set the Bucket Policy to Private? #1349

Closed xujuchao closed 9 months ago

xujuchao commented 9 months ago

我想通过Python sdk实现设置桶的策略为私有,请问如何实现?

image

xujuchao commented 9 months ago

I want to use Python sdk to set the bucket policy to private, how to achieve?

balamurugana commented 9 months ago

What is the equivalent mc admin command you are using?

xujuchao commented 9 months ago

I didn't find it, but the bucket I created through the Python sdk has an Access policy of n/a. If this is not specified, does it default to private without having to select "private"?

image

balamurugana commented 9 months ago

You would need to know respective mc command to map respective minio admin API in minio-py