Microsoft.MachineLearningServices 工作區/onlineEndpoints/deployments 2023-04-01-preview

Bicep 資源定義

workspaces/onlineEndpoints/deployments 資源類型可以使用目標作業來部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔

資源格式

若要建立 Microsoft.MachineLearningServices/workspaces/onlineEndpoints/deployments 資源,請將下列 Bicep 新增至範本。

resource symbolicname 'Microsoft.MachineLearningServices/workspaces/onlineEndpoints/deployments@2023-04-01-preview' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  sku: {
    capacity: int
    family: 'string'
    name: 'string'
    size: 'string'
    tier: 'string'
  }
  kind: 'string'
  parent: resourceSymbolicName
  identity: {
    type: 'string'
    userAssignedIdentities: {
      {customized property}: {}
    }
  }
  properties: {
    appInsightsEnabled: bool
    codeConfiguration: {
      codeId: 'string'
      scoringScript: 'string'
    }
    dataCollector: {
      collections: {
        {customized property}: {
          clientId: 'string'
          dataCollectionMode: 'string'
          dataId: 'string'
          samplingRate: int
        }
      }
      requestLogging: {
        captureHeaders: [
          'string'
        ]
      }
      rollingRate: 'string'
    }
    description: 'string'
    egressPublicNetworkAccess: 'string'
    environmentId: 'string'
    environmentVariables: {
      {customized property}: 'string'
    }
    instanceType: 'string'
    livenessProbe: {
      failureThreshold: int
      initialDelay: 'string'
      period: 'string'
      successThreshold: int
      timeout: 'string'
    }
    model: 'string'
    modelMountPath: 'string'
    properties: {
      {customized property}: 'string'
    }
    readinessProbe: {
      failureThreshold: int
      initialDelay: 'string'
      period: 'string'
      successThreshold: int
      timeout: 'string'
    }
    requestSettings: {
      maxConcurrentRequestsPerInstance: int
      maxQueueWait: 'string'
      requestTimeout: 'string'
    }
    scaleSettings: {
      scaleType: 'string'
      // For remaining properties, see OnlineScaleSettings objects
    }
    endpointComputeType: 'string'
    // For remaining properties, see OnlineDeploymentProperties objects
  }
}

OnlineDeploymentProperties 物件

設定 endpointComputeType 屬性,以指定對象的類型。

針對 Kubernetes,請使用:

  endpointComputeType: 'Kubernetes'
  containerResourceRequirements: {
    containerResourceLimits: {
      cpu: 'string'
      gpu: 'string'
      memory: 'string'
    }
    containerResourceRequests: {
      cpu: 'string'
      gpu: 'string'
      memory: 'string'
    }
  }

針對 Managed,請使用:

  endpointComputeType: 'Managed'

OnlineScaleSettings 物件

設定 scaleType 屬性,以指定物件的類型。

針對 Default,請使用:

  scaleType: 'Default'

針對 TargetUtilization,請使用:

  scaleType: 'TargetUtilization'
  maxInstances: int
  minInstances: int
  pollingInterval: 'string'
  targetUtilizationPercentage: int

屬性值

workspaces/onlineEndpoints/deployments

名字 描述 價值
名字 資源名稱

請參閱如何在 Bicep 中設定子資源的名稱和類型。
字串 (必要)
位置 資源所在的地理位置 字串 (必要)
標籤 資源標籤。 標記名稱和值的字典。 請參閱範本中的 標籤
sku 自動調整之 ARM 合約所需的 SKU 詳細數據。 Sku
入口網站/工具等用來轉譯相同類型資源的不同UX體驗的元數據。 字串
父母 在 Bicep 中,您可以指定子資源的父資源。 只有在父資源外部宣告子資源時,才需要新增這個屬性。

如需詳細資訊,請參閱 父資源外部的子資源
類型資源的符號名稱:onlineEndpoints
身份 受控服務識別(系統指派和/或使用者指派的身分識別) ManagedServiceIdentity
性能 [必要]實體的其他屬性。 OnlineDeploymentProperties (必要)

ManagedServiceIdentity

名字 描述 價值
類型 受控服務識別的類型(允許 SystemAssigned 和 UserAssigned 類型)。 'None'
'SystemAssigned'
'SystemAssigned,UserAssigned'
'UserAssigned' (必要)
userAssignedIdentities 與資源相關聯的使用者指派身分識別集。 userAssignedIdentities 字典索引鍵的格式為 ARM 資源標識符:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}。 字典值可以是要求中的空白物件({})。 UserAssignedIdentities

