WebserviceDeploymentConfiguration 类

为所有 Webservice 部署配置对象定义基类功能。

此类表示用于将 Webservice 部署到特定目标上的配置参数。 例如,若要为 Azure Kubernetes 服务创建部署,请使用 AksWebservice 类的 deploy_configuration 方法。

初始化配置对象。

继承
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
必需

将部署到 Webservice 的映像。

例外