Skip to main content

script_execution_history

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

Overview

Namescript_execution_history
TypeResource
Idazure.hdinsight.script_execution_history

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the script action. Required.
applicationNamestringThe application name of the script action, if any.
debugInformationstringThe script action execution debug information.
endTimestringThe end time of script action execution.
executionSummaryarrayThe summary of script action execution result.
operationstringThe reason why the script action was executed.
parametersstringThe parameters for the script.
rolesarrayThe list of roles where script will be executed. Required.
scriptExecutionIdintegerThe execution id of the script action.
startTimestringThe start time of script action execution.
statusstringThe current execution status of the script action.
uristringThe URI to the script. Required.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_by_clusterselectresource_group_name, cluster_name, subscription_idLists all scripts' execution history for the specified cluster.
promoteexecresource_group_name, cluster_name, script_execution_id, subscription_idPromotes the specified ad-hoc script execution to a persisted script.

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
cluster_namestringThe name of the cluster. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
script_execution_idstringThe script execution Id. Required.
subscription_idstring

SELECT examples

Lists all scripts' execution history for the specified cluster.

SELECT
name,
applicationName,
debugInformation,
endTime,
executionSummary,
operation,
parameters,
roles,
scriptExecutionId,
startTime,
status,
uri
FROM azure.hdinsight.script_execution_history
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND cluster_name = '{{ cluster_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

Lifecycle Methods

Promotes the specified ad-hoc script execution to a persisted script.

EXEC azure.hdinsight.script_execution_history.promote 
@resource_group_name='{{ resource_group_name }}' --required,
@cluster_name='{{ cluster_name }}' --required,
@script_execution_id='{{ script_execution_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;