def __init__(self, credentials: AzureCredentials): self.keyvault = KeyVaultFacade(credentials.credentials, credentials.subscription_id) self.virtualmachines = VirtualMachineFacade(credentials.credentials, credentials.subscription_id) self.network = NetworkFacade(credentials.credentials, credentials.subscription_id) self.securitycenter = SecurityCenterFacade(credentials.credentials, credentials.subscription_id) self.sqldatabase = SQLDatabaseFacade(credentials.credentials, credentials.subscription_id) self.storageaccounts = StorageAccountsFacade(credentials.credentials, credentials.subscription_id) self.graphrbac = GraphRBACFacade(credentials.graphrbac_credentials, credentials.credentials, credentials.tenant_id, credentials.subscription_id) # Instantiate facades for proprietary services try: self.appgateway = AppGatewayFacade(credentials.credentials, credentials.subscription_id) except NameError: pass try: self.appservice = AppServiceFacade(credentials.credentials, credentials.subscription_id) except NameError: pass try: self.loadbalancer = LoadBalancerFacade(credentials.credentials, credentials.subscription_id) except NameError: pass try: self.rediscache = RedisCacheFacade(credentials.credentials, credentials.subscription_id) except NameError: pass
def __init__(self, credentials: AzureCredentials, subscription_ids=[], all_subscriptions=False, programmatic_execution=False): self.credentials = credentials self.programmatic_execution = programmatic_execution self.subscription_list = [] self.subscription_ids = subscription_ids self.all_subscriptions = all_subscriptions self.aad = AADFacade(credentials) self.arm = ARMFacade(credentials) self.keyvault = KeyVaultFacade(credentials) self.virtualmachines = VirtualMachineFacade(credentials) self.network = NetworkFacade(credentials) self.securitycenter = SecurityCenterFacade(credentials) self.sqldatabase = SQLDatabaseFacade(credentials) self.storageaccounts = StorageAccountsFacade(credentials) # Instantiate facades for proprietary services try: self.appgateway = AppGatewayFacade(credentials) except NameError: pass try: self.appservice = AppServiceFacade(credentials) except NameError: pass try: self.loadbalancer = LoadBalancerFacade(credentials) except NameError: pass try: self.rediscache = RedisCacheFacade(credentials) except NameError: pass self._set_subscriptions()
def __init__(self, credentials: AzureCredentials): self.keyvault = KeyVaultFacade(credentials.credentials, credentials.subscription_id) self.network = NetworkFacade(credentials.credentials, credentials.subscription_id) self.securitycenter = SecurityCenterFacade(credentials.credentials, credentials.subscription_id) self.sqldatabase = SQLDatabaseFacade(credentials.credentials, credentials.subscription_id) self.storageaccounts = StorageAccountsFacade( credentials.credentials, credentials.subscription_id) try: self.appgateway = AppGatewayFacade(credentials.credentials, credentials.subscription_id) self.appservice = AppServiceFacade(credentials.credentials, credentials.subscription_id) self.loadbalancer = LoadBalancerFacade(credentials.credentials, credentials.subscription_id) self.rediscache = RedisCacheFacade(credentials.credentials, credentials.subscription_id) except NameError: pass