diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index 3f2db5445..c30ba6afa 100755 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -ecd4019225ea99c009d2ce2db46e8967d2047c19 \ No newline at end of file +c68a27fa9c9d838e839c584be8018eb3b68377d5 \ No newline at end of file diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md old mode 100644 new mode 100755 index b7509d7f1..4fa44753b --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -15,3 +15,6 @@ ### Internal Changes ### API Changes +* Add `deployment_mode` field for `databricks.sdk.service.bundle.Deployment`. +* Add `deployment_mode` field for `databricks.sdk.service.bundle.Version`. +* Add `collaboration_platform_connectivity` and `effective_collaboration_platform_connectivity` fields for `databricks.sdk.service.settingsv2.Setting`. \ No newline at end of file diff --git a/databricks/sdk/service/bundle.py b/databricks/sdk/service/bundle.py index fd82785ad..a9b1911b3 100755 --- a/databricks/sdk/service/bundle.py +++ b/databricks/sdk/service/bundle.py @@ -31,6 +31,10 @@ class Deployment: created_by: Optional[str] = None """The user who created the deployment (email or principal name).""" + deployment_mode: Optional[DeploymentMode] = None + """Bundle target deployment mode (development or production), derived from the most recent + version's mode.""" + destroy_time: Optional[Timestamp] = None """When the deployment was destroyed (i.e. `bundle destroy` completed). Unset if the deployment has not been destroyed. Named destroy_time (not delete_time) because this tracks the `databricks @@ -65,6 +69,8 @@ def as_dict(self) -> dict: body["create_time"] = self.create_time.ToJsonString() if self.created_by is not None: body["created_by"] = self.created_by + if self.deployment_mode is not None: + body["deployment_mode"] = self.deployment_mode.value if self.destroy_time is not None: body["destroy_time"] = self.destroy_time.ToJsonString() if self.destroyed_by is not None: @@ -90,6 +96,8 @@ def as_shallow_dict(self) -> dict: body["create_time"] = self.create_time if self.created_by is not None: body["created_by"] = self.created_by + if self.deployment_mode is not None: + body["deployment_mode"] = self.deployment_mode if self.destroy_time is not None: body["destroy_time"] = self.destroy_time if self.destroyed_by is not None: @@ -114,6 +122,7 @@ def from_dict(cls, d: Dict[str, Any]) -> Deployment: return cls( create_time=_timestamp(d, "create_time"), created_by=d.get("created_by", None), + deployment_mode=_enum(d, "deployment_mode", DeploymentMode), destroy_time=_timestamp(d, "destroy_time"), destroyed_by=d.get("destroyed_by", None), display_name=d.get("display_name", None), @@ -125,6 +134,14 @@ def from_dict(cls, d: Dict[str, Any]) -> Deployment: ) +class DeploymentMode(Enum): + """Bundle target deployment mode. Mirrors the `mode` field on a bundle target in `databricks.yml` + (see https://docs.databricks.com/dev-tools/bundles/deployment-modes).""" + + DEPLOYMENT_MODE_DEVELOPMENT = "DEPLOYMENT_MODE_DEVELOPMENT" + DEPLOYMENT_MODE_PRODUCTION = "DEPLOYMENT_MODE_PRODUCTION" + + class DeploymentResourceType(Enum): """Type of a deployment resource.""" @@ -560,6 +577,9 @@ class Version: created_by: Optional[str] = None """The user who created the version (email or principal name).""" + deployment_mode: Optional[DeploymentMode] = None + """Bundle target deployment mode (development or production), captured at the time of this version.""" + display_name: Optional[str] = None """Display name for the deployment, captured at the time of this version.""" @@ -591,6 +611,8 @@ def as_dict(self) -> dict: body["create_time"] = self.create_time.ToJsonString() if self.created_by is not None: body["created_by"] = self.created_by + if self.deployment_mode is not None: + body["deployment_mode"] = self.deployment_mode.value if self.display_name is not None: body["display_name"] = self.display_name if self.name is not None: @@ -620,6 +642,8 @@ def as_shallow_dict(self) -> dict: body["create_time"] = self.create_time if self.created_by is not None: body["created_by"] = self.created_by + if self.deployment_mode is not None: + body["deployment_mode"] = self.deployment_mode if self.display_name is not None: body["display_name"] = self.display_name if self.name is not None: @@ -644,6 +668,7 @@ def from_dict(cls, d: Dict[str, Any]) -> Version: completion_reason=_enum(d, "completion_reason", VersionComplete), create_time=_timestamp(d, "create_time"), created_by=d.get("created_by", None), + deployment_mode=_enum(d, "deployment_mode", DeploymentMode), display_name=d.get("display_name", None), name=d.get("name", None), status=_enum(d, "status", VersionStatus), diff --git a/databricks/sdk/service/settings.py b/databricks/sdk/service/settings.py index 1f11f7896..a3174bc62 100755 --- a/databricks/sdk/service/settings.py +++ b/databricks/sdk/service/settings.py @@ -1800,6 +1800,8 @@ class CustomerFacingIngressNetworkPolicyRequestDestination: account_api: Optional[CustomerFacingIngressNetworkPolicyAccountApiDestination] = None account_databricks_one: Optional[CustomerFacingIngressNetworkPolicyAccountDatabricksOneDestination] = None + """Account DatabricksOne destination is not supported. DO NOT change the stage of this destination + past PRIVATE_PREVIEW.""" account_ui: Optional[CustomerFacingIngressNetworkPolicyAccountUiDestination] = None diff --git a/databricks/sdk/service/settingsv2.py b/databricks/sdk/service/settingsv2.py index 889f364cb..9071989f8 100755 --- a/databricks/sdk/service/settingsv2.py +++ b/databricks/sdk/service/settingsv2.py @@ -347,6 +347,40 @@ def from_dict(cls, d: Dict[str, Any]) -> ClusterAutoRestartMessageMaintenanceWin return cls(hours=d.get("hours", None), minutes=d.get("minutes", None)) +@dataclass +class CollaborationPlatformConnectivityMessage: + """Controls which external collaboration platforms (Slack, Microsoft Teams) can connect to a + workspace. Defaults to ALLOW_ALL.""" + + connectivity: CollaborationPlatformConnectivityMessageConnectivity + + def as_dict(self) -> dict: + """Serializes the CollaborationPlatformConnectivityMessage into a dictionary suitable for use as a JSON request body.""" + body = {} + if self.connectivity is not None: + body["connectivity"] = self.connectivity.value + return body + + def as_shallow_dict(self) -> dict: + """Serializes the CollaborationPlatformConnectivityMessage into a shallow dictionary of its immediate attributes.""" + body = {} + if self.connectivity is not None: + body["connectivity"] = self.connectivity + return body + + @classmethod + def from_dict(cls, d: Dict[str, Any]) -> CollaborationPlatformConnectivityMessage: + """Deserializes the CollaborationPlatformConnectivityMessage from a dictionary.""" + return cls(connectivity=_enum(d, "connectivity", CollaborationPlatformConnectivityMessageConnectivity)) + + +class CollaborationPlatformConnectivityMessageConnectivity(Enum): + ALLOW_ALL = "ALLOW_ALL" + ALLOW_SLACK = "ALLOW_SLACK" + ALLOW_TEAMS = "ALLOW_TEAMS" + DENY_ALL = "DENY_ALL" + + @dataclass class IntegerMessage: value: Optional[int] = None @@ -614,6 +648,10 @@ class Setting: """Setting value for boolean type setting. This is the setting value set by consumers, check effective_boolean_val for final setting value.""" + collaboration_platform_connectivity: Optional[CollaborationPlatformConnectivityMessage] = None + """Setting value for collaboration_platform_connectivity setting. This is the setting value set by + consumers, check effective_collaboration_platform_connectivity for final setting value.""" + effective_aibi_dashboard_embedding_access_policy: Optional[AibiDashboardEmbeddingAccessPolicy] = None """Effective setting value for aibi_dashboard_embedding_access_policy setting. This is the final effective value of setting. To set a value use aibi_dashboard_embedding_access_policy.""" @@ -634,6 +672,10 @@ class Setting: """Effective setting value for boolean type setting. This is the final effective value of setting. To set a value use boolean_val.""" + effective_collaboration_platform_connectivity: Optional[CollaborationPlatformConnectivityMessage] = None + """Effective setting value for collaboration_platform_connectivity setting. This is the final + effective value of setting. To set a value use collaboration_platform_connectivity.""" + effective_integer_val: Optional[IntegerMessage] = None """Effective setting value for integer type setting. This is the final effective value of setting. To set a value use integer_val.""" @@ -690,6 +732,8 @@ def as_dict(self) -> dict: body["automatic_cluster_update_workspace"] = self.automatic_cluster_update_workspace.as_dict() if self.boolean_val: body["boolean_val"] = self.boolean_val.as_dict() + if self.collaboration_platform_connectivity: + body["collaboration_platform_connectivity"] = self.collaboration_platform_connectivity.as_dict() if self.effective_aibi_dashboard_embedding_access_policy: body["effective_aibi_dashboard_embedding_access_policy"] = ( self.effective_aibi_dashboard_embedding_access_policy.as_dict() @@ -706,6 +750,10 @@ def as_dict(self) -> dict: ) if self.effective_boolean_val: body["effective_boolean_val"] = self.effective_boolean_val.as_dict() + if self.effective_collaboration_platform_connectivity: + body["effective_collaboration_platform_connectivity"] = ( + self.effective_collaboration_platform_connectivity.as_dict() + ) if self.effective_integer_val: body["effective_integer_val"] = self.effective_integer_val.as_dict() if self.effective_operational_email_custom_recipient: @@ -745,6 +793,8 @@ def as_shallow_dict(self) -> dict: body["automatic_cluster_update_workspace"] = self.automatic_cluster_update_workspace if self.boolean_val: body["boolean_val"] = self.boolean_val + if self.collaboration_platform_connectivity: + body["collaboration_platform_connectivity"] = self.collaboration_platform_connectivity if self.effective_aibi_dashboard_embedding_access_policy: body["effective_aibi_dashboard_embedding_access_policy"] = ( self.effective_aibi_dashboard_embedding_access_policy @@ -759,6 +809,8 @@ def as_shallow_dict(self) -> dict: body["effective_automatic_cluster_update_workspace"] = self.effective_automatic_cluster_update_workspace if self.effective_boolean_val: body["effective_boolean_val"] = self.effective_boolean_val + if self.effective_collaboration_platform_connectivity: + body["effective_collaboration_platform_connectivity"] = self.effective_collaboration_platform_connectivity if self.effective_integer_val: body["effective_integer_val"] = self.effective_integer_val if self.effective_operational_email_custom_recipient: @@ -798,6 +850,9 @@ def from_dict(cls, d: Dict[str, Any]) -> Setting: d, "automatic_cluster_update_workspace", ClusterAutoRestartMessage ), boolean_val=_from_dict(d, "boolean_val", BooleanMessage), + collaboration_platform_connectivity=_from_dict( + d, "collaboration_platform_connectivity", CollaborationPlatformConnectivityMessage + ), effective_aibi_dashboard_embedding_access_policy=_from_dict( d, "effective_aibi_dashboard_embedding_access_policy", AibiDashboardEmbeddingAccessPolicy ), @@ -811,6 +866,9 @@ def from_dict(cls, d: Dict[str, Any]) -> Setting: d, "effective_automatic_cluster_update_workspace", ClusterAutoRestartMessage ), effective_boolean_val=_from_dict(d, "effective_boolean_val", BooleanMessage), + effective_collaboration_platform_connectivity=_from_dict( + d, "effective_collaboration_platform_connectivity", CollaborationPlatformConnectivityMessage + ), effective_integer_val=_from_dict(d, "effective_integer_val", IntegerMessage), effective_operational_email_custom_recipient=_from_dict( d, "effective_operational_email_custom_recipient", OperationalEmailCustomRecipientMessage diff --git a/docs/dbdataclasses/bundle.rst b/docs/dbdataclasses/bundle.rst index 478ff6670..2952c9cae 100755 --- a/docs/dbdataclasses/bundle.rst +++ b/docs/dbdataclasses/bundle.rst @@ -8,6 +8,16 @@ These dataclasses are used in the SDK to represent API requests and responses fo :members: :undoc-members: +.. py:class:: DeploymentMode + + Bundle target deployment mode. Mirrors the `mode` field on a bundle target in `databricks.yml` (see https://docs.databricks.com/dev-tools/bundles/deployment-modes). + + .. py:attribute:: DEPLOYMENT_MODE_DEVELOPMENT + :value: "DEPLOYMENT_MODE_DEVELOPMENT" + + .. py:attribute:: DEPLOYMENT_MODE_PRODUCTION + :value: "DEPLOYMENT_MODE_PRODUCTION" + .. py:class:: DeploymentResourceType Type of a deployment resource. diff --git a/docs/dbdataclasses/settingsv2.rst b/docs/dbdataclasses/settingsv2.rst index c96ef50b1..2f3a6c846 100755 --- a/docs/dbdataclasses/settingsv2.rst +++ b/docs/dbdataclasses/settingsv2.rst @@ -97,6 +97,24 @@ These dataclasses are used in the SDK to represent API requests and responses fo :members: :undoc-members: +.. autoclass:: CollaborationPlatformConnectivityMessage + :members: + :undoc-members: + +.. py:class:: CollaborationPlatformConnectivityMessageConnectivity + + .. py:attribute:: ALLOW_ALL + :value: "ALLOW_ALL" + + .. py:attribute:: ALLOW_SLACK + :value: "ALLOW_SLACK" + + .. py:attribute:: ALLOW_TEAMS + :value: "ALLOW_TEAMS" + + .. py:attribute:: DENY_ALL + :value: "DENY_ALL" + .. autoclass:: IntegerMessage :members: :undoc-members: