Fleet Manager Instances

Instances are the DSS instances that Fleet Manager will manage.

Create an instance

import dataikuapi

key_id = "<my key id>"
key_secret = "<my key secret>"

# <Cloud vendor> is either AWS, Azure or GCP
client = dataikuapi.FMClient<Cloud vendor>("https://localhost", key_id, key_secret)

my_template_id = "ist-default"
my_network_id = "vn-default"

# create an instance
creator = client.new_instance_creator("My new designer", my_template_id, my_network_id, "dss-11.0.3-default")
dss = creator.create()

# provision the instance
status = dss.reprovision()
res = status.wait_for_result()

Reference API doc

class dataikuapi.fm.instances.FMInstance(client, instance_data)

A handle to interact with a DSS instance. Do not create this directly, use dataikuapi.fmclient.FMClient.get_instance() or

get_client()

Get a Python client to communicate with a DSS instance :return: a Python client to communicate with the target instance :rtype: dataikuapi.dssclient.DSSClient

reprovision()

Reprovision the physical DSS instance

Returns

the Future object representing the reprovision process

Return type

dataikuapi.fm.future.FMFuture

deprovision()

Deprovision the physical DSS instance

Returns

the Future object representing the deprovision process

Return type

dataikuapi.fm.future.FMFuture

restart_dss()

Restart the DSS running on the physical instance

Returns

the Future object representing the restart process

Return type

dataikuapi.fm.future.FMFuture

save()

Update the instance

get_status()

Get the physical DSS instance’s status

Returns

the instance status

Return type

dataikuapi.fm.instances.FMInstanceStatus

delete()

Delete the DSS instance

Returns

the Future object representing the deletion process

Return type

dataikuapi.fm.future.FMFuture

get_initial_password()

Get the initial DSS admin password.

Can only be called once

Returns

a password for the ‘admin’ user.

reset_user_password(username, password)

Reset the password for a user on the DSS instance

Parameters
  • username (string) – login

  • password (string) – new password

Returns

the Future object representing the password reset process

Return type

dataikuapi.fm.future.FMFuture

replay_setup_actions()

Replay the setup actions on the DSS instance

Returns

the Future object representing the replay process

Return type

dataikuapi.fm.future.FMFuture

set_automated_snapshots(enable, period, keep=0)

Set the automated snapshot policy for this instance

Parameters
  • enable (boolean) – Enable the automated snapshots

  • period (int) – The time period between 2 snapshot in hours

  • keep (int) – Optional, the number of snapshot to keep. Use 0 to keep all snapshots. Defaults to 0.

set_custom_certificate(pem_data)

Set the custom certificate for this instance

Only needed when Virtual Network HTTPS Strategy is set to Custom Certificate

Parameters

pem_data (str) – The SSL certificate

list_snapshots()

List all the snapshots of this instance

Returns

list of snapshots

Return type

list of dataikuapi.fm.instances.FMSnapshot

get_snapshot(snapshot_id)

Get a snapshot of this instance

Parameters

snapshot_id (str) – identifier of the snapshot

Returns

Snapshot

Return type

dataikuapi.fm.instances.FMSnapshot

snapshot(reason_for_snapshot=None)

Create a snapshot of the instance

Returns

Snapshot

Return type

dataikuapi.fm.instances.FMSnapshot

class dataikuapi.fm.instances.FMInstanceCreator(client, label, instance_settings_template_id, virtual_network_id, image_id)
with_dss_node_type(dss_node_type)

Set the DSS node type of the instance to create. The default node type is DESIGN.

Parameters

dss_node_type (dataikuapi.fm.instances.FMNodeType) – the type of the dss node to create.

Return type

dataikuapi.fm.instances.FMInstanceCreator

with_cloud_instance_type(cloud_instance_type)

Set the machine type for the DSS Instance

Parameters

cloud_instance_type (str) – the machine type to be used for the instance

Return type

dataikuapi.fm.instances.FMInstanceCreator

with_data_volume_options(data_volume_type=None, data_volume_size=None, data_volume_size_max=None, data_volume_IOPS=None, data_volume_encryption=None, data_volume_encryption_key=None)

Set the options of the data volume to use with the DSS Instance

