Share via


Registry Model Containers - Create Or Update

Create or update model container.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}?api-version=2025-04-01

URI Parameters

Name In Required Type Description
modelName
path True

string

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

Container name.

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.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Request Body

Name Required Type Description
properties True

ModelContainer

[Required] Additional attributes of the entity.

Responses

Name Type Description
200 OK

ModelContainerResource

Create or update request is successful.

201 Created

ModelContainerResource

Created

Headers

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

ErrorResponse

Error

Examples

CreateOrUpdate Registry Model Container.

Sample request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/registry123/models/testContainer?api-version=2025-04-01

{
  "properties": {
    "description": "Model container description",
    "tags": {
      "tag1": "value1",
      "tag2": "value2"
    }
  }
}

Sample response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/registry123/models/testContainer",
  "name": "testContainer",
  "type": "Microsoft.MachineLearningServices/registries/models",
  "properties": {
    "description": "Model container description",
    "tags": {
      "tag1": "value1",
      "tag2": "value2"
    }
  },
  "systemData": {
    "createdAt": "2020-12-01T12:00:00.000Z",
    "createdBy": "John Smith",
    "createdByType": "User",
    "lastModifiedAt": "2020-12-01T12:00:00.000Z",
    "lastModifiedBy": "John Smith",
    "lastModifiedByType": "User"
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/registry123/models/testContainer",
  "name": "testContainer",
  "type": "Microsoft.MachineLearningServices/registries/models",
  "properties": {
    "description": "Model container description",
    "tags": {
      "tag1": "value1",
      "tag2": "value2"
    }
  },
  "systemData": {
    "createdAt": "2020-12-01T12:00:00.000Z",
    "createdBy": "John Smith",
    "createdByType": "User",
    "lastModifiedAt": "2020-12-01T12:00:00.000Z",
    "lastModifiedBy": "John Smith",
    "lastModifiedByType": "User"
  }
}

Definitions

Name Description
AssetProvisioningState

Provisioning state of registry asset.

createdByType

The type of identity that created the resource.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

ModelContainer
ModelContainerResource

Azure Resource Manager resource envelope.

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

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

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.

ModelContainer

Name Type Default value Description
description

string

The asset description text.

isArchived

boolean

False

Is the asset archived?

latestVersion

string

The latest version inside this container.

nextVersion

string

The next auto incremental version

properties

object

The asset property dictionary.

provisioningState

AssetProvisioningState

Provisioning state for the model container.

tags

object

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

ModelContainerResource

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

ModelContainer

[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"

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.