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
If you're integrating Azure Chaos Studio into your CI/CD pipelines, or you simply prefer to use direct API calls to interact with your Azure resources, you can use Chaos Studio's REST API. For the full API reference, visit the [Azure Chaos Studio REST API reference](/rest/api/chaosstudio/). This page provides samples for using the REST API effectively, and is not intended as a comprehensive reference.
16
16
17
-
This article assumes you're using Azure CLI to execute these commands, but you can adapt them to other standard REST clients.
17
+
This article assumes you're using [Azure CLI](/azure-docs-cli/docs-ref-conceptual/install-azure-cli-windows.md) to execute these commands, but you can adapt them to other standard REST clients.
18
18
19
19
20
20
You can use the Chaos Studio REST APIs to:
@@ -54,13 +54,13 @@ These operations help you see what [targets and capabilities](chaos-studio-targe
54
54
### List all target types available in a region
55
55
56
56
```azurecli
57
-
az rest --method get --url "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/targetTypes?api-version={apiVersion}"
57
+
az rest --method get --url "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes?api-version={apiVersion}"
58
58
```
59
59
60
60
### List all capabilities available for a target type
61
61
62
62
```azurecli
63
-
az rest --method get --url "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/targetTypes/{targetType}/capabilityTypes?api-version={apiVersion}"
63
+
az rest --method get --url "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes/{targetType}/capabilityTypes?api-version={apiVersion}"
64
64
```
65
65
66
66
### Enable a resource as a target
@@ -173,9 +173,10 @@ This section describes the parameters used throughout this document and how you
173
173
| --- | --- | --- | --- |
174
174
| {apiVersion} | Version of the API to use when you execute the command provided | Can be found in the [API documentation](/rest/api/chaosstudio/)|`2023-11-01`|
175
175
| {experimentId} | Azure Resource ID for the experiment | Can be found on the [Chaos Studio Experiment page](https://portal.azure.com/#blade/HubsExtension/BrowseResource/resourceType/Microsoft.chaos%2Fchaosexperiments)|`/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/my-resource-group/providers/Microsoft.Chaos/experiments/my-chaos-experiment`|
176
-
| {experimentName.json} | JSON that contains the configuration of the chaos experiment | Generated by the user | See [a CLI tutorial](chaos-studio-tutorial-service-direct-cli.md) for a JSON example |
177
-
| {subscriptionId} | Subscription ID where the target resource is located | Can be found on the [Subscriptions page](https://portal.azure.com/#blade/Microsoft_Azure_Billing/SubscriptionsBlade)|`6b052e15-03d3-4f17-b2e1-be7f07588291`|
178
-
| {resourceGroupName} | Name of the resource group where the target resource is located | Can be found on the [Resource groups page](https://portal.azure.com/#blade/HubsExtension/BrowseResourceGroups)|`my-resource-group`|
179
-
| {executionDetailsId} | Execution ID of an experiment execution | Can be found on the [Chaos Studio Experiment page](https://portal.azure.com/#blade/HubsExtension/BrowseResource/resourceType/Microsoft.chaos%2Fchaosexperiments)|`C69E7FCD-1548-47E5-9DDA-92A5DD60E610`|
180
-
| {targetType} | Type of target for the corresponding resource | Can be found in the [Fault providers list](chaos-studio-fault-providers.md)|`Microsoft-VirtualMachine`|
181
-
| {capabilityName} | Name of an individual capability resource, extending a target resource | Can be found in the [fault reference documentation](chaos-studio-fault-library.md)|`Shutdown-1.0`|
176
+
| {experimentName.json} | JSON that contains the configuration of the chaos experiment | Generated by the user |`experiment.json` (See [a CLI tutorial](chaos-studio-tutorial-service-direct-cli.md) for a full example file) |
177
+
| {subscriptionId} | Subscription ID where the target resource is located | Find in the [Azure portal Subscriptions page](https://portal.azure.com/#blade/Microsoft_Azure_Billing/SubscriptionsBlade) or by running `az account list --output table`|`6b052e15-03d3-4f17-b2e1-be7f07588291`|
178
+
| {resourceGroupName} | Name of the resource group where the target resource is located | Find in the [Resource Groups page](https://portal.azure.com/#blade/HubsExtension/BrowseResourceGroups) or by running `az group list --output table`|`my-resource-group`|
179
+
| {executionDetailsId} | Execution ID of an experiment execution | Find in the [Chaos Studio Experiment page](https://portal.azure.com/#blade/HubsExtension/BrowseResource/resourceType/Microsoft.chaos%2Fchaosexperiments) or with a [GET call](#get-all-executions-of-an-experiment) to the `/executions` endpoint |`C69E7FCD-1548-47E5-9DDA-92A5DD60E610`|
180
+
| {targetType} | Type of target for the corresponding resource | Find in the [Fault providers list](chaos-studio-fault-providers.md) or a [GET call](#list-all-target-types-available-in-a-region) to the `/locations/{locationName}/targetTypes` endpoint |`Microsoft-VirtualMachine`|
181
+
| {capabilityName} | Name of an individual capability resource, extending a target resource | Find in the [fault reference documentation](chaos-studio-fault-library.md) or with a [GET call](#list-all-capabilities-available-for-a-target-type) to the `capabilityTypes` endpoint |`Shutdown-1.0`|
182
+
| {locationName} | Azure region for a resource or regional endpoint | Find all possible regions for your account with `az account list-locations --output table`|`eastus`|
0 commit comments