Calling ClustersAPI.create with data_security_mode failed because the attribute was missing from the SDK's generated model. The maintainer confirmed the field had been added to the OpenAPI spec and is present in the latest SDK release. Upgrade databricks-sdk to the latest version (pip install -U databricks-sdk) and pass data_security_mode=DataSecurityMode.SINGLE_USER (or your policy's mode) directly in w.clusters.create(...).
Fix CreateCluster missing data_security_mode in Databricks SDK
- databricks-sdklibrary
- ClustersAPIlibrary
- OpenAPI specproduct
- Databricksorganization
- databricks-sdk-pylibrary
Cluster policies requiring data_security_mode broke SDK-based creation because the attribute was absent from the SDK model. The maintainer confirmed the field is now in the OpenAPI spec and shipped in the latest release. After pip install -U databricks-sdk, w.clusters.create(..., data_security_mode=DataSecurityMode.SINGLE_USER) worked. If your org pins an old SDK version, that pin is the bug: the field only exists in the newer generated code. Source: https://github.com/databricks/databricks-sdk-py/issues/225
Source: https://github.com/databricks/databricks-sdk-py/issues/225