Registry Environment Versions - Create Or Update

Create or update version.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}?api-version=2026-05-01

URI Parameters

Name In Required Type Description
environmentName
path True

string

pattern: ^[a-zA-Z0-9][a-zA-Z0-9\-_]{0,254}$

Container name. This is case-sensitive.

registryName
path True

string

pattern: ^[a-zA-Z0-9][a-zA-Z0-9\-_]{2,32}$

Name of Azure Machine Learning registry. This is case-insensitive

resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string

minLength: 1

The ID of the target subscription.

version
path True

string

Version identifier. This is case-sensitive.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Request Body

Name Required Type Description
properties True

EnvironmentVersionProperties

[Required] Additional attributes of the entity.

Responses

Name Type Description
200 OK

EnvironmentVersion

Resource 'EnvironmentVersion' update operation succeeded

201 Created

EnvironmentVersion

The request has succeeded and a new resource has been created as a result.

Headers

  • Azure-AsyncOperation: string
  • x-ms-async-operation-timeout: string
Other Status Codes

ErrorResponse

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

CreateOrUpdate Registry Environment Version.

Sample request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/test-rg/providers/Microsoft.MachineLearningServices/registries/my-aml-registry/environments/string/versions/string?api-version=2026-05-01

{
  "properties": {
    "description": "string",
    "build": {
      "contextUri": "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/",
      "dockerfilePath": "prod/Dockerfile"
    },
    "condaFile": "string",
    "image": "docker.io/tensorflow/serving:latest",
    "inferenceConfig": {
      "livenessRoute": {
        "path": "string",
        "port": 1
      },
      "readinessRoute": {
        "path": "string",
        "port": 1
      },
      "scoringRoute": {
        "path": "string",
        "port": 1
      }
    },
    "isAnonymous": false,
    "properties": {
      "string": "string"
    },
    "tags": {
      "string": "string"
    }
  }
}

Sample response

{
  "name": "string",
  "type": "string",
  "id": "string",
  "properties": {
    "description": "string",
    "build": {
      "contextUri": "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/",
      "dockerfilePath": "prod/Dockerfile"
    },
    "condaFile": "string",
    "environmentType": "Curated",
    "image": "docker.io/tensorflow/serving:latest",
    "inferenceConfig": {
      "livenessRoute": {
        "path": "string",
        "port": 1
      },
      "readinessRoute": {
        "path": "string",
        "port": 1
      },
      "scoringRoute": {
        "path": "string",
        "port": 1
      }
    },
    "isAnonymous": false,
    "properties": {
      "string": "string"
    },
    "tags": {
      "string": "string"
    }
  },
  "systemData": {
    "createdAt": "2020-01-01T12:34:56.999Z",
    "createdBy": "string",
    "createdByType": "User",
    "lastModifiedAt": "2020-01-01T12:34:56.999Z",
    "lastModifiedBy": "string",
    "lastModifiedByType": "User"
  }
}
{
  "name": "string",
  "type": "string",
  "id": "string",
  "properties": {
    "description": "string",
    "build": {
      "contextUri": "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/",
      "dockerfilePath": "prod/Dockerfile"
    },
    "condaFile": "string",
    "environmentType": "Curated",
    "image": "docker.io/tensorflow/serving:latest",
    "inferenceConfig": {
      "livenessRoute": {
        "path": "string",
        "port": 1
      },
      "readinessRoute": {
        "path": "string",
        "port": 1
      },
      "scoringRoute": {
        "path": "string",
        "port": 1
      }
    },
    "isAnonymous": false,
    "properties": {
      "string": "string"
    },
    "tags": {
      "string": "string"
    }
  },
  "systemData": {
    "createdAt": "2020-01-01T12:34:56.999Z",
    "createdBy": "string",
    "createdByType": "User",
    "lastModifiedAt": "2020-01-01T12:34:56.999Z",
    "lastModifiedBy": "string",
    "lastModifiedByType": "User"
  }
}

Definitions

Name Description
AssetProvisioningState

Provisioning state of registry asset.

AutoRebuildSetting

AutoRebuild setting for the derived image

BuildContext

Configuration settings for Docker build context

createdByType

The type of identity that created the resource.

EnvironmentType

Environment type is either user created or curated by Azure ML service

EnvironmentVersion

Azure Resource Manager resource envelope.

EnvironmentVersionProperties

Environment version details.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

InferenceContainerProperties
OperatingSystemType

The type of operating system.

Route
systemData

Metadata pertaining to creation and last modification of the resource.

AssetProvisioningState

Provisioning state of registry asset.

Value Description
Succeeded
Failed
Canceled
Creating
Updating
Deleting

AutoRebuildSetting

AutoRebuild setting for the derived image

Value Description
Disabled
OnBaseImageUpdate

BuildContext

Configuration settings for Docker build context

Name Type Default value Description
contextUri

string

minLength: 1
pattern: [a-zA-Z0-9_]

[Required] URI of the Docker build context used to build the image. Supports blob URIs on environment creation and may return blob or Git URIs. <seealso href="https://docs.docker.com/engine/reference/commandline/build/#extended-description" />

dockerfilePath

string

Dockerfile

Path to the Dockerfile in the build context. <seealso href="https://docs.docker.com/engine/reference/builder/" />

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

EnvironmentType

Environment type is either user created or curated by Azure ML service

Value Description
Curated
UserCreated

EnvironmentVersion

Azure Resource Manager resource envelope.

Name Type Description
id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

The name of the resource

properties

EnvironmentVersionProperties

[Required] Additional attributes of the entity.

systemData

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"

EnvironmentVersionProperties

Environment version details.

Name Type Default value Description
autoRebuild

AutoRebuildSetting

Disabled

AutoRebuild setting for the derived image

build

BuildContext

Configuration settings for Docker build context.

condaFile

string

Standard configuration file used by Conda that lets you install any kind of package, including Python, R, and C/C++ packages. <see href="https://repo2docker.readthedocs.io/en/latest/config_files.html#environment-yml-install-a-conda-environment" />

description

string

The asset description text.

environmentType

EnvironmentType

Environment type is either user managed or curated by the Azure ML service <see href="https://docs.microsoft.com/en-us/azure/machine-learning/resource-curated-environments" />

image

string

Name of the image that will be used for the environment. <seealso href="https://docs.microsoft.com/en-us/azure/machine-learning/how-to-deploy-custom-docker-image#use-a-custom-base-image" />

inferenceConfig

InferenceContainerProperties

Defines configuration specific to inference.

isAnonymous

boolean

False

If the name version are system generated (anonymous registration).

isArchived

boolean

False

Is the asset archived?

osType

OperatingSystemType

Linux

The type of operating system.

properties

object

The asset property dictionary.

provisioningState

AssetProvisioningState

Provisioning state for the environment version.

stage

string

Stage in the environment lifecycle assigned to this environment

tags

object

Tag dictionary. Tags can be added, removed, and updated.

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

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

InferenceContainerProperties

Name Type Description
livenessRoute

Route

The route to check the liveness of the inference server container.

readinessRoute

Route

The route to check the readiness of the inference server container.

scoringRoute

Route

The port to send the scoring requests to, within the inference server container.

startupRoute

Route

The route to check the startup of the application in the container.

OperatingSystemType

The type of operating system.

Value Description
Linux
Windows

Route

Name Type Description
path

string

minLength: 1
pattern: [a-zA-Z0-9_]

[Required] The path for the route.

port

integer (int32)

[Required] The port for the route.

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

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

createdByType

The type of identity that last modified the resource.