databricks-sdk 0.130.0__tar.gz → 0.131.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/CHANGELOG.md +7 -0
  2. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/PKG-INFO +1 -1
  3. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/bundledeployments.py +95 -71
  4. databricks_sdk-0.131.0/databricks/sdk/version.py +1 -0
  5. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks_sdk.egg-info/PKG-INFO +1 -1
  6. databricks_sdk-0.130.0/databricks/sdk/version.py +0 -1
  7. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/CONTRIBUTING.md +0 -0
  8. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/DCO +0 -0
  9. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/LICENSE +0 -0
  10. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/MANIFEST.in +0 -0
  11. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/Makefile +0 -0
  12. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/NOTICE +0 -0
  13. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/README.md +0 -0
  14. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/SECURITY.md +0 -0
  15. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/__init__.py +0 -0
  16. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/__init__.py +0 -0
  17. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/_base_client.py +0 -0
  18. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/_property.py +0 -0
  19. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/_widgets/__init__.py +0 -0
  20. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/_widgets/default_widgets_utils.py +0 -0
  21. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/_widgets/ipywidgets_utils.py +0 -0
  22. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/azure.py +0 -0
  23. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/casing.py +0 -0
  24. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/client_types.py +0 -0
  25. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/clock.py +0 -0
  26. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/common/lro.py +0 -0
  27. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/common/types/__init__.py +0 -0
  28. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/common/types/fieldmask.py +0 -0
  29. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/config.py +0 -0
  30. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/core.py +0 -0
  31. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/credentials_provider.py +0 -0
  32. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/data_plane.py +0 -0
  33. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/dbutils.py +0 -0
  34. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/environments.py +0 -0
  35. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/errors/__init__.py +0 -0
  36. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/errors/base.py +0 -0
  37. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/errors/customizer.py +0 -0
  38. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/errors/deserializer.py +0 -0
  39. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/errors/details.py +0 -0
  40. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/errors/mapper.py +0 -0
  41. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/errors/overrides.py +0 -0
  42. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/errors/parser.py +0 -0
  43. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/errors/platform.py +0 -0
  44. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/errors/private_link.py +0 -0
  45. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/errors/sdk.py +0 -0
  46. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/logger/__init__.py +0 -0
  47. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/logger/round_trip_logger.py +0 -0
  48. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/mixins/__init__.py +0 -0
  49. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/mixins/compute.py +0 -0
  50. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/mixins/files.py +0 -0
  51. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/mixins/files_utils.py +0 -0
  52. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/mixins/jobs.py +0 -0
  53. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/mixins/open_ai_client.py +0 -0
  54. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/mixins/sharing.py +0 -0
  55. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/mixins/workspace.py +0 -0
  56. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/oauth.py +0 -0
  57. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/oidc.py +0 -0
  58. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/oidc_token_supplier.py +0 -0
  59. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/py.typed +0 -0
  60. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/retries.py +0 -0
  61. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/runtime/__init__.py +0 -0
  62. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/runtime/dbutils_stub.py +0 -0
  63. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/__init__.py +0 -0
  64. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/_internal.py +0 -0
  65. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/agentbricks.py +0 -0
  66. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/aisearch.py +0 -0
  67. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/apps.py +0 -0
  68. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/billing.py +0 -0
  69. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/bundle.py +0 -0
  70. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/catalog.py +0 -0
  71. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/cleanrooms.py +0 -0
  72. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/compute.py +0 -0
  73. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/dashboards.py +0 -0
  74. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/database.py +0 -0
  75. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/dataclassification.py +0 -0
  76. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/dataquality.py +0 -0
  77. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/disasterrecovery.py +0 -0
  78. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/environments.py +0 -0
  79. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/files.py +0 -0
  80. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/iam.py +0 -0
  81. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/iamv2.py +0 -0
  82. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/jobs.py +0 -0
  83. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/knowledgeassistants.py +0 -0
  84. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/marketplace.py +0 -0
  85. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/ml.py +0 -0
  86. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/networking.py +0 -0
  87. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/oauth2.py +0 -0
  88. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/pipelines.py +0 -0
  89. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/postgres.py +0 -0
  90. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/provisioning.py +0 -0
  91. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/qualitymonitorv2.py +0 -0
  92. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/serving.py +0 -0
  93. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/settings.py +0 -0
  94. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/settingsv2.py +0 -0
  95. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/sharing.py +0 -0
  96. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/sql.py +0 -0
  97. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/supervisoragents.py +0 -0
  98. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/tags.py +0 -0
  99. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/vectorsearch.py +0 -0
  100. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/service/workspace.py +0 -0
  101. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks/sdk/useragent.py +0 -0
  102. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks_sdk.egg-info/SOURCES.txt +0 -0
  103. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks_sdk.egg-info/dependency_links.txt +0 -0
  104. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks_sdk.egg-info/requires.txt +0 -0
  105. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/databricks_sdk.egg-info/top_level.txt +0 -0
  106. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/pyproject.toml +0 -0
  107. {databricks_sdk-0.130.0 → databricks_sdk-0.131.0}/setup.cfg +0 -0