UserAssignedIdentities

名字 描述 價值
{自定義屬性} UserAssignedIdentity

UserAssignedIdentity

此物件不包含在部署期間設定的任何屬性。 所有屬性都是 ReadOnly。

OnlineDeploymentProperties

名字 描述 價值
appInsightsEnabled 如果為 true,請啟用 Application Insights 記錄。 bool
codeConfiguration 端點部署的程式代碼組態。 CodeConfiguration
dataCollector mdc 組態是 null 時,我們會停用 mdc。 DataCollector
描述 端點部署的描述。 字串
egressPublicNetworkAccess 如果已啟用,請允許輸出公用網路存取。 如果停用,這會建立安全的輸出。 預設值:已啟用。 'Disabled'
'Enabled'
environmentId 端點部署環境規格的 ARM 資源識別碼。 字串
environmentVariables 部署的環境變數組態。 EndpointDeploymentPropertiesBaseEnvironmentVariables
instanceType 計算實例類型。 字串
livenessProbe 即時性探查會定期監視容器的健康情況。 ProbeSettings
模型的 URI 路徑。 字串
modelMountPath 在自定義容器中掛接模型的路徑。 字串
性能 屬性字典。 可以新增屬性,但無法移除或改變。 EndpointDeploymentPropertiesBaseProperties
readinessProbe 整備探查會驗證容器是否已準備好提供流量。 屬性和預設值與活躍度探查相同。 ProbeSettings
requestSettings 要求部署的設定。 OnlineRequestSettings
scaleSettings 部署的調整設定。
如果它是 Null 或未提供,
默認為 KubernetesOnlineDeployment 的 TargetUtilizationScaleSettings
和 至 ManagedOnlineDeployment 的 DefaultScaleSettings。
OnlineScaleSettings
endpointComputeType 設定物件類型 Kubernetes
受控 (必要)

CodeConfiguration

名字 描述 價值
codeId 程式代碼資產的 ARM 資源識別碼。 字串
scoringScript [必要]在啟動時執行的腳本。 例如 “score.py” 字串 (必要)

約束:
最小長度 = 1
Pattern = [a-zA-Z0-9_]

DataCollector

名字 描述 價值
收集 [必要]集合組態。 每個集合都有自己的組態來收集模型數據,而且集合的名稱可以是任意字串。
模型數據收集器可用於承載記錄或自定義記錄或兩者。 收集要求和回應會保留給承載記錄,其他則用於自定義記錄。
DataCollectorCollections (必要)
requestLogging mdc 的要求記錄組態包含所有集合的進階記錄設定。 這是選擇性的。 RequestLogging
rollingRate 將模型數據收集到 Blob 記憶體時,我們需要將數據變換到不同的路徑,以避免在單一 Blob 檔案中記錄所有數據。
如果滾動速率為小時,則會在 Blob 路徑 /yyyy/MM/dd/HH/中收集所有數據。
如果是當天,所有數據都會在 Blob 路徑 /yyyy/MM/dd/中收集。
滾動路徑的另一個優點是模型監視 ui 能夠非常快速地選取時間範圍的數據。
'Day'
'Hour'
'Minute'
'Month'
'Year'

DataCollectorCollections

名字 描述 價值
{自定義屬性} 集合

收集

名字 描述 價值
clientId 用來收集記錄至 Blob 記憶體的 msi 用戶端識別碼。 如果為 null,後端會挑選已註冊的端點身分識別進行驗證。 字串
dataCollectionMode 啟用或停用數據收集。 'Disabled'
'Enabled'
dataId 數據資產arm資源標識碼。用戶端可確保數據資產指向 Blob 記憶體,而後端會將數據收集到 Blob 記憶體。 字串
samplingRate 收集的取樣率。 取樣率 1.0 表示我們預設會收集 100% 數據。 int

RequestLogging

名字 描述 價值
captureHeaders 針對承載記錄,我們預設只會收集承載。 如果客戶也想要收集指定的標頭,他們可以在 captureHeaders 中設定它們,讓後端會收集這些標頭以及承載。 string[]

EndpointDeploymentPropertiesBaseEnvironmentVariables

名字 描述 價值
{自定義屬性} 字串

ProbeSettings

