Skip to main content

scenario_runs

Creates, updates, deletes, gets or lists a scenario_runs resource.

Overview

Namescenario_runs
TypeResource
Idazure.chaos.scenario_runs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
endTimestring (date-time)When the scenario run was completed.
errorsarraySystem or infrastructure errors encountered during the scenario run.
executionErrorsobjectBusiness errors from fault injection — permission and resource state issues.
managedIdentityPrincipalIdstringThe principal id for the managed identity used for the run. Required.
resourcesarrayAll resources discovered for the scenario run. Required.
scenarioConfigurationNamestringThe scenario configuration name. Required.
scenarioNamestringThe scenario name. Required.
scenarioRunJsonstringThe scenario run json.
scenarioRunSummaryarrayThe scenario run summary.
startTimestring (date-time)When the scenario run was started. Required.
statusstringThe 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)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
workspaceNamestringThe workspace name. Required.
zoneResolutionobjectZone 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:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, workspace_name, scenario_name, run_id, subscription_idGet a scenario run. Get a scenario run.
list_allselectresource_group_name, workspace_name, scenario_name, subscription_idGet a list of scenario runs.
cancelexecresource_group_name, workspace_name, scenario_name, run_id, subscription_idCancel 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.

NameDatatypeDescription
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
run_idstringThe name of the ScenarioRun. Required.
scenario_namestringName of the scenario. Required.
subscription_idstring
workspace_namestringString that represents a Workspace resource name. Required.

SELECT examples

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
;

Lifecycle Methods

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
;