script_executions
Creates, updates, deletes, gets or lists a script_executions resource.
Overview
| Name | script_executions |
| Type | Resource |
| Id | azure_isv.avs.script_executions |
Fields
The following fields are returned by SELECT queries:
- get
- list
| 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. |
errors | array | Standard error output stream from the powershell execution. |
failureReason | string | Error message if the script was able to run, but if the script itself had errors or powershell threw an exception. |
finishedAt | string (date-time) | Time the script execution was finished. |
hiddenParameters | array | Parameters that will be hidden/not visible to ARM, such as passwords and credentials. |
information | array | Standard information out stream from the powershell execution. |
namedOutputs | object | User-defined dictionary. |
output | array | Standard output stream from the powershell execution. |
parameters | array | Parameters the script will accept. |
provisioningState | string | The state of the script execution resource. Known values are: "Succeeded", "Failed", "Canceled", "Pending", "Running", "Cancelling", "Cancelled", and "Deleting". (Succeeded, Failed, Canceled, Pending, Running, Cancelling, Cancelled, Deleting) |
retention | string | Time to live for the resource. If not provided, will be available for 60 days. |
scriptCmdletId | string | A reference to the script cmdlet resource if user is running a AVS script. |
startedAt | string (date-time) | Time the script execution was started. |
submittedAt | string (date-time) | Time the script execution was submitted. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
timeout | string | Time limit for execution. Required. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
warnings | array | Standard warning out stream from the powershell execution. |
| 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. |
errors | array | Standard error output stream from the powershell execution. |
failureReason | string | Error message if the script was able to run, but if the script itself had errors or powershell threw an exception. |
finishedAt | string (date-time) | Time the script execution was finished. |
hiddenParameters | array | Parameters that will be hidden/not visible to ARM, such as passwords and credentials. |
information | array | Standard information out stream from the powershell execution. |
namedOutputs | object | User-defined dictionary. |
output | array | Standard output stream from the powershell execution. |
parameters | array | Parameters the script will accept. |
provisioningState | string | The state of the script execution resource. Known values are: "Succeeded", "Failed", "Canceled", "Pending", "Running", "Cancelling", "Cancelled", and "Deleting". (Succeeded, Failed, Canceled, Pending, Running, Cancelling, Cancelled, Deleting) |
retention | string | Time to live for the resource. If not provided, will be available for 60 days. |
scriptCmdletId | string | A reference to the script cmdlet resource if user is running a AVS script. |
startedAt | string (date-time) | Time the script execution was started. |
submittedAt | string (date-time) | Time the script execution was submitted. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
timeout | string | Time limit for execution. Required. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
warnings | array | Standard warning out stream from the powershell execution. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, private_cloud_name, script_execution_name, subscription_id | Get a ScriptExecution. | |
list | select | resource_group_name, private_cloud_name, subscription_id | List ScriptExecution resources by PrivateCloud. | |
create_or_update | insert | resource_group_name, private_cloud_name, script_execution_name, subscription_id | Create a ScriptExecution. | |
create_or_update | replace | resource_group_name, private_cloud_name, script_execution_name, subscription_id | Create a ScriptExecution. | |
delete | delete | resource_group_name, private_cloud_name, script_execution_name, subscription_id | Delete a ScriptExecution. | |
get_execution_logs | exec | resource_group_name, private_cloud_name, script_execution_name, subscription_id | Return the logs for a script execution resource. |
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 |
|---|---|---|
private_cloud_name | string | Name of the private cloud. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
script_execution_name | string | Name of the script cmdlet. Required. |
subscription_id | string |
SELECT examples
- get
- list
Get a ScriptExecution.
SELECT
id,
name,
errors,
failureReason,
finishedAt,
hiddenParameters,
information,
namedOutputs,
output,
parameters,
provisioningState,
retention,
scriptCmdletId,
startedAt,
submittedAt,
systemData,
timeout,
type,
warnings
FROM azure_isv.avs.script_executions
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND private_cloud_name = '{{ private_cloud_name }}' -- required
AND script_execution_name = '{{ script_execution_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List ScriptExecution resources by PrivateCloud.
SELECT
id,
name,
errors,
failureReason,
finishedAt,
hiddenParameters,
information,
namedOutputs,
output,
parameters,
provisioningState,
retention,
scriptCmdletId,
startedAt,
submittedAt,
systemData,
timeout,
type,
warnings
FROM azure_isv.avs.script_executions
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND private_cloud_name = '{{ private_cloud_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Create a ScriptExecution.
INSERT INTO azure_isv.avs.script_executions (
properties,
resource_group_name,
private_cloud_name,
script_execution_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ private_cloud_name }}',
'{{ script_execution_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: script_executions
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the script_executions resource.
- name: private_cloud_name
value: "{{ private_cloud_name }}"
description: Required parameter for the script_executions resource.
- name: script_execution_name
value: "{{ script_execution_name }}"
description: Required parameter for the script_executions resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the script_executions resource.
- name: properties
description: |
The resource-specific properties for this resource.
value:
scriptCmdletId: "{{ scriptCmdletId }}"
parameters:
- type: "{{ type }}"
name: "{{ name }}"
hiddenParameters:
- type: "{{ type }}"
name: "{{ name }}"
failureReason: "{{ failureReason }}"
timeout: "{{ timeout }}"
retention: "{{ retention }}"
submittedAt: "{{ submittedAt }}"
startedAt: "{{ startedAt }}"
finishedAt: "{{ finishedAt }}"
provisioningState: "{{ provisioningState }}"
output:
- "{{ output }}"
namedOutputs: "{{ namedOutputs }}"
information:
- "{{ information }}"
warnings:
- "{{ warnings }}"
errors:
- "{{ errors }}"
REPLACE examples
- create_or_update
Create a ScriptExecution.
REPLACE azure_isv.avs.script_executions
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND private_cloud_name = '{{ private_cloud_name }}' --required
AND script_execution_name = '{{ script_execution_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;
DELETE examples
- delete
Delete a ScriptExecution.
DELETE FROM azure_isv.avs.script_executions
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND private_cloud_name = '{{ private_cloud_name }}' --required
AND script_execution_name = '{{ script_execution_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- get_execution_logs
Return the logs for a script execution resource.
EXEC azure_isv.avs.script_executions.get_execution_logs
@resource_group_name='{{ resource_group_name }}' --required,
@private_cloud_name='{{ private_cloud_name }}' --required,
@script_execution_name='{{ script_execution_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;