名字 描述 價值
failureThreshold 傳回狀況不良狀態之前允許的失敗次數。 int
initialDelay ISO 8601 格式第一個探查之前的延遲。 字串
時期 ISO 8601 格式探查之間的時間長度。 字串
successThreshold 傳回狀況良好狀態之前,成功探查的數目。 int
超時 ISO 8601 格式的探查逾時。 字串

EndpointDeploymentPropertiesBaseProperties

名字 描述 價值
{自定義屬性} 字串

OnlineRequestSettings

名字 描述 價值
maxConcurrentRequestsPerInstance 每個節點允許每個部署的最大並行要求數目。 預設值為 1。 int
maxQueueWait 要求以 ISO 8601 格式留在佇列中的最大時間量。
預設為 500 毫秒。
字串
requestTimeout ISO 8601 格式的評分逾時。
預設為 5000 毫秒。
字串

OnlineScaleSettings

名字 描述 價值
scaleType 設定物件類型 預設
TargetUtilization (必要)

DefaultScaleSettings

名字 描述 價值
scaleType [必要]部署調整演算法的類型 'Default' (必要)

TargetUtilizationScaleSettings

名字 描述 價值
scaleType [必要]部署調整演算法的類型 'TargetUtilization' (必要)
maxInstances 部署可調整的實例數目上限。 配額將保留給max_instances。 int
minInstances 要一律存在的實例數目下限。 int
pollingInterval ISO 8691 格式的輪詢間隔。 僅支援有效位數為秒數的持續時間。 字串
targetUtilizationPercentage 自動調整程式的目標 CPU 使用量。 int

KubernetesOnlineDeployment

名字 描述 價值
endpointComputeType [必要]端點的計算類型。 'Kubernetes' (必要)
containerResourceRequirements 容器的資源需求(cpu和記憶體)。 ContainerResourceRequirements

ContainerResourceRequirements

名字 描述 價值
containerResourceLimits 容器資源限制資訊: ContainerResourceSettings
containerResourceRequests 容器資源要求資訊: ContainerResourceSettings

ContainerResourceSettings

名字 描述 價值
中央處理器 容器的 vCPU 要求/限制數目。 詳細資訊:
https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
字串
gpu 容器的 Nvidia GPU 卡片要求/限制數目。 詳細資訊:
https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
字串
記憶 容器的記憶體大小要求/限制。 詳細資訊:
https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
字串

ManagedOnlineDeployment

名字 描述 價值
endpointComputeType [必要]端點的計算類型。 'Managed' (必要)

Sku

名字 描述 價值
能力 如果 SKU 支援相應放大/縮小,則應該包含容量整數。 如果資源無法相應放大/縮小,可能會省略此專案。 int
家庭 如果服務有不同世代的硬體,針對相同的 SKU,則可以在這裡擷取。 字串
名字 SKU 的名稱。 例如 - P3。 通常是字母+數位碼 字串 (必要)
大小 SKU 大小。 當名稱欄位是階層和其他一些值的組合時,這會是獨立程序代碼。 字串
如果服務有一個以上的層級,但 PUT 上不需要此欄位,則資源提供者必須實作此字段。 'Basic'
'Free'
'Premium'
'Standard'

ARM 樣本資源定義

workspaces/onlineEndpoints/deployments 資源類型可以使用目標作業來部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔

資源格式

若要建立 Microsoft.MachineLearningServices/workspaces/onlineEndpoints/deployments 資源,請將下列 JSON 新增至範本。

{
  "type": "Microsoft.MachineLearningServices/workspaces/onlineEndpoints/deployments",
  "apiVersion": "2023-04-01-preview",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "sku": {
    "capacity": "int",
    "family": "string",
    "name": "string",
    "size": "string",
    "tier": "string"
  },
  "kind": "string",
  "identity": {
    "type": "string",
    "userAssignedIdentities": {
      "{customized property}": {}
    }
  },
  "properties": {
    "appInsightsEnabled": "bool",
    "codeConfiguration": {
      "codeId": "string",
      "scoringScript": "string"
    },
    "dataCollector": {
      "collections": {
        "{customized property}": {
          "clientId": "string",
          "dataCollectionMode": "string",
          "dataId": "string",
          "samplingRate": "int"
        }
      },
      "requestLogging": {
        "captureHeaders": [ "string" ]
      },
      "rollingRate": "string"
    },
    "description": "string",
    "egressPublicNetworkAccess": "string",
    "environmentId": "string",
    "environmentVariables": {
      "{customized property}": "string"
    },
    "instanceType": "string",
    "livenessProbe": {
      "failureThreshold": "int",
      "initialDelay": "string",
      "period": "string",
      "successThreshold": "int",
      "timeout": "string"
    },
    "model": "string",
    "modelMountPath": "string",
    "properties": {
      "{customized property}": "string"
    },
    "readinessProbe": {
      "failureThreshold": "int",
      "initialDelay": "string",
      "period": "string",
      "successThreshold": "int",
      "timeout": "string"
    },
    "requestSettings": {
      "maxConcurrentRequestsPerInstance": "int",
      "maxQueueWait": "string",
      "requestTimeout": "string"
    },
    "scaleSettings": {
      "scaleType": "string"
      // For remaining properties, see OnlineScaleSettings objects
    },
    "endpointComputeType": "string"
    // For remaining properties, see OnlineDeploymentProperties objects
  }
}

