你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Batch Endpoints - Create Or Update

(异步) 创建批处理推理终结点。

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}?api-version=2024-04-01

URI 参数

名称 必需 类型 说明
endpointName
path True

string

Batch 推理终结点的名称。

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

resourceGroupName
path True

string

资源组的名称。 此名称不区分大小写。

subscriptionId
path True

string

目标订阅的 ID。

workspaceName
path True

string

Azure 机器学习工作区的名称。

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

api-version
query True

string

要用于此操作的 API 版本。

请求正文

名称 必需 类型 说明
location True

string

资源所在的地理位置

properties True

BatchEndpoint

[必需]实体的其他属性。

identity

ManagedServiceIdentity

托管服务标识 (系统分配的标识和/或用户分配的标识)

kind

string

门户/工具等用于为相同类型的资源呈现不同的 UX 体验的元数据。

sku

Sku

自动缩放的 ARM 协定所需的 SKU 详细信息。

tags

object

资源标记。

响应

名称 类型 说明
200 OK

BatchEndpointTrackedResource

Create或更新请求成功。

201 Created

BatchEndpointTrackedResource

创建

Headers

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

ErrorResponse

错误

示例

CreateOrUpdate Workspace Batch Endpoint.

Sample Request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/test-rg/providers/Microsoft.MachineLearningServices/workspaces/my-aml-workspace/batchEndpoints/testEndpointName?api-version=2024-04-01

{
  "properties": {
    "description": "string",
    "properties": {
      "string": "string"
    },
    "authMode": "AMLToken",
    "defaults": {
      "deploymentName": "string"
    }
  },
  "tags": {},
  "location": "string",
  "kind": "string",
  "identity": {
    "type": "SystemAssigned",
    "userAssignedIdentities": {
      "string": {}
    }
  },
  "sku": {
    "name": "string",
    "tier": "Free",
    "size": "string",
    "family": "string",
    "capacity": 1
  }
}

Sample Response

{
  "id": "string",
  "name": "string",
  "type": "string",
  "properties": {
    "description": "string",
    "properties": {
      "string": "string"
    },
    "scoringUri": "https://www.contoso.com/example",
    "swaggerUri": "https://www.contoso.com/example",
    "authMode": "AMLToken",
    "defaults": {
      "deploymentName": "string"
    },
    "provisioningState": "Succeeded"
  },
  "systemData": {
    "createdAt": "2020-01-01T12:34:56.999Z",
    "createdBy": "string",
    "createdByType": "User",
    "lastModifiedAt": "2020-01-01T12:34:56.999Z",
    "lastModifiedBy": "string",
    "lastModifiedByType": "User"
  },
  "tags": {},
  "location": "string",
  "kind": "string",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-1111-2222-3333-444444444444",
    "tenantId": "00000000-1111-2222-3333-444444444444",
    "userAssignedIdentities": {
      "string": {
        "principalId": "00000000-1111-2222-3333-444444444444",
        "clientId": "00000000-1111-2222-3333-444444444444"
      }
    }
  },
  "sku": {
    "name": "string",
    "tier": "Free",
    "size": "string",
    "family": "string",
    "capacity": 1
  }
}
{
  "id": "string",
  "name": "string",
  "type": "string",
  "properties": {
    "description": "string",
    "properties": {
      "string": "string"
    },
    "scoringUri": "https://www.contoso.com/example",
    "swaggerUri": "https://www.contoso.com/example",
    "authMode": "AMLToken",
    "defaults": {
      "deploymentName": "string"
    },
    "provisioningState": "Updating"
  },
  "systemData": {
    "createdAt": "2020-01-01T12:34:56.999Z",
    "createdBy": "string",
    "createdByType": "User",
    "lastModifiedAt": "2020-01-01T12:34:56.999Z",
    "lastModifiedBy": "string",
    "lastModifiedByType": "User"
  },
  "tags": {},
  "location": "string",
  "kind": "string",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "00000000-1111-2222-3333-444444444444",
    "tenantId": "00000000-1111-2222-3333-444444444444",
    "userAssignedIdentities": {
      "string": {
        "principalId": "00000000-1111-2222-3333-444444444444",
        "clientId": "00000000-1111-2222-3333-444444444444"
      }
    }
  },
  "sku": {
    "name": "string",
    "tier": "Free",
    "size": "string",
    "family": "string",
    "capacity": 1
  }
}

定义

名称 说明
BatchEndpoint

Batch 终结点配置。

BatchEndpointDefaults

Batch 终结点默认值

BatchEndpointTrackedResource
createdByType

创建资源的标识类型。

EndpointAuthKeys

终结点身份验证的密钥。

EndpointAuthMode

用于确定终结点身份验证模式的枚举。

EndpointProvisioningState

终结点预配的状态。

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详细信息。

ErrorResponse

错误响应

ManagedServiceIdentity

托管服务标识 (系统分配的标识和/或用户分配的标识)