@@ -1,5 +1,12 @@
1
1
  # Version changelog
2
2
 
3
+ ## Release v0.131.0 (2026-08-17)
4
+
5
+ ### API Changes
6
+ * [Breaking] Change `action_type` and `status` fields for `databricks.sdk.service.bundledeployments.Operation` to no longer be required.
7
+ * Change `action_type` and `status` fields for `databricks.sdk.service.bundledeployments.Operation` to no longer be required.
8
+ * [Breaking] Remove `create_operation()` method for [w.bundle_deployments](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/bundledeployments/bundle_deployments.html) workspace-level service.
9
+
3
10
  ## Release v0.130.0 (2026-08-16)
4
11
 
5
12
  ### API Changes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: databricks-sdk
3
- Version: 0.130.0
3
+ Version: 0.131.0
4
4
  Summary: Databricks SDK for Python (Beta)
5
5
  Project-URL: Documentation, https://databricks-sdk-py.readthedocs.io
6
6
  Keywords: databricks,sdk
@@ -492,24 +492,25 @@ class ListVersionsResponse:
492
492
 
493
493
  @dataclass
494
494
  class Operation:
495
- """An operation on a single resource performed during a version. Operations record the result of
496
- applying a resource change to the workspace. Most fields are immutable once recorded; ``state``,
497
- ``error_message``, ``resource_id``, and ``status`` may be updated afterwards (via
498
- UpdateOperation), guarded by ``sequence_id`` for optimistic concurrency control."""
499
-
500
- action_type: OperationActionType
501
- """The type of operation performed on this resource."""
502
-
503
- status: OperationStatus
504
- """Whether the operation succeeded or failed. Mutable: may be updated after creation via
505
- UpdateOperation, e.g. when an operation recorded as failed is retried and eventually succeeds. A
506
- succeeded operation cannot carry an ``error_message``."""
495
+ """An operation on a single resource performed during a version. The full set of operations for a
496
+ version is recorded when the version is created: each carries its ``resource_key`` and
497
+ ``action_type`` and starts in ``OPERATION_STATUS_PENDING``. As each resource is applied, its
498
+ operation is updated (via UpdateOperation) to record the result of applying the change to the
499
+ workspace. ``state``, ``error_message``, ``resource_id``, ``status``, and ``dashboard_metadata``
500
+ may be updated afterwards, guarded by ``sequence_id`` for optimistic concurrency control; all
501
+ other fields are immutable once recorded."""
502
+
503
+ action_type: Optional[OperationActionType] = None
504
+ """The type of operation performed on this resource. Set when the version is created and immutable
505
+ thereafter."""
507
506
 
508
507
  create_time: Optional[Timestamp] = None
509
508
  """When the operation was recorded."""
510
509
 
511
510
  dashboard_metadata: Optional[DashboardMetadata] = None
512
- """Dashboard-specific metadata; set only for dashboard resources."""
511
+ """Dashboard-specific metadata; set only for dashboard resources. Mutable: may be set or updated
512
+ via UpdateOperation as the resource is applied, and is mirrored onto the corresponding
513
+ deployment-level resource."""
513
514
 
514
515
  error_message: Optional[str] = None
515
516
  """Error message if the operation failed. Set when status is OPERATION_STATUS_FAILED. Captures the
@@ -530,7 +531,8 @@ class Operation:
530
531
  resource_key: Optional[str] = None
531
532
  """Resource identifier within the bundle (e.g. "jobs.foo", "pipelines.bar", "jobs.foo.permissions",
532
533
  "files.<rel-path>"). Can be an arbitrary UTF-8 encoded string key. This key links the operation
