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

status
str
default value: None

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

cert
str
default value: None

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

key
str
default value: None

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

cname
str
default value: None

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

leaf_domain_label
str
default value: None

The leaf domain label to use for the auto-generated certificate.

overwrite_existing_domain
bool
default value: False

Indicates whether to overwrite the existing leaf domain label. The default is False.

renew
bool
default value: False

Indicates if leaf_domain_label refreshes the auto-generated certificate. If provided, the existing SSL configuration must be auto. The default is False.

status
str
Required

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

cert
str
Required

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

key
str
Required

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

cname
str
Required

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

leaf_domain_label
str
Required

The leaf domain label to use for the auto-generated certificate.

overwrite_existing_domain
bool
Required

Indicates whether to overwrite the existing leaf domain label. The default is False.

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

object_dict
dict
Required

A JSON object to convert to a SslConfiguration object.

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