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 的类型。 |
description
|
提供此 Webservice 的说明。 默认值: None
|
tags
|
提供此 Webservice 的键值标签字典。 默认值: None
|
properties
|
提供此 Webservice 的键值属性字典。 这些属性在部署后无法更改,但是可以添加新的键值对。 默认值: None
|
primary_key
|
要用于此 Webservice 的主要身份验证密钥。 默认值: None
|
secondary_key
|
要用于此 Webservice 的辅助身份验证密钥。 默认值: None
|
location
|
要将此 Webservice 部署到的 Azure 区域。 默认值: None
|
type
必需
|
与此对象关联的 Webservice 的类型。 |
description
必需
|
提供此 Webservice 的说明。 |
tags
必需
|
提供此 Webservice 的键值标签字典。 |
properties
必需
|
提供此 Webservice 的键值属性字典。 这些属性在部署后无法更改,但是可以添加新的键值对。 |
primary_key
必需
|
要用于此 Webservice 的主要身份验证密钥。 |
secondary_key
必需
|
要用于此 Webservice 的辅助身份验证密钥。 |
location
必需
|
要将此 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
validate_image
检查要部署到 Webservice 的映像是否有效。
如果验证失败,则会引发 WebserviceException。
validate_image(image)
参数
名称 | 说明 |
---|---|
cls
必需
|
指示这是一个类方法。 |
image
必需
|
将部署到 Webservice 的映像。 |
例外
类型 | 说明 |
---|---|