Skip to content

ClusterPolicy

laktory.models.resources.databricks.ClusterPolicy ¤

Bases: BaseModel, PulumiResource, TerraformResource

Databricks cluster policy

ATTRIBUTE DESCRIPTION
access_controls

List of access controls

TYPE: list[AccessControl]

definition

Policy definition: JSON document expressed in Databricks Policy Definition Language. Cannot be used with policy_family_id.

TYPE: Union[str, dict[str, Any]]

description

Additional human-readable description of the cluster policy.

TYPE: str

libraries

TODO

TYPE: list[ClusterPolicyLibrary]

max_clusters_per_user

Maximum number of clusters allowed per user. When omitted, there is no limit. If specified, value must be greater than zero.

TYPE: int

name

Cluster policy name. This must be unique. Length must be between 1 and 100 characters.

TYPE: str

policy_family_definition_overrides

Policy definition JSON document expressed in Databricks Policy Definition Language. The JSON document must be passed as a string and cannot be embedded in the requests. You can use this to customize the policy definition inherited from the policy family. Policy rules specified here are merged into the inherited policy definition.

TYPE: str

policy_family_id

ID of the policy family. The cluster policy's policy definition inherits the policy family's policy definition. Cannot be used with definition. Use policy_family_definition_overrides instead to customize the policy definition.

TYPE: str

Examples:

from laktory import models

cluster = models.resources.databricks.ClusterPolicy(
    name="okube",
    definition={
        "dbus_per_hour": {
            "type": "range",
            "maxValue": 10,
        },
        "autotermination_minutes": {"type": "fixed", "value": 30, "hidden": True},
        "custom_tags.team": {
            "type": "fixed",
            "value": "okube",
        },
    },
    libraries=[
        {
            "pypi": {
                "package": "laktory==0.5.0",
            }
        }
    ],
    access_controls=[
        {"permission_level": "CAN_USE", "group_name": "account users"}
    ],
)
References
ATTRIBUTE DESCRIPTION
additional_core_resources
  • permissions

TYPE: list[PulumiResource]

Attributes¤

additional_core_resources property ¤

additional_core_resources
  • permissions

laktory.models.resources.databricks.clusterpolicy.ClusterPolicyLibraryCran ¤

Bases: BaseModel


laktory.models.resources.databricks.clusterpolicy.ClusterPolicyLibraryMaven ¤

Bases: BaseModel


laktory.models.resources.databricks.clusterpolicy.ClusterPolicyLibraryPypi ¤

Bases: BaseModel


laktory.models.resources.databricks.clusterpolicy.ClusterPolicyLibrary ¤

Bases: BaseModel

Cluster Policy Library

ATTRIBUTE DESCRIPTION
cran

Cran library specifications

TYPE: ClusterPolicyLibraryCran

egg

Egg filepath

TYPE: str

jar

Jar filepath

TYPE: str

maven

TODO

TYPE: ClusterPolicyLibraryMaven

pypi

Pypi library specifications

TYPE: ClusterPolicyLibraryPypi

requirements

TODO

whl

Wheel filepath

TYPE: str