AksCompute class

Definition

Manages Azure Kubernetes Service compute target objects.

AksCompute(workspace, name)
Inheritance
AksCompute

Methods

attach(workspace, name, resource_id)

(Deprecated) Associate an already existing AKS compute resource with the provided workspace.

attach_configuration(resource_group=None, cluster_name=None, resource_id=None, cluster_purpose=None)

Create a configuration object for attaching a AKS compute target.

delete()

Remove the AksCompute object from its associated workspace.

If this object was created through Azure ML, the corresponding cloud based objects will also be deleted. If this object was created externally and only attached to the workspace, it will raise exception and nothing will be changed.

deserialize(workspace, object_dict)

Convert a json object into a AksCompute object.

Will fail if the provided workspace is not the workspace the Compute is associated with.

detach()

Detach the AksCompute object from its associated workspace.

No underlying cloud object will be deleted, the association will just be removed.

get_credentials()

Retrieve the credentials for the AKS target.

provisioning_configuration(agent_count=None, vm_size=None, ssl_cname=None, ssl_cert_pem_file=None, ssl_key_pem_file=None, location=None, vnet_resourcegroup_name=None, vnet_name=None, subnet_name=None, service_cidr=None, dns_service_ip=None, docker_bridge_cidr=None, cluster_purpose=None)

Create a configuration object for provisioning an AKS compute target.

refresh_state()

Perform an in-place update of the properties of the object.

Based on the current state of the corresponding cloud object. Primarily useful for manual polling of compute state.

serialize()

Convert this AksCompute object into a json serialized dictionary.

update(update_configuration)

Update the AksCompute object using the update configuration provided.

attach(workspace, name, resource_id)

(Deprecated) Associate an already existing AKS compute resource with the provided workspace.

attach(workspace, name, resource_id)

Parameters

workspace
Workspace

The workspace object to associate the compute resource with

name
str

The name to associate with the compute resource inside the provided workspace. Does not have to match with the already given name of the compute resource

resource_id
str

The Azure resource ID for the compute resource being attached

Returns

An AksCompute object representation of the compute object

Return type

attach_configuration(resource_group=None, cluster_name=None, resource_id=None, cluster_purpose=None)

Create a configuration object for attaching a AKS compute target.

attach_configuration(resource_group=None, cluster_name=None, resource_id=None, cluster_purpose=None)

Parameters

resource_group
str

Name of the resource group in which the AKS is located.

default value: None
cluster_name
str

The AKS cluster name

default value: None
resource_id
str

The Azure resource ID for the compute resource being attached

default value: None
cluster_purpose
str

Targeted usage of the cluster. This is used to provision AzureML components to ensure the desired level of fault-tolerance and QoS. AksCompute.ClusterPurpose class is provided for convenience of specifying available values. More detailed information of these values and their use cases can be found here: https://aka.ms/azureml-create-attach-aks

default value: None

Returns

A configuration object to be used when attaching a Compute object

Return type

AksAttachConfiguration

delete()

Remove the AksCompute object from its associated workspace.

If this object was created through Azure ML, the corresponding cloud based objects will also be deleted. If this object was created externally and only attached to the workspace, it will raise exception and nothing will be changed.

delete()

deserialize(workspace, object_dict)

Convert a json object into a AksCompute object.

Will fail if the provided workspace is not the workspace the Compute is associated with.

deserialize(workspace, object_dict)

Parameters

workspace
Workspace

The workspace object the AksCompute object is associated with

object_dict
dict

A json object to convert to a AksCompute object

Returns

The AksCompute representation of the provided json object

Return type

detach()

Detach the AksCompute object from its associated workspace.

No underlying cloud object will be deleted, the association will just be removed.

detach()

get_credentials()

Retrieve the credentials for the AKS target.

get_credentials()

Returns

Credentials for the AKS target

Return type

provisioning_configuration(agent_count=None, vm_size=None, ssl_cname=None, ssl_cert_pem_file=None, ssl_key_pem_file=None, location=None, vnet_resourcegroup_name=None, vnet_name=None, subnet_name=None, service_cidr=None, dns_service_ip=None, docker_bridge_cidr=None, cluster_purpose=None)

Create a configuration object for provisioning an AKS compute target.

provisioning_configuration(agent_count=None, vm_size=None, ssl_cname=None, ssl_cert_pem_file=None, ssl_key_pem_file=None, location=None, vnet_resourcegroup_name=None, vnet_name=None, subnet_name=None, service_cidr=None, dns_service_ip=None, docker_bridge_cidr=None, cluster_purpose=None)

Parameters

agent_count
int

Number of agents (VMs) to host containers. Defaults to 3

default value: None
vm_size
str

Size of agent VMs. A full list of options can be found here: https://aka.ms/azureml-aks-details Defaults to Standard_D3_v2

default value: None
ssl_cname
str

A CName to use if enabling SSL validation on the cluster. Must provide all three CName, cert file, and key file to enable SSL validation

default value: None
ssl_cert_pem_file
str

A file path to a file containing cert information for SSL validation. Must provide all three CName, cert file, and key file to enable SSL validation

default value: None
ssl_key_pem_file
str

A file path to a file containing key information for SSL validation. Must provide all three CName, cert file, and key file to enable SSL validation

default value: None
location
str

Location to provision cluster in. If not specified, will default to workspace location. Available regions for this compute can be found here: https://azure.microsoft.com/en-us/global-infrastructure/services/?regions=all&products=kubernetes-service

default value: None
vnet_resourcegroup_name
str

Name of the resource group where the virtual network is located

default value: None
vnet_name
str

Name of the virtual network

default value: None
subnet_name
str

Name of the subnet inside the vnet

default value: None
service_cidr
str

A CIDR notation IP range from which to assign service cluster IPs.

default value: None
dns_service_ip
str

Containers DNS server IP address.

default value: None
docker_bridge_cidr
str

A CIDR notation IP for Docker bridge.

default value: None
cluster_purpose
str

Targeted usage of the cluster. This is used to provision AzureML components to ensure the desired level of fault-tolerance and QoS. AksCompute.ClusterPurpose class is provided for convenience of specifying available values. More detailed information of these values and their use cases can be found here: https://aka.ms/azureml-create-attach-aks

default value: None

Returns

A configuration object to be used when creating a Compute object

Return type

AksProvisioningConfiguration

refresh_state()

Perform an in-place update of the properties of the object.

Based on the current state of the corresponding cloud object. Primarily useful for manual polling of compute state.

refresh_state()

serialize()

Convert this AksCompute object into a json serialized dictionary.

serialize()

Returns

The json representation of this AksCompute object

Return type

update(update_configuration)

Update the AksCompute object using the update configuration provided.

update(update_configuration)

Parameters

update_configuration
azureml.core.AksUpdateConfiguration

The AKS update configuration object