Support SQL Servers for migrations (#11987)

* Support SQL Servers

* Use function but dont do anything with it for now
This commit is contained in:
Amir Omidi
2020-08-28 12:56:08 -07:00
committed by GitHub
parent d8aa9b8d7f
commit ceb4df5b8b
3 changed files with 12 additions and 8 deletions

View File

@@ -25,11 +25,18 @@ export async function getSubscriptions(account: azdata.Account): Promise<Subscri
}
export type AzureProduct = azureResource.AzureGraphResource;
export type SqlManagedInstance = azureResource.AzureSqlManagedInstanceResource;
export type SqlManagedInstance = azureResource.AzureGraphResource;
export async function getAvailableManagedInstanceProducts(account: azdata.Account, subscription: Subscription): Promise<SqlManagedInstance[]> {
const api = await getAzureCoreAPI();
const result = await api.runGraphQuery<azureResource.AzureSqlManagedInstanceResource>(account, subscription, false, 'where type == "microsoft.sql/managedinstances"');
const result = await api.runGraphQuery<azureResource.AzureGraphResource>(account, subscription, false, 'where type == "microsoft.sql/managedinstances"');
return result.resources;
}
export type SqlServer = azureResource.AzureGraphResource;
export async function getAvailableSqlServers(account: azdata.Account, subscription: Subscription): Promise<SqlServer[]> {
const api = await getAzureCoreAPI();
const result = await api.runGraphQuery<azureResource.AzureGraphResource>(account, subscription, false, 'where type == "microsoft.sql/servers"');
return result.resources;
}