OnlineDeploymentProperties 物件

設定 endpointComputeType 屬性,以指定對象的類型。

針對 Kubernetes,請使用:

  "endpointComputeType": "Kubernetes",
  "containerResourceRequirements": {
    "containerResourceLimits": {
      "cpu": "string",
      "gpu": "string",
      "memory": "string"
    },
    "containerResourceRequests": {
      "cpu": "string",
      "gpu": "string",
      "memory": "string"
    }
  }

針對 Managed,請使用:

  "endpointComputeType": "Managed"

OnlineScaleSettings 物件

設定 scaleType 屬性,以指定物件的類型。

針對 Default,請使用:

  "scaleType": "Default"

針對 TargetUtilization,請使用:

  "scaleType": "TargetUtilization",
  "maxInstances": "int",
  "minInstances": "int",
  "pollingInterval": "string",
  "targetUtilizationPercentage": "int"

屬性值

workspaces/onlineEndpoints/deployments

名字 描述 價值
類型 資源類型 'Microsoft.MachineLearningServices/workspaces/onlineEndpoints/deployments'
apiVersion 資源 API 版本 '2023-04-01-preview'
名字 資源名稱

請參閱如何在JSON ARM 範本中設定子資源的名稱和類型。
字串 (必要)
位置 資源所在的地理位置 字串 (必要)
標籤 資源標籤。 標記名稱和值的字典。 請參閱範本中的 標籤
sku 自動調整之 ARM 合約所需的 SKU 詳細數據。 Sku
入口網站/工具等用來轉譯相同類型資源的不同UX體驗的元數據。 字串
身份 受控服務識別(系統指派和/或使用者指派的身分識別) ManagedServiceIdentity
性能 [必要]實體的其他屬性。 OnlineDeploymentProperties (必要)

ManagedServiceIdentity

名字 描述 價值
類型 受控服務識別的類型(允許 SystemAssigned 和 UserAssigned 類型)。 'None'
'SystemAssigned'
'SystemAssigned,UserAssigned'
'UserAssigned' (必要)
userAssignedIdentities 與資源相關聯的使用者指派身分識別集。 userAssignedIdentities 字典索引鍵的格式為 ARM 資源標識符:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}。 字典值可以是要求中的空白物件({})。 UserAssignedIdentities

UserAssignedIdentities

名字 描述 價值
{自定義屬性} UserAssignedIdentity

UserAssignedIdentity

此物件不包含在部署期間設定的任何屬性。 所有屬性都是 ReadOnly。

OnlineDeploymentProperties

名字 描述 價值
appInsightsEnabled 如果為 true,請啟用 Application Insights 記錄。 bool
codeConfiguration 端點部署的程式代碼組態。 CodeConfiguration
dataCollector mdc 組態是 null 時,我們會停用 mdc。 DataCollector
描述 端點部署的描述。 字串
egressPublicNetworkAccess 如果已啟用,請允許輸出公用網路存取。 如果停用,這會建立安全的輸出。 預設值:已啟用。 'Disabled'
'Enabled'
environmentId 端點部署環境規格的 ARM 資源識別碼。 字串
environmentVariables 部署的環境變數組態。 EndpointDeploymentPropertiesBaseEnvironmentVariables
instanceType 計算實例類型。 字串
livenessProbe 即時性探查會定期監視容器的健康情況。 ProbeSettings
模型的 URI 路徑。 字串
modelMountPath 在自定義容器中掛接模型的路徑。 字串
性能 屬性字典。 可以新增屬性,但無法移除或改變。 EndpointDeploymentPropertiesBaseProperties
readinessProbe 整備探查會驗證容器是否已準備好提供流量。 屬性和預設值與活躍度探查相同。 ProbeSettings
requestSettings 要求部署的設定。 OnlineRequestSettings
scaleSettings 部署的調整設定。
如果它是 Null 或未提供,
默認為 KubernetesOnlineDeployment 的 TargetUtilizationScaleSettings
和 至 ManagedOnlineDeployment 的 DefaultScaleSettings。
OnlineScaleSettings
endpointComputeType 設定物件類型 Kubernetes
受控 (必要)

