Consolidate getSubscriptions (#16821)

* Consolidate getSubscriptions

* Undo test change
This commit is contained in:
Charles Gagnon
2021-08-18 12:56:45 -07:00
committed by GitHub
parent 8c858f9990
commit df49d67f7d
9 changed files with 39 additions and 58 deletions

View File

@@ -11,8 +11,14 @@ import { azureResource } from 'azureResource';
import { AzureAccount, Tenant } from 'azurecore';
export interface IAzureResourceSubscriptionService {
getSubscriptions(account: Account, credential: msRest.ServiceClientCredentials, tenantId: string): Promise<azureResource.AzureResourceSubscription[]>;
getAllSubscriptions(account: Account): Promise<azureResource.AzureResourceSubscription[]>;
/**
* Gets subscriptions for the given account. Any errors that occur while fetching the subscriptions for each tenant
* will be displayed to the user, but this function will only throw an error if it's unable to fetch any subscriptions.
* @param account The account to get the subscriptions for
* @param tenants The list of tenants to get subscriptions for - if undefined then subscriptions for all tenants will be retrieved
* @returns The list of all subscriptions on this account that were able to be retrieved
*/
getSubscriptions(account: Account, tenants?: string[] | undefined): Promise<azureResource.AzureResourceSubscription[]>;
}
export interface IAzureResourceSubscriptionFilterService {