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
def __init__(self, endpoint, access_key, secret_key, secure=False): self.boxUssage = 0 AWSClient.__init__(self, endpoint, access_key, secret_key, secure)
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)