CodeConfiguration

名字 描述 價值
codeId 程式代碼資產的 ARM 資源識別碼。 字串
scoringScript [必要]在啟動時執行的腳本。 例如 “score.py” 字串 (必要)

約束:
最小長度 = 1
Pattern = [a-zA-Z0-9_]

DataCollector

名字 描述 價值
收集 [必要]集合組態。 每個集合都有自己的組態來收集模型數據,而且集合的名稱可以是任意字串。
模型數據收集器可用於承載記錄或自定義記錄或兩者。 收集要求和回應會保留給承載記錄,其他則用於自定義記錄。
DataCollectorCollections (必要)
requestLogging mdc 的要求記錄組態包含所有集合的進階記錄設定。 這是選擇性的。 RequestLogging
rollingRate 將模型數據收集到 Blob 記憶體時,我們需要將數據變換到不同的路徑,以避免在單一 Blob 檔案中記錄所有數據。
如果滾動速率為小時,則會在 Blob 路徑 /yyyy/MM/dd/HH/中收集所有數據。
如果是當天,所有數據都會在 Blob 路徑 /yyyy/MM/dd/中收集。
滾動路徑的另一個優點是模型監視 ui 能夠非常快速地選取時間範圍的數據。
'Day'
'Hour'
'Minute'
'Month'
'Year'

DataCollectorCollections

名字 描述 價值
{自定義屬性} 集合

收集

名字 描述 價值
clientId 用來收集記錄至 Blob 記憶體的 msi 用戶端識別碼。 如果為 null,後端會挑選已註冊的端點身分識別進行驗證。 字串
dataCollectionMode 啟用或停用數據收集。 'Disabled'
'Enabled'
dataId 數據資產arm資源標識碼。用戶端可確保數據資產指向 Blob 記憶體,而後端會將數據收集到 Blob 記憶體。 字串
samplingRate 收集的取樣率。 取樣率 1.0 表示我們預設會收集 100% 數據。 int

RequestLogging

名字 描述 價值
captureHeaders 針對承載記錄,我們預設只會收集承載。 如果客戶也想要收集指定的標頭,他們可以在 captureHeaders 中設定它們,讓後端會收集這些標頭以及承載。 string[]

EndpointDeploymentPropertiesBaseEnvironmentVariables

名字 描述 價值
{自定義屬性} 字串

ProbeSettings

名字 描述 價值
failureThreshold 傳回狀況不良狀態之前允許的失敗次數。 int
initialDelay ISO 8601 格式第一個探查之前的延遲。 字串
時期 ISO 8601 格式探查之間的時間長度。 字串
successThreshold 傳回狀況良好狀態之前,成功探查的數目。 int
超時 ISO 8601 格式的探查逾時。 字串

EndpointDeploymentPropertiesBaseProperties

名字 描述 價值
{自定義屬性} 字串

OnlineRequestSettings

名字 描述 價值
maxConcurrentRequestsPerInstance 每個節點允許每個部署的最大並行要求數目。 預設值為 1。 int
maxQueueWait 要求以 ISO 8601 格式留在佇列中的最大時間量。
預設為 500 毫秒。
字串
requestTimeout ISO 8601 格式的評分逾時。
預設為 5000 毫秒。
字串

OnlineScaleSettings

名字 描述 價值
scaleType 設定物件類型 預設
TargetUtilization (必要)

DefaultScaleSettings

名字 描述 價值
scaleType [必要]部署調整演算法的類型 'Default' (必要)

TargetUtilizationScaleSettings

名字 描述 價值
scaleType [必要]部署調整演算法的類型 'TargetUtilization' (必要)
maxInstances 部署可調整的實例數目上限。 配額將保留給max_instances。 int
minInstances 要一律存在的實例數目下限。 int
pollingInterval ISO 8691 格式的輪詢間隔。 僅支援有效位數為秒數的持續時間。 字串
targetUtilizationPercentage 自動調整程式的目標 CPU 使用量。 int

