public override GraphQueryBuilder DefineQuery(ResourceCriteriaDefinition criteria)
        {
            var graphQueryBuilder = base.DefineQuery(criteria)
                                    .Where("kind", Operator.DoesNotContain, "functionapp");

            return(graphQueryBuilder);
        }
示例#2
0
        public virtual GraphQueryBuilder DefineQuery(ResourceCriteriaDefinition criteriaDefinition)
        {
            Guard.NotNull(criteriaDefinition, nameof(criteriaDefinition));
            Guard.NotNull(criteriaDefinition.Include, nameof(criteriaDefinition.Include));

            var graphQueryBuilder = GraphQueryBuilder.ForResourceType(ResourceTypes)
                                    .WithSubscriptionsWithIds(criteriaDefinition.Include.Subscriptions) // Filter on queried subscriptions defined in landscape
                                    .WithResourceGroupsWithName(criteriaDefinition.Include.ResourceGroups)
                                    .WithinRegions(criteriaDefinition.Include.Regions)
                                    .WithTags(criteriaDefinition.Include.Tags)
                                    .Project(ProjectedFieldNames);

            return(graphQueryBuilder);
        }