internal async Task <IEnumerable <string> > ListInResourceGroupAsync(string resourceGroup)
        {
            var apps = await azure.AppServices.FunctionApps.ListByResourceGroupAsync(resourceGroup);

            var result = new List <string>();

            foreach (var app in apps)
            {
                result.Add(
                    InstanceName.FromFunctionAppName(app.Name).PlainName);
            }
            return(result);
        }
        internal async Task <IEnumerable <ILogDataObject> > ListInResourceGroupAsync(string resourceGroup, CancellationToken cancellationToken)
        {
            var runtime = new FunctionRuntimePackage(logger);
            var apps    = await azure.AppServices.FunctionApps.ListByResourceGroupAsync(resourceGroup, cancellationToken : cancellationToken);

            var result = new List <InstanceOutputData>();

            foreach (var app in apps)
            {
                cancellationToken.ThrowIfCancellationRequested();
                var name = InstanceName.FromFunctionAppName(app.Name, resourceGroup);
                result.Add(new InstanceOutputData(
                               name.PlainName,
                               app.Region.Name,
                               await runtime.GetDeployedRuntimeVersion(name, azure, cancellationToken))
                           );
            }
            return(result);
        }