KubernetesOnlineDeployment

名字 描述 價值
endpointComputeType [必要]端點的計算類型。 'Kubernetes' (必要)
containerResourceRequirements 容器的資源需求(cpu和記憶體)。 ContainerResourceRequirements

ContainerResourceRequirements

名字 描述 價值
containerResourceLimits 容器資源限制資訊: ContainerResourceSettings
containerResourceRequests 容器資源要求資訊: ContainerResourceSettings

ContainerResourceSettings

名字 描述 價值
中央處理器 容器的 vCPU 要求/限制數目。 詳細資訊:
https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
字串
gpu 容器的 Nvidia GPU 卡片要求/限制數目。 詳細資訊:
https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
字串
記憶 容器的記憶體大小要求/限制。 詳細資訊:
https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
字串

ManagedOnlineDeployment

名字 描述 價值
endpointComputeType [必要]端點的計算類型。 'Managed' (必要)

Sku

名字 描述 價值
能力 如果 SKU 支援相應放大/縮小,則應該包含容量整數。 如果資源無法相應放大/縮小,可能會省略此專案。 int
家庭 如果服務有不同世代的硬體,針對相同的 SKU,則可以在這裡擷取。 字串
名字 SKU 的名稱。 例如 - P3。 通常是字母+數位碼 字串 (必要)
大小 SKU 大小。 當名稱欄位是階層和其他一些值的組合時,這會是獨立程序代碼。 字串
如果服務有一個以上的層級,但 PUT 上不需要此欄位,則資源提供者必須實作此字段。 'Basic'
'Free'
'Premium'
'Standard'

Terraform (AzAPI 提供者) 資源定義

workspaces/onlineEndpoints/deployments 資源類型可以使用目標作業來部署:

  • 資源群組

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔

資源格式

若要建立 Microsoft.MachineLearningServices/workspaces/onlineEndpoints/deployments 資源,請將下列 Terraform 新增至範本。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.MachineLearningServices/workspaces/onlineEndpoints/deployments@2023-04-01-preview"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  identity {
    type = "string"
    identity_ids = []
  }
  body = jsonencode({
    properties = {
      appInsightsEnabled = bool
      codeConfiguration = {
        codeId = "string"
        scoringScript = "string"
      }
      dataCollector = {
        collections = {
          {customized property} = {
            clientId = "string"
            dataCollectionMode = "string"
            dataId = "string"
            samplingRate = int
          }
        }
        requestLogging = {
          captureHeaders = [
            "string"
          ]
        }
        rollingRate = "string"
      }
      description = "string"
      egressPublicNetworkAccess = "string"
      environmentId = "string"
      environmentVariables = {
        {customized property} = "string"
      }
      instanceType = "string"
      livenessProbe = {
        failureThreshold = int
        initialDelay = "string"
        period = "string"
        successThreshold = int
        timeout = "string"
      }
      model = "string"
      modelMountPath = "string"
      properties = {
        {customized property} = "string"
      }
      readinessProbe = {
        failureThreshold = int
        initialDelay = "string"
        period = "string"
        successThreshold = int
        timeout = "string"
      }
      requestSettings = {
        maxConcurrentRequestsPerInstance = int
        maxQueueWait = "string"
        requestTimeout = "string"
      }
      scaleSettings = {
        scaleType = "string"
        // For remaining properties, see OnlineScaleSettings objects
      }
      endpointComputeType = "string"
      // For remaining properties, see OnlineDeploymentProperties objects
    }
    sku = {
      capacity = int
      family = "string"
      name = "string"
      size = "string"
      tier = "string"
    }
    kind = "string"
  })
}

OnlineDeploymentProperties 物件

設定 endpointComputeType 屬性,以指定對象的類型。

針對 Kubernetes,請使用:

  endpointComputeType = "Kubernetes"
  containerResourceRequirements = {
    containerResourceLimits = {
      cpu = "string"
      gpu = "string"
      memory = "string"
    }
    containerResourceRequests = {
      cpu = "string"
      gpu = "string"
      memory = "string"
    }
  }

針對 Managed,請使用:

  endpointComputeType = "Managed"

OnlineScaleSettings 物件

設定 scaleType 屬性,以指定物件的類型。

針對 Default,請使用:

  scaleType = "Default"

