Skip to main content

script_execution_histories

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

Overview

Namescript_execution_histories
TypeResource
Idazure.hdinsight.script_execution_histories

Fields

The following fields are returned by SELECT queries:

OK response definition.

NameDatatypeDescription
namestringThe name of the script action.
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.
scriptExecutionIdinteger (int64)The 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.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_by_clusterselectsubscriptionId, resourceGroupName, clusterNameLists all scripts' execution history for the specified cluster.
promoteexecsubscriptionId, resourceGroupName, clusterName, scriptExecutionIdPromotes 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
clusterNamestringThe name of the cluster.
resourceGroupNamestringThe name of the resource group.
scriptExecutionIdstringThe script execution Id
subscriptionIdstringThe subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

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_histories
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND clusterName = '{{ clusterName }}' -- required
;

Lifecycle Methods

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

EXEC azure.hdinsight.script_execution_histories.promote 
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@clusterName='{{ clusterName }}' --required,
@scriptExecutionId='{{ scriptExecutionId }}' --required
;