Parameters
  • data_volume_type (str) – Optional, data volume type

  • data_volume_size (int) – Optional, data volume initial size

  • data_volume_size_max (int) – Optional, data volume maximum size

  • data_volume_IOPS (int) – Optional, data volume IOPS

  • data_volume_encryption (dataikuapi.fm.instances.FMInstanceEncryptionMode) – Optional, encryption mode of the data volume

  • data_volume_encryption_key (str) – Optional, the encryption key to use when data_volume_encryption_key is FMInstanceEncryptionMode.CUSTOM

Return type

dataikuapi.fm.instances.FMInstanceCreator

with_cloud_tags(cloud_tags)

Set the tags to be applied to the cloud resources created for this DSS instance

Parameters

cloud_tags (dict) – a key value dictionary of tags to be applied on the cloud resources

Return type

dataikuapi.fm.instances.FMInstanceCreator

with_fm_tags(fm_tags)

A list of tags to add on the DSS Instance in Fleet Manager

Parameters

fm_tags (list) – Optional, list of tags to be applied on the instance in the Fleet Manager

Return type

dataikuapi.fm.instances.FMInstanceCreator

class dataikuapi.fm.instances.FMAWSInstance(client, instance_data)
set_elastic_ip(enable, elasticip_allocation_id)

Set a public elastic ip for this instance

Parameters
  • enable (boolan) – Enable the elastic ip allocation

  • elasticip_allocation_id (str) – AWS ElasticIP allocation ID

class dataikuapi.fm.instances.FMAWSInstanceCreator(client, label, instance_settings_template_id, virtual_network_id, image_id)
with_aws_root_volume_options(aws_root_volume_size=None, aws_root_volume_type=None, aws_root_volume_IOPS=None)

Set the options of the root volume of the DSS Instance

Parameters
  • aws_root_volume_size (int) – Optional, the root volume size

  • aws_root_volume_type (str) – Optional, the root volume type

  • aws_root_volume_IOPS (int) – Optional, the root volume IOPS

Return type

dataikuapi.fm.instances.FMAWSInstanceCreator

create()

Create the DSS instance

Returns

a newly created DSS instance

Return type

dataikuapi.fm.instances.FMAWSInstance

class dataikuapi.fm.instances.FMAzureInstance(client, instance_data)
set_elastic_ip(enable, public_ip_id)

Set a public elastic ip for this instance

Parameters
  • enable (boolan) – Enable the elastic ip allocation

  • public_ip_id (str) – Azure Public IP ID

class dataikuapi.fm.instances.FMAzureInstanceCreator(client, label, instance_settings_template_id, virtual_network_id, image_id)
create()

Create the DSS instance

Returns

a newly created DSS instance

Return type

dataikuapi.fm.instances.FMAzureInstance

class dataikuapi.fm.instances.FMGCPInstance(client, instance_data)
set_public_ip(enable, public_ip_id)

Set a public ip for this instance

Parameters
  • enable (boolan) – Enable the public ip allocation

  • public_ip_id (str) – GCP Public IP ID

class dataikuapi.fm.instances.FMGCPInstanceCreator(client, label, instance_settings_template_id, virtual_network_id, image_id)
create()

Create the DSS instance

Returns

a newly created DSS instance

Return type

dataikuapi.fm.instances.FMGCPInstance

class dataikuapi.fm.instances.FMInstanceEncryptionMode(value)

An enumeration.

NONE = 'NONE'
DEFAULT_KEY = 'DEFAULT_KEY'
TENANT = 'TENANT'
CUSTOM = 'CUSTOM'
class dataikuapi.fm.instances.FMInstanceStatus(data)

A class holding read-only information about an Instance. This class should not be created directly. Instead, use FMInstance.get_status()

class dataikuapi.fm.instances.FMSnapshot(client, instance_id, snapshot_id, snapshot_data=None)

A handle to interact with a snapshot of a DSS instance. Do not create this directly, use FMInstance.snapshot()

get_info()

Get the information about this snapshot

Returns

a dict

reprovision()

Reprovision the physical DSS instance from this snapshot

Returns

the Future object representing the reprovision process

Return type

dataikuapi.fm.future.FMFuture

delete()

Delete the snapshot

Returns

the Future object representing the deletion process

Return type

dataikuapi.fm.future.FMFuture