針對 TargetUtilization,請使用:

  scaleType = "TargetUtilization"
  maxInstances = int
  minInstances = int
  pollingInterval = "string"
  targetUtilizationPercentage = int

屬性值

workspaces/onlineEndpoints/deployments

名字 描述 價值
類型 資源類型 “Microsoft.MachineLearningServices/workspaces/onlineEndpoints/deployments@2023-04-01-preview”
名字 資源名稱 字串 (必要)
位置 資源所在的地理位置 字串 (必要)
parent_id 此資源為父系之資源的標識碼。 類型資源的標識碼:onlineEndpoints
標籤 資源標籤。 標記名稱和值的字典。
sku 自動調整之 ARM 合約所需的 SKU 詳細數據。 Sku
入口網站/工具等用來轉譯相同類型資源的不同UX體驗的元數據。 字串
身份 受控服務識別(系統指派和/或使用者指派的身分識別) ManagedServiceIdentity
性能 [必要]實體的其他屬性。 OnlineDeploymentProperties (必要)

ManagedServiceIdentity

名字 描述 價值
類型 受控服務識別的類型(允許 SystemAssigned 和 UserAssigned 類型)。 “SystemAssigned”
“SystemAssigned,UserAssigned”
“UserAssigned” (必要)
identity_ids 與資源相關聯的使用者指派身分識別集。 userAssignedIdentities 字典索引鍵的格式為 ARM 資源標識符:'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}。 字典值可以是要求中的空白物件({})。 使用者身分識別標識碼的陣列。

UserAssignedIdentities

名字 描述 價值
{自定義屬性} UserAssignedIdentity

UserAssignedIdentity

此物件不包含在部署期間設定的任何屬性。 所有屬性都是 ReadOnly。

OnlineDeploymentProperties

名字 描述 價值
appInsightsEnabled 如果為 true,請啟用 Application Insights 記錄。 bool
codeConfiguration 端點部署的程式代碼組態。 CodeConfiguration
dataCollector mdc 組態是 null 時,我們會停用 mdc。 DataCollector
描述 端點部署的描述。 字串
egressPublicNetworkAccess 如果已啟用,請允許輸出公用網路存取。 如果停用,這會建立安全的輸出。 預設值:已啟用。 “Disabled”
“Enabled”
environmentId 端點部署環境規格的 ARM 資源識別碼。 字串
environmentVariables 部署的環境變數組態。 EndpointDeploymentPropertiesBaseEnvironmentVariables
instanceType 計算實例類型。 字串
livenessProbe 即時性探查會定期監視容器的健康情況。 ProbeSettings
模型的 URI 路徑。 字串
modelMountPath 在自定義容器中掛接模型的路徑。 字串
性能 屬性字典。 可以新增屬性,但無法移除或改變。 EndpointDeploymentPropertiesBaseProperties
readinessProbe 整備探查會驗證容器是否已準備好提供流量。 屬性和預設值與活躍度探查相同。 ProbeSettings
requestSettings 要求部署的設定。 OnlineRequestSettings
scaleSettings 部署的調整設定。
如果它是 Null 或未提供,
默認為 KubernetesOnlineDeployment 的 TargetUtilizationScaleSettings
和 至 ManagedOnlineDeployment 的 DefaultScaleSettings。
OnlineScaleSettings
endpointComputeType 設定物件類型 Kubernetes
受控 (必要)

CodeConfiguration

名字 描述 價值
codeId 程式代碼資產的 ARM 資源識別碼。 字串
scoringScript [必要]在啟動時執行的腳本。 例如 “score.py” 字串 (必要)

約束:
最小長度 = 1
Pattern = [a-zA-Z0-9_]

DataCollector

名字 描述 價值
收集 [必要]集合組態。 每個集合都有自己的組態來收集模型數據,而且集合的名稱可以是任意字串。
模型數據收集器可用於承載記錄或自定義記錄或兩者。 收集要求和回應會保留給承載記錄,其他則用於自定義記錄。
DataCollectorCollections (必要)
requestLogging mdc 的要求記錄組態包含所有集合的進階記錄設定。 這是選擇性的。 RequestLogging
rollingRate 將模型數據收集到 Blob 記憶體時,我們需要將數據變換到不同的路徑,以避免在單一 Blob 檔案中記錄所有數據。
如果滾動速率為小時,則會在 Blob 路徑 /yyyy/MM/dd/HH/中收集所有數據。
如果是當天,所有數據都會在 Blob 路徑 /yyyy/MM/dd/中收集。
滾動路徑的另一個優點是模型監視 ui 能夠非常快速地選取時間範圍的數據。
“Day”
“Hour”
“Minute”
“Month”
“Year”

