Fleet Manager#
For usage information and examples, see Fleet Manager.
The main FMClient class#
- class dataikuapi.fmclient.FMClient(host, api_key_id, api_key_secret, tenant_id='main', extra_headers=None, insecure_tls=False)#
- get_tenant_id()#
- get_cloud_credentials()#
Get the cloud credentials :return: cloud credentials :rtype:
dataikuapi.fm.tenant.FMCloudCredentials
- get_sso_settings()#
Get the Single Sign-On (SSO) settings
- Returns:
SSO settings
- Return type:
dataikuapi.iam.settings.SSOSettings
- get_ldap_settings()#
Get the LDAP settings
- Returns:
LDAP settings
- Return type:
dataikuapi.iam.settings.LDAPSettings
- get_azure_ad_settings()#
Get the Azure Active Directory (aka Microsoft Entra ID) settings
- Returns:
Azure AD settings
- Return type:
dataikuapi.iam.settings.AzureADSettings
- get_cloud_tags()#
Get the tenant’s cloud tags
- Returns:
tenant’s cloud tags
- Return type:
- list_cloud_accounts()#
List all cloud accounts
- Returns:
list of cloud accounts
- Return type:
list of
dataikuapi.fm.cloudaccounts.FMCloudAccount
- get_cloud_account(cloud_account_id)#
Get a cloud account by its id
- Parameters:
cloud_account_id (str) – the id of the cloud account to retrieve
- Returns:
the requested cloud account
- Return type:
dataikuapi.fm.cloudaccounts.FMCloudAccount
- list_virtual_networks()#
List all virtual networks
- Returns:
list of virtual networks
- Return type:
- get_virtual_network(virtual_network_id)#
Get a virtual network by its id
- Parameters:
virtual_network_id (str) – the id of the network to retrieve
- Returns:
the requested virtual network
- Return type:
- list_load_balancers()#
List all load balancers
- Returns:
list of load balancers
- Return type:
list of
dataikuapi.fm.loadbalancers.FMLoadBalancer
- get_load_balancer(load_balancer_id)#
Get a load balancer by its id
- Parameters:
load_balancer_id (str) – the id of the load balancer to retrieve
- Returns:
the requested load balancer
- Return type:
dataikuapi.fm.loadbalancers.FMLoadBalancer
- list_instance_templates()#
List all instance settings templates
- Returns:
list of instance settings template
- Return type:
list of
dataikuapi.fm.tenant.FMInstanceSettingsTemplate
- get_instance_template(template_id)#
Get an instance setting template template by its id
- Parameters:
template_id (str) – the id of the template to retrieve
- Returns:
the requested instance settings template
- Return type:
dataikuapi.fm.instancesettingstemplates.FMInstanceSettingsTemplate
- list_instances()#
List all DSS instances
- Returns:
list of instances
- Return type:
- get_instance(instance_id)#
Get a DSS instance by its id
- Parameters:
instance_id (str) – the id of the instance to retrieve
- Returns:
the requested instance if any
- Return type:
- list_instance_images()#
List all available images to create new instances
- Returns:
list of images, as a pair of id and label
- class dataikuapi.fmclient.FMClientAWS(host, api_key_id, api_key_secret, tenant_id='main', extra_headers=None, insecure_tls=False)#
- new_cloud_account_creator(label)#
Instantiate a new cloud account creator
- Parameters:
label (str) – The label of the cloud account
- Return type:
dataikuapi.fm.cloudaccounts.FMAWSCloudAccountCreator
- new_virtual_network_creator(label)#
Instantiate a new virtual network creator
- Parameters:
label (str) – The label of the network
- Return type:
- new_load_balancer_creator(name, virtual_network_id)#
Instantiate a new load balancer creator
- Parameters:
name (str) – The name of the load balancer
virtual_network_id (str) – The id of the virtual network
- Return type:
dataikuapi.fm.loadbalancers.FMAWSLoadBalancerCreator
- new_instance_template_creator(label)#
Instantiate a new instance template creator
- Parameters:
label (str) – The label of the instance
- Return type:
dataikuapi.fm.instancesettingstemplates.FMAWSInstanceSettingsTemplateCreator
- new_instance_creator(label, instance_settings_template_id, virtual_network_id, image_id)#
Instantiate a new instance creator
- Parameters:
label (str) – The label of the instance
instance_settings_template (str) – The instance settings template id this instance should be based on
virtual_network (str) – The virtual network where the instance should be spawned
image_id (str) – The ID of the DSS runtime image (ex: dss-9.0.3-default)
- Return type:
- class dataikuapi.fmclient.FMClientAzure(host, api_key_id, api_key_secret, tenant_id='main', extra_headers=None, insecure_tls=False)#
- new_cloud_account_creator(label)#
Instantiate a new cloud account creator
- Parameters:
label (str) – The label of the cloud account
- Return type:
dataikuapi.fm.cloudaccounts.FMAzureCloudAccountCreator
- new_virtual_network_creator(label)#
Instantiate a new virtual network creator
- Parameters:
label (str) – The label of the network
- Return type:
- new_load_balancer_creator(name, virtual_network_id)#
Instantiate a new Load balancer creator
- Parameters:
name (str) – The name of the load balancer
virtual_network_id (str) – The id of the virtual network
- Return type:
dataikuapi.fm.loadbalancers.FMAzureLoadBalancerCreator
- new_instance_template_creator(label)#
Instantiate a new instance template creator
- Parameters:
label (str) – The label of the instance
- Return type:
dataikuapi.fm.instancesettingstemplates.FMAzureInstanceSettingsTemplateCreator
- new_instance_creator(label, instance_settings_template_id, virtual_network_id, image_id)#
Instantiate a new instance creator
- Parameters:
label (str) – The label of the instance
instance_settings_template (str) – The instance settings template id this instance should be based on
virtual_network (str) – The virtual network where the instance should be spawned
image_id (str) – The ID of the DSS runtime image (ex: dss-9.0.3-default)
- Return type:
- class dataikuapi.fmclient.FMClientGCP(host, api_key_id, api_key_secret, tenant_id='main', extra_headers=None, insecure_tls=False)#
- new_cloud_account_creator(label)#
Instantiate a new cloud account creator
- Parameters:
label (str) – The label of the cloud account
- Return type:
dataikuapi.fm.cloudaccounts.FMGCPCloudAccountCreator
- new_virtual_network_creator(label)#
Instantiate a new virtual network creator
- Parameters:
label (str) – The label of the network
- Return type:
- new_instance_template_creator(label)#
Instantiate a new instance template creator
- Parameters:
label (str) – The label of the instance
- Return type:
dataikuapi.fm.instancesettingstemplates.FMGCPInstanceSettingsTemplateCreator
- new_instance_creator(label, instance_settings_template_id, virtual_network_id, image_id)#
Instantiate a new instance creator
- Parameters:
label (str) – The label of the instance
instance_settings_template (str) – The instance settings template id this instance should be based on
virtual_network (str) – The virtual network where the instance should be spawned
image_id (str) – The ID of the DSS runtime image (ex: dss-9.0.3-default)
- Return type:
Fleet Manager Instances#
- 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:
- deprovision()#
Deprovision the physical DSS instance
- Returns:
the Future object representing the deprovision process
- Return type:
- restart_dss()#
Restart the DSS running on the physical instance
- Returns:
the Future object representing the restart process
- Return type:
- save()#
Update the instance
- get_status()#
Get the physical DSS instance’s status
- Returns:
the instance status
- Return type:
- delete()#
Delete the DSS instance
- Returns:
the Future object representing the deletion process
- Return type:
- start()#
Start the DSS instance
- Returns:
the Future object representing the starting process
- Return type:
- stop()#
Stop the DSS instance
- Returns:
the Future object representing the stopping process
- Return type:
- 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:
- replay_setup_actions()#
Replay the setup actions on the DSS instance
- Returns:
the Future object representing the replay process
- Return type:
- 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:
- get_snapshot(snapshot_id)#
Get a snapshot of this instance
- Parameters:
snapshot_id (str) – identifier of the snapshot
- Returns:
Snapshot
- Return type:
- snapshot(reason_for_snapshot=None)#
Create a snapshot of the instance
- Returns:
Snapshot
- Return type:
- 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:
- 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:
- 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 volumedata_volume_encryption_key (str) – Optional, the encryption key to use when data_volume_encryption_key is FMInstanceEncryptionMode.CUSTOM
- Return type:
- 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:
- 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:
- 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:
- create()#
Create the DSS instance
- Returns:
a newly created DSS instance
- Return type:
- 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:
- 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:
- 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:
- delete()#
Delete the snapshot
- Returns:
the Future object representing the deletion process
- Return type:
Fleet Manager Virtual Networks#
- class dataikuapi.fm.virtualnetworks.FMVirtualNetwork(client, vn_data)#
- save()#
Update this virtual network.
- delete()#
Delete this virtual network.
- Returns:
the Future object representing the deletion process
- Return type:
- set_fleet_management(enable, event_server=None, deployer_management='NO_MANAGED_DEPLOYER', govern_server=None)#
When enabled, all instances in this virtual network know each other and can centrally manage deployer and logs centralization
- Parameters:
enable (boolean) – Enable or not the Fleet Management
event_server (str) – Optional, Node name of the node that should act as the centralized event server for logs concentration. Audit logs of all design, deployer and automation nodes will automatically be sent there.
deployer_management (str) – Optional, Accepts: - “NO_MANAGED_DEPLOYER”: Do not manage the deployer. This is the default mode. - “CENTRAL_DEPLOYER”: Central deployer. Recommended if you have more than one design node or may have more than one design node in the future. - “EACH_DESIGN_NODE”: Deployer from design. Recommended if you have a single design node and want a simpler setup.
govern_server (str) – Optional, node name of the node that should act as the centralized Govern server.
- set_https_strategy(https_strategy)#
Set the HTTPS strategy for this virtual network
- Parameters:
https_strategy (
dataikuapi.fm.virtualnetworks.FMHTTPSStrategy
) – the strategy to set
- class dataikuapi.fm.virtualnetworks.FMVirtualNetworkCreator(client, label)#
- with_internet_access_mode(internet_access_mode)#
Set the Internet access mode
- Parameters:
internet_access_mode (str) – The internet access mode of the instances created in this virtual network. Accepts “YES”, “NO”, “EGRESS_ONLY”. Defaults to “YES”
- with_default_values()#
Set the VPC and Subnet to their default values: the vpc and subnet of the FM instance
- with_account(cloud_account=None, cloud_account_id=None)#
Set the Cloud Account for this virtual network
- Parameters:
cloud_account (
dataikuapi.fm.cloudaccounts.FMCloudAccount
) – The cloud accountcloud_account_id (str) – The cloud account identifier
- with_auto_create_peering()#
Automatically create the network peering when creating this virtual network
- class dataikuapi.fm.virtualnetworks.FMAWSVirtualNetwork(client, vn_data)#
- set_dns_strategy(assign_domain_name, aws_private_ip_zone53_id=None, aws_public_ip_zone53_id=None)#
Set the DNS strategy for this virtual network
- Parameters:
assign_domain_name (boolean) – If false, don’t assign domain names, use ip_only
aws_private_ip_zone53_id (str) – Optional, AWS Only, the ID of the AWS Route53 Zone to use for private ip
aws_public_ip_zone53_id (str) – Optional, AWS Only, the ID of the AWS Route53 Zone to use for public ip
- class dataikuapi.fm.virtualnetworks.FMAWSVirtualNetworkCreator(client, label)#
- with_vpc(aws_vpc_id, aws_subnet_id, aws_second_subnet_id=None)#
Set the VPC and Subnet to be used by the virtual network
- Parameters:
aws_vpc_id (str) – ID of the VPC to use
aws_subnet_id (str) – ID of the subnet to use
aws_second_subnet_id (str) – ID of the second subnet to use
- with_region(aws_region)#
Set the region where the VPC should be found
- Parameters:
aws_region (str) – the region of the VPC to use
- with_auto_create_security_groups()#
Automatically create the AWS Security Groups when creating this virtual network
- with_aws_security_groups(*aws_security_groups)#
Use pre-created AWS Security Groups
- Parameters:
aws_security_groups (str) – Up to 5 security group ids to assign to the instances created in this virtual network
- create()#
Create a new virtual network
- Returns:
a newly created network
- Return type:
- class dataikuapi.fm.virtualnetworks.FMAzureVirtualNetwork(client, vn_data)#
- set_dns_strategy(assign_domain_name, azure_dns_zone_id=None)#
Set the DNS strategy for this virtual network
- Parameters:
assign_domain_name (boolean) – If false, don’t assign domain names, use ip_only
azure_dns_zone_id (str) – Optional, Azure Only, the ID of the Azure DNS zone to use
- class dataikuapi.fm.virtualnetworks.FMAzureVirtualNetworkCreator(client, label)#
- with_azure_virtual_network(azure_vn_id, azure_subnet_id, azure_second_subnet_id=None)#
Setup the Azure Virtual Network and Subnet to be used by the virtual network
- Parameters:
azure_vn_id (str) – Resource ID of the Azure Virtual Network to use
azure_subnet_id (str) – Subnet name of the first subnet
azure_second_subnet_id (str) – Subnet name of the second subnet
- with_auto_update_security_groups(auto_update_security_groups=True)#
Auto update the security groups of the Azure Virtual Network
- Parameters:
auto_update_security_groups (boolean) – Optional, Auto update the subnet security group. Defaults to True
- create()#
Create a new virtual network
- Returns:
a newly created network
- Return type:
- class dataikuapi.fm.virtualnetworks.FMGCPVirtualNetwork(client, vn_data)#
- set_assign_public_ip(public_ip=True)#
Sets whether the instances on this network will have a publicly accessible IP
- Parameters:
public_ip (bool) – if False, the instances will not be accessible from outside GCP
- set_location_for_created_resources(project_id=None, zone=None)#
Set the location in GCP of the instances created using this virtual network
- Parameters:
project_id (str) – Optional, the project in which instances should be created. If empty string, then the project of the FM instance is used
zone (str) – Optional, the zone in which instances should be created. If empty string, then the zone of the FM instance is used
- set_dns_strategy(assign_domain_name, private_ip_zone_id=None, public_ip_zone_id=None)#
Set the DNS strategy for this virtual network
- Parameters:
assign_domain_name (boolean) – If false, don’t assign domain names, use ip_only
private_ip_zone_id (str) – Optional, the ID of the Cloud DNS Zone to use for private ip
public_ip_zone_id (str) – Optional, the ID of the Cloud DNS Zone to use for public ip
- class dataikuapi.fm.virtualnetworks.FMGCPVirtualNetworkCreator(client, label)#
- with_vpc(project_id, network, subnetwork)#
Setup the VPC which the virtual network will use
- Parameters:
project_id (str) – ID of the project in which the network is defined
network (str) – name of the network
subnetwork (str) – name of the subnetwork
- with_network_tags(*network_tags)#
Use network tags on the instances created in the virtual network
- Parameters:
network_tags (str) – network tags to assign to the instances created in this virtual network.
- create()#
Create the virtual network
- Returns:
a newly created network
- Return type:
- class dataikuapi.fm.virtualnetworks.FMHTTPSStrategy(data, https_strategy, http_redirect=False)#
- static disable()#
Use HTTP only
- static self_signed(http_redirect)#
Use self-signed certificates
- Parameters:
http_redirect (bool) – If true, HTTP is redirected to HTTPS. If false, HTTP is disabled. Defaults to false
- static custom_cert(http_redirect)#
Use a custom certificate for each instance
- Parameters:
http_redirect (bool) – If true, HTTP is redirected to HTTPS. If false, HTTP is disabled. Defaults to false
- static lets_encrypt(contact_mail)#
Use Let’s Encrypt to generate https certificates
- Parameters:
contact_mail (str) – The contact email provided to Let’s Encrypt
Fleet Manager Instance Templates#
- class dataikuapi.fm.instancesettingstemplates.FMInstanceSettingsTemplate(client, ist_data)#
- save()#
Update this template
- delete()#
Delete this template
- Returns:
the Future object representing the deletion process
- Return type:
- add_setup_action(setup_action)#
Add a setup action
- Parameters:
setup_action (
dataikuapi.fm.instancesettingstemplates.FMSetupAction
) – the action to add- Return type:
dataikuapi.fm.instancesettingstemplates.FMInstanceSettingsTemplate
- class dataikuapi.fm.instancesettingstemplates.FMInstanceSettingsTemplateCreator(client, label)#
- create()#
Create a new instance settings template.
- Returns:
a newly created template
- Return type:
dataikuapi.fm.instancesettingstemplates.FMInstanceSettingsTemplate
- with_setup_actions(setup_actions)#
Add setup actions
- Parameters:
setup_actions (list of
dataikuapi.fm.instancesettingstemplates.FMSetupActions
) – List of setup actions to be played on an instance- Return type:
dataikuapi.fm.instancesettingstemplates.FMInstanceSettingsTemplateCreator
- with_license(license_file_path=None, license_string=None)#
Override global license
- Parameters:
license_file_path (str) – Optional, load the license from a json file
license_string (str) – Optional, load the license from a json string
- Return type:
dataikuapi.fm.instancesettingstemplates.FMInstanceSettingsTemplateCreator
- class dataikuapi.fm.instancesettingstemplates.FMAWSInstanceSettingsTemplateCreator(client, label)#
- with_aws_keypair(aws_keypair_name)#
Add an AWS Keypair to the DSS instance. Needed to get SSH access to the DSS instance, using the centos user.
- Parameters:
aws_keypair_name (str) – Name of an AWS key pair to add to the instance.
- Return type:
dataikuapi.fm.instancesettingstemplates.FMAWSInstanceSettingsTemplateCreator
- with_startup_instance_profile(startup_instance_profile_arn)#
Add an Instance Profile to be assigned to the DSS instance on startup
- Parameters:
startup_instance_profile_arn (str) – ARN of the Instance profile assigned to the DSS instance at startup time
- Return type:
dataikuapi.fm.instancesettingstemplates.FMAWSInstanceSettingsTemplateCreator
- with_runtime_instance_profile(runtime_instance_profile_arn)#
Add an Instance Profile to be assigned to the DSS instance when running
- Parameters:
runtime_instance_profile_arn (str) – ARN of the Instance profile assigned to the DSS instance during runtime
- Return type:
dataikuapi.fm.instancesettingstemplates.FMAWSInstanceSettingsTemplateCreator
- with_restrict_aws_metadata_server_access(restrict_aws_metadata_server_access=True)#
Restrict AWS metadata server access on the DSS instance.
- Parameters:
restrict_aws_metadata_server_access (boolean) – Optional, If true, restrict the access to the metadata server access. Defaults to true
- Return type:
dataikuapi.fm.instancesettingstemplates.FMAWSInstanceSettingsTemplateCreator
- with_default_aws_api_access_mode()#
The DSS Instance will use the Runtime Instance Profile to access AWS API.
- with_keypair_aws_api_access_mode(aws_access_key_id, aws_keypair_storage_mode='NONE', aws_secret_access_key=None, aws_secret_access_key_aws_secret_name=None, aws_secrets_manager_region=None)#
DSS Instance will use an Access Key to authenticate against the AWS API.
- Parameters:
aws_access_key_id (str) – AWS Access Key ID.
aws_keypair_storage_mode (str) – Optional, the storage mode of the AWS api key. Accepts “NONE”, “INLINE_ENCRYPTED” or “AWS_SECRETS_MANAGER”. Defaults to “NONE”
aws_secret_access_key (str) – Optional, AWS Access Key Secret. Only needed if keypair_storage_mode is “INLINE_ENCRYPTED”
aws_secret_access_key_aws_secret_name (str) – Optional, ASM secret name. Only needed if aws_keypair_storage_mode is “AWS_SECRET_MANAGER”
aws_secrets_manager_region (str) – Optional, Secret Manager region to use. Only needed if aws_keypair_storage_mode is “AWS_SECRET_MANAGER”
- Return type:
dataikuapi.fm.instancesettingstemplates.FMAWSInstanceSettingsTemplateCreator
- class dataikuapi.fm.instancesettingstemplates.FMAzureInstanceSettingsTemplateCreator(client, label)#
- with_ssh_key(ssh_public_key)#
Add an SSH public key to the DSS Instance. Needed to access it through SSH, using the centos user.
- Parameters:
ssh_public_key (str) – The content of the public key to add to the instance.
- Return type:
dataikuapi.fm.instancesettingstemplates.FMAzureInstanceSettingsTemplateCreator
- with_startup_managed_identity(startup_managed_identity)#
Add a managed identity to be assign to the DSS instance on startup
- Parameters:
startup_managed_identity (str) – Managed Identity ID
- Return type:
dataikuapi.fm.instancesettingstemplates.FMAzureInstanceSettingsTemplateCreator
- with_runtime_managed_identity(runtime_managed_identity)#
Add a managed identity to be assign to the DSS instance when running
- Parameters:
runtime_managed_identity (str) – Managed Identity ID
- Return type:
dataikuapi.fm.instancesettingstemplates.FMAzureInstanceSettingsTemplateCreator
- class dataikuapi.fm.instancesettingstemplates.FMGCPInstanceSettingsTemplateCreator(client, label)#
- with_ssh_key(ssh_public_key)#
Add an SSH public key to the DSS Instance. Needed to access it through SSH, using the centos user.
- Parameters:
ssh_public_key (str) – The content of the public key to add to the instance.
- Return type:
dataikuapi.fm.instancesettingstemplates.FMGCPInstanceSettingsTemplateCreator
- with_restrict_metadata_server_access(restrict_metadata_server_access=True)#
Restrict GCloud metadata server access on the DSS instance.
- Parameters:
restrict_metadata_server_access (boolean) – Optional, If true, restrict the access to the metadata server access. Defaults to true
- Return type:
dataikuapi.fm.instancesettingstemplates.FMGCPInstanceSettingsTemplateCreator
- with_block_project_wide_keys(block_project_wide_keys=True)#
Restrict GCloud metadata server access on the DSS instance.
- Parameters:
block_project_wide_keys (boolean) – Optional, If true, block project-wide ssh keys on the instance. Defaults to true
- Return type:
dataikuapi.fm.instancesettingstemplates.FMGCPInstanceSettingsTemplateCreator
- with_runtime_service_account(startup_service_account)#
Add a service account to be assigned to the DSS instance on startup
- Parameters:
startup_service_account (str) – service account email
- Return type:
dataikuapi.fm.instancesettingstemplates.FMGCPInstanceSettingsTemplateCreator
- class dataikuapi.fm.instancesettingstemplates.FMSetupAction(setupActionType, params=None)#
- static add_authorized_key(ssh_key)#
Return an ADD_AUTHORIZED_KEY setup action
- static run_ansible_task(stage, yaml_string)#
Return a RUN_ANSIBLE_TASK setup action
- Parameters:
stage (
dataikuapi.fm.instancesettingstemplates.FMSetupActionStage
) – the action stageyaml_string (str) – a yaml encoded string defining the ansibles tasks to run
- Return type:
- static install_system_packages(packages)#
Return an INSTALL_SYSTEM_PACKAGES setup action
- Parameters:
packages (list) – List of packages to install
- Return type:
- static setup_advanced_security(basic_headers=True, hsts=False)#
Return a SETUP_ADVANCED_SECURITY setup action
- Parameters:
basic_headers (boolean) – Optional, Prevent browsers to render Web content served by DSS to be embedded into a frame, iframe, embed or object tag. Defaults to True
hsts (boolean) – Optional, Enforce HTTP Strict Transport Security. Defaults to False
- Return type:
- static install_jdbc_driver(database_type, url, paths_in_archive=None, http_headers=None, http_username=None, http_password=None, datadir_subdirectory=None)#
Return a INSTALL_JDBC_DRIVER setup action
- Parameters:
database_type (
dataikuapi.fm.instancesettingstemplates.FMSetupActionAddJDBCDriverDatabaseType
) – the database typeurl (str) – The full address to the driver. Supports http(s)://, s3://, abs:// or file:// endpoints
paths_in_archive (list) – Optional, must be used when the driver is shipped as a tarball or a ZIP file. Add here all the paths to find the JAR files in the driver archive. Paths are relative to the top of the archive. Wildcards are supported.
http_headers (dict) – Optional, If you download the driver from a HTTP(S) endpoint, add here the headers you want to add to the query. This setting is ignored for any other type of download.
http_username (str) – Optional, If the HTTP(S) endpoint expect a Basic Authentication, add here the username. To explicitely specify which Assigned Identity use if the machine have several, set the client_id here. To authenticate with a SAS Token on Azure Blob Storage (not recommended), use “token” as the value here.
http_password (str) – Optional, If the HTTP(S) endpoint expect a Basic Authentication, add here the password. To authenticate with a SAS Token on Azure Blob Storage (not recommended), store the token in this field.
datadir_subdirectory (str) – Optional, Some drivers are shipped with a high number of JAR files along with them. In that case, you might want to install them under an additional level in the DSS data directory. Set the name of this subdirectory here. Not required for most drivers.
- Return type:
- static setup_k8s_and_spark()#
Return a SETUP_K8S_AND_SPARK setup action
Fleet Manager Tenant#
- class dataikuapi.fm.tenant.FMCloudAuthentication(data)#
- static aws_same_as_fm()#
AWS Only: use the same authentication as Fleet Manager
- static aws_iam_role(role_arn)#
AWS Only: use an IAM Role
- Parameters:
role_arn (str) – ARN of the IAM Role
- static aws_keypair(access_key_id, secret_access_key)#
AWS Only: use an AWS Access Key
- Parameters:
access_key_id (str) – AWS Access Key ID
secret_access_key (str) – AWS Secret Access Key
- static azure(subscription, tenant_id, environment, client_id)#
Azure Only
- Parameters:
subscription (str) – Azure Subscription
tenant_id (str) – Azure Tenant Id
environment (str) – Azure Environment
client_id (str) – Azure Client Id
- static gcp(project_id, service_account_key)#
GCP Only
- Parameters:
project_id (str) – GCP project
service_account_key (str) – Optional, service account key (JSON)
- class dataikuapi.fm.tenant.FMCloudCredentials(client, cloud_credentials)#
A Tenant Cloud Credentials in the FM instance
- set_cmk_key(cmk_key_id)#
- set_static_license(license_file_path=None, license_string=None)#
Set a default static license for the DSS instances
- Parameters:
license_file_path (str) – Optional, load the license from a json file
license_string (str) – Optional, load the license from a json string
- set_azure_keyvault(azure_keyvault_id, azure_key_name, azure_key_version)#
Set the Azure Key Vault configuration
- Parameters:
azure_keyvault_id (str) – the Azure Key Vault resource ID
azure_key_name (str) – the name of the key to use in the vault
azure_key_version (str) – the version of the key to use in the vault
- set_aws_cmk(aws_cmk_id)#
Set AWS Customer Managed Key (CMK) configuration
- Parameters:
aws_cmk_id (str) – the ID of the key to use
- set_gcp_key(gcp_location_id, gcp_key_ring, gcp_crypto_key, gcp_crypto_key_version)#
Set GCP Key Management Service (KMS) configuration
- Parameters:
gcp_location_id (str) – the location ID of the key ring
gcp_key_ring (str) – the name of the key ring
gcp_crypto_key (str) – the name of the key to use in the key ring
gcp_crypto_key_version (str) – the version of the key to use in the key ring
- set_automatically_updated_license(license_token)#
Set an automatically updated license for the DSS instances
- Parameters:
license_token (str) – License token
- set_authentication(authentication)#
Set the authentication for the tenant
- Parameters:
authentication (
dataikuapi.fm.tenant.FMCloudAuthentication
) – the authentication to be used
- save()#
Saves back the settings to the project
Fleet Manager Future#
- class dataikuapi.fm.future.FMFuture(client, job_id, state=None, result_wrapper=<function FMFuture.<lambda>>)#
A future on the DSS instance
- static from_resp(client, resp, result_wrapper=<function FMFuture.<lambda>>)#
Creates a DSSFuture from a parsed JSON response
- Return type:
- classmethod get_result_wait_if_needed(client, ret)#
- abort()#
Abort the future
- get_state()#
Get the status of the future, and its result if it’s ready
- peek_state()#
Get the status of the future, and its result if it’s ready
- get_result()#
Get the future result if it’s ready, raises an Exception otherwise
- has_result()#
Checks whether the future has a result ready
- wait_for_result()#
Wait and get the future result