SslConfiguration Class

Represents an SSL configuration object for use with AksCompute.

Initialize the SslConfiguration object.

Inheritance
builtins.object
SslConfiguration

Constructor

SslConfiguration(status=None, cert=None, key=None, cname=None, leaf_domain_label=None, overwrite_existing_domain=False, renew=False)

Parameters

Name Description
status
str

Indicates whether SSL validation is enabled, disabled, or auto.

default value: None
cert
str

The cert string to use for SSL validation. If provided, you must also provide cname and key PEM file

default value: None
key
str

The key string to use for SSL validation. If provided, you must also provide cname and cert PEM file

default value: None
cname
str

The CNAME to use for SSL validation. If provided, you must also provide cert and key PEM files.

default value: None
leaf_domain_label
str

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 leaf_domain_label refreshes the auto-generated certificate. If provided, the existing SSL configuration must be auto. The default is False.

default value: False
status
Required
str

Indicates whether SSL validation is enabled, disabled, or auto.

cert
Required
str

The cert string to use for SSL validation. If provided, you must also provide cname and key PEM file

key
Required
str

The key string to use for SSL validation. If provided, you must also provide cname and cert PEM file

cname
Required
str

The CNAME to use for SSL validation. If provided, you must also provide cert and key PEM files.

leaf_domain_label
Required
str

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 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

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