533
- to the corresponding deployment-level Resource."""
534
+ to the corresponding deployment-level Resource. Set when the version is created and immutable
535
+ thereafter."""
534
536
 
535
537
  resource_type: Optional[DeploymentResourceType] = None
536
538
  """The type of the deployment resource this operation applies to. Derived from the ``resource_key``
@@ -539,11 +541,12 @@ class Operation:
539
541
  sequence_id: Optional[int] = None
540
542
  """Monotonically increasing revision used for optimistic concurrency control (the AIP-154
541
543
  concurrency token for this resource, realized as a sequence number rather than an opaque etag).
542
- The server assigns 1 on creation and increments it on every successful UpdateOperation. It is
543
- OPTIONAL rather than OUTPUT_ONLY because it is dual-purpose: CreateOperation/GetOperation return
544
- the current value, and UpdateOperation reads the caller-supplied value as a precondition. The
545
- caller must echo the value it last observed; if it no longer matches the server's value, the
546
- update is rejected with ABORTED so the caller can re-read and retry. Ignored on CreateOperation."""
544
+ The server assigns 0 when the operation is created and increments it on every successful
545
+ UpdateOperation, so a never-updated operation is at 0 and the first successful update makes it
546
+ 1. It is OPTIONAL rather than OUTPUT_ONLY because it is dual-purpose: GetOperation returns the
547
+ current value, and UpdateOperation reads the caller-supplied value as a precondition. The caller
548
+ must echo the value it last observed; if it no longer matches the server's value, the update is
549
+ rejected with ABORTED so the caller can re-read and retry."""
547
550
 
548
551
  state: Optional[str] = None
549
552
  """Serialized local config state after the operation. Its presence records whether the resource
@@ -566,6 +569,12 @@ class Operation:
566
569
  and API responses. Both generate the same OpenAPI schema ("type": "string"), so the SDKs are
567
570
  identical either way."""
568
571
 
572
+ status: Optional[OperationStatus] = None
573
+ """Status of the operation. Starts as OPERATION_STATUS_PENDING when the version is created and
574
+ moves to a terminal status once the resource is applied. Mutable: updated via UpdateOperation,
575
+ e.g. when an operation recorded as failed is retried and eventually succeeds. A succeeded
576
+ operation cannot carry an ``error_message``."""
577
+
569
578
  update_time: Optional[Timestamp] = None
570
579
  """When the operation was last updated. Set to ``create_time`` when the operation is created and to
571
580
  the server timestamp on each successful UpdateOperation."""
@@ -665,6 +674,7 @@ class OperationStatus(Enum):
665
674
  """Status of a resource operation."""
666
675
 
667
676
  OPERATION_STATUS_FAILED = "OPERATION_STATUS_FAILED"
677
+ OPERATION_STATUS_PENDING = "OPERATION_STATUS_PENDING"
668
678
  OPERATION_STATUS_SUCCEEDED = "OPERATION_STATUS_SUCCEEDED"
669
679
 
670
680
 
@@ -765,6 +775,44 @@ class Resource:
765
775
  )
766
776
 
767
777
 
778
+ @dataclass
779
+ class StagedOperation:
780
+ """A resource operation to record when a version is created. Each staged operation identifies the
781
+ resource it applies to and the action planned for it; the server records the operation in
782
+ ``OPERATION_STATUS_PENDING``, and its outcome is filled in later via UpdateOperation."""
783
+
784
+ resource_key: str
785
+ """The key identifying the resource this operation applies to (e.g. "jobs.foo", "pipelines.bar").
786
+ Becomes the final component of the operation's name and must be unique among the operations in
787
+ the request."""
788
+
789
+ action_type: OperationActionType
790
+ """The type of operation planned for this resource."""
791
+
792
+ def as_dict(self) -> dict:
793
+ """Serializes the StagedOperation into a dictionary suitable for use as a JSON request body."""
794
+ body = {}
795
+ if self.action_type is not None:
796
+ body["action_type"] = self.action_type.value
797
+ if self.resource_key is not None:
798
+ body["resource_key"] = self.resource_key
799
+ return body
800
+
801
+ def as_shallow_dict(self) -> dict:
802
+ """Serializes the StagedOperation into a shallow dictionary of its immediate attributes."""
803
+ body = {}
804
+ if self.action_type is not None:
805
+ body["action_type"] = self.action_type
806
+ if self.resource_key is not None:
807
+ body["resource_key"] = self.resource_key
808
+ return body
809
+
810
+ @classmethod
811
+ def from_dict(cls, d: Dict[str, Any]) -> StagedOperation:
812
+ """Deserializes the StagedOperation from a dictionary."""
813
+ return cls(action_type=_enum(d, "action_type", OperationActionType), resource_key=d.get("resource_key", None))
814
+
815
+
768
816
  @dataclass
