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
- cert
- str
The cert string to use for SSL validation. If provided, you must also provide cname
and
key
PEM file
- key
- str
The key string to use for SSL validation. If provided, you must also provide cname
and
cert
PEM file
- cname
- str
The CNAME to use for SSL validation. If provided, you must also provide cert
and key
PEM files.
- leaf_domain_label
- str
The leaf domain label to use for the auto-generated certificate.
- overwrite_existing_domain
- bool
Indicates whether to overwrite the existing leaf domain label. The default is False.
- renew
- bool
Indicates if leaf_domain_label
refreshes the auto-generated certificate. If provided,
the existing SSL configuration must be auto. The default is False.
- cert
- str
The cert string to use for SSL validation. If provided, you must also provide cname
and
key
PEM file
- key
- str
The key string to use for SSL validation. If provided, you must also provide cname
and
cert
PEM file
- cname
- str
The CNAME to use for SSL validation. If provided, you must also provide cert
and key
PEM files.
- overwrite_existing_domain
- bool
Indicates whether to overwrite the existing leaf domain label. The default is False.
- renew
- bool
Indicates if leaf_domain_label
refreshes the auto-generated certificate. If provided,
the existing SSL configuration must be auto. The default is False.
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
Returns
The SslConfiguration representation of the provided JSON object.
Return type
Exceptions
serialize
Convert this SslConfiguration object into a JSON serialized dictionary.
serialize()
Returns
The JSON representation of this SslConfiguration object.
Return type
Exceptions
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for