Software Update Configurations - Create
Create a new software update configuration with the name given in the URI.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName}?api-version=2024-10-23
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
automation
|
path | True |
string |
The name of the automation account. |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
|
software
|
path | True |
string |
The name of the software update configuration to be created. |
|
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 Header
| Name | Required | Type | Description |
|---|---|---|---|
| clientRequestId |
string |
Identifies this specific client request. |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| properties.scheduleInfo | True |
Schedule information for the Software update configuration |
|
| properties.updateConfiguration | True |
update specific properties for the Software update configuration |
|
| properties.error |
Details of provisioning error |
||
| properties.tasks |
Tasks information for the Software update configuration. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Resource 'softwareUpdateConfiguration' update operation succeeded |
|
| 201 Created |
Resource 'softwareUpdateConfiguration' create operation succeeded |
|
| 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 software update configuration
Sample request
PUT https://management.azure.com/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Automation/automationAccounts/myaccount/softwareUpdateConfigurations/testpatch?api-version=2024-10-23
{
"properties": {
"scheduleInfo": {
"advancedSchedule": {
"weekDays": [
"Monday",
"Thursday"
]
},
"expiryTime": "2018-11-09T11:22:57+00:00",
"frequency": "Hour",
"interval": 1,
"startTime": "2017-10-19T12:22:57+00:00",
"timeZone": "America/Los_Angeles"
},
"tasks": {
"postTask": {
"parameters": null,
"source": "GetCache"
},
"preTask": {
"parameters": {
"COMPUTERNAME": "Computer1"
},
"source": "HelloWorld"
}
},
"updateConfiguration": {
"azureVirtualMachines": [
"/subscriptions/5ae68d89-69a4-454f-b5ce-e443cc4e0067/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-01",
"/subscriptions/5ae68d89-69a4-454f-b5ce-e443cc4e0067/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-02",
"/subscriptions/5ae68d89-69a4-454f-b5ce-e443cc4e0067/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-03"
],
"duration": "PT2H0M",
"nonAzureComputerNames": [
"box1.contoso.com",
"box2.contoso.com"
],
"operatingSystem": "Windows",
"targets": {
"azureQueries": [
{
"locations": [
"Japan East",
"UK South"
],
"scope": [
"/subscriptions/5ae68d89-69a4-454f-b5ce-e443cc4e0067/resourceGroups/myresources",
"/subscriptions/5ae68d89-69a4-454f-b5ce-e443cc4e0067"
],
"tagSettings": {
"filterOperator": "All",
"tags": {
"tag1": [
"tag1Value1",
"tag1Value2",
"tag1Value3"
],
"tag2": [
"tag2Value1",
"tag2Value2",
"tag2Value3"
]
}
}
}
],
"nonAzureQueries": [
{
"functionAlias": "SavedSearch1",
"workspaceId": "WorkspaceId1"
},
{
"functionAlias": "SavedSearch2",
"workspaceId": "WorkspaceId2"
}
]
},
"windows": {
"excludedKbNumbers": [
"168934",
"168973"
],
"includedUpdateClassifications": "Critical",
"rebootSetting": "IfRequired"
}
}
}
}
Sample response
{
"name": "testpatch",
"id": "/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Automation/automationAccounts/myaccount/softwareUpdateConfigurations/testpatch",
"properties": {
"createdBy": "adam@contoso.com",
"creationTime": "2017-10-19T18:54:50.5233333+00:00",
"error": {},
"lastModifiedBy": "adam@contoso.com",
"lastModifiedTime": "2017-10-19T18:54:50.68+00:00",
"provisioningState": "Provisioning",
"scheduleInfo": {
"description": "",
"advancedSchedule": {},
"creationTime": "2017-10-19T18:54:50.5233333+00:00",
"expiryTime": "2018-11-09T11:22:00-08:00",
"expiryTimeOffsetMinutes": -480,
"frequency": "Week",
"interval": 1,
"isEnabled": true,
"lastModifiedTime": "2017-10-19T18:54:50.5233333+00:00",
"nextRun": "2017-10-19T12:22:00-07:00",
"nextRunOffsetMinutes": -420,
"startTime": "2017-10-19T12:22:00-07:00",
"startTimeOffsetMinutes": -420,
"timeZone": "America/Los_Angeles"
},
"tasks": {
"postTask": {
"parameters": null,
"source": "GetCache"
},
"preTask": {
"parameters": {
"COMPUTERNAME": "Computer1"
},
"source": "HelloWorld"
}
},
"updateConfiguration": {
"azureVirtualMachines": [
"/subscriptions/5ae68d89-69a4-454f-b5ce-e443cc4e0067/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-01",
"/subscriptions/5ae68d89-69a4-454f-b5ce-e443cc4e0067/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-02",
"/subscriptions/5ae68d89-69a4-454f-b5ce-e443cc4e0067/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-03"
],
"duration": "PT2H",
"linux": {},
"nonAzureComputerNames": [
"box1.contoso.com",
"box2.contoso.com"
],
"operatingSystem": "Windows",
"targets": {
"azureQueries": [
{
"locations": [
"Japan East",
"UK South"
],
"scope": [
"/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourceGroups/a-stasku-rg0",
"/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d"
],
"tagSettings": {
"filterOperator": "All",
"tags": {
"tag1": [
"tag1Value1",
"tag1Value2"
],
"tag2": [
"tag2Value1",
"tag2Value2"
]
}
}
}
]
},
"windows": {
"excludedKbNumbers": [
"168934",
"168973"
],
"includedUpdateClassifications": "Critical"
}
}
}
}
{
"name": "testpatch",
"id": "/subscriptions/51766542-3ed7-4a72-a187-0c8ab644ddab/resourceGroups/mygroup/providers/Microsoft.Automation/automationAccounts/myaccount/softwareUpdateConfigurations/testpatch",
"properties": {
"creationTime": "2017-10-19T18:54:50.5233333+00:00",
"error": {},
"lastModifiedBy": "",
"lastModifiedTime": "2017-10-19T18:54:50.68+00:00",
"provisioningState": "Provisioning",
"scheduleInfo": {
"description": "",
"creationTime": "2017-10-19T18:54:50.5233333+00:00",
"expiryTime": "2018-11-09T11:22:00-08:00",
"expiryTimeOffsetMinutes": -480,
"frequency": "Week",
"interval": 1,
"isEnabled": true,
"lastModifiedTime": "2017-10-19T18:54:50.5233333+00:00",
"nextRun": "2017-10-19T12:22:00-07:00",
"nextRunOffsetMinutes": -420,
"startTime": "2017-10-19T12:22:00-07:00",
"startTimeOffsetMinutes": -420,
"timeZone": "America/Los_Angeles"
},
"tasks": {
"postTask": {
"parameters": null,
"source": "GetCache"
},
"preTask": {
"parameters": {
"COMPUTERNAME": "Computer1"
},
"source": "HelloWorld"
}
},
"updateConfiguration": {
"azureVirtualMachines": [
"/subscriptions/5ae68d89-69a4-454f-b5ce-e443cc4e0067/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-01",
"/subscriptions/5ae68d89-69a4-454f-b5ce-e443cc4e0067/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-02",
"/subscriptions/5ae68d89-69a4-454f-b5ce-e443cc4e0067/resourceGroups/myresources/providers/Microsoft.Compute/virtualMachines/vm-03"
],
"duration": "PT2H",
"linux": {},
"nonAzureComputerNames": [
"box1.contoso.com",
"box2.contoso.com"
],
"operatingSystem": "Windows",
"targets": {
"azureQueries": [
{
"locations": [
"Japan East",
"UK South"
],
"scope": [
"/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d/resourceGroups/a-stasku-rg0",
"/subscriptions/422b6c61-95b0-4213-b3be-7282315df71d"
],
"tagSettings": {
"filterOperator": "All",
"tags": {
"tag1": [
"tag1Value1",
"tag1Value2"
],
"tag2": [
"tag2Value1",
"tag2Value2"
]
}
}
}
]
},
"windows": {
"excludedKbNumbers": [
"168934",
"168973"
],
"includedUpdateClassifications": "Critical"
}
}
}
}
Definitions
| Name | Description |
|---|---|
|
Advanced |
The properties of the create Advanced Schedule. |
|
Advanced |
The properties of the create advanced schedule monthly occurrence. |
|
Automation |
Error response of an operation failure |
|
Azure |
Azure query for the update configuration. |
|
created |
The type of identity that created the resource. |
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
Linux |
Linux specific update configuration. |
|
Linux |
Update classifications included in the software update configuration. |
|
Non |
Non Azure query for the update configuration. |
|
Operating |
Target operating system for the software update configuration. |
|
Schedule |
Day of the occurrence. Must be one of monday, tuesday, wednesday, thursday, friday, saturday, sunday. |
|
Schedule |
Gets or sets the frequency of the schedule. |
|
software |
Software update configuration properties. |
|
software |
Task properties of the software update configuration. |
|
SUCSchedule |
Definition of schedule parameters. |
|
system |
Metadata pertaining to creation and last modification of the resource. |
|
Tag |
Filter VMs by Any or All specified tags. |
|
Tag |
Tag filter information for the VM. |
|
Target |
Group specific to the update configuration. |
|
task |
Task properties of the software update configuration. |
|
update |
Update specific properties of the software update configuration. |
|
Windows |
Windows specific update configuration. |
|
Windows |
Update classification included in the software update configuration. A comma separated string with required values |
AdvancedSchedule
The properties of the create Advanced Schedule.
| Name | Type | Description |
|---|---|---|
| monthDays |
integer[] (int32) |
Days of the month that the job should execute on. Must be between 1 and 31. |
| monthlyOccurrences |
Occurrences of days within a month. |
|
| weekDays |
string[] |
Days of the week that the job should execute on. |
AdvancedScheduleMonthlyOccurrence
The properties of the create advanced schedule monthly occurrence.
| Name | Type | Description |
|---|---|---|
| day |
Day of the occurrence. Must be one of monday, tuesday, wednesday, thursday, friday, saturday, sunday. |
|
| occurrence |
integer (int32) |
Occurrence of the week within the month. Must be between 1 and 5 |
AutomationErrorResponse
Error response of an operation failure
| Name | Type | Description |
|---|---|---|
| code |
string |
Error code |
| message |
string |
Error message indicating why the operation failed. |
AzureQueryProperties
Azure query for the update configuration.
| Name | Type | Description |
|---|---|---|
| locations |
string[] |
List of locations to scope the query to. |
| scope |
string[] |
List of Subscription or Resource Group ARM Ids. |
| tagSettings |
Tag settings for the VM. |
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. |
LinuxProperties
Linux specific update configuration.
| Name | Type | Description |
|---|---|---|
| excludedPackageNameMasks |
string[] |
packages excluded from the software update configuration. |
| includedPackageClassifications |
Update classifications included in the software update configuration. |
|
| includedPackageNameMasks |
string[] |
packages included from the software update configuration. |
| rebootSetting |
string |
Reboot setting for the software update configuration. |
LinuxUpdateClasses
Update classifications included in the software update configuration.
| Value | Description |
|---|---|
| Unclassified |
Unclassified |
| Critical |
Critical |
| Security |
Security |
| Other |
Other |
NonAzureQueryProperties
Non Azure query for the update configuration.
| Name | Type | Description |
|---|---|---|
| functionAlias |
string |
Log Analytics Saved Search name. |
| workspaceId |
string |
Workspace Id for Log Analytics in which the saved Search is resided. |
OperatingSystemType
Target operating system for the software update configuration.
| Value | Description |
|---|---|
| Windows |
Windows |
| Linux |
Linux |
ScheduleDay
Day of the occurrence. Must be one of monday, tuesday, wednesday, thursday, friday, saturday, sunday.
| Value | Description |
|---|---|
| Monday |
Monday |
| Tuesday |
Tuesday |
| Wednesday |
Wednesday |
| Thursday |
Thursday |
| Friday |
Friday |
| Saturday |
Saturday |
| Sunday |
Sunday |
ScheduleFrequency
Gets or sets the frequency of the schedule.
| Value | Description |
|---|---|
| OneTime |
OneTime |
| Day |
Day |
| Hour |
Hour |
| Week |
Week |
| Month |
Month |
| Minute |
The minimum allowed interval for Minute schedules is 15 minutes. |
softwareUpdateConfiguration
Software update configuration properties.
| Name | Type | Description |
|---|---|---|
| id |
string (arm-id) |
Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
| name |
string |
The name of the resource |
| properties.createdBy |
string |
CreatedBy property, which only appears in the response. |
| properties.creationTime |
string (date-time) |
Creation time of the resource, which only appears in the response. |
| properties.error |
Details of provisioning error |
|
| properties.lastModifiedBy |
string |
LastModifiedBy property, which only appears in the response. |
| properties.lastModifiedTime |
string (date-time) |
Last time resource was modified, which only appears in the response. |
| properties.provisioningState |
string |
Provisioning state for the software update configuration, which only appears in the response. |
| properties.scheduleInfo |
Schedule information for the Software update configuration |
|
| properties.tasks |
Tasks information for the Software update configuration. |
|
| properties.updateConfiguration |
update specific properties for the Software update configuration |
|
| systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
| type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
softwareUpdateConfigurationTasks
Task properties of the software update configuration.
| Name | Type | Description |
|---|---|---|
| postTask |
Post task properties. |
|
| preTask |
Pre task properties. |
SUCScheduleProperties
Definition of schedule parameters.
| Name | Type | Description |
|---|---|---|
| advancedSchedule |
Gets or sets the advanced schedule. |
|
| creationTime |
string (date-time) |
Gets or sets the creation time. |
| description |
string |
Gets or sets the description. |
| expiryTime |
string (date-time) |
Gets or sets the end time of the schedule. |
| expiryTimeOffsetMinutes |
number (double) |
Gets or sets the expiry time's offset in minutes. |
| frequency |
Gets or sets the frequency of the schedule. |
|
| interval |
integer (int64) |
Gets or sets the interval of the schedule. |
| isEnabled |
boolean |
Gets or sets a value indicating whether this schedule is enabled. |
| lastModifiedTime |
string (date-time) |
Gets or sets the last modified time. |
| nextRun |
string (date-time) |
Gets or sets the next run time of the schedule. |
| nextRunOffsetMinutes |
number (double) |
Gets or sets the next run time's offset in minutes. |
| startTime |
string (date-time) |
Gets or sets the start time of the schedule. |
| startTimeOffsetMinutes |
number (double) |
Gets the start time's offset in minutes. |
| timeZone |
string |
Gets or sets the time zone of the schedule. |
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. |
TagOperators
Filter VMs by Any or All specified tags.
| Value | Description |
|---|---|
| All |
All |
| Any |
Any |
TagSettingsProperties
Tag filter information for the VM.
| Name | Type | Description |
|---|---|---|
| filterOperator |
Filter VMs by Any or All specified tags. |
|
| tags |
object |
Dictionary of tags with its list of values. |
TargetProperties
Group specific to the update configuration.
| Name | Type | Description |
|---|---|---|
| azureQueries |
List of Azure queries in the software update configuration. |
|
| nonAzureQueries |
List of non Azure queries in the software update configuration. |
taskProperties
Task properties of the software update configuration.
| Name | Type | Description |
|---|---|---|
| parameters |
object |
Gets or sets the parameters of the task. |
| source |
string |
Gets or sets the name of the runbook. |
updateConfiguration
Update specific properties of the software update configuration.
| Name | Type | Description |
|---|---|---|
| azureVirtualMachines |
string[] |
List of azure resource Ids for azure virtual machines targeted by the software update configuration. |
| duration |
string (duration) |
Maximum time allowed for the software update configuration run. Duration needs to be specified using the format PT[n]H[n]M[n]S as per ISO8601 |
| linux |
Linux specific update configuration. |
|
| nonAzureComputerNames |
string[] |
List of names of non-azure machines targeted by the software update configuration. |
| operatingSystem |
operating system of target machines |
|
| targets |
Group targets for the software update configuration. |
|
| windows |
Windows specific update configuration. |
WindowsProperties
Windows specific update configuration.
| Name | Type | Description |
|---|---|---|
| excludedKbNumbers |
string[] |
KB numbers excluded from the software update configuration. |
| includedKbNumbers |
string[] |
KB numbers included from the software update configuration. |
| includedUpdateClassifications |
Update classification included in the software update configuration. A comma separated string with required values |
|
| rebootSetting |
string |
Reboot setting for the software update configuration. |
WindowsUpdateClasses
Update classification included in the software update configuration. A comma separated string with required values
| Value | Description |
|---|---|
| Unclassified |
Unclassified |
| Critical |
Critical |
| Security |
Security |
| UpdateRollup |
UpdateRollup |
| FeaturePack |
FeaturePack |
| ServicePack |
ServicePack |
| Definition |
Definition |
| Tools |
Tools |
| Updates |
Updates |