Package - Create Or Update
Create or update the package identified by package name.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}/packages/{packageName}?api-version=2023-05-15-preview
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
automation
|
path | True |
string |
The name of the automation account. |
package
|
path | True |
string |
The name of Package. |
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
runtime
|
path | True |
string pattern: ^[a-zA-Z][a-zA-Z-_0-9]*$ |
The name of the Runtime Environment. |
subscription
|
path | True |
string |
Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
api-version
|
query | True |
string |
Client Api Version. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
properties.contentLink | True |
Gets or sets the package content link. |
|
allOf |
Tracked Resource |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK |
|
201 Created |
Created |
|
Other Status Codes |
Automation error response describing why the operation failed. |
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 package
Sample request
PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/runtimeEnvironments/runtimeEnvironmentName/packages/OmsCompositeResources?api-version=2023-05-15-preview
{
"properties": {
"contentLink": {
"uri": "https://teststorage.blob.core.windows.net/dsccomposite/OmsCompositeResources.zip",
"contentHash": {
"algorithm": "sha265",
"value": "07E108A962B81DD9C9BAA89BB47C0F6EE52B29E83758B07795E408D258B2B87A"
}
}
}
}
Sample response
{
"id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/runtimeEnvironments/runtimeEnvironmentName/packages/OmsCompositeResources",
"name": "OmsCompositeResources",
"type": "Microsoft.Automation/automationAccounts/runtimeEnvironments/packages",
"location": "East US 2",
"tags": {},
"properties": {
"default": false,
"version": null,
"sizeInBytes": 0,
"error": {
"code": null,
"message": null
},
"provisioningState": "Creating"
},
"systemData": {
"createdAt": "2023-07-05T07:32:41.4389914+00:00",
"lastModifiedAt": "2023-07-05T07:33:07.5597465+00:00"
}
}
{
"id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/runtimeEnvironments/runtimeEnvironmentName/packages/OmsCompositeResources",
"name": "OmsCompositeResources",
"type": "Microsoft.Automation/automationAccounts/runtimeEnvironments/packages",
"location": "East US 2",
"tags": {},
"properties": {
"default": false,
"version": null,
"sizeInBytes": 0,
"error": {
"code": null,
"message": null
},
"provisioningState": "Creating"
},
"systemData": {
"createdAt": "2023-07-05T07:32:41.4389914+00:00",
"lastModifiedAt": "2023-07-05T07:33:07.5597465+00:00"
}
}
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 |
Error response of an operation failure |
Package |
Definition of the Package type. |
Package |
The parameters supplied to the create or update package operation. |
Package |
Definition of the package error info type. |
Package |
Gets or sets the provisioning state of the Package. |
system |
Metadata pertaining to creation and last modification of the resource. |
Tracked |
Tracked 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 |
ErrorResponse
Error response of an operation failure
Name | Type | Description |
---|---|---|
code |
string |
Error code |
message |
string |
Error message indicating why the operation failed. |
Package
Definition of the Package type.
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.allOf |
Metadata pertaining to creation and last modification of the resource. |
|
properties.contentLink |
Gets or sets the contentLink of the Package. |
|
properties.default |
boolean |
Gets or sets the isGlobal flag of the package. |
properties.error |
Gets or sets the error info of the Package. |
|
properties.provisioningState |
Gets or sets the provisioning state of the Package. |
|
properties.sizeInBytes |
integer (int64) |
Gets or sets the size in bytes of the Package. |
properties.version |
string |
Gets or sets the version of the Package. |
systemData |
Metadata pertaining to creation and last modification of the resource. |
|
tags |
object |
Resource tags. |
type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
PackageCreateOrUpdateParameters
The parameters supplied to the create or update package operation.
Name | Type | Description |
---|---|---|
allOf |
Tracked Resource |
|
properties.contentLink |
Gets or sets the package content link. |
PackageErrorInfo
Definition of the package error info type.
Name | Type | Description |
---|---|---|
code |
string |
Package import error code. |
message |
string |
Package import error message. |
PackageProvisioningState
Gets or sets the provisioning state of the Package.
Value | Description |
---|---|
Created | |
Creating | |
StartingImportModuleRunbook | |
RunningImportModuleRunbook | |
ContentRetrieved | |
ContentDownloaded | |
ContentValidated | |
ConnectionTypeImported | |
ContentStored | |
ModuleDataStored | |
ActivitiesStored | |
ModuleImportRunbookComplete | |
Succeeded | |
Failed | |
Canceled | |
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. |
TrackedResource
Tracked Resource
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 |
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" |