File tree Expand file tree Collapse file tree 9 files changed +138
-0
lines changed
experimental/python/databricks/bundles Expand file tree Collapse file tree 9 files changed +138
-0
lines changed Original file line number Diff line number Diff line change 134134 "Library" ,
135135 "LibraryDict" ,
136136 "LibraryParam" ,
137+ "Lifecycle" ,
138+ "LifecycleDict" ,
139+ "LifecycleParam" ,
137140 "LocalFileInfo" ,
138141 "LocalFileInfoDict" ,
139142 "LocalFileInfoParam" ,
482485 JobsHealthRulesParam ,
483486)
484487from databricks .bundles .jobs ._models .library import Library , LibraryDict , LibraryParam
488+ from databricks .bundles .jobs ._models .lifecycle import (
489+ Lifecycle ,
490+ LifecycleDict ,
491+ LifecycleParam ,
492+ )
485493from databricks .bundles .jobs ._models .local_file_info import (
486494 LocalFileInfo ,
487495 LocalFileInfoDict ,
Original file line number Diff line number Diff line change 4444 JobsHealthRules ,
4545 JobsHealthRulesParam ,
4646)
47+ from databricks .bundles .jobs ._models .lifecycle import Lifecycle , LifecycleParam
4748from databricks .bundles .jobs ._models .performance_target import (
4849 PerformanceTarget ,
4950 PerformanceTargetParam ,
@@ -116,6 +117,8 @@ class Job(Resource):
116117 A list of job cluster specifications that can be shared and reused by tasks of this job. Libraries cannot be declared in a shared job cluster. You must declare dependent libraries in task settings.
117118 """
118119
120+ lifecycle : VariableOrOptional [Lifecycle ] = None
121+
119122 max_concurrent_runs : VariableOrOptional [int ] = None
120123 """
121124 An optional maximum allowed number of concurrent runs of the job.
@@ -256,6 +259,8 @@ class JobDict(TypedDict, total=False):
256259 A list of job cluster specifications that can be shared and reused by tasks of this job. Libraries cannot be declared in a shared job cluster. You must declare dependent libraries in task settings.
257260 """
258261
262+ lifecycle : VariableOrOptional [LifecycleParam ]
263+
259264 max_concurrent_runs : VariableOrOptional [int ]
260265 """
261266 An optional maximum allowed number of concurrent runs of the job.
Original file line number Diff line number Diff line change 1+ from dataclasses import dataclass
2+ from typing import TYPE_CHECKING , TypedDict
3+
4+ from databricks .bundles .core ._transform import _transform
5+ from databricks .bundles .core ._transform_to_json import _transform_to_json_value
6+ from databricks .bundles .core ._variable import VariableOrOptional
7+
8+ if TYPE_CHECKING :
9+ from typing_extensions import Self
10+
11+
12+ @dataclass (kw_only = True )
13+ class Lifecycle :
14+ """"""
15+
16+ prevent_destroy : VariableOrOptional [bool ] = None
17+
18+ @classmethod
19+ def from_dict (cls , value : "LifecycleDict" ) -> "Self" :
20+ return _transform (cls , value )
21+
22+ def as_dict (self ) -> "LifecycleDict" :
23+ return _transform_to_json_value (self ) # type:ignore
24+
25+
26+ class LifecycleDict (TypedDict , total = False ):
27+ """"""
28+
29+ prevent_destroy : VariableOrOptional [bool ]
30+
31+
32+ LifecycleParam = LifecycleDict | Lifecycle
Original file line number Diff line number Diff line change 5656 "InitScriptInfo" ,
5757 "InitScriptInfoDict" ,
5858 "InitScriptInfoParam" ,
59+ "Lifecycle" ,
60+ "LifecycleDict" ,
61+ "LifecycleParam" ,
5962 "LocalFileInfo" ,
6063 "LocalFileInfoDict" ,
6164 "LocalFileInfoParam" ,
236239 InitScriptInfoDict ,
237240 InitScriptInfoParam ,
238241)
242+ from databricks .bundles .pipelines ._models .lifecycle import (
243+ Lifecycle ,
244+ LifecycleDict ,
245+ LifecycleParam ,
246+ )
239247from databricks .bundles .pipelines ._models .local_file_info import (
240248 LocalFileInfo ,
241249 LocalFileInfoDict ,
Original file line number Diff line number Diff line change 1+ from dataclasses import dataclass
2+ from typing import TYPE_CHECKING , TypedDict
3+
4+ from databricks .bundles .core ._transform import _transform
5+ from databricks .bundles .core ._transform_to_json import _transform_to_json_value
6+ from databricks .bundles .core ._variable import VariableOrOptional
7+
8+ if TYPE_CHECKING :
9+ from typing_extensions import Self
10+
11+
12+ @dataclass (kw_only = True )
13+ class Lifecycle :
14+ """"""
15+
16+ prevent_destroy : VariableOrOptional [bool ] = None
17+
18+ @classmethod
19+ def from_dict (cls , value : "LifecycleDict" ) -> "Self" :
20+ return _transform (cls , value )
21+
22+ def as_dict (self ) -> "LifecycleDict" :
23+ return _transform_to_json_value (self ) # type:ignore
24+
25+
26+ class LifecycleDict (TypedDict , total = False ):
27+ """"""
28+
29+ prevent_destroy : VariableOrOptional [bool ]
30+
31+
32+ LifecycleParam = LifecycleDict | Lifecycle
Original file line number Diff line number Diff line change 2525 IngestionPipelineDefinition ,
2626 IngestionPipelineDefinitionParam ,
2727)
28+ from databricks .bundles .pipelines ._models .lifecycle import (
29+ Lifecycle ,
30+ LifecycleParam ,
31+ )
2832from databricks .bundles .pipelines ._models .notifications import (
2933 Notifications ,
3034 NotificationsParam ,
@@ -143,6 +147,8 @@ class Pipeline(Resource):
143147 Libraries or code needed by this deployment.
144148 """
145149
150+ lifecycle : VariableOrOptional [Lifecycle ] = None
151+
146152 name : VariableOrOptional [str ] = None
147153 """
148154 Friendly identifier for this pipeline.
@@ -301,6 +307,8 @@ class PipelineDict(TypedDict, total=False):
301307 Libraries or code needed by this deployment.
302308 """
303309
310+ lifecycle : VariableOrOptional [LifecycleParam ]
311+
304312 name : VariableOrOptional [str ]
305313 """
306314 Friendly identifier for this pipeline.
Original file line number Diff line number Diff line change 11__all__ = [
2+ "Lifecycle" ,
3+ "LifecycleDict" ,
4+ "LifecycleParam" ,
25 "Volume" ,
36 "VolumeDict" ,
47 "VolumeGrant" ,
1215]
1316
1417
18+ from databricks .bundles .volumes ._models .lifecycle import (
19+ Lifecycle ,
20+ LifecycleDict ,
21+ LifecycleParam ,
22+ )
1523from databricks .bundles .volumes ._models .volume import Volume , VolumeDict , VolumeParam
1624from databricks .bundles .volumes ._models .volume_grant import (
1725 VolumeGrant ,
Original file line number Diff line number Diff line change 1+ from dataclasses import dataclass
2+ from typing import TYPE_CHECKING , TypedDict
3+
4+ from databricks .bundles .core ._transform import _transform
5+ from databricks .bundles .core ._transform_to_json import _transform_to_json_value
6+ from databricks .bundles .core ._variable import VariableOrOptional
7+
8+ if TYPE_CHECKING :
9+ from typing_extensions import Self
10+
11+
12+ @dataclass (kw_only = True )
13+ class Lifecycle :
14+ """"""
15+
16+ prevent_destroy : VariableOrOptional [bool ] = None
17+
18+ @classmethod
19+ def from_dict (cls , value : "LifecycleDict" ) -> "Self" :
20+ return _transform (cls , value )
21+
22+ def as_dict (self ) -> "LifecycleDict" :
23+ return _transform_to_json_value (self ) # type:ignore
24+
25+
26+ class LifecycleDict (TypedDict , total = False ):
27+ """"""
28+
29+ prevent_destroy : VariableOrOptional [bool ]
30+
31+
32+ LifecycleParam = LifecycleDict | Lifecycle
Original file line number Diff line number Diff line change 99 VariableOrList ,
1010 VariableOrOptional ,
1111)
12+ from databricks .bundles .volumes ._models .lifecycle import Lifecycle , LifecycleParam
1213from databricks .bundles .volumes ._models .volume_grant import (
1314 VolumeGrant ,
1415 VolumeGrantParam ,
@@ -45,6 +46,8 @@ class Volume(Resource):
4546
4647 grants : VariableOrList [VolumeGrant ] = field (default_factory = list )
4748
49+ lifecycle : VariableOrOptional [Lifecycle ] = None
50+
4851 storage_location : VariableOrOptional [str ] = None
4952 """
5053 The storage location on the cloud
@@ -85,6 +88,8 @@ class VolumeDict(TypedDict, total=False):
8588
8689 grants : VariableOrList [VolumeGrantParam ]
8790
91+ lifecycle : VariableOrOptional [LifecycleParam ]
92+
8893 storage_location : VariableOrOptional [str ]
8994 """
9095 The storage location on the cloud
You can’t perform that action at this time.
0 commit comments