Skip to main content

instance_profiles

Creates, updates, deletes, gets or lists an instance_profiles resource.

Overview

Nameinstance_profiles
TypeResource
Iddatabricks_workspace.compute.instance_profiles

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
instance_profile_arnstring
is_meta_instance_profileboolean

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectdeployment_nameList the instance profiles that the calling user can use to launch a cluster.
addinsertdeployment_nameIn the UI, you can select the instance profile when launching clusters. This API is only available to admin users.
editreplacedeployment_nameThe only supported field to change is the optional IAM role ARN associated with the instance profile. It is required to specify the IAM role ARN if both of the following are true:
removedeletedeployment_nameRemove the instance profile with the provided ARN. Existing clusters with this instance profile will continue to function.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
deployment_namestringThe Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc)

SELECT examples

List the instance profiles that the calling user can use to launch a cluster.

SELECT
instance_profile_arn,
is_meta_instance_profile
FROM databricks_workspace.compute.instance_profiles
WHERE deployment_name = '{{ deployment_name }}' -- required;

INSERT examples

In the UI, you can select the instance profile when launching clusters. This API is only available to admin users.

INSERT INTO databricks_workspace.compute.instance_profiles (
data__skip_validation,
data__instance_profile_arn,
data__iam_role_arn,
data__is_meta_instance_profile,
deployment_name
)
SELECT
{{ skip_validation }},
'{{ instance_profile_arn }}',
'{{ iam_role_arn }}',
'{{ is_meta_instance_profile }}',
'{{ deployment_name }}'
;

REPLACE examples

The only supported field to change is the optional IAM role ARN associated with the instance profile. It is required to specify the IAM role ARN if both of the following are true:

REPLACE databricks_workspace.compute.instance_profiles
SET
data__instance_profile_arn = '{{ instance_profile_arn }}',
data__iam_role_arn = '{{ iam_role_arn }}',
data__is_meta_instance_profile = '{{ is_meta_instance_profile }}'
WHERE
deployment_name = '{{ deployment_name }}' --required;

DELETE examples

Remove the instance profile with the provided ARN. Existing clusters with this instance profile will continue to function.

DELETE FROM databricks_workspace.compute.instance_profiles
WHERE deployment_name = '{{ deployment_name }}' --required;