ManagedServiceIdentityType

) 允许 SystemAssigned 和 UserAssigned 类型的托管服务标识 (的类型。

Sku

表示 SKU 的资源模型定义

SkuTier

如果服务具有多个层,但 PUT 上不需要此字段,则资源提供程序需要实现此字段。

systemData

与资源的创建和上次修改相关的元数据。

UserAssignedIdentity

用户分配的标识属性

BatchEndpoint

Batch 终结点配置。

名称 类型 说明
authMode

EndpointAuthMode

[必需]将“密钥”用于基于密钥的身份验证,将“AMLToken”用于 Azure 机器学习基于令牌的身份验证。 “密钥”不会过期,但“AMLToken”不会过期。

defaults

BatchEndpointDefaults

Batch 终结点的默认值

description

string

推理终结点的说明。

keys

EndpointAuthKeys

最初在终结点上设置的 EndpointAuthKeys。 此属性将始终作为 null 返回。 必须使用 ListKeys API 检索 AuthKey 值。

properties

object

属性字典。 可以添加属性,但不能删除或更改。

provisioningState

EndpointProvisioningState

终结点的预配状态。

scoringUri

string

终结点 URI。

swaggerUri

string

终结点 Swagger URI。

BatchEndpointDefaults

Batch 终结点默认值

名称 类型 说明
deploymentName

string

将默认为终结点的部署的名称。 调用终结点评分 URL 时,此部署最终将收到 100% 的流量。

BatchEndpointTrackedResource

名称 类型 说明
id

string

资源的完全限定的资源 ID。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

identity

ManagedServiceIdentity

托管服务标识 (系统分配的标识和/或用户分配的标识)

kind

string

门户/工具等用于为相同类型的资源呈现不同的 UX 体验的元数据。

location

string

资源所在的地理位置

name

string

资源的名称

properties

BatchEndpoint

[必需]实体的其他属性。

sku

Sku

自动缩放的 ARM 协定所需的 SKU 详细信息。

systemData

systemData

包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。

tags

object

资源标记。

type

string

资源类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts”

createdByType

创建资源的标识类型。

名称 类型 说明
Application

string

Key

string

ManagedIdentity

string

User

string

EndpointAuthKeys

终结点身份验证的密钥。

名称 类型 说明
primaryKey

string

主键。

secondaryKey

string

辅助密钥。

EndpointAuthMode

用于确定终结点身份验证模式的枚举。

名称 类型 说明
AADToken

string

AMLToken

string

Key

string

EndpointProvisioningState

终结点预配的状态。

名称 类型 说明
Canceled

string

Creating

string

Deleting

string

Failed

string

Succeeded

string

Updating

string

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

ErrorDetail

错误详细信息。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorResponse

错误响应

名称 类型 说明
error

ErrorDetail

错误对象。

ManagedServiceIdentity

托管服务标识 (系统分配的标识和/或用户分配的标识)

名称 类型 说明
principalId

string

系统分配的标识的服务主体 ID。 此属性仅针对系统分配的标识提供。

tenantId

string

系统分配的标识的租户 ID。 此属性仅针对系统分配的标识提供。

type

ManagedServiceIdentityType

) 允许 SystemAssigned 和 UserAssigned 类型的托管服务标识 (的类型。

userAssignedIdentities

<string,  UserAssignedIdentity>

User-Assigned 标识
与资源关联的用户分配标识集。 userAssignedIdentities 字典密钥将是采用以下格式的 ARM 资源 ID:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}。 字典值可以是请求中) ({} 空对象。

ManagedServiceIdentityType

) 允许 SystemAssigned 和 UserAssigned 类型的托管服务标识 (的类型。

名称 类型 说明
None

string

SystemAssigned

string

SystemAssigned,UserAssigned

string

UserAssigned

string

Sku

表示 SKU 的资源模型定义

名称 类型 说明
capacity

integer

如果 SKU 支持横向扩展/缩减,则应包含容量整数。 如果无法对资源进行横向扩展/缩减,则可能会省略此项。

family

string

如果服务针对同一 SKU 具有不同代系的硬件,则可以在此处捕获。

name

string

SKU 的名称。 例如 - P3。 它通常是字母+数字代码

size

string

SKU 大小。 当名称字段是层和一些其他值的组合时,这将是独立代码。

tier

SkuTier

如果服务具有多个层,但 PUT 上不需要此字段,则资源提供程序需要实现此字段。

SkuTier

如果服务具有多个层,但 PUT 上不需要此字段,则资源提供程序需要实现此字段。

名称 类型 说明
Basic

string

Free

string

Premium

string

Standard

string

systemData

与资源的创建和上次修改相关的元数据。

名称 类型 说明
createdAt

string

资源创建时间戳 (UTC) 。

createdBy

string

创建资源的标识。

createdByType

createdByType

创建资源的标识类型。

lastModifiedAt

string

资源上次修改的时间戳 (UTC)

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

上次修改资源的标识类型。

UserAssignedIdentity

用户分配的标识属性

名称 类型 说明
clientId

string

已分配标识的客户端 ID。

principalId

string

分配的标识的主体 ID。