769
817
  class Version:
770
818
  """A single invocation of a deploy or destroy command against a deployment. Creating a version
@@ -1089,46 +1137,9 @@ class BundleDeploymentsAPI:
1089
1137
  res = self._api.do("POST", "/api/2.0/bundle/deployments", body=body, headers=headers)
1090
1138
  return Deployment.from_dict(res)
1091
1139
 
1092
- def create_operation(self, parent: str, operation: Operation, resource_key: str) -> Operation:
1093
- """Creates a resource operation under a version.
1094
-
1095
- The caller must provide a ``resource_key`` which becomes the final component of the operation's name.
1096
- If an operation with the same key already exists under the version, the server returns
1097
- ``ALREADY_EXISTS``.
1098
-
1099
- On success the server also updates the corresponding deployment-level resource, creating it if this is
1100
- the first operation for that resource_key and removing it if the operation records no ``state`` (see
1101
- that field).
1102
-
1103
- :param parent: str
1104
- The parent version where this operation will be recorded. Format:
1105
- deployments/{deployment_id}/versions/{version_id}
1106
- :param operation: :class:`Operation`
1107
- The resource operation to create.
1108
- :param resource_key: str
1109
- The key identifying the resource this operation applies to. Becomes the final component of the
1110
- operation's name.
1111
-
1112
- :returns: :class:`Operation`
1113
- """
1114
-
1115
- body = operation.as_dict()
1116
- query = {}
1117
- if resource_key is not None:
1118
- query["resource_key"] = resource_key
1119
- headers = {
1120
- "Accept": "application/json",
1121
- "Content-Type": "application/json",
1122
- }
1123
-
1124
- cfg = self._api._cfg
1125
- if cfg.workspace_id:
1126
- headers["X-Databricks-Workspace-Id"] = cfg.workspace_id
1127
-
1128
- res = self._api.do("POST", f"/api/2.0/bundle/{parent}/operations", query=query, body=body, headers=headers)
1129
- return Operation.from_dict(res)
1130
-
1131
- def create_version(self, parent: str, version: Version, version_id: str) -> Version:
1140
+ def create_version(
1141
+ self, parent: str, version: Version, version_id: str, *, operations: Optional[List[StagedOperation]] = None
1142
+ ) -> Version:
1132
1143
  """Creates a new version under a deployment.
1133
1144
 
1134
1145
  Creating a version acquires an exclusive lock on the deployment, preventing concurrent deploys. The
@@ -1137,6 +1148,12 @@ class BundleDeploymentsAPI:
1137
1148
  most recent version (leaving it unset for the first version), which the server validates to detect
1138
1149
  concurrent deploys.
1139
1150
 
1151
+ The caller also provides the full set of ``operations`` planned for this version, each identified by a
1152
+ ``resource_key`` and an ``action_type``. The server records one operation per resource in
1153
+ ``OPERATION_STATUS_PENDING`` in the same transaction as the version, so the plan is captured
1154
+ atomically. The outcome of each operation is recorded later via UpdateOperation as the resource is
1155
+ applied; the set of operations cannot be changed after the version is created.
1156
+
1140
1157
  :param parent: str
1141
1158
  The parent deployment where this version will be created. Format: deployments/{deployment_id}
1142
1159
  :param version: :class:`Version`
@@ -1147,12 +1164,19 @@ class BundleDeploymentsAPI:
1147
1164
  or equal to 1. Must be numerically greater than the deployment's most recent version (see
1148
1165
  ``version.previous_version_id``); it does not need to start at 1 or increase by exactly 1. If the
