Apply Updates - Create Or Update Or Cancel
Apply Updates to resource
Apply maintenance updates to resource
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/applyUpdates/{applyUpdateName}?api-version=2023-09-01-preview
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
apply
|
path | True |
string |
ApplyUpdate name |
provider
|
path | True |
string |
Resource provider name |
resource
|
path | True |
string |
Resource group name |
resource
|
path | True |
string |
Resource identifier |
resource
|
path | True |
string |
Resource type |
subscription
|
path | True |
string |
Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
api-version
|
query | True |
string |
Version of the API to be used with the client request. |
Request Body
Name | Type | Description |
---|---|---|
properties.lastUpdateTime |
string |
Last Update time |
properties.resourceId |
string |
The resourceId |
properties.status |
The status |
Responses
Name | Type | Description |
---|---|---|
200 OK |
ApplyUpdate update request accepted |
|
201 Created |
ApplyUpdate create request accepted |
|
Other Status Codes |
BadRequest |
Examples
Apply |
Apply |
ApplyUpdates_CreateOrUpdateOnly_NoCancellation
Sample request
Sample response
{
"id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Compute/virtualMachineScaleSets/smdtest1/providers/Microsoft.Maintenance/applyUpdates/e9b9685d-78e4-44c4-a81c-64a14f9b87b6",
"name": "e9b9685d-78e4-44c4-a81c-64a14f9b87b6",
"type": "Microsoft.Maintenance/applyUpdates",
"properties": {
"resourceId": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Compute/virtualMachineScaleSets/smdtest1",
"status": "Pending"
}
}
{
"id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Compute/virtualMachineScaleSets/smdtest1/providers/Microsoft.Maintenance/applyUpdates/e9b9685d-78e4-44c4-a81c-64a14f9b87b6",
"name": "e9b9685d-78e4-44c4-a81c-64a14f9b87b6",
"type": "Microsoft.Maintenance/applyUpdates",
"properties": {
"resourceId": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Compute/virtualMachineScaleSets/smdtest1",
"status": "Pending"
}
}
ApplyUpdates_CreateOrUpdateOrCancel
Sample request
PUT https://management.azure.com/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/maintenanceConfig1/providers/Microsoft.Maintenance/applyUpdates/20230901121200?api-version=2023-09-01-preview
{
"properties": {
"status": "Cancel"
}
}
Sample response
{
"id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/microsoft.maintenance/maintenanceconfigurations/maintenanceconfig1/providers/microsoft.maintenance/applyupdates/20230901121200",
"name": "maintenanceConfig1",
"type": "Microsoft.Maintenance/applyUpdates",
"properties": {
"status": "Cancelled",
"resourceId": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/microsoft.maintenance/maintenanceconfigurations/maintenanceconfig1"
}
}
{
"id": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/microsoft.maintenance/maintenanceconfigurations/maintenanceconfig1/providers/microsoft.maintenance/applyupdates/20230901121200",
"name": "maintenanceConfig1",
"type": "Microsoft.Maintenance/applyUpdates",
"properties": {
"status": "Cancelled",
"resourceId": "/subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/microsoft.maintenance/maintenanceconfigurations/maintenanceconfig1"
}
}
Definitions
Name | Description |
---|---|
Apply |
Apply Update request |
created |
The type of identity that created the resource. |
Error |
An error response details received from the Azure Maintenance service. |
Maintenance |
An error response received from the Azure Maintenance service. |
system |
Metadata pertaining to creation and last modification of the resource. |
Update |
The status |
ApplyUpdate
Apply Update request
Name | Type | Description |
---|---|---|
id |
string |
Fully qualified identifier of the resource |
name |
string |
Name of the resource |
properties.lastUpdateTime |
string |
Last Update time |
properties.resourceId |
string |
The resourceId |
properties.status |
The status |
|
systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
type |
string |
Type of the resource |
createdByType
The type of identity that created the resource.
Name | Type | Description |
---|---|---|
Application |
string |
|
Key |
string |
|
ManagedIdentity |
string |
|
User |
string |
ErrorDetails
An error response details received from the Azure Maintenance service.
Name | Type | Description |
---|---|---|
code |
string |
Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. |
message |
string |
Human-readable representation of the error. |
MaintenanceError
An error response received from the Azure Maintenance service.
Name | Type | Description |
---|---|---|
error |
Details of the error |
systemData
Metadata pertaining to creation and last modification of the resource.
Name | Type | Description |
---|---|---|
createdAt |
string |
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 |
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. |
UpdateStatus
The status
Name | Type | Description |
---|---|---|
Cancel |
string |
Cancel the schedule and stop creating PMR for resources part of it. Applicable to Maintenance Configuration resource type only. |
Cancelled |
string |
Send the Cancelled response to the user if request came to cancel the schedule. Applicable to Maintenance Configuration resource type only. |
Completed |
string |
All updates are successfully applied. |
InProgress |
string |
Updates installation are in progress. |
NoUpdatesPending |
string |
No updates are pending. |
Pending |
string |
There are pending updates to be installed. |
RetryLater |
string |
Updates installation failed and should be retried later. |
RetryNow |
string |
Updates installation failed but are ready to retry again. |