Skip to content

Commit 5a9a4be

Browse files
committed
add filter/query tip
1 parent 2cda310 commit 5a9a4be

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

articles/chaos-studio/chaos-studio-samples-rest-api.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,14 @@ For example, if you want a summary of all the Chaos Studio targets active in you
165165
az graph query -q "chaosresources | where type == 'microsoft.chaos/targets' | summarize count() by resourceGroup"
166166
```
167167

168+
### Filtering and querying
169+
170+
Like other Azure CLI commands, you can use the `--query` and `--filter` parameters with the Azure CLI `rest` commands. For example, to see a table of available capability types for a specific target type, use the following command:
171+
172+
```azurecli
173+
az rest --method get --url "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes/{targetType}/capabilityTypes?api-version=2023-11-01" --output table --query 'value[].{name:name, faultType:properties.runtimeProperties.kind, urn:properties.urn}'
174+
```
175+
168176
## Parameter definitions
169177

170178
This section describes the parameters used throughout this document and how you can fill them in.

0 commit comments

Comments
 (0)