1149
1166
  value is not numerically greater, the server returns ``INVALID_PARAMETER_VALUE``.
1167
+ :param operations: List[:class:`StagedOperation`] (optional)
1168
+ The full set of resource operations to record for this version. The server creates one operation per
1169
+ entry in ``OPERATION_STATUS_PENDING``, in the same transaction as the version; each outcome is
1170
+ recorded later via UpdateOperation. May be empty for a version that changes no resources. Each
1171
+ ``resource_key`` must be unique within the request.
1150
1172
 
1151
1173
  :returns: :class:`Version`
1152
1174
  """
1153
1175
 
1154
1176
  body = version.as_dict()
1155
1177
  query = {}
1178
+ if operations is not None:
1179
+ query["operations"] = [v.as_dict() for v in operations]
1156
1180
  if version_id is not None:
1157
1181
  query["version_id"] = version_id
1158
1182
  headers = {
@@ -1480,16 +1504,16 @@ class BundleDeploymentsAPI:
1480
1504
  def update_operation(self, name: str, operation: Operation, update_mask: FieldMask) -> Operation:
1481
1505
  """Updates a resource operation's mutable fields.
1482
1506
 
1483
- ``state``, ``error_message``, ``resource_id``, and ``status`` may be updated, independently;
1484
- ``update_mask`` must contain only those paths. All other fields are immutable. The update is guarded
1485
- by an optimistic-concurrency check: the caller sets ``operation.sequence_id`` to the value it last
1486
- observed, and the server rejects the update with ``ABORTED`` if the operation has been modified since.
1487
- On success the server increments ``sequence_id``; updates to ``state`` and ``resource_id`` are
1488
- mirrored onto the corresponding deployment-level resource. Listing ``state`` in ``update_mask`` with
1489
- no value clears it, which removes the resource, so a delete that is retried until it succeeds must
1490
- clear ``state``. The parent version must be in progress, and after the update is applied a succeeded
1491
- operation cannot carry an ``error_message``. See the ``state`` and ``resource_id`` fields for the
1492
- rest.
1507
+ ``state``, ``error_message``, ``resource_id``, ``status``, and ``dashboard_metadata`` may be updated,
1508
+ independently; ``update_mask`` must contain only those paths. All other fields are immutable. The
1509
+ update is guarded by an optimistic-concurrency check: the caller sets ``operation.sequence_id`` to the
1510
+ value it last observed, and the server rejects the update with ``ABORTED`` if the operation has been
1511
+ modified since. On success the server increments ``sequence_id``; updates to ``state``,
1512
+ ``resource_id``, and ``dashboard_metadata`` are mirrored onto the corresponding deployment-level
1513
+ resource. Listing ``state`` in ``update_mask`` with no value clears it, which removes the resource, so
1514
+ a delete that is retried until it succeeds must clear ``state``. The parent version must be in
1515
+ progress, and after the update is applied a succeeded operation cannot carry an ``error_message``. See
1516
+ the ``state`` and ``resource_id`` fields for the rest.
1493
1517
 
1494
1518
  :param name: str
1495
1519
  Resource name of the operation. Format:
@@ -1500,8 +1524,8 @@ class BundleDeploymentsAPI:
1500
1524
  field docs on Operation). All other fields are ignored.
1501
1525
  :param update_mask: FieldMask
1502
1526
  The set of fields to update. Required; supported paths are ``state``, ``error_message``,
1503
- ``resource_id``, and ``status``. An empty mask or any other path is rejected with
1504
- INVALID_PARAMETER_VALUE.
1527
+ ``resource_id``, ``status``, and ``dashboard_metadata``. An empty mask or any other path is rejected
1528
+ with INVALID_PARAMETER_VALUE.
1505
1529
 
1506
1530
  :returns: :class:`Operation`
1507
1531
  """
@@ -0,0 +1 @@
1
+ __version__ = "0.131.0"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: databricks-sdk
3
- Version: 0.130.0
3
+ Version: 0.131.0
4
4
  Summary: Databricks SDK for Python (Beta)
5
5
  Project-URL: Documentation, https://databricks-sdk-py.readthedocs.io
6
6
  Keywords: databricks,sdk
@@ -1 +0,0 @@
1
- __version__ = "0.130.0"
File without changes