az connectedmachine extension
Note
This reference is part of the connectedmachine extension for the Azure CLI (version 2.15.0 or higher). The extension will automatically install the first time you run an az connectedmachine extension command. Learn more about extensions.
Manage machine extension with connectedmachine.
Commands
az connectedmachine extension create |
The operation to Create the extension. |
az connectedmachine extension delete |
The operation to delete the extension. |
az connectedmachine extension list |
The operation to get all extensions of a non-Azure machine. |
az connectedmachine extension show |
The operation to get the extension. |
az connectedmachine extension update |
The operation to create or update the extension. |
az connectedmachine extension wait |
Place the CLI in a waiting state until a condition of the connectedmachine extension is met. |
az connectedmachine extension create
The operation to Create the extension.
az connectedmachine extension create --machine-name
--name
--resource-group
[--auto-upgrade-minor {false, true}]
[--enable-auto-upgrade {false, true}]
[--force-update-tag]
[--inst-handler-version]
[--instance-view-type]
[--location]
[--no-wait]
[--protected-settings]
[--publisher]
[--settings]
[--status]
[--tags]
[--type]
[--type-handler-version]
Examples
Create or Update a Machine Extension
az connectedmachine extension create --name "CustomScriptExtension" --location "eastus2euap" --type "CustomScriptExtension" --publisher "Microsoft.Compute" --settings '{"commandToExecute":"hostname"}' --type-handler-version "1.10" --machine-name "myMachine" --resource-group "myResourceGroup"
Required Parameters
The name of the machine where the extension should be created or updated.
The name of the machine extension.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Indicate whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.
Indicate whether the extension should be automatically upgraded by the platform if there is a newer version available.
How the extension handler should be forced to update even if the extension configuration has not changed.
Specify the version of the script handler.
Specify the type of the extension; an example is "CustomScriptExtension".
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
Do not wait for the long-running operation to finish.
The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. Expected value: json-string/json-file/@json-file.
The name of the extension handler publisher.
Json formatted public settings for the extension. Expected value: json-string/json-file/@json-file.
Instance view status.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Specify the type of the extension; an example is "CustomScriptExtension".
Specify the version of the script handler.
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 connectedmachine extension delete
The operation to delete the extension.
az connectedmachine extension delete [--ids]
[--machine-name]
[--name]
[--no-wait]
[--resource-group]
[--subscription]
[--yes]
Examples
Delete a Machine Extension
az connectedmachine extension delete --name "MMA" --machine-name "myMachine" --resource-group "myResourceGroup"
Optional Parameters
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 machine where the extension should be deleted.
The name of the machine extension.
Do not wait for the long-running operation to finish.
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
.
Do not prompt for confirmation.
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 connectedmachine extension list
The operation to get all extensions of a non-Azure machine.
az connectedmachine extension list --machine-name
--resource-group
[--expand]
Examples
Get all Machine Extensions
az connectedmachine extension list --machine-name "myMachine" --resource-group "myResourceGroup"
Required Parameters
The name of the machine containing the extension.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The expand expression to apply on the operation.
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 connectedmachine extension show
The operation to get the extension.
az connectedmachine extension show [--ids]
[--machine-name]
[--name]
[--resource-group]
[--subscription]
Examples
Get Machine Extension
az connectedmachine extension show --name "CustomScriptExtension" --machine-name "myMachine" --resource-group "myResourceGroup"
Optional Parameters
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 machine containing the extension.
The name of the machine extension.
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
.
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 connectedmachine extension update
The operation to create or update the extension.
az connectedmachine extension update [--auto-upgrade-minor {false, true}]
[--enable-auto-upgrade {false, true}]
[--force-update-tag]
[--ids]
[--machine-name]
[--name]
[--no-wait]
[--protected-settings]
[--publisher]
[--resource-group]
[--settings]
[--subscription]
[--tags]
[--type]
[--type-handler-version]
Examples
Create or Update a Machine Extension
az connectedmachine extension update --name "CustomScriptExtension" --type "CustomScriptExtension" --publisher "Microsoft.Compute" --settings '{"commandToExecute":"hostname"}' --type-handler-version "1.10" --machine-name "myMachine" --resource-group "myResourceGroup"
Optional Parameters
Indicate whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.
Indicate whether the extension should be automatically upgraded by the platform if there is a newer version available.
How the extension handler should be forced to update even if the extension configuration has not changed.
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 machine where the extension should be created or updated.
The name of the machine extension.
Do not wait for the long-running operation to finish.
The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. Expected value: json-string/json-file/@json-file.
The name of the extension handler publisher.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Json formatted public settings for the extension. Expected value: json-string/json-file/@json-file.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Specify the type of the extension; an example is "CustomScriptExtension".
Specify the version of the script handler.
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 connectedmachine extension wait
Place the CLI in a waiting state until a condition of the connectedmachine extension is met.
az connectedmachine extension wait [--created]
[--custom]
[--deleted]
[--exists]
[--ids]
[--interval]
[--machine-name]
[--name]
[--resource-group]
[--subscription]
[--timeout]
[--updated]
Examples
Pause executing next line of CLI script until the connectedmachine extension is successfully created.
az connectedmachine extension wait --name "CustomScriptExtension" --machine-name "myMachine" --resource-group "myResourceGroup" --created
Pause executing next line of CLI script until the connectedmachine extension is successfully updated.
az connectedmachine extension wait --name "CustomScriptExtension" --machine-name "myMachine" --resource-group "myResourceGroup" --updated
Pause executing next line of CLI script until the connectedmachine extension is successfully deleted.
az connectedmachine extension wait --name "CustomScriptExtension" --machine-name "myMachine" --resource-group "myResourceGroup" --deleted
Optional Parameters
Wait until created with 'provisioningState' at 'Succeeded'.
Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].
Wait until deleted.
Wait until the resource exists.
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.
Polling interval in seconds.
The name of the machine containing the extension.
The name of the machine extension.
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
.
Maximum wait in seconds.
Wait until updated with provisioningState at 'Succeeded'.
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.
Feedback
Submit and view feedback for