DataCollectorCollections

名字 描述 價值
{自定義屬性} 集合

收集

名字 描述 價值
clientId 用來收集記錄至 Blob 記憶體的 msi 用戶端識別碼。 如果為 null,後端會挑選已註冊的端點身分識別進行驗證。 字串
dataCollectionMode 啟用或停用數據收集。 “Disabled”
“Enabled”
dataId 數據資產arm資源標識碼。用戶端可確保數據資產指向 Blob 記憶體,而後端會將數據收集到 Blob 記憶體。 字串
samplingRate 收集的取樣率。 取樣率 1.0 表示我們預設會收集 100% 數據。 int

RequestLogging

名字 描述 價值
captureHeaders 針對承載記錄,我們預設只會收集承載。 如果客戶也想要收集指定的標頭,他們可以在 captureHeaders 中設定它們,讓後端會收集這些標頭以及承載。 string[]

EndpointDeploymentPropertiesBaseEnvironmentVariables

名字 描述 價值
{自定義屬性} 字串

ProbeSettings

名字 描述 價值
failureThreshold 傳回狀況不良狀態之前允許的失敗次數。 int
initialDelay ISO 8601 格式第一個探查之前的延遲。 字串
時期 ISO 8601 格式探查之間的時間長度。 字串
successThreshold 傳回狀況良好狀態之前,成功探查的數目。 int
超時 ISO 8601 格式的探查逾時。 字串

EndpointDeploymentPropertiesBaseProperties

名字 描述 價值
{自定義屬性} 字串

OnlineRequestSettings

名字 描述 價值
maxConcurrentRequestsPerInstance 每個節點允許每個部署的最大並行要求數目。 預設值為 1。 int
maxQueueWait 要求以 ISO 8601 格式留在佇列中的最大時間量。
預設為 500 毫秒。
字串
requestTimeout ISO 8601 格式的評分逾時。
預設為 5000 毫秒。
字串

OnlineScaleSettings

名字 描述 價值
scaleType 設定物件類型 預設
TargetUtilization (必要)

DefaultScaleSettings

名字 描述 價值
scaleType [必要]部署調整演算法的類型 “Default” (必要)

TargetUtilizationScaleSettings

名字 描述 價值
scaleType [必要]部署調整演算法的類型 “TargetUtilization” (必要)
maxInstances 部署可調整的實例數目上限。 配額將保留給max_instances。 int
minInstances 要一律存在的實例數目下限。 int
pollingInterval ISO 8691 格式的輪詢間隔。 僅支援有效位數為秒數的持續時間。 字串
targetUtilizationPercentage 自動調整程式的目標 CPU 使用量。 int

KubernetesOnlineDeployment

名字 描述 價值
endpointComputeType [必要]端點的計算類型。 “Kubernetes” (必要)
containerResourceRequirements 容器的資源需求(cpu和記憶體)。 ContainerResourceRequirements

ContainerResourceRequirements

名字 描述 價值
containerResourceLimits 容器資源限制資訊: ContainerResourceSettings
containerResourceRequests 容器資源要求資訊: ContainerResourceSettings

ContainerResourceSettings

名字 描述 價值
中央處理器 容器的 vCPU 要求/限制數目。 詳細資訊:
https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
字串
gpu 容器的 Nvidia GPU 卡片要求/限制數目。 詳細資訊:
https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
字串
記憶 容器的記憶體大小要求/限制。 詳細資訊:
https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
字串

ManagedOnlineDeployment

名字 描述 價值
endpointComputeType [必要]端點的計算類型。 “Managed” (必要)

Sku

名字 描述 價值
能力 如果 SKU 支援相應放大/縮小,則應該包含容量整數。 如果資源無法相應放大/縮小,可能會省略此專案。 int
家庭 如果服務有不同世代的硬體,針對相同的 SKU,則可以在這裡擷取。 字串
名字 SKU 的名稱。 例如 - P3。 通常是字母+數位碼 字串 (必要)
大小 SKU 大小。 當名稱欄位是階層和其他一些值的組合時,這會是獨立程序代碼。 字串
如果服務有一個以上的層級,但 PUT 上不需要此欄位,則資源提供者必須實作此字段。 “Basic”
“Free”
“Premium”
“Standard”