WebserviceDeploymentConfiguration 類別

定義所有 Webservice 部署組態物件的基類功能。

這個類別代表在特定目標上部署 Webservice 的組態參數。 例如,若要建立Azure Kubernetes Service的部署,請使用 deploy_configuration 類別的 AksWebservice 方法。

初始化組態物件。

繼承
WebserviceDeploymentConfiguration

建構函式

WebserviceDeploymentConfiguration(type, description=None, tags=None, properties=None, primary_key=None, secondary_key=None, location=None)

參數

type
Webservice
必要

與此物件相關聯的 Webservice 類型。

description
str
預設值: None

提供此 Webservice 的描述。

tags
dict[str, str]
預設值: None

索引鍵值標籤的字典,可提供此 Webservice。

properties
dict[str, str]
預設值: None

索引鍵值屬性的字典,可提供此 Webservice。 部署之後,就無法變更這些屬性,但是可以新增新的索引鍵值組。

primary_key
str
預設值: None

要用於此 Webservice 的主要驗證金鑰。

secondary_key
str
預設值: None

要用於此 Webservice 的次要驗證金鑰。

location
str
預設值: None

要作為部署此 Webservice 的 Azure 區域。

type
Webservice
必要

與此物件相關聯的 Webservice 類型。

description
str
必要

提供此 Webservice 的描述。

tags
dict[str, str]
必要

索引鍵值標籤的字典,可提供此 Webservice。

properties
dict[str, str]
必要

索引鍵值屬性的字典,可提供此 Webservice。 部署之後,就無法變更這些屬性,但是可以新增新的索引鍵值組。

primary_key
str
必要

要用於此 Webservice 的主要驗證金鑰。

secondary_key
str
必要

要用於此 Webservice 的次要驗證金鑰。

location
str
必要

要作為部署此 Webservice 的 Azure 區域。

變數

azureml.core.webservice.Webservice.description

提供此 Webservice 的描述。

azureml.core.webservice.Webservice.tags

索引鍵值標籤的字典,可提供此 Webservice。

azureml.core.webservice.Webservice.properties

索引鍵值屬性的字典,可提供此 Webservice。 部署之後,就無法變更這些屬性,但是可以新增新的索引鍵值組。

azureml.core.webservice.Webservice.primary_key

要用於此 Webservice 的主要驗證金鑰。

azureml.core.webservice.Webservice.secondary_key

要用於此 Webservice 的次要驗證金鑰。

azureml.core.webservice.Webservice.location

要作為部署此 Webservice 的 Azure 區域。

方法

print_deploy_configuration

列印部署組態。

validate_configuration

檢查指定的組態值是否有效。

如果驗證失敗, WebserviceException 則引發 。

validate_image

檢查部署至 Webservice 的映射是否有效。

如果驗證失敗, WebserviceException 則引發 。

print_deploy_configuration

列印部署組態。

abstract print_deploy_configuration()

validate_configuration

檢查指定的組態值是否有效。

如果驗證失敗, WebserviceException 則引發 。

abstract validate_configuration()

例外狀況

validate_image

檢查部署至 Webservice 的映射是否有效。

如果驗證失敗, WebserviceException 則引發 。

validate_image(image)

參數

cls
必要

表示這是類別方法。

image
Image
必要

將部署至 Web 服務的映射。

例外狀況