I would like to create clusters in databricks workspace and give 'Can Manage' permissions to some users. How could I do this with REST API or some other script?
This is how I create clusters in python (can be done the same with cURL):
response = requests.post(
'https://%s/api/2.0/clusters/create' % (DOMAIN),
headers={'Authorization': b"Basic " + base64.standard_b64encode(b"token:" + TOKEN)},
json={
"cluster_name": "my-cluster",
"num_workers": 2,
"spark_version": "5.3.x-scala2.11",
"node_type_id": "Standard_D3_v2",
'spark_env_vars': {
'PYSPARK_PYTHON': '/databricks/python3/bin/python3',
}
}
)
Is there possibility to add 'Can Manage' permission to users with a script?