Python to list users in AWS

2021-07-01 08:07

阅读:479

标签:str   class   nsf   def   pytho   nbsp   www   dict   get   

code

import boto3
c1=boto3.client(iam)
#list_users will be a dict
users=c1.list_users()
#transfer dict to list
user_list=list(( r.get(UserName) for r in users.get(Users) ))
#print list
print(user_list)
#transfer list to string
for user_name in user_list:
   print(user_name)

refer

https://www.w3schools.com/python/default.asp

 

Python to list users in AWS

标签:str   class   nsf   def   pytho   nbsp   www   dict   get   

原文地址:https://www.cnblogs.com/oskb/p/9638046.html


评论


亲,登录后才可以留言!