az image builder customizer
Manage image builder template customizers.
Commands
Name | Description | Type | Status |
---|---|---|---|
az image builder customizer add |
Add an image builder customizer to an image builder template. |
Core | GA |
az image builder customizer clear |
Remove all image builder customizers from an image builder template. |
Core | GA |
az image builder customizer remove |
Remove an image builder customizer from an image builder template. |
Core | GA |
az image builder customizer add
Add an image builder customizer to an image builder template.
Must be used with --defer.
az image builder customizer add --customizer-name
--type {file, powershell, shell, windows-restart, windows-update}
[--defer]
[--dest-path]
[--exit-codes]
[--file-source]
[--filters]
[--ids]
[--inline-script]
[--name]
[--resource-group]
[--restart-check-command]
[--restart-command]
[--restart-timeout]
[--script-url]
[--search-criteria]
[--subscription]
[--update-limit]
Examples
Add an inline shell customizer to an image template in the cli object cache
az image builder customizer add -n myTemplate -g myGroup \
--inline-script "sudo mkdir /buildArtifacts" \
"sudo cp /tmp/index.html /buildArtifacts/index.html" \
--customizer-name shellScriptInline --type shell --defer
Add a file customizer to an image template in the cli object cache
az image builder customizer add -n myTemplate -g myGroup \
--customizer-name myFile --type file \
--file-source "https://my-remote-file.html" --dest-path "/tmp/index.html" --defer
Add a windows restart customizer to an image template in the cli object cache
az image builder customizer add -n myTemplate -g myGroup \
--customizer-name shellScriptUrl \
--restart-check-command "echo Azure-Image-Builder-Restarted-the-VM > \
c:\buildArtifacts\restart.txt" \
--type windows-restart --restart-timeout 10m --defer
Add a windows update customizer to an image template in the cli object cache.
az image builder customizer add -n myTemplate -g myGroup --customizer-name winUpdate --type windows-update --search-criteria IsInstalled=0 --filters "exclude:\$_.Title -like \'*Preview*\'" "include:\$true" --update-limit 20 --defer
Required Parameters
Name of the customizer.
Type of customizer to be added to the image template.
Optional Parameters
Temporarily store the object in the local cache instead of sending to Azure. Use az cache
commands to view/clear.
The absolute destination path where the file specified in --file-source will be downloaded to in the image.
Space-separated list of valid exit codes, as integers.
The URI of the file to be downloaded into the image. It can be a github link, SAS URI for Azure Storage, etc.
Space delimited filters to select updates to apply. Omit or specify empty array to use the default (no filter).
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.
Space-separated list of inline script lines to customize the image with.
The name of the image template.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Command to verify that restart succeeded.
Command to execute the restart operation.
Restart timeout specified as a string consisting of a magnitude and unit, e.g. '5m' (5 minutes) or '2h' (2 hours).
URL of script to customize the image with. The URL must be publicly accessible.
Criteria to search updates. Omit or specify empty string to use the default (search all). Refer to above link for examples and detailed description of this field.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Maximum number of updates to apply at a time. Omit or specify 0 to use the default (1000).
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az image builder customizer clear
Remove all image builder customizers from an image builder template.
Must be used with --defer.
az image builder customizer clear [--defer]
[--ids]
[--name]
[--resource-group]
[--subscription]
Optional Parameters
Temporarily store the object in the local cache instead of sending to Azure. Use az cache
commands to view/clear.
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.
The name of the image template.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az image builder customizer remove
Remove an image builder customizer from an image builder template.
Must be used with --defer.
az image builder customizer remove --customizer-name
[--defer]
[--ids]
[--name]
[--resource-group]
[--subscription]
Required Parameters
Name of the customizer.
Optional Parameters
Temporarily store the object in the local cache instead of sending to Azure. Use az cache
commands to view/clear.
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.
The name of the image template.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Azure CLI