Machine Extensions - Update
The operation to create or update the extension.
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}?api-version=2026-09-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
extension
|
path | True |
string |
The name of the machine extension. |
|
machine
|
path | True |
string minLength: 1maxLength: 54 pattern: ^[a-zA-Z0-9-_\.]{1,54}$ |
The name of the hybrid machine. |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
|
subscription
|
path | True |
string (uuid) |
The ID of the target subscription. The value must be an UUID. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Body
| Name | Type | Description |
|---|---|---|
| properties.autoUpgradeMinorVersion |
boolean |
Indicates 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. |
| properties.enableAutomaticUpgrade |
boolean |
Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. |
| properties.forceUpdateTag |
string |
How the extension handler should be forced to update even if the extension configuration has not changed. |
| properties.protectedSettings |
management.azure.com.hybridcompute.machineextensions.update |
The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. |
| properties.publisher |
string |
The name of the extension handler publisher. |
| properties.settings |
management.azure.com.hybridcompute.machineextensions.update |
Json formatted public settings for the extension. |
| properties.type |
string |
Specifies the type of the extension; an example is "CustomScriptExtension". |
| properties.typeHandlerVersion |
string |
Specifies the version of the script handler. |
| tags |
object |
Resource tags |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Azure operation completed successfully. |
|
| 202 Accepted |
Resource update request accepted. Headers
|
|
| Other Status Codes |
An unexpected error response. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| user_impersonation | impersonate your user account |
Examples
Create or Update a Machine Extension
Sample request
PATCH https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/machines/myMachine/extensions/CustomScriptExtension?api-version=2026-09-01
{
"properties": {
"type": "CustomScriptExtension",
"enableAutomaticUpgrade": true,
"publisher": "Microsoft.Compute",
"settings": {
"commandToExecute": "powershell.exe -c \"Get-Process | Where-Object { $_.CPU -lt 100 }\""
},
"typeHandlerVersion": "1.10"
}
}
Sample response
{
"name": "CustomScriptExtension",
"type": "Microsoft.HybridCompute/machines/extensions",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/Machines/myMachine/Extensions/CustomScriptExtension",
"location": "eastus2euap",
"properties": {
"type": "string",
"autoUpgradeMinorVersion": false,
"enableAutomaticUpgrade": true,
"instanceView": {
"name": "CustomScriptExtension",
"type": "CustomScriptExtension",
"status": {
"code": "success",
"level": "Information",
"message": "Finished executing command, StdOut: , StdErr:",
"time": "2020-01-08T20:42:10.999Z"
},
"typeHandlerVersion": "1.10.3"
},
"protectedSettings": {},
"provisioningState": "Succeeded",
"publisher": "Microsoft.Compute",
"settings": {
"commandToExecute": "powershell.exe -c \"Get-Process | Where-Object { $_.CPU -gt 10000 }\""
},
"typeHandlerVersion": "1.10.3"
}
}
Azure-AsyncOperation: {callbackUri}
Location: {callbackUrl}
Retry-After: 200
Definitions
| Name | Description |
|---|---|
|
created |
The type of identity that created the resource. |
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
Machine |
Describes a Machine Extension. |
|
Machine |
Describes the Machine Extension Instance View. |
|
Machine |
Instance view status. |
|
Machine |
Describes the properties of a Machine Extension. |
|
Machine |
Describes a Machine Extension Update. |
|
Status |
The level code. |
|
system |
Metadata pertaining to creation and last modification of the resource. |
createdByType
The type of identity that created the resource.
| Value | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
object |
The additional info. |
| type |
string |
The additional info type. |
ErrorDetail
The error detail.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
MachineExtension
Describes a Machine Extension.
| Name | Type | Description |
|---|---|---|
| id |
string (arm-id) |
Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
| location |
string |
The geo-location where the resource lives |
| name |
string |
The name of the resource |
| properties |
Describes Machine Extension Properties. |
|
| systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
| tags |
object |
Resource tags. |
| type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
MachineExtensionInstanceView
Describes the Machine Extension Instance View.
| Name | Type | Description |
|---|---|---|
| name |
string |
The machine extension name. |
| status |
Instance view status. |
|
| type |
string |
Specifies the type of the extension; an example is "CustomScriptExtension". |
| typeHandlerVersion |
string |
Specifies the version of the script handler. |
MachineExtensionInstanceViewStatus
Instance view status.
| Name | Type | Description |
|---|---|---|
| code |
string |
The status code. |
| displayStatus |
string |
The short localizable label for the status. |
| level |
The level code. |
|
| message |
string |
The detailed status message, including for alerts and error messages. |
| time |
string (date-time) |
The time of the status. |
MachineExtensionProperties
Describes the properties of a Machine Extension.
| Name | Type | Description |
|---|---|---|
| autoUpgradeMinorVersion |
boolean |
Indicates 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. |
| enableAutomaticUpgrade |
boolean |
Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. |
| forceUpdateTag |
string |
How the extension handler should be forced to update even if the extension configuration has not changed. |
| instanceView |
The machine extension instance view. |
|
| protectedSettings |
management.azure.com.hybridcompute.machineextensions.update |
The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. |
| provisioningState |
string |
The provisioning state, which only appears in the response. |
| publisher |
string |
The name of the extension handler publisher. |
| settings |
management.azure.com.hybridcompute.machineextensions.update |
Json formatted public settings for the extension. |
| type |
string |
Specifies the type of the extension; an example is "CustomScriptExtension". |
| typeHandlerVersion |
string |
Specifies the version of the script handler. |
MachineExtensionUpdate
Describes a Machine Extension Update.
| Name | Type | Description |
|---|---|---|
| properties.autoUpgradeMinorVersion |
boolean |
Indicates 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. |
| properties.enableAutomaticUpgrade |
boolean |
Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. |
| properties.forceUpdateTag |
string |
How the extension handler should be forced to update even if the extension configuration has not changed. |
| properties.protectedSettings |
management.azure.com.hybridcompute.machineextensions.update |
The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. |
| properties.publisher |
string |
The name of the extension handler publisher. |
| properties.settings |
management.azure.com.hybridcompute.machineextensions.update |
Json formatted public settings for the extension. |
| properties.type |
string |
Specifies the type of the extension; an example is "CustomScriptExtension". |
| properties.typeHandlerVersion |
string |
Specifies the version of the script handler. |
| tags |
object |
Resource tags |
StatusLevelTypes
The level code.
| Value | Description |
|---|---|
| Info |
Info |
| Warning |
Warning |
| Error |
Error |
systemData
Metadata pertaining to creation and last modification of the resource.
| Name | Type | Description |
|---|---|---|
| createdAt |
string (date-time) |
The timestamp of resource creation (UTC). |
| createdBy |
string |
The identity that created the resource. |
| createdByType |
The type of identity that created the resource. |
|
| lastModifiedAt |
string (date-time) |
The timestamp of resource last modification (UTC) |
| lastModifiedBy |
string |
The identity that last modified the resource. |
| lastModifiedByType |
The type of identity that last modified the resource. |