in src/handlers/resourceValidator.ts [115:135]
private async getFunctionappSku(state: StateConstant, appService: AzureAppService): Promise<FunctionSkuConstant> {
let configSettings;
try {
configSettings = await appService.get(true);
} catch (expt) {
throw new AzureResourceError(state, 'Get Function App SKU', 'Failed to get site config', expt);
}
if (configSettings === undefined || configSettings.properties === undefined) {
throw new AzureResourceError(state, 'Get Function App SKU', 'Function app sku should not be empty');
}
Logger.Info('Successfully acquired site configs from function app!');
for (const key in configSettings.properties) {
Logger.Debug(`- ${key} = ${configSettings.properties[key]}`);
}
const result: FunctionSkuConstant = FunctionSkuUtil.FromString(configSettings.properties.sku);
Logger.Info(`Detected function app sku: ${FunctionSkuConstant[result]}`);
return result;
}