Пример #1
0
        public async Task <IHaveModels <Resource> > FindByTypeAsync(string subscriptionId, ResourceType resourceType)
        {
            string filter = $"$filter=resourcetype eq '{resourceType.GetDescription()}'";
            var    url    =
                $"https://management.azure.com/subscriptions/{subscriptionId}/resources?api-version=2019-10-01&{filter}";
            var results = await Utility.GetResourceAsync <ResourceList>(url, Token)
                          .ConfigureAwait(false);

            //var value = results.Value.Where(x=>x.Type ==  resourceType.GetDescription());
            //results.Value = value.ToList();
            return(results);
        }