Share via


az image builder error-handler

Manage image builder template error handler.

Commands

Name Description Type Status
az image builder error-handler add

Add error handler to an existing image builder template.

Core GA
az image builder error-handler remove

Remove error handler from an existing image builder template.

Core GA
az image builder error-handler show

Show error handler of an existing image builder template.

Core GA

az image builder error-handler add

Add error handler to an existing image builder template.

Must be used with --defer.

az image builder error-handler add [--defer]
                                   [--ids]
                                   [--name]
                                   [--on-customizer-error {abort, cleanup}]
                                   [--on-validation-error {abort, cleanup}]
                                   [--resource-group]
                                   [--subscription]

Optional Parameters

--defer

Temporarily store the object in the local cache instead of sending to Azure. Use az cache commands to view/clear.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

The name of the image template.

--on-customizer-error

If there is a customizer error and this field is set to "cleanup", the build VM and associated network resources will be cleaned up. This is the default behavior. If there is a customizer error and this field is set to "abort", the build VM will be preserved.

Accepted values: abort, cleanup
--on-validation-error

If there is a validation error and this field is set to "cleanup", the build VM and associated network resources will be cleaned up. This is the default behavior. If there is a validation error and this field is set to "abort", the build VM will be preserved.

Accepted values: abort, cleanup
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az image builder error-handler remove

Remove error handler from an existing image builder template.

Must be used with --defer.

az image builder error-handler remove [--defer]
                                      [--ids]
                                      [--name]
                                      [--resource-group]
                                      [--subscription]

Examples

Remove error handler from an existing image builder template.

az image builder error-handler remove -n myTemplate -g myGroup --defer

Optional Parameters

--defer

Temporarily store the object in the local cache instead of sending to Azure. Use az cache commands to view/clear.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

The name of the image template.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az image builder error-handler show

Show error handler of an existing image builder template.

Must be used with --defer.

az image builder error-handler show [--defer]
                                    [--ids]
                                    [--name]
                                    [--resource-group]
                                    [--subscription]

Examples

Show error handler of an existing image builder template.

az image builder error-handler show -n myTemplate -g myGroup --defer

Optional Parameters

--defer

Temporarily store the object in the local cache instead of sending to Azure. Use az cache commands to view/clear.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

The name of the image template.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.