SslConfiguration Class
Represents an SSL configuration object for use with AksCompute.
Initialize the SslConfiguration object.
- Inheritance
-
builtins.objectSslConfiguration
Constructor
SslConfiguration(status=None, cert=None, key=None, cname=None, leaf_domain_label=None, overwrite_existing_domain=False, renew=False)
Parameters
Name | Description |
---|---|
status
|
Indicates whether SSL validation is enabled, disabled, or auto. Default value: None
|
cert
|
The cert string to use for SSL validation. If provided, you must also provide Default value: None
|
key
|
The key string to use for SSL validation. If provided, you must also provide Default value: None
|
cname
|
The CNAME to use for SSL validation. If provided, you must also provide Default value: None
|
leaf_domain_label
|
The leaf domain label to use for the auto-generated certificate. Default value: None
|
overwrite_existing_domain
|
Indicates whether to overwrite the existing leaf domain label. The default is False. Default value: False
|
renew
|
Indicates if Default value: False
|
status
Required
|
Indicates whether SSL validation is enabled, disabled, or auto. |
cert
Required
|
The cert string to use for SSL validation. If provided, you must also provide |
key
Required
|
The key string to use for SSL validation. If provided, you must also provide |
cname
Required
|
The CNAME to use for SSL validation. If provided, you must also provide |
leaf_domain_label
Required
|
The leaf domain label to use for the auto-generated certificate. |
overwrite_existing_domain
Required
|
Indicates whether to overwrite the existing leaf domain label. The default is False. |
renew
Required
|
Indicates if |
Remarks
To configure SSL, specify either the leaf_domain_label
parameter or the parameters cname
,
cert
, and key
.
A typical pattern to specify SSL configuration is to use the attach_configuration
or
provisioning_configuration
method of the
AksCompute class to obtain a configuration object. Then, use the
enable_ssl
method of the returned configuration object. For example, for the attach configuration,
use the enable_ssl method.
# 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")
For more information on enabling SSL for AKS, see Use SSL to secure a web service through Azure Machine Learning.
Methods
deserialize |
Convert a JSON object into a SslConfiguration object. |
serialize |
Convert this SslConfiguration object into a JSON serialized dictionary. |
deserialize
Convert a JSON object into a SslConfiguration object.
static deserialize(object_dict)
Parameters
Name | Description |
---|---|
object_dict
Required
|
A JSON object to convert to a SslConfiguration object. |
Returns
Type | Description |
---|---|
The SslConfiguration representation of the provided JSON object. |
Exceptions
Type | Description |
---|---|
serialize
Convert this SslConfiguration object into a JSON serialized dictionary.
serialize()
Returns
Type | Description |
---|---|
The JSON representation of this SslConfiguration object. |
Exceptions
Type | Description |
---|---|