You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Additional override sections (all APIOps Toolkit sections are supported):
77
+
# policies:
78
+
# - name: policy
79
+
# properties:
80
+
# format: rawxml
81
+
# gateways:
82
+
# - name: my-gateway
83
+
# properties:
84
+
# locationData:
85
+
# name: "gateway location"
86
+
# versionSets:
87
+
# - name: my-version-set
88
+
# properties:
89
+
# displayName: "My Version Set"
90
+
# groups:
91
+
# - name: my-group
92
+
# properties:
93
+
# displayName: "My Group"
94
+
# subscriptions:
95
+
# - name: my-subscription
96
+
# properties:
97
+
# displayName: "My Subscription"
98
+
# products:
99
+
# - name: my-product
100
+
# properties:
101
+
# displayName: "My Product"
102
+
# tags:
103
+
# - name: my-tag
104
+
# properties:
105
+
# displayName: "My Tag"
106
+
# policyFragments:
107
+
# - name: my-fragment
108
+
# properties:
109
+
# description: "My Policy Fragment"
68
110
```
69
111
70
112
## Override capabilities by resource type
71
113
114
+
Override properties are generic — any ARM resource property can be overridden. The examples below show common use cases per resource type, but you're not limited to these properties.
| `resourceId` | `string` | Azure resource ID of the logging target (for example, Application Insights) |
152
-
| `credentials` | `object` | Credentials for the logging service |
207
+
### Service-level policies
208
+
209
+
```yaml
210
+
policies:
211
+
- name: policy
212
+
properties:
213
+
format: rawxml
214
+
```
215
+
216
+
### All other resource types
217
+
218
+
Overrides are also supported for: `gateways`, `versionSets`, `groups`, `subscriptions`, `products`, `tags`, `policyFragments`, and `workspaces`. Each uses the same `name` + `properties` format:
Copy file name to clipboardExpand all lines: docs/guides/filtering-resources.md
+52-4Lines changed: 52 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,9 +69,57 @@ namedValues:
69
69
70
70
**Rules:**
71
71
- Each field is optional — omit it to extract all resources of that type
72
-
- Each field must be an array of strings (validated at load time)
73
-
- Names are case-sensitive and must match the APIM resource name exactly
72
+
- Simple fields must be an array of strings
73
+
-`apis` and `workspaces` also accept nested object entries for sub-resource filtering (see below)
74
+
- Names are matched case-insensitively against APIM resource names
74
75
- An empty file extracts everything (same as no filter)
76
+
- An empty array (`[]`) excludes ALL resources of that type
77
+
78
+
---
79
+
80
+
## Nested Sub-Resource Filtering
81
+
82
+
### API sub-resource filters
83
+
84
+
For APIs, you can control which sub-resources (operations, diagnostics, schemas, releases) are extracted. Use an object entry instead of a plain string:
85
+
86
+
```yaml
87
+
apis:
88
+
- petstore-api # Simple: include all sub-resources
89
+
- orders-api: # Nested: control sub-resources
90
+
operations:
91
+
- get-order
92
+
- create-order
93
+
diagnostics:
94
+
- applicationinsights
95
+
schemas: [] # Empty = exclude ALL schemas
96
+
releases:
97
+
- v1-release
98
+
```
99
+
100
+
**Sub-filter rules:**
101
+
- If a sub-resource key is **omitted**, all sub-resources of that type are included
102
+
- If a sub-resource key is an **empty array** (`[]`), all sub-resources of that type are excluded
103
+
- If a sub-resource key lists **names**, only those sub-resources are included
104
+
105
+
### Workspace sub-resource filters
106
+
107
+
For workspaces, you can specify which workspace-scoped resources to extract:
108
+
109
+
```yaml
110
+
workspaces:
111
+
- team-a-workspace: # Nested: control workspace resources
112
+
apis:
113
+
- team-api-1
114
+
- team-api-2
115
+
backends:
116
+
- team-backend
117
+
namedValues:
118
+
- team-api-key
119
+
- team-b-workspace # Simple: extract all resources
@@ -224,8 +272,8 @@ There is no "exclude" syntax. To extract everything except certain resources, li
224
272
- **Start broad, narrow later** — Begin with no filter to see what's in your APIM instance, then create a filter for your team's slice
225
273
- **One filter per team** — In multi-team setups, each team maintains its own `configuration.extractor.yaml`
226
274
- **Commit the filter file** — Keep it in version control alongside your artifacts so CI/CD pipelines can use it
227
-
- **Case-sensitive names** — Filter values must match APIM resource names exactly (usually lowercase with hyphens)
228
-
- **Validate early** — The config loader validates that each filter field is an array of strings and will throw `Failed to load filter config` on invalid YAML
275
+
- **Case-insensitive matching** — Filter values are matched case-insensitively against APIM resource names
276
+
- **Validate early** — The config loader validates filter entries and will throw `Failed to load filter config` on invalid YAML. Unknown top-level keys produce a warning.
0 commit comments