Module - Create Or Update
Create or Update the module identified by module name.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}?api-version=2024-10-23
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
automation
|
path | True |
string |
The name of the automation account. |
|
module
|
path | True |
string |
The module name. |
|
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 | Required | Type | Description |
|---|---|---|---|
| properties.contentLink | True |
Gets or sets the module content link. |
|
| location |
string |
Gets or sets the location of the resource. |
|
| name |
string |
Gets or sets name of the resource. |
|
| tags |
object |
Gets or sets the tags attached to the resource. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Resource 'Module' update operation succeeded |
|
| 201 Created |
Resource 'Module' 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 or update a module
Sample request
PUT https://management.azure.com/subscriptions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/OmsCompositeResources?api-version=2024-10-23
{
"properties": {
"contentLink": {
"contentHash": {
"algorithm": "sha265",
"value": "07E108A962B81DD9C9BAA89BB47C0F6EE52B29E83758B07795E408D258B2B87A"
},
"uri": "https://teststorage.blob.core.windows.net/dsccomposite/OmsCompositeResources.zip",
"version": "1.0.0.0"
}
}
}
Sample response
{
"name": "OmsCompositeResources",
"type": "Microsoft.Automation/AutomationAccounts/Modules",
"etag": null,
"id": "/subscriptions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/OmsCompositeResources",
"location": "East US 2",
"properties": {
"activityCount": 0,
"creationTime": "2017-03-29T15:41:47.003+00:00",
"error": {
"code": null,
"message": null
},
"isComposite": false,
"isGlobal": false,
"lastModifiedTime": "2017-03-29T15:42:10.567+00:00",
"provisioningState": "Creating",
"sizeInBytes": 0,
"version": null
},
"tags": {}
}
{
"name": "OmsCompositeResources",
"type": "Microsoft.Automation/AutomationAccounts/Modules",
"etag": null,
"id": "/subscriptions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/modules/OmsCompositeResources",
"location": "East US 2",
"properties": {
"activityCount": 0,
"creationTime": "2017-03-29T15:41:47.003+00:00",
"error": {
"code": null,
"message": null
},
"isComposite": false,
"isGlobal": false,
"lastModifiedTime": "2017-03-29T15:42:10.567+00:00",
"provisioningState": "Creating",
"sizeInBytes": 0,
"version": null
},
"tags": {}
}
Definitions
| Name | Description |
|---|---|
|
Content |
Definition of the runbook property type. |
|
Content |
Definition of the content link. |
|
created |
The type of identity that created the resource. |
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
| Module |
Definition of the module type. |
|
Module |
The parameters supplied to the create or update module operation. |
|
Module |
Definition of the module error info type. |
|
Module |
Gets or sets the provisioning state of the module. |
|
system |
Metadata pertaining to creation and last modification of the resource. |
ContentHash
Definition of the runbook property type.
| Name | Type | Description |
|---|---|---|
| algorithm |
string |
Gets or sets the content hash algorithm used to hash the content. |
| value |
string |
Gets or sets expected hash value of the content. |
ContentLink
Definition of the content link.
| Name | Type | Description |
|---|---|---|
| contentHash |
Gets or sets the hash. |
|
| uri |
string |
Gets or sets the uri of content. |
| version |
string |
Gets or sets the version of the content. |
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. |
Module
Definition of the module type.
| Name | Type | Description |
|---|---|---|
| etag |
string |
Gets or sets the etag of the resource. |
| 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.activityCount |
integer (int32) |
Gets or sets the activity count of the module. |
| properties.contentLink |
Gets or sets the contentLink of the module. |
|
| properties.creationTime |
string (date-time) |
Gets or sets the creation time. |
| properties.description |
string |
Gets or sets the description. |
| properties.error |
Gets or sets the error info of the module. |
|
| properties.isComposite |
boolean |
Gets or sets type of module, if its composite or not. |
| properties.isGlobal |
boolean |
Gets or sets the isGlobal flag of the module. |
| properties.lastModifiedTime |
string (date-time) |
Gets or sets the last modified time. |
| properties.provisioningState |
Gets or sets the provisioning state of the module. |
|
| properties.sizeInBytes |
integer (int64) |
Gets or sets the size in bytes of the module. |
| properties.version |
string |
Gets or sets the version of the module. |
| 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" |
ModuleCreateOrUpdateParameters
The parameters supplied to the create or update module operation.
| Name | Type | Description |
|---|---|---|
| location |
string |
Gets or sets the location of the resource. |
| name |
string |
Gets or sets name of the resource. |
| properties.contentLink |
Gets or sets the module content link. |
|
| tags |
object |
Gets or sets the tags attached to the resource. |
ModuleErrorInfo
Definition of the module error info type.
| Name | Type | Description |
|---|---|---|
| code |
string |
Gets or sets the error code. |
| message |
string |
Gets or sets the error message. |
ModuleProvisioningState
Gets or sets the provisioning state of the module.
| Value | Description |
|---|---|
| Created |
Created |
| Creating |
Creating |
| StartingImportModuleRunbook |
StartingImportModuleRunbook |
| RunningImportModuleRunbook |
RunningImportModuleRunbook |
| ContentRetrieved |
ContentRetrieved |
| ContentDownloaded |
ContentDownloaded |
| ContentValidated |
ContentValidated |
| ConnectionTypeImported |
ConnectionTypeImported |
| ContentStored |
ContentStored |
| ModuleDataStored |
ModuleDataStored |
| ActivitiesStored |
ActivitiesStored |
| ModuleImportRunbookComplete |
ModuleImportRunbookComplete |
| Succeeded |
Succeeded |
| Failed |
Failed |
| Canceled |
Canceled |
| Updating |
Updating |
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. |