Skip to content

Commit

Permalink
✨ Add account info admin command
Browse files Browse the repository at this point in the history
Signed-off-by: Muhammed Hussein Karimi <[email protected]>
  • Loading branch information
mhkarimi1383 committed Dec 5, 2024
1 parent a7b443d commit 0cfaa66
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions minio/minioadmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
@unique
class _COMMAND(Enum):
"""Admin Command enumerations."""
ACCOUNT_INFO = "accountinfo"
ADD_USER = "add-user"
USER_INFO = "user-info"
LIST_USERS = "list-users"
Expand Down Expand Up @@ -316,6 +317,14 @@ def info(self) -> str:
)
return response.data.decode()

def account_info(self) -> str:
"""Get MinIO Account (aka User) information."""
response = self._url_open(
"GET",
_COMMAND.ACCOUNT_INFO,
)
return response.data.decode()

def user_add(self, access_key: str, secret_key: str) -> str:
"""Create user with access and secret keys"""
body = json.dumps(
Expand Down

0 comments on commit 0cfaa66

Please sign in to comment.