scenario_runs
Creates, updates, deletes, gets or lists a scenario_runs resource.
Overview
| Name | scenario_runs |
| Type | Resource |
| Id | azure.chaos.scenario_runs |
Fields
The following fields are returned by SELECT queries:
- get
- list_all
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
endTime | string (date-time) | When the scenario run was completed. |
errors | array | System or infrastructure errors encountered during the scenario run. |
executionErrors | object | Business errors from fault injection — permission and resource state issues. |
managedIdentityPrincipalId | string | The principal id for the managed identity used for the run. Required. |
resources | array | All resources discovered for the scenario run. Required. |
scenarioConfigurationName | string | The scenario configuration name. Required. |
scenarioName | string | The scenario name. Required. |
scenarioRunJson | string | The scenario run json. |
scenarioRunSummary | array | The scenario run summary. |
startTime | string (date-time) | When the scenario run was started. Required. |
status | string | The scenario run status. Required. Known values are: "Queued", "Resolving", "Generating", "Validating", "ValidationSucceeded", "Starting", "Preparing", "Running", "CleaningUp", "Canceling", "Canceled", "Succeeded", and "Failed". (Queued, Resolving, Generating, Validating, ValidationSucceeded, Starting, Preparing, Running, CleaningUp, Canceling, Canceled, Succeeded, Failed) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
workspaceName | string | The workspace name. Required. |
zoneResolution | object | Zone resolution information. Present when the scenario configuration used physical zone targeting (physicalZones). Contains the mode, requested physical zones, and per-subscription logical zone mappings. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
endTime | string (date-time) | When the scenario run was completed. |
errors | array | System or infrastructure errors encountered during the scenario run. |
executionErrors | object | Business errors from fault injection — permission and resource state issues. |
managedIdentityPrincipalId | string | The principal id for the managed identity used for the run. Required. |
resources | array | All resources discovered for the scenario run. Required. |
scenarioConfigurationName | string | The scenario configuration name. Required. |
scenarioName | string | The scenario name. Required. |
scenarioRunJson | string | The scenario run json. |
scenarioRunSummary | array | The scenario run summary. |
startTime | string (date-time) | When the scenario run was started. Required. |
status | string | The scenario run status. Required. Known values are: "Queued", "Resolving", "Generating", "Validating", "ValidationSucceeded", "Starting", "Preparing", "Running", "CleaningUp", "Canceling", "Canceled", "Succeeded", and "Failed". (Queued, Resolving, Generating, Validating, ValidationSucceeded, Starting, Preparing, Running, CleaningUp, Canceling, Canceled, Succeeded, Failed) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
workspaceName | string | The workspace name. Required. |
zoneResolution | object | Zone resolution information. Present when the scenario configuration used physical zone targeting (physicalZones). Contains the mode, requested physical zones, and per-subscription logical zone mappings. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, workspace_name, scenario_name, run_id, subscription_id | Get a scenario run. Get a scenario run. | |
list_all | select | resource_group_name, workspace_name, scenario_name, subscription_id | Get a list of scenario runs. | |
cancel | exec | resource_group_name, workspace_name, scenario_name, run_id, subscription_id | Cancel the currently running scenario execution. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
run_id | string | The name of the ScenarioRun. Required. |
scenario_name | string | Name of the scenario. Required. |
subscription_id | string | |
workspace_name | string | String that represents a Workspace resource name. Required. |
SELECT examples
- get
- list_all
Get a scenario run. Get a scenario run.
SELECT
id,
name,
endTime,
errors,
executionErrors,
managedIdentityPrincipalId,
resources,
scenarioConfigurationName,
scenarioName,
scenarioRunJson,
scenarioRunSummary,
startTime,
status,
systemData,
type,
workspaceName,
zoneResolution
FROM azure.chaos.scenario_runs
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND workspace_name = '{{ workspace_name }}' -- required
AND scenario_name = '{{ scenario_name }}' -- required
AND run_id = '{{ run_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Get a list of scenario runs.
SELECT
id,
name,
endTime,
errors,
executionErrors,
managedIdentityPrincipalId,
resources,
scenarioConfigurationName,
scenarioName,
scenarioRunJson,
scenarioRunSummary,
startTime,
status,
systemData,
type,
workspaceName,
zoneResolution
FROM azure.chaos.scenario_runs
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND workspace_name = '{{ workspace_name }}' -- required
AND scenario_name = '{{ scenario_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lifecycle Methods
- cancel
Cancel the currently running scenario execution.
EXEC azure.chaos.scenario_runs.cancel
@resource_group_name='{{ resource_group_name }}' --required,
@workspace_name='{{ workspace_name }}' --required,
@scenario_name='{{ scenario_name }}' --required,
@run_id='{{ run_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;