SslConfiguration 類別
表示要與 AksCompute 搭配使用的 SSL 組態物件。
初始化 SslConfiguration 物件。
- 繼承
-
builtins.objectSslConfiguration
建構函式
SslConfiguration(status=None, cert=None, key=None, cname=None, leaf_domain_label=None, overwrite_existing_domain=False, renew=False)
參數
備註
若要設定 SSL,請指定 leaf_domain_label
參數或參數 cname
、 cert
和 key
。
指定 SSL 組態的一般模式是使用 attach_configuration
類別的 AksCompute 或 provisioning_configuration
方法來取得組態物件。 然後,使用 enable_ssl
傳回之組態物件的 方法。 例如,針對附加組態,請使用 enable_ssl 方法。
# Load workspace configuration from the config.json file.
from azureml.core import Workspace
ws = Workspace.from_config()
# Use the default configuration, but you can also provide parameters to customize.
from azureml.core.compute import AksCompute
prov_config = AksCompute.provisioning_configuration()
attach_config = AksCompute.attach_configuration(resource_group=ws.resource_group,
cluster_name="dev-cluster")
# Enable ssl.
prov_config.enable_ssl(leaf_domain_label = "contoso")
attach_config.enable_ssl(leaf_domain_label = "contoso")
如需啟用 AKS SSL 的詳細資訊,請參閱 使用 SSL 透過 Azure Machine Learning 保護 Web 服務。
方法
deserialize |
將 JSON 物件轉換成 SslConfiguration 物件。 |
serialize |
將此 SslConfiguration 物件轉換成 JSON 序列化字典。 |
deserialize
將 JSON 物件轉換成 SslConfiguration 物件。
static deserialize(object_dict)
參數
傳回
所提供 JSON 物件的 SslConfiguration 標記法。
傳回類型
例外狀況
serialize
將此 SslConfiguration 物件轉換成 JSON 序列化字典。
serialize()
傳回
這個 SslConfiguration 物件的 JSON 表示。
傳回類型
例外狀況
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應