Runtime Environments - Update

Update an Runtime Environment.

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}?api-version=2023-05-15-preview

URI Parameters

Name In Required Type Description
automationAccountName
path True

string

The name of the automation account.

resourceGroupName
path True

string

Name of an Azure Resource group.

Regex pattern: ^[-\w\._]+$

runtimeEnvironmentName
path True

string

The name of the Runtime Environment.

Regex pattern: ^[a-zA-Z][a-zA-Z-_0-9]*$

subscriptionId
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 Type Description
properties.defaultPackages

object

List of Default packages for Environment

Responses

Name Type Description
200 OK

RuntimeEnvironment

OK

Other Status Codes

ErrorResponse

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

Update an automation account

Sample Request

PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runtimeEnvironments/myRuntimeEnvironmentName?api-version=2023-05-15-preview

{
  "properties": {
    "defaultPackages": {
      "Az": "8.3.0"
    }
  }
}

Sample Response

{
  "name": "myRuntimeEnvironmentName",
  "id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount9/runtimeEnvironments/myRuntimeEnvironmentName",
  "type": "Microsoft.Automation/automationAccounts/runtimeEnvironments",
  "location": "East US 2",
  "tags": {},
  "properties": {
    "runtime": {
      "language": "PowerShell",
      "version": "7.1"
    },
    "defaultPackages": {
      "Az": "8.3.0"
    },
    "description": "Description of the Runtime Environment"
  },
  "systemData": {
    "createdAt": "2023-07-05T07:32:41.4389914+00:00",
    "lastModifiedAt": "2023-07-05T07:33:07.5597465+00:00"
  }
}

Definitions

Name Description
createdByType

The type of identity that created the resource.

ErrorResponse

Error response of an operation failure

RuntimeEnvironment

Definition of the Runtime Environment type.

RuntimeEnvironmentUpdateParameters

The parameters supplied to the update automation account operation.

systemData

Metadata pertaining to creation and last modification of the resource.

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

ErrorResponse

Error response of an operation failure

Name Type Description
code

string

Error code

message

string

Error message indicating why the operation failed.

RuntimeEnvironment

Definition of the Runtime Environment type.

Name Type Description
id

string

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.defaultPackages

object

List of Default packages for Environment

properties.description

string

Gets or sets the description.

properties.runtime.language

string

Language of Runtime Environment

properties.runtime.version

string

Version of Language

systemData

systemData

Resource system metadata.

tags

object

Resource tags.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

RuntimeEnvironmentUpdateParameters

The parameters supplied to the update automation account operation.

Name Type Description
properties.defaultPackages

object

List of Default packages for Environment

systemData

systemData

Metadata pertaining to creation and last modification of the resource.

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

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

createdByType

The type of identity that last modified the resource.