示例#1
0
 def __init__(self, endpoint, access_key, secret_key, accNumber=None, secure=False):
     AWSClient.__init__(self, endpoint, access_key, secret_key, secure)
     #try to retrieve the curent user's account number
     if accNumber is None:
         iam = IAMClient(access_key, secret_key)
         userinfo = iam.getUser()
         self.accNumber = userinfo['UserId']
         iam.closeConnections()
         iam = None
     else:
         self.accNumber = accNumber
示例#2
0
 def __init__(self, endpoint, access_key, secret_key, secure=False):
     self.boxUssage = 0
     AWSClient.__init__(self, endpoint, access_key, secret_key, secure)
示例#3
0
 def __init__(self, access_key, secret_key):
     #IAM has only one endpoint
     #IAM calls should be always https
     AWSClient.__init__(self, 'iam.amazonaws.com', access_key, secret_key, secure=True)