From 0912e6db16bc68b366a3550b4279ab9ddb89b904 Mon Sep 17 00:00:00 2001 From: Hector Castejon Diaz Date: Thu, 1 May 2025 16:16:01 +0200 Subject: [PATCH] Preview --- databricks/sdk/service/apps.py | 24 +-- databricks/sdk/service/billing.py | 14 +- databricks/sdk/service/catalog.py | 200 ++++++++++++++----------- databricks/sdk/service/cleanrooms.py | 6 +- databricks/sdk/service/compute.py | 66 +++++--- databricks/sdk/service/dashboards.py | 37 +++-- databricks/sdk/service/iam.py | 134 +++++++++++------ databricks/sdk/service/jobs.py | 12 +- databricks/sdk/service/marketplace.py | 46 +++--- databricks/sdk/service/ml.py | 30 ++-- databricks/sdk/service/oauth2.py | 14 +- databricks/sdk/service/pipelines.py | 28 ++-- databricks/sdk/service/provisioning.py | 14 +- databricks/sdk/service/serving.py | 52 ++++--- databricks/sdk/service/settings.py | 30 ++-- databricks/sdk/service/sharing.py | 36 ++--- databricks/sdk/service/sql.py | 84 +++++++---- databricks/sdk/service/vectorsearch.py | 40 ++--- databricks/sdk/service/workspace.py | 48 +++--- 19 files changed, 535 insertions(+), 380 deletions(-) diff --git a/databricks/sdk/service/apps.py b/databricks/sdk/service/apps.py index 6f645641d..28faefe84 100755 --- a/databricks/sdk/service/apps.py +++ b/databricks/sdk/service/apps.py @@ -1392,16 +1392,16 @@ def list_deployments( query["page_token"] = json["next_page_token"] def set_permissions( - self, app_name: str, *, access_control_list: Optional[List[AppAccessControlRequest]] = None + self, *, access_control_list: Optional[List[AppAccessControlRequest]] = None, app_name: Optional[str] = None ) -> AppPermissions: """Set app permissions. Sets permissions on an object, replacing existing permissions if they exist. Deletes all direct permissions if none are specified. Objects can inherit permissions from their root object. - :param app_name: str - The app for which to get or manage permissions. :param access_control_list: List[:class:`AppAccessControlRequest`] (optional) + :param app_name: str (optional) + The app for which to get or manage permissions. :returns: :class:`AppPermissions` """ @@ -1416,12 +1416,12 @@ def set_permissions( res = self._api.do("PUT", f"/api/2.0/permissions/apps/{app_name}", body=body, headers=headers) return AppPermissions.from_dict(res) - def start(self, name: str) -> Wait[App]: + def start(self, *, name: Optional[str] = None) -> Wait[App]: """Start an app. Start the last active deployment of the app in the workspace. - :param name: str + :param name: str (optional) The name of the app. :returns: @@ -1437,15 +1437,15 @@ def start(self, name: str) -> Wait[App]: op_response = self._api.do("POST", f"/api/2.0/apps/{name}/start", headers=headers) return Wait(self.wait_get_app_active, response=App.from_dict(op_response), name=op_response["name"]) - def start_and_wait(self, name: str, timeout=timedelta(minutes=20)) -> App: + def start_and_wait(self, *, name: Optional[str] = None, timeout=timedelta(minutes=20)) -> App: return self.start(name=name).result(timeout=timeout) - def stop(self, name: str) -> Wait[App]: + def stop(self, *, name: Optional[str] = None) -> Wait[App]: """Stop an app. Stops the active deployment of the app in the workspace. - :param name: str + :param name: str (optional) The name of the app. :returns: @@ -1461,7 +1461,7 @@ def stop(self, name: str) -> Wait[App]: op_response = self._api.do("POST", f"/api/2.0/apps/{name}/stop", headers=headers) return Wait(self.wait_get_app_stopped, response=App.from_dict(op_response), name=op_response["name"]) - def stop_and_wait(self, name: str, timeout=timedelta(minutes=20)) -> App: + def stop_and_wait(self, *, name: Optional[str] = None, timeout=timedelta(minutes=20)) -> App: return self.stop(name=name).result(timeout=timeout) def update(self, name: str, app: App) -> App: @@ -1486,15 +1486,15 @@ def update(self, name: str, app: App) -> App: return App.from_dict(res) def update_permissions( - self, app_name: str, *, access_control_list: Optional[List[AppAccessControlRequest]] = None + self, *, access_control_list: Optional[List[AppAccessControlRequest]] = None, app_name: Optional[str] = None ) -> AppPermissions: """Update app permissions. Updates the permissions on an app. Apps can inherit permissions from their root object. - :param app_name: str - The app for which to get or manage permissions. :param access_control_list: List[:class:`AppAccessControlRequest`] (optional) + :param app_name: str (optional) + The app for which to get or manage permissions. :returns: :class:`AppPermissions` """ diff --git a/databricks/sdk/service/billing.py b/databricks/sdk/service/billing.py index 3595e4026..d2211b675 100755 --- a/databricks/sdk/service/billing.py +++ b/databricks/sdk/service/billing.py @@ -2003,16 +2003,18 @@ def list(self, *, page_token: Optional[str] = None) -> Iterator[BudgetConfigurat return query["page_token"] = json["next_page_token"] - def update(self, budget_id: str, budget: UpdateBudgetConfigurationBudget) -> UpdateBudgetConfigurationResponse: + def update( + self, budget: UpdateBudgetConfigurationBudget, *, budget_id: Optional[str] = None + ) -> UpdateBudgetConfigurationResponse: """Modify budget. Updates a budget configuration for an account. Both account and budget configuration are specified by ID. - :param budget_id: str - The Databricks budget configuration ID. :param budget: :class:`UpdateBudgetConfigurationBudget` The updated budget. This will overwrite the budget specified by the budget ID. + :param budget_id: str (optional) + The Databricks budget configuration ID. :returns: :class:`UpdateBudgetConfigurationResponse` """ @@ -2182,7 +2184,7 @@ def list( parsed = WrappedLogDeliveryConfigurations.from_dict(json).log_delivery_configurations return parsed if parsed is not None else [] - def patch_status(self, log_delivery_configuration_id: str, status: LogDeliveryConfigStatus): + def patch_status(self, status: LogDeliveryConfigStatus, *, log_delivery_configuration_id: Optional[str] = None): """Enable or disable log delivery configuration. Enables or disables a log delivery configuration. Deletion of delivery configurations is not @@ -2190,13 +2192,13 @@ def patch_status(self, log_delivery_configuration_id: str, status: LogDeliveryCo re-enable a delivery configuration if this would violate the delivery configuration limits described under [Create log delivery](:method:LogDelivery/Create). - :param log_delivery_configuration_id: str - Databricks log delivery configuration ID :param status: :class:`LogDeliveryConfigStatus` Status of log delivery configuration. Set to `ENABLED` (enabled) or `DISABLED` (disabled). Defaults to `ENABLED`. You can [enable or disable the configuration](#operation/patch-log-delivery-config-status) later. Deletion of a configuration is not supported, so disable a log delivery configuration that is no longer needed. + :param log_delivery_configuration_id: str (optional) + Databricks log delivery configuration ID """ diff --git a/databricks/sdk/service/catalog.py b/databricks/sdk/service/catalog.py index a77115edc..fb76f287a 100755 --- a/databricks/sdk/service/catalog.py +++ b/databricks/sdk/service/catalog.py @@ -10070,17 +10070,21 @@ def __init__(self, api_client): self._api = api_client def create( - self, workspace_id: int, metastore_id: str, *, metastore_assignment: Optional[CreateMetastoreAssignment] = None + self, + *, + metastore_assignment: Optional[CreateMetastoreAssignment] = None, + metastore_id: Optional[str] = None, + workspace_id: Optional[int] = None, ): """Assigns a workspace to a metastore. Creates an assignment to a metastore for a workspace - :param workspace_id: int - Workspace ID. - :param metastore_id: str - Unity Catalog metastore ID :param metastore_assignment: :class:`CreateMetastoreAssignment` (optional) + :param metastore_id: str (optional) + Unity Catalog metastore ID + :param workspace_id: int (optional) + Workspace ID. """ @@ -10166,18 +10170,22 @@ def list(self, metastore_id: str) -> Iterator[int]: return parsed if parsed is not None else [] def update( - self, workspace_id: int, metastore_id: str, *, metastore_assignment: Optional[UpdateMetastoreAssignment] = None + self, + *, + metastore_assignment: Optional[UpdateMetastoreAssignment] = None, + metastore_id: Optional[str] = None, + workspace_id: Optional[int] = None, ): """Updates a metastore assignment to a workspaces. Updates an assignment to a metastore for a workspace. Currently, only the default catalog may be updated. - :param workspace_id: int - Workspace ID. - :param metastore_id: str - Unity Catalog metastore ID :param metastore_assignment: :class:`UpdateMetastoreAssignment` (optional) + :param metastore_id: str (optional) + Unity Catalog metastore ID + :param workspace_id: int (optional) + Workspace ID. """ @@ -10287,12 +10295,14 @@ def list(self) -> Iterator[MetastoreInfo]: parsed = ListMetastoresResponse.from_dict(json).metastores return parsed if parsed is not None else [] - def update(self, metastore_id: str, *, metastore_info: Optional[UpdateMetastore] = None) -> AccountsMetastoreInfo: + def update( + self, *, metastore_id: Optional[str] = None, metastore_info: Optional[UpdateMetastore] = None + ) -> AccountsMetastoreInfo: """Update a metastore. Updates an existing Unity Catalog metastore. - :param metastore_id: str + :param metastore_id: str (optional) Unity Catalog metastore ID :param metastore_info: :class:`UpdateMetastore` (optional) @@ -10319,7 +10329,7 @@ def __init__(self, api_client): self._api = api_client def create( - self, metastore_id: str, *, credential_info: Optional[CreateStorageCredential] = None + self, *, credential_info: Optional[CreateStorageCredential] = None, metastore_id: Optional[str] = None ) -> AccountsStorageCredentialInfo: """Create a storage credential. @@ -10331,9 +10341,9 @@ def create( The caller must be a metastore admin and have the **CREATE_STORAGE_CREDENTIAL** privilege on the metastore. - :param metastore_id: str - Unity Catalog metastore ID :param credential_info: :class:`CreateStorageCredential` (optional) + :param metastore_id: str (optional) + Unity Catalog metastore ID :returns: :class:`AccountsStorageCredentialInfo` """ @@ -10433,21 +10443,21 @@ def list(self, metastore_id: str) -> Iterator[StorageCredentialInfo]: def update( self, - metastore_id: str, - storage_credential_name: str, *, credential_info: Optional[UpdateStorageCredential] = None, + metastore_id: Optional[str] = None, + storage_credential_name: Optional[str] = None, ) -> AccountsStorageCredentialInfo: """Updates a storage credential. Updates a storage credential on the metastore. The caller must be the owner of the storage credential. If the caller is a metastore admin, only the __owner__ credential can be changed. - :param metastore_id: str + :param credential_info: :class:`UpdateStorageCredential` (optional) + :param metastore_id: str (optional) Unity Catalog metastore ID - :param storage_credential_name: str + :param storage_credential_name: str (optional) Name of the storage credential. - :param credential_info: :class:`UpdateStorageCredential` (optional) :returns: :class:`AccountsStorageCredentialInfo` """ @@ -10496,9 +10506,9 @@ def get(self, artifact_type: ArtifactType) -> ArtifactAllowlistInfo: def update( self, - artifact_type: ArtifactType, artifact_matchers: List[ArtifactMatcher], *, + artifact_type: Optional[ArtifactType] = None, created_at: Optional[int] = None, created_by: Optional[str] = None, metastore_id: Optional[str] = None, @@ -10509,10 +10519,10 @@ def update( the new allowlist. The caller must be a metastore admin or have the **MANAGE ALLOWLIST** privilege on the metastore. - :param artifact_type: :class:`ArtifactType` - The artifact type of the allowlist. :param artifact_matchers: List[:class:`ArtifactMatcher`] A list of allowed artifact match patterns. + :param artifact_type: :class:`ArtifactType` (optional) + The artifact type of the allowlist. :param created_at: int (optional) Time at which this artifact allowlist was set, in epoch milliseconds. :param created_by: str (optional) @@ -10719,11 +10729,11 @@ def list( def update( self, - name: str, *, comment: Optional[str] = None, enable_predictive_optimization: Optional[EnablePredictiveOptimization] = None, isolation_mode: Optional[CatalogIsolationMode] = None, + name: Optional[str] = None, new_name: Optional[str] = None, options: Optional[Dict[str, str]] = None, owner: Optional[str] = None, @@ -10734,14 +10744,14 @@ def update( Updates the catalog that matches the supplied name. The caller must be either the owner of the catalog, or a metastore admin (when changing the owner field of the catalog). - :param name: str - The name of the catalog. :param comment: str (optional) User-provided free-form text description. :param enable_predictive_optimization: :class:`EnablePredictiveOptimization` (optional) Whether predictive optimization should be enabled for this object and objects under it. :param isolation_mode: :class:`CatalogIsolationMode` (optional) Whether the current securable is accessible from all workspaces or a specific set of workspaces. + :param name: str (optional) + The name of the catalog. :param new_name: str (optional) New name for the catalog. :param options: Dict[str,str] (optional) @@ -10915,16 +10925,21 @@ def list(self, *, max_results: Optional[int] = None, page_token: Optional[str] = query["page_token"] = json["next_page_token"] def update( - self, name: str, options: Dict[str, str], *, new_name: Optional[str] = None, owner: Optional[str] = None + self, + options: Dict[str, str], + *, + name: Optional[str] = None, + new_name: Optional[str] = None, + owner: Optional[str] = None, ) -> ConnectionInfo: """Update a connection. Updates the connection that matches the supplied name. - :param name: str - Name of the connection. :param options: Dict[str,str] A map of key-value properties attached to the securable. + :param name: str (optional) + Name of the connection. :param new_name: str (optional) New name for the connection. :param owner: str (optional) @@ -11160,7 +11175,6 @@ def list_credentials( def update_credential( self, - name_arg: str, *, aws_iam_role: Optional[AwsIamRole] = None, azure_managed_identity: Optional[AzureManagedIdentity] = None, @@ -11169,6 +11183,7 @@ def update_credential( databricks_gcp_service_account: Optional[DatabricksGcpServiceAccount] = None, force: Optional[bool] = None, isolation_mode: Optional[IsolationMode] = None, + name_arg: Optional[str] = None, new_name: Optional[str] = None, owner: Optional[str] = None, read_only: Optional[bool] = None, @@ -11181,8 +11196,6 @@ def update_credential( The caller must be the owner of the credential or a metastore admin or have the `MANAGE` permission. If the caller is a metastore admin, only the __owner__ field can be changed. - :param name_arg: str - Name of the credential. :param aws_iam_role: :class:`AwsIamRole` (optional) The AWS IAM role configuration :param azure_managed_identity: :class:`AzureManagedIdentity` (optional) @@ -11198,6 +11211,8 @@ def update_credential( external locations and external tables (when purpose is **STORAGE**). :param isolation_mode: :class:`IsolationMode` (optional) Whether the current securable is accessible from all workspaces or a specific set of workspaces. + :param name_arg: str (optional) + Name of the credential. :param new_name: str (optional) New name of credential. :param owner: str (optional) @@ -11499,7 +11514,6 @@ def list( def update( self, - name: str, *, access_point: Optional[str] = None, comment: Optional[str] = None, @@ -11508,6 +11522,7 @@ def update( fallback: Optional[bool] = None, force: Optional[bool] = None, isolation_mode: Optional[IsolationMode] = None, + name: Optional[str] = None, new_name: Optional[str] = None, owner: Optional[str] = None, read_only: Optional[bool] = None, @@ -11520,8 +11535,6 @@ def update( or be a metastore admin. In the second case, the admin can only update the name of the external location. - :param name: str - Name of the external location. :param access_point: str (optional) The AWS access point to use when accesing s3 for this external location. :param comment: str (optional) @@ -11537,6 +11550,8 @@ def update( :param force: bool (optional) Force update even if changing url invalidates dependent external tables or mounts. :param isolation_mode: :class:`IsolationMode` (optional) + :param name: str (optional) + Name of the external location. :param new_name: str (optional) New name for the external location. :param owner: str (optional) @@ -11737,7 +11752,7 @@ def list( return query["page_token"] = json["next_page_token"] - def update(self, name: str, *, owner: Optional[str] = None) -> FunctionInfo: + def update(self, *, name: Optional[str] = None, owner: Optional[str] = None) -> FunctionInfo: """Update a function. Updates the function that matches the supplied name. Only the owner of the function can be updated. If @@ -11747,7 +11762,7 @@ def update(self, name: str, *, owner: Optional[str] = None) -> FunctionInfo: the function itself and has the **USE_CATALOG** privilege on its parent catalog as well as the **USE_SCHEMA** privilege on the function's parent schema. - :param name: str + :param name: str (optional) The fully-qualified name of the function (of the form __catalog_name__.__schema_name__.__function__name__). :param owner: str (optional) @@ -11845,18 +11860,22 @@ def get_effective( return EffectivePermissionsList.from_dict(res) def update( - self, securable_type: SecurableType, full_name: str, *, changes: Optional[List[PermissionsChange]] = None + self, + *, + changes: Optional[List[PermissionsChange]] = None, + full_name: Optional[str] = None, + securable_type: Optional[SecurableType] = None, ) -> PermissionsList: """Update permissions. Updates the permissions for a securable. - :param securable_type: :class:`SecurableType` - Type of securable. - :param full_name: str - Full name of securable. :param changes: List[:class:`PermissionsChange`] (optional) Array of permissions change objects. + :param full_name: str (optional) + Full name of securable. + :param securable_type: :class:`SecurableType` (optional) + Type of securable. :returns: :class:`PermissionsList` """ @@ -11893,20 +11912,20 @@ class MetastoresAPI: def __init__(self, api_client): self._api = api_client - def assign(self, workspace_id: int, metastore_id: str, default_catalog_name: str): + def assign(self, metastore_id: str, default_catalog_name: str, *, workspace_id: Optional[int] = None): """Create an assignment. Creates a new metastore assignment. If an assignment for the same __workspace_id__ exists, it will be overwritten by the new __metastore_id__ and __default_catalog_name__. The caller must be an account admin. - :param workspace_id: int - A workspace ID. :param metastore_id: str The unique ID of the metastore. :param default_catalog_name: str The name of the default catalog in the metastore. This field is depracted. Please use "Default Namespace API" to configure the default catalog for a Databricks workspace. + :param workspace_id: int (optional) + A workspace ID. """ @@ -12071,11 +12090,11 @@ def unassign(self, workspace_id: int, metastore_id: str): def update( self, - id: str, *, delta_sharing_organization_name: Optional[str] = None, delta_sharing_recipient_token_lifetime_in_seconds: Optional[int] = None, delta_sharing_scope: Optional[UpdateMetastoreDeltaSharingScope] = None, + id: Optional[str] = None, new_name: Optional[str] = None, owner: Optional[str] = None, privilege_model_version: Optional[str] = None, @@ -12086,8 +12105,6 @@ def update( Updates information for a specific metastore. The caller must be a metastore admin. If the __owner__ field is set to the empty string (**""**), the ownership is updated to the System User. - :param id: str - Unique ID of the metastore. :param delta_sharing_organization_name: str (optional) The organization name of a Delta Sharing entity, to be used in Databricks-to-Databricks Delta Sharing as the official name. @@ -12095,6 +12112,8 @@ def update( The lifetime of delta sharing recipient token in seconds. :param delta_sharing_scope: :class:`UpdateMetastoreDeltaSharingScope` (optional) The scope of Delta Sharing enabled for the metastore. + :param id: str (optional) + Unique ID of the metastore. :param new_name: str (optional) New name for the metastore. :param owner: str (optional) @@ -12132,7 +12151,11 @@ def update( return MetastoreInfo.from_dict(res) def update_assignment( - self, workspace_id: int, *, default_catalog_name: Optional[str] = None, metastore_id: Optional[str] = None + self, + *, + default_catalog_name: Optional[str] = None, + metastore_id: Optional[str] = None, + workspace_id: Optional[int] = None, ): """Update an assignment. @@ -12141,13 +12164,13 @@ def update_assignment( The caller must be an account admin to update __metastore_id__; otherwise, the caller can be a Workspace admin. - :param workspace_id: int - A workspace ID. :param default_catalog_name: str (optional) The name of the default catalog in the metastore. This field is depracted. Please use "Default Namespace API" to configure the default catalog for a Databricks workspace. :param metastore_id: str (optional) The unique ID of the metastore. + :param workspace_id: int (optional) + A workspace ID. """ @@ -12332,7 +12355,9 @@ def list( return query["page_token"] = json["next_page_token"] - def update(self, full_name: str, version: int, *, comment: Optional[str] = None) -> ModelVersionInfo: + def update( + self, *, comment: Optional[str] = None, full_name: Optional[str] = None, version: Optional[int] = None + ) -> ModelVersionInfo: """Update a Model Version. Updates the specified model version. @@ -12343,12 +12368,12 @@ def update(self, full_name: str, version: int, *, comment: Optional[str] = None) Currently only the comment of the model version can be updated. - :param full_name: str - The three-level (fully qualified) name of the model version - :param version: int - The integer version number of the model version :param comment: str (optional) The comment attached to the model version + :param full_name: str (optional) + The three-level (fully qualified) name of the model version + :param version: int (optional) + The integer version number of the model version :returns: :class:`ModelVersionInfo` """ @@ -12504,7 +12529,6 @@ def cancel_refresh(self, table_name: str, refresh_id: str): def create( self, - table_name: str, assets_dir: str, output_schema_name: str, *, @@ -12517,6 +12541,7 @@ def create( skip_builtin_dashboard: Optional[bool] = None, slicing_exprs: Optional[List[str]] = None, snapshot: Optional[MonitorSnapshot] = None, + table_name: Optional[str] = None, time_series: Optional[MonitorTimeSeries] = None, warehouse_id: Optional[str] = None, ) -> MonitorInfo: @@ -12532,8 +12557,6 @@ def create( Workspace assets, such as the dashboard, will be created in the workspace where this call was made. - :param table_name: str - Full name of the table. :param assets_dir: str The directory to store monitoring assets (e.g. dashboard, metric tables). :param output_schema_name: str @@ -12560,6 +12583,8 @@ def create( high-cardinality columns, only the top 100 unique values by frequency will generate slices. :param snapshot: :class:`MonitorSnapshot` (optional) Configuration for monitoring snapshot tables. + :param table_name: str (optional) + Full name of the table. :param time_series: :class:`MonitorTimeSeries` (optional) Configuration for monitoring time series tables. :param warehouse_id: str (optional) @@ -12710,7 +12735,7 @@ def list_refreshes(self, table_name: str) -> MonitorRefreshListResponse: return MonitorRefreshListResponse.from_dict(res) def regenerate_dashboard( - self, table_name: str, *, warehouse_id: Optional[str] = None + self, *, table_name: Optional[str] = None, warehouse_id: Optional[str] = None ) -> RegenerateDashboardResponse: """Regenerate a monitoring dashboard. @@ -12724,7 +12749,7 @@ def regenerate_dashboard( The call must be made from the workspace where the monitor was created. The dashboard will be regenerated in the assets directory that was specified when the monitor was created. - :param table_name: str + :param table_name: str (optional) Full name of the table. :param warehouse_id: str (optional) Optional argument to specify the warehouse for dashboard regeneration. If not specified, the first @@ -12773,7 +12798,6 @@ def run_refresh(self, table_name: str) -> MonitorRefreshInfo: def update( self, - table_name: str, output_schema_name: str, *, baseline_table_name: Optional[str] = None, @@ -12785,6 +12809,7 @@ def update( schedule: Optional[MonitorCronSchedule] = None, slicing_exprs: Optional[List[str]] = None, snapshot: Optional[MonitorSnapshot] = None, + table_name: Optional[str] = None, time_series: Optional[MonitorTimeSeries] = None, ) -> MonitorInfo: """Update a table monitor. @@ -12801,8 +12826,6 @@ def update( Certain configuration fields, such as output asset identifiers, cannot be updated. - :param table_name: str - Full name of the table. :param output_schema_name: str Schema where output metric tables are created. :param baseline_table_name: str (optional) @@ -12828,6 +12851,8 @@ def update( high-cardinality columns, only the top 100 unique values by frequency will generate slices. :param snapshot: :class:`MonitorSnapshot` (optional) Configuration for monitoring snapshot tables. + :param table_name: str (optional) + Full name of the table. :param time_series: :class:`MonitorTimeSeries` (optional) Configuration for monitoring time series tables. @@ -13129,9 +13154,9 @@ def set_alias(self, full_name: str, alias: str, version_num: int) -> RegisteredM def update( self, - full_name: str, *, comment: Optional[str] = None, + full_name: Optional[str] = None, new_name: Optional[str] = None, owner: Optional[str] = None, ) -> RegisteredModelInfo: @@ -13145,10 +13170,10 @@ def update( Currently only the name, the owner or the comment of the registered model can be updated. - :param full_name: str - The three-level (fully qualified) name of the registered model :param comment: str (optional) The comment attached to the registered model + :param full_name: str (optional) + The three-level (fully qualified) name of the registered model :param new_name: str (optional) New name for the registered model. :param owner: str (optional) @@ -13409,10 +13434,10 @@ def list( def update( self, - full_name: str, *, comment: Optional[str] = None, enable_predictive_optimization: Optional[EnablePredictiveOptimization] = None, + full_name: Optional[str] = None, new_name: Optional[str] = None, owner: Optional[str] = None, properties: Optional[Dict[str, str]] = None, @@ -13424,12 +13449,12 @@ def update( __name__ field must be updated, the caller must be a metastore admin or have the **CREATE_SCHEMA** privilege on the parent catalog. - :param full_name: str - Full name of the schema. :param comment: str (optional) User-provided free-form text description. :param enable_predictive_optimization: :class:`EnablePredictiveOptimization` (optional) Whether predictive optimization should be enabled for this object and objects under it. + :param full_name: str (optional) + Full name of the schema. :param new_name: str (optional) New name for the schema. :param owner: str (optional) @@ -13625,7 +13650,6 @@ def list( def update( self, - name: str, *, aws_iam_role: Optional[AwsIamRoleRequest] = None, azure_managed_identity: Optional[AzureManagedIdentityResponse] = None, @@ -13635,6 +13659,7 @@ def update( databricks_gcp_service_account: Optional[DatabricksGcpServiceAccountRequest] = None, force: Optional[bool] = None, isolation_mode: Optional[IsolationMode] = None, + name: Optional[str] = None, new_name: Optional[str] = None, owner: Optional[str] = None, read_only: Optional[bool] = None, @@ -13644,8 +13669,6 @@ def update( Updates a storage credential on the metastore. - :param name: str - Name of the storage credential. :param aws_iam_role: :class:`AwsIamRoleRequest` (optional) The AWS IAM role configuration. :param azure_managed_identity: :class:`AzureManagedIdentityResponse` (optional) @@ -13661,6 +13684,8 @@ def update( :param force: bool (optional) Force update even if there are dependent external locations or external tables. :param isolation_mode: :class:`IsolationMode` (optional) + :param name: str (optional) + Name of the storage credential. :param new_name: str (optional) New name for the storage credential. :param owner: str (optional) @@ -14486,7 +14511,12 @@ def read(self, name: str, *, include_browse: Optional[bool] = None) -> VolumeInf return VolumeInfo.from_dict(res) def update( - self, name: str, *, comment: Optional[str] = None, new_name: Optional[str] = None, owner: Optional[str] = None + self, + *, + comment: Optional[str] = None, + name: Optional[str] = None, + new_name: Optional[str] = None, + owner: Optional[str] = None, ) -> VolumeInfo: """Update a Volume. @@ -14498,10 +14528,10 @@ def update( Currently only the name, the owner or the comment of the volume could be updated. - :param name: str - The three-level (fully qualified) name of the volume :param comment: str (optional) The comment attached to the volume + :param name: str (optional) + The three-level (fully qualified) name of the volume :param new_name: str (optional) New name for the volume. :param owner: str (optional) @@ -14616,9 +14646,9 @@ def get_bindings( def update( self, - name: str, *, assign_workspaces: Optional[List[int]] = None, + name: Optional[str] = None, unassign_workspaces: Optional[List[int]] = None, ) -> CurrentWorkspaceBindings: """Update catalog workspace bindings. @@ -14626,10 +14656,10 @@ def update( Updates workspace bindings of the catalog. The caller must be a metastore admin or an owner of the catalog. - :param name: str - The name of the catalog. :param assign_workspaces: List[int] (optional) A list of workspace IDs. + :param name: str (optional) + The name of the catalog. :param unassign_workspaces: List[int] (optional) A list of workspace IDs. @@ -14652,25 +14682,25 @@ def update( def update_bindings( self, - securable_type: UpdateBindingsSecurableType, - securable_name: str, *, add: Optional[List[WorkspaceBinding]] = None, remove: Optional[List[WorkspaceBinding]] = None, + securable_name: Optional[str] = None, + securable_type: Optional[UpdateBindingsSecurableType] = None, ) -> WorkspaceBindingsResponse: """Update securable workspace bindings. Updates workspace bindings of the securable. The caller must be a metastore admin or an owner of the securable. - :param securable_type: :class:`UpdateBindingsSecurableType` - The type of the securable to bind to a workspace. - :param securable_name: str - The name of the securable. :param add: List[:class:`WorkspaceBinding`] (optional) List of workspace bindings :param remove: List[:class:`WorkspaceBinding`] (optional) List of workspace bindings + :param securable_name: str (optional) + The name of the securable. + :param securable_type: :class:`UpdateBindingsSecurableType` (optional) + The type of the securable to bind to a workspace. :returns: :class:`WorkspaceBindingsResponse` """ diff --git a/databricks/sdk/service/cleanrooms.py b/databricks/sdk/service/cleanrooms.py index 3f6d5a033..2fc9d335d 100755 --- a/databricks/sdk/service/cleanrooms.py +++ b/databricks/sdk/service/cleanrooms.py @@ -1414,7 +1414,7 @@ def list(self, *, page_size: Optional[int] = None, page_token: Optional[str] = N return query["page_token"] = json["next_page_token"] - def update(self, name: str, *, clean_room: Optional[CleanRoom] = None) -> CleanRoom: + def update(self, *, clean_room: Optional[CleanRoom] = None, name: Optional[str] = None) -> CleanRoom: """Update a clean room. Update a clean room. The caller must be the owner of the clean room, have **MODIFY_CLEAN_ROOM** @@ -1422,9 +1422,9 @@ def update(self, name: str, *, clean_room: Optional[CleanRoom] = None) -> CleanR When the caller is a metastore admin, only the __owner__ field can be updated. - :param name: str - Name of the clean room. :param clean_room: :class:`CleanRoom` (optional) + :param name: str (optional) + Name of the clean room. :returns: :class:`CleanRoom` """ diff --git a/databricks/sdk/service/compute.py b/databricks/sdk/service/compute.py index 9a60ebc87..94aa4e5bf 100755 --- a/databricks/sdk/service/compute.py +++ b/databricks/sdk/service/compute.py @@ -10115,16 +10115,19 @@ def list( return parsed if parsed is not None else [] def set_permissions( - self, cluster_policy_id: str, *, access_control_list: Optional[List[ClusterPolicyAccessControlRequest]] = None + self, + *, + access_control_list: Optional[List[ClusterPolicyAccessControlRequest]] = None, + cluster_policy_id: Optional[str] = None, ) -> ClusterPolicyPermissions: """Set cluster policy permissions. Sets permissions on an object, replacing existing permissions if they exist. Deletes all direct permissions if none are specified. Objects can inherit permissions from their root object. - :param cluster_policy_id: str - The cluster policy for which to get or manage permissions. :param access_control_list: List[:class:`ClusterPolicyAccessControlRequest`] (optional) + :param cluster_policy_id: str (optional) + The cluster policy for which to get or manage permissions. :returns: :class:`ClusterPolicyPermissions` """ @@ -10142,16 +10145,19 @@ def set_permissions( return ClusterPolicyPermissions.from_dict(res) def update_permissions( - self, cluster_policy_id: str, *, access_control_list: Optional[List[ClusterPolicyAccessControlRequest]] = None + self, + *, + access_control_list: Optional[List[ClusterPolicyAccessControlRequest]] = None, + cluster_policy_id: Optional[str] = None, ) -> ClusterPolicyPermissions: """Update cluster policy permissions. Updates the permissions on a cluster policy. Cluster policies can inherit permissions from their root object. - :param cluster_policy_id: str - The cluster policy for which to get or manage permissions. :param access_control_list: List[:class:`ClusterPolicyAccessControlRequest`] (optional) + :param cluster_policy_id: str (optional) + The cluster policy for which to get or manage permissions. :returns: :class:`ClusterPolicyPermissions` """ @@ -11392,16 +11398,19 @@ def restart_and_wait( return self.restart(cluster_id=cluster_id, restart_user=restart_user).result(timeout=timeout) def set_permissions( - self, cluster_id: str, *, access_control_list: Optional[List[ClusterAccessControlRequest]] = None + self, + *, + access_control_list: Optional[List[ClusterAccessControlRequest]] = None, + cluster_id: Optional[str] = None, ) -> ClusterPermissions: """Set cluster permissions. Sets permissions on an object, replacing existing permissions if they exist. Deletes all direct permissions if none are specified. Objects can inherit permissions from their root object. - :param cluster_id: str - The cluster for which to get or manage permissions. :param access_control_list: List[:class:`ClusterAccessControlRequest`] (optional) + :param cluster_id: str (optional) + The cluster for which to get or manage permissions. :returns: :class:`ClusterPermissions` """ @@ -11548,15 +11557,18 @@ def update_and_wait( return self.update(cluster=cluster, cluster_id=cluster_id, update_mask=update_mask).result(timeout=timeout) def update_permissions( - self, cluster_id: str, *, access_control_list: Optional[List[ClusterAccessControlRequest]] = None + self, + *, + access_control_list: Optional[List[ClusterAccessControlRequest]] = None, + cluster_id: Optional[str] = None, ) -> ClusterPermissions: """Update cluster permissions. Updates the permissions on a cluster. Clusters can inherit permissions from their root object. - :param cluster_id: str - The cluster for which to get or manage permissions. :param access_control_list: List[:class:`ClusterAccessControlRequest`] (optional) + :param cluster_id: str (optional) + The cluster for which to get or manage permissions. :returns: :class:`ClusterPermissions` """ @@ -12021,15 +12033,19 @@ def list(self) -> Iterator[GlobalInitScriptDetails]: return parsed if parsed is not None else [] def update( - self, script_id: str, name: str, script: str, *, enabled: Optional[bool] = None, position: Optional[int] = None + self, + name: str, + script: str, + *, + enabled: Optional[bool] = None, + position: Optional[int] = None, + script_id: Optional[str] = None, ): """Update init script. Updates a global init script, specifying only the fields to change. All fields are optional. Unspecified fields retain their current value. - :param script_id: str - The ID of the global init script. :param name: str The name of the script :param script: str @@ -12046,6 +12062,8 @@ def update( If an explicit position value conflicts with an existing script, your request succeeds, but the original script at that position and all later scripts have their positions incremented by 1. + :param script_id: str (optional) + The ID of the global init script. """ @@ -12360,16 +12378,19 @@ def list(self) -> Iterator[InstancePoolAndStats]: return parsed if parsed is not None else [] def set_permissions( - self, instance_pool_id: str, *, access_control_list: Optional[List[InstancePoolAccessControlRequest]] = None + self, + *, + access_control_list: Optional[List[InstancePoolAccessControlRequest]] = None, + instance_pool_id: Optional[str] = None, ) -> InstancePoolPermissions: """Set instance pool permissions. Sets permissions on an object, replacing existing permissions if they exist. Deletes all direct permissions if none are specified. Objects can inherit permissions from their root object. - :param instance_pool_id: str - The instance pool for which to get or manage permissions. :param access_control_list: List[:class:`InstancePoolAccessControlRequest`] (optional) + :param instance_pool_id: str (optional) + The instance pool for which to get or manage permissions. :returns: :class:`InstancePoolPermissions` """ @@ -12385,16 +12406,19 @@ def set_permissions( return InstancePoolPermissions.from_dict(res) def update_permissions( - self, instance_pool_id: str, *, access_control_list: Optional[List[InstancePoolAccessControlRequest]] = None + self, + *, + access_control_list: Optional[List[InstancePoolAccessControlRequest]] = None, + instance_pool_id: Optional[str] = None, ) -> InstancePoolPermissions: """Update instance pool permissions. Updates the permissions on an instance pool. Instance pools can inherit permissions from their root object. - :param instance_pool_id: str - The instance pool for which to get or manage permissions. :param access_control_list: List[:class:`InstancePoolAccessControlRequest`] (optional) + :param instance_pool_id: str (optional) + The instance pool for which to get or manage permissions. :returns: :class:`InstancePoolPermissions` """ diff --git a/databricks/sdk/service/dashboards.py b/databricks/sdk/service/dashboards.py index 1683ba1b1..60ceaacfb 100755 --- a/databricks/sdk/service/dashboards.py +++ b/databricks/sdk/service/dashboards.py @@ -2062,18 +2062,20 @@ def wait_get_message_genie_completed( attempt += 1 raise TimeoutError(f"timed out after {timeout}: {status_message}") - def create_message(self, space_id: str, conversation_id: str, content: str) -> Wait[GenieMessage]: + def create_message( + self, content: str, *, conversation_id: Optional[str] = None, space_id: Optional[str] = None + ) -> Wait[GenieMessage]: """Create conversation message. Create new message in a [conversation](:method:genie/startconversation). The AI response uses all previously created messages in the conversation to respond. - :param space_id: str - The ID associated with the Genie space where the conversation is started. - :param conversation_id: str - The ID associated with the conversation. :param content: str User message content. + :param conversation_id: str (optional) + The ID associated with the conversation. + :param space_id: str (optional) + The ID associated with the Genie space where the conversation is started. :returns: Long-running operation waiter for :class:`GenieMessage`. @@ -2102,7 +2104,12 @@ def create_message(self, space_id: str, conversation_id: str, content: str) -> W ) def create_message_and_wait( - self, space_id: str, conversation_id: str, content: str, timeout=timedelta(minutes=20) + self, + content: str, + *, + conversation_id: Optional[str] = None, + space_id: Optional[str] = None, + timeout=timedelta(minutes=20), ) -> GenieMessage: return self.create_message(content=content, conversation_id=conversation_id, space_id=space_id).result( timeout=timeout @@ -2375,15 +2382,15 @@ def get_space(self, space_id: str) -> GenieSpace: res = self._api.do("GET", f"/api/2.0/genie/spaces/{space_id}", headers=headers) return GenieSpace.from_dict(res) - def start_conversation(self, space_id: str, content: str) -> Wait[GenieMessage]: + def start_conversation(self, content: str, *, space_id: Optional[str] = None) -> Wait[GenieMessage]: """Start conversation. Start a new conversation. - :param space_id: str - The ID associated with the Genie space where you want to start a conversation. :param content: str The text of the message that starts the conversation. + :param space_id: str (optional) + The ID associated with the Genie space where you want to start a conversation. :returns: Long-running operation waiter for :class:`GenieMessage`. @@ -2408,7 +2415,9 @@ def start_conversation(self, space_id: str, content: str) -> Wait[GenieMessage]: space_id=space_id, ) - def start_conversation_and_wait(self, space_id: str, content: str, timeout=timedelta(minutes=20)) -> GenieMessage: + def start_conversation_and_wait( + self, content: str, *, space_id: Optional[str] = None, timeout=timedelta(minutes=20) + ) -> GenieMessage: return self.start_conversation(content=content, space_id=space_id).result(timeout=timeout) @@ -2785,13 +2794,17 @@ def migrate( return Dashboard.from_dict(res) def publish( - self, dashboard_id: str, *, embed_credentials: Optional[bool] = None, warehouse_id: Optional[str] = None + self, + *, + dashboard_id: Optional[str] = None, + embed_credentials: Optional[bool] = None, + warehouse_id: Optional[str] = None, ) -> PublishedDashboard: """Publish dashboard. Publish the current draft dashboard. - :param dashboard_id: str + :param dashboard_id: str (optional) UUID identifying the dashboard to be published. :param embed_credentials: bool (optional) Flag to indicate if the publisher's credentials should be embedded in the published dashboard. These diff --git a/databricks/sdk/service/iam.py b/databricks/sdk/service/iam.py index d5fe5645e..45a96e93c 100755 --- a/databricks/sdk/service/iam.py +++ b/databricks/sdk/service/iam.py @@ -2473,12 +2473,18 @@ def list( return query["startIndex"] += len(json["Resources"]) - def patch(self, id: str, *, operations: Optional[List[Patch]] = None, schemas: Optional[List[PatchSchema]] = None): + def patch( + self, + *, + id: Optional[str] = None, + operations: Optional[List[Patch]] = None, + schemas: Optional[List[PatchSchema]] = None, + ): """Update group details. Partially updates the details of a group. - :param id: str + :param id: str (optional) Unique ID in the Databricks workspace. :param operations: List[:class:`Patch`] (optional) :param schemas: List[:class:`PatchSchema`] (optional) @@ -2501,12 +2507,12 @@ def patch(self, id: str, *, operations: Optional[List[Patch]] = None, schemas: O def update( self, - id: str, *, display_name: Optional[str] = None, entitlements: Optional[List[ComplexValue]] = None, external_id: Optional[str] = None, groups: Optional[List[ComplexValue]] = None, + id: Optional[str] = None, members: Optional[List[ComplexValue]] = None, meta: Optional[ResourceMeta] = None, roles: Optional[List[ComplexValue]] = None, @@ -2516,8 +2522,6 @@ def update( Updates the details of a group by replacing the entire group entity. - :param id: str - Databricks group ID :param display_name: str (optional) String that represents a human-readable group name :param entitlements: List[:class:`ComplexValue`] (optional) @@ -2527,6 +2531,8 @@ def update( [assigning entitlements]: https://docs.databricks.com/administration-guide/users-groups/index.html#assigning-entitlements :param external_id: str (optional) :param groups: List[:class:`ComplexValue`] (optional) + :param id: str (optional) + Databricks group ID :param members: List[:class:`ComplexValue`] (optional) :param meta: :class:`ResourceMeta` (optional) Container for the group identifier. Workspace local versus account. @@ -2756,12 +2762,18 @@ def list( return query["startIndex"] += len(json["Resources"]) - def patch(self, id: str, *, operations: Optional[List[Patch]] = None, schemas: Optional[List[PatchSchema]] = None): + def patch( + self, + *, + id: Optional[str] = None, + operations: Optional[List[Patch]] = None, + schemas: Optional[List[PatchSchema]] = None, + ): """Update service principal details. Partially updates the details of a single service principal in the Databricks account. - :param id: str + :param id: str (optional) Unique ID in the Databricks workspace. :param operations: List[:class:`Patch`] (optional) :param schemas: List[:class:`PatchSchema`] (optional) @@ -2787,7 +2799,6 @@ def patch(self, id: str, *, operations: Optional[List[Patch]] = None, schemas: O def update( self, - id: str, *, active: Optional[bool] = None, application_id: Optional[str] = None, @@ -2795,6 +2806,7 @@ def update( entitlements: Optional[List[ComplexValue]] = None, external_id: Optional[str] = None, groups: Optional[List[ComplexValue]] = None, + id: Optional[str] = None, roles: Optional[List[ComplexValue]] = None, schemas: Optional[List[ServicePrincipalSchema]] = None, ): @@ -2804,8 +2816,6 @@ def update( This action replaces the existing service principal with the same name. - :param id: str - Databricks service principal ID. :param active: bool (optional) If this user is active :param application_id: str (optional) @@ -2819,6 +2829,8 @@ def update( [assigning entitlements]: https://docs.databricks.com/administration-guide/users-groups/index.html#assigning-entitlements :param external_id: str (optional) :param groups: List[:class:`ComplexValue`] (optional) + :param id: str (optional) + Databricks service principal ID. :param roles: List[:class:`ComplexValue`] (optional) Corresponds to AWS instance profile/arn role. :param schemas: List[:class:`ServicePrincipalSchema`] (optional) @@ -3111,12 +3123,18 @@ def list( return query["startIndex"] += len(json["Resources"]) - def patch(self, id: str, *, operations: Optional[List[Patch]] = None, schemas: Optional[List[PatchSchema]] = None): + def patch( + self, + *, + id: Optional[str] = None, + operations: Optional[List[Patch]] = None, + schemas: Optional[List[PatchSchema]] = None, + ): """Update user details. Partially updates a user resource by applying the supplied operations on specific user attributes. - :param id: str + :param id: str (optional) Unique ID in the Databricks workspace. :param operations: List[:class:`Patch`] (optional) :param schemas: List[:class:`PatchSchema`] (optional) @@ -3139,7 +3157,6 @@ def patch(self, id: str, *, operations: Optional[List[Patch]] = None, schemas: O def update( self, - id: str, *, active: Optional[bool] = None, display_name: Optional[str] = None, @@ -3147,6 +3164,7 @@ def update( entitlements: Optional[List[ComplexValue]] = None, external_id: Optional[str] = None, groups: Optional[List[ComplexValue]] = None, + id: Optional[str] = None, name: Optional[Name] = None, roles: Optional[List[ComplexValue]] = None, schemas: Optional[List[UserSchema]] = None, @@ -3156,8 +3174,6 @@ def update( Replaces a user's information with the data supplied in request. - :param id: str - Databricks user ID. :param active: bool (optional) If this user is active :param display_name: str (optional) @@ -3175,6 +3191,8 @@ def update( :param external_id: str (optional) External ID is not currently supported. It is reserved for future use. :param groups: List[:class:`ComplexValue`] (optional) + :param id: str (optional) + Databricks user ID. :param name: :class:`Name` (optional) :param roles: List[:class:`ComplexValue`] (optional) Corresponds to AWS instance profile/arn role. @@ -3419,12 +3437,18 @@ def list( return query["startIndex"] += len(json["Resources"]) - def patch(self, id: str, *, operations: Optional[List[Patch]] = None, schemas: Optional[List[PatchSchema]] = None): + def patch( + self, + *, + id: Optional[str] = None, + operations: Optional[List[Patch]] = None, + schemas: Optional[List[PatchSchema]] = None, + ): """Update group details. Partially updates the details of a group. - :param id: str + :param id: str (optional) Unique ID in the Databricks workspace. :param operations: List[:class:`Patch`] (optional) :param schemas: List[:class:`PatchSchema`] (optional) @@ -3445,12 +3469,12 @@ def patch(self, id: str, *, operations: Optional[List[Patch]] = None, schemas: O def update( self, - id: str, *, display_name: Optional[str] = None, entitlements: Optional[List[ComplexValue]] = None, external_id: Optional[str] = None, groups: Optional[List[ComplexValue]] = None, + id: Optional[str] = None, members: Optional[List[ComplexValue]] = None, meta: Optional[ResourceMeta] = None, roles: Optional[List[ComplexValue]] = None, @@ -3460,8 +3484,6 @@ def update( Updates the details of a group by replacing the entire group entity. - :param id: str - Databricks group ID :param display_name: str (optional) String that represents a human-readable group name :param entitlements: List[:class:`ComplexValue`] (optional) @@ -3471,6 +3493,8 @@ def update( [assigning entitlements]: https://docs.databricks.com/administration-guide/users-groups/index.html#assigning-entitlements :param external_id: str (optional) :param groups: List[:class:`ComplexValue`] (optional) + :param id: str (optional) + Databricks group ID :param members: List[:class:`ComplexValue`] (optional) :param meta: :class:`ResourceMeta` (optional) Container for the group identifier. Workspace local versus account. @@ -3651,10 +3675,10 @@ def get_permission_levels(self, request_object_type: str, request_object_id: str def set( self, - request_object_type: str, - request_object_id: str, *, access_control_list: Optional[List[AccessControlRequest]] = None, + request_object_id: Optional[str] = None, + request_object_type: Optional[str] = None, ) -> ObjectPermissions: """Set object permissions. @@ -3662,13 +3686,13 @@ def set( permissions if none are specified. Objects can inherit permissions from their parent objects or root object. - :param request_object_type: str + :param access_control_list: List[:class:`AccessControlRequest`] (optional) + :param request_object_id: str (optional) + The id of the request object. + :param request_object_type: str (optional) The type of the request object. Can be one of the following: alerts, authorization, clusters, cluster-policies, dashboards, dbsql-dashboards, directories, experiments, files, instance-pools, jobs, notebooks, pipelines, queries, registered-models, repos, serving-endpoints, or warehouses. - :param request_object_id: str - The id of the request object. - :param access_control_list: List[:class:`AccessControlRequest`] (optional) :returns: :class:`ObjectPermissions` """ @@ -3687,23 +3711,23 @@ def set( def update( self, - request_object_type: str, - request_object_id: str, *, access_control_list: Optional[List[AccessControlRequest]] = None, + request_object_id: Optional[str] = None, + request_object_type: Optional[str] = None, ) -> ObjectPermissions: """Update object permissions. Updates the permissions on an object. Objects can inherit permissions from their parent objects or root object. - :param request_object_type: str + :param access_control_list: List[:class:`AccessControlRequest`] (optional) + :param request_object_id: str (optional) + The id of the request object. + :param request_object_type: str (optional) The type of the request object. Can be one of the following: alerts, authorization, clusters, cluster-policies, dashboards, dbsql-dashboards, directories, experiments, files, instance-pools, jobs, notebooks, pipelines, queries, registered-models, repos, serving-endpoints, or warehouses. - :param request_object_id: str - The id of the request object. - :param access_control_list: List[:class:`AccessControlRequest`] (optional) :returns: :class:`ObjectPermissions` """ @@ -3905,12 +3929,18 @@ def list( return query["startIndex"] += len(json["Resources"]) - def patch(self, id: str, *, operations: Optional[List[Patch]] = None, schemas: Optional[List[PatchSchema]] = None): + def patch( + self, + *, + id: Optional[str] = None, + operations: Optional[List[Patch]] = None, + schemas: Optional[List[PatchSchema]] = None, + ): """Update service principal details. Partially updates the details of a single service principal in the Databricks workspace. - :param id: str + :param id: str (optional) Unique ID in the Databricks workspace. :param operations: List[:class:`Patch`] (optional) :param schemas: List[:class:`PatchSchema`] (optional) @@ -3931,7 +3961,6 @@ def patch(self, id: str, *, operations: Optional[List[Patch]] = None, schemas: O def update( self, - id: str, *, active: Optional[bool] = None, application_id: Optional[str] = None, @@ -3939,6 +3968,7 @@ def update( entitlements: Optional[List[ComplexValue]] = None, external_id: Optional[str] = None, groups: Optional[List[ComplexValue]] = None, + id: Optional[str] = None, roles: Optional[List[ComplexValue]] = None, schemas: Optional[List[ServicePrincipalSchema]] = None, ): @@ -3948,8 +3978,6 @@ def update( This action replaces the existing service principal with the same name. - :param id: str - Databricks service principal ID. :param active: bool (optional) If this user is active :param application_id: str (optional) @@ -3963,6 +3991,8 @@ def update( [assigning entitlements]: https://docs.databricks.com/administration-guide/users-groups/index.html#assigning-entitlements :param external_id: str (optional) :param groups: List[:class:`ComplexValue`] (optional) + :param id: str (optional) + Databricks service principal ID. :param roles: List[:class:`ComplexValue`] (optional) Corresponds to AWS instance profile/arn role. :param schemas: List[:class:`ServicePrincipalSchema`] (optional) @@ -4274,12 +4304,18 @@ def list( return query["startIndex"] += len(json["Resources"]) - def patch(self, id: str, *, operations: Optional[List[Patch]] = None, schemas: Optional[List[PatchSchema]] = None): + def patch( + self, + *, + id: Optional[str] = None, + operations: Optional[List[Patch]] = None, + schemas: Optional[List[PatchSchema]] = None, + ): """Update user details. Partially updates a user resource by applying the supplied operations on specific user attributes. - :param id: str + :param id: str (optional) Unique ID in the Databricks workspace. :param operations: List[:class:`Patch`] (optional) :param schemas: List[:class:`PatchSchema`] (optional) @@ -4323,7 +4359,6 @@ def set_permissions( def update( self, - id: str, *, active: Optional[bool] = None, display_name: Optional[str] = None, @@ -4331,6 +4366,7 @@ def update( entitlements: Optional[List[ComplexValue]] = None, external_id: Optional[str] = None, groups: Optional[List[ComplexValue]] = None, + id: Optional[str] = None, name: Optional[Name] = None, roles: Optional[List[ComplexValue]] = None, schemas: Optional[List[UserSchema]] = None, @@ -4340,8 +4376,6 @@ def update( Replaces a user's information with the data supplied in request. - :param id: str - Databricks user ID. :param active: bool (optional) If this user is active :param display_name: str (optional) @@ -4359,6 +4393,8 @@ def update( :param external_id: str (optional) External ID is not currently supported. It is reserved for future use. :param groups: List[:class:`ComplexValue`] (optional) + :param id: str (optional) + Databricks user ID. :param name: :class:`Name` (optional) :param roles: List[:class:`ComplexValue`] (optional) Corresponds to AWS instance profile/arn role. @@ -4496,23 +4532,27 @@ def list(self, workspace_id: int) -> Iterator[PermissionAssignment]: return parsed if parsed is not None else [] def update( - self, workspace_id: int, principal_id: int, *, permissions: Optional[List[WorkspacePermission]] = None + self, + *, + permissions: Optional[List[WorkspacePermission]] = None, + principal_id: Optional[int] = None, + workspace_id: Optional[int] = None, ) -> PermissionAssignment: """Create or update permissions assignment. Creates or updates the workspace permissions assignment in a given account and workspace for the specified principal. - :param workspace_id: int - The workspace ID. - :param principal_id: int - The ID of the user, service principal, or group. :param permissions: List[:class:`WorkspacePermission`] (optional) Array of permissions assignments to update on the workspace. Valid values are "USER" and "ADMIN" (case-sensitive). If both "USER" and "ADMIN" are provided, "ADMIN" takes precedence. Other values will be ignored. Note that excluding this field, or providing unsupported values, will have the same effect as providing an empty list, which will result in the deletion of all permissions for the principal. + :param principal_id: int (optional) + The ID of the user, service principal, or group. + :param workspace_id: int (optional) + The workspace ID. :returns: :class:`PermissionAssignment` """ diff --git a/databricks/sdk/service/jobs.py b/databricks/sdk/service/jobs.py index 051b514c8..d0c3d9701 100755 --- a/databricks/sdk/service/jobs.py +++ b/databricks/sdk/service/jobs.py @@ -10052,16 +10052,16 @@ def run_now_and_wait( ).result(timeout=timeout) def set_permissions( - self, job_id: str, *, access_control_list: Optional[List[JobAccessControlRequest]] = None + self, *, access_control_list: Optional[List[JobAccessControlRequest]] = None, job_id: Optional[str] = None ) -> JobPermissions: """Set job permissions. Sets permissions on an object, replacing existing permissions if they exist. Deletes all direct permissions if none are specified. Objects can inherit permissions from their root object. - :param job_id: str - The job for which to get or manage permissions. :param access_control_list: List[:class:`JobAccessControlRequest`] (optional) + :param job_id: str (optional) + The job for which to get or manage permissions. :returns: :class:`JobPermissions` """ @@ -10271,15 +10271,15 @@ def update( self._api.do("POST", "/api/2.2/jobs/update", body=body, headers=headers) def update_permissions( - self, job_id: str, *, access_control_list: Optional[List[JobAccessControlRequest]] = None + self, *, access_control_list: Optional[List[JobAccessControlRequest]] = None, job_id: Optional[str] = None ) -> JobPermissions: """Update job permissions. Updates the permissions on a job. Jobs can inherit permissions from their root object. - :param job_id: str - The job for which to get or manage permissions. :param access_control_list: List[:class:`JobAccessControlRequest`] (optional) + :param job_id: str (optional) + The job for which to get or manage permissions. :returns: :class:`JobPermissions` """ diff --git a/databricks/sdk/service/marketplace.py b/databricks/sdk/service/marketplace.py index 6d3a8815b..dfc4c1364 100755 --- a/databricks/sdk/service/marketplace.py +++ b/databricks/sdk/service/marketplace.py @@ -3589,10 +3589,10 @@ def __init__(self, api_client): def create( self, - listing_id: str, *, accepted_consumer_terms: Optional[ConsumerTerms] = None, catalog_name: Optional[str] = None, + listing_id: Optional[str] = None, recipient_type: Optional[DeltaSharingRecipientType] = None, repo_detail: Optional[RepoInstallation] = None, share_name: Optional[str] = None, @@ -3601,9 +3601,9 @@ def create( Install payload associated with a Databricks Marketplace listing. - :param listing_id: str :param accepted_consumer_terms: :class:`ConsumerTerms` (optional) :param catalog_name: str (optional) + :param listing_id: str (optional) :param recipient_type: :class:`DeltaSharingRecipientType` (optional) :param repo_detail: :class:`RepoInstallation` (optional) for git repo installations @@ -3723,10 +3723,10 @@ def list_listing_installations( def update( self, - listing_id: str, - installation_id: str, installation: InstallationDetail, *, + installation_id: Optional[str] = None, + listing_id: Optional[str] = None, rotate_token: Optional[bool] = None, ) -> UpdateInstallationResponse: """Update an installation. @@ -3736,9 +3736,9 @@ def update( the token will be rotate if the rotateToken flag is true 2. the token will be forcibly rotate if the rotateToken flag is true and the tokenInfo field is empty - :param listing_id: str - :param installation_id: str :param installation: :class:`InstallationDetail` + :param installation_id: str (optional) + :param listing_id: str (optional) :param rotate_token: bool (optional) :returns: :class:`UpdateInstallationResponse` @@ -3947,7 +3947,6 @@ def __init__(self, api_client): def create( self, - listing_id: str, intended_use: str, accepted_consumer_terms: ConsumerTerms, *, @@ -3956,13 +3955,13 @@ def create( first_name: Optional[str] = None, is_from_lighthouse: Optional[bool] = None, last_name: Optional[str] = None, + listing_id: Optional[str] = None, recipient_type: Optional[DeltaSharingRecipientType] = None, ) -> CreatePersonalizationRequestResponse: """Create a personalization request. Create a personalization request for a listing. - :param listing_id: str :param intended_use: str :param accepted_consumer_terms: :class:`ConsumerTerms` :param comment: str (optional) @@ -3970,6 +3969,7 @@ def create( :param first_name: str (optional) :param is_from_lighthouse: bool (optional) :param last_name: str (optional) + :param listing_id: str (optional) :param recipient_type: :class:`DeltaSharingRecipientType` (optional) :returns: :class:`CreatePersonalizationRequestResponse` @@ -4212,13 +4212,13 @@ def list( return query["page_token"] = json["next_page_token"] - def update(self, id: str, filter: ExchangeFilter) -> UpdateExchangeFilterResponse: + def update(self, filter: ExchangeFilter, *, id: Optional[str] = None) -> UpdateExchangeFilterResponse: """Update exchange filter. Update an exchange filter. - :param id: str :param filter: :class:`ExchangeFilter` + :param id: str (optional) :returns: :class:`UpdateExchangeFilterResponse` """ @@ -4433,13 +4433,13 @@ def list_listings_for_exchange( return query["page_token"] = json["next_page_token"] - def update(self, id: str, exchange: Exchange) -> UpdateExchangeResponse: + def update(self, exchange: Exchange, *, id: Optional[str] = None) -> UpdateExchangeResponse: """Update exchange. Update an exchange - :param id: str :param exchange: :class:`Exchange` + :param id: str (optional) :returns: :class:`UpdateExchangeResponse` """ @@ -4654,13 +4654,13 @@ def list(self, *, page_size: Optional[int] = None, page_token: Optional[str] = N return query["page_token"] = json["next_page_token"] - def update(self, id: str, listing: Listing) -> UpdateListingResponse: + def update(self, listing: Listing, *, id: Optional[str] = None) -> UpdateListingResponse: """Update listing. Update a listing - :param id: str :param listing: :class:`Listing` + :param id: str (optional) :returns: :class:`UpdateListingResponse` """ @@ -4719,21 +4719,21 @@ def list( def update( self, - listing_id: str, - request_id: str, status: PersonalizationRequestStatus, *, + listing_id: Optional[str] = None, reason: Optional[str] = None, + request_id: Optional[str] = None, share: Optional[ShareInfo] = None, ) -> UpdatePersonalizationRequestResponse: """Update personalization request status. Update personalization request. This method only permits updating the status of the request. - :param listing_id: str - :param request_id: str :param status: :class:`PersonalizationRequestStatus` + :param listing_id: str (optional) :param reason: str (optional) + :param request_id: str (optional) :param share: :class:`ShareInfo` (optional) :returns: :class:`UpdatePersonalizationRequestResponse` @@ -4811,12 +4811,14 @@ def get_latest_version(self) -> GetLatestVersionProviderAnalyticsDashboardRespon res = self._api.do("GET", "/api/2.0/marketplace-provider/analytics_dashboard/latest", headers=headers) return GetLatestVersionProviderAnalyticsDashboardResponse.from_dict(res) - def update(self, id: str, *, version: Optional[int] = None) -> UpdateProviderAnalyticsDashboardResponse: + def update( + self, *, id: Optional[str] = None, version: Optional[int] = None + ) -> UpdateProviderAnalyticsDashboardResponse: """Update provider analytics dashboard. Update provider analytics dashboard. - :param id: str + :param id: str (optional) id is immutable property and can't be updated. :param version: int (optional) this is the version of the dashboard template we want to update our user to current expectation is @@ -4924,13 +4926,13 @@ def list(self, *, page_size: Optional[int] = None, page_token: Optional[str] = N return query["page_token"] = json["next_page_token"] - def update(self, id: str, provider: ProviderInfo) -> UpdateProviderResponse: + def update(self, provider: ProviderInfo, *, id: Optional[str] = None) -> UpdateProviderResponse: """Update provider. Update provider profile - :param id: str :param provider: :class:`ProviderInfo` + :param id: str (optional) :returns: :class:`UpdateProviderResponse` """ diff --git a/databricks/sdk/service/ml.py b/databricks/sdk/service/ml.py index 46ce607e1..d153e01fd 100755 --- a/databricks/sdk/service/ml.py +++ b/databricks/sdk/service/ml.py @@ -7119,16 +7119,19 @@ def set_experiment_tag(self, experiment_id: str, key: str, value: str): self._api.do("POST", "/api/2.0/mlflow/experiments/set-experiment-tag", body=body, headers=headers) def set_permissions( - self, experiment_id: str, *, access_control_list: Optional[List[ExperimentAccessControlRequest]] = None + self, + *, + access_control_list: Optional[List[ExperimentAccessControlRequest]] = None, + experiment_id: Optional[str] = None, ) -> ExperimentPermissions: """Set experiment permissions. Sets permissions on an object, replacing existing permissions if they exist. Deletes all direct permissions if none are specified. Objects can inherit permissions from their root object. - :param experiment_id: str - The experiment for which to get or manage permissions. :param access_control_list: List[:class:`ExperimentAccessControlRequest`] (optional) + :param experiment_id: str (optional) + The experiment for which to get or manage permissions. :returns: :class:`ExperimentPermissions` """ @@ -7201,15 +7204,18 @@ def update_experiment(self, experiment_id: str, *, new_name: Optional[str] = Non self._api.do("POST", "/api/2.0/mlflow/experiments/update", body=body, headers=headers) def update_permissions( - self, experiment_id: str, *, access_control_list: Optional[List[ExperimentAccessControlRequest]] = None + self, + *, + access_control_list: Optional[List[ExperimentAccessControlRequest]] = None, + experiment_id: Optional[str] = None, ) -> ExperimentPermissions: """Update experiment permissions. Updates the permissions on an experiment. Experiments can inherit permissions from their root object. - :param experiment_id: str - The experiment for which to get or manage permissions. :param access_control_list: List[:class:`ExperimentAccessControlRequest`] (optional) + :param experiment_id: str (optional) + The experiment for which to get or manage permissions. :returns: :class:`ExperimentPermissions` """ @@ -8459,18 +8465,18 @@ def set_model_version_tag(self, name: str, version: str, key: str, value: str): def set_permissions( self, - registered_model_id: str, *, access_control_list: Optional[List[RegisteredModelAccessControlRequest]] = None, + registered_model_id: Optional[str] = None, ) -> RegisteredModelPermissions: """Set registered model permissions. Sets permissions on an object, replacing existing permissions if they exist. Deletes all direct permissions if none are specified. Objects can inherit permissions from their root object. - :param registered_model_id: str - The registered model for which to get or manage permissions. :param access_control_list: List[:class:`RegisteredModelAccessControlRequest`] (optional) + :param registered_model_id: str (optional) + The registered model for which to get or manage permissions. :returns: :class:`RegisteredModelPermissions` """ @@ -8648,18 +8654,18 @@ def update_model_version(self, name: str, version: str, *, description: Optional def update_permissions( self, - registered_model_id: str, *, access_control_list: Optional[List[RegisteredModelAccessControlRequest]] = None, + registered_model_id: Optional[str] = None, ) -> RegisteredModelPermissions: """Update registered model permissions. Updates the permissions on a registered model. Registered models can inherit permissions from their root object. - :param registered_model_id: str - The registered model for which to get or manage permissions. :param access_control_list: List[:class:`RegisteredModelAccessControlRequest`] (optional) + :param registered_model_id: str (optional) + The registered model for which to get or manage permissions. :returns: :class:`RegisteredModelPermissions` """ diff --git a/databricks/sdk/service/oauth2.py b/databricks/sdk/service/oauth2.py index 53d337ef4..ffbad88e2 100755 --- a/databricks/sdk/service/oauth2.py +++ b/databricks/sdk/service/oauth2.py @@ -1473,8 +1473,8 @@ def list( def update( self, - integration_id: str, *, + integration_id: Optional[str] = None, redirect_urls: Optional[List[str]] = None, scopes: Optional[List[str]] = None, token_access_policy: Optional[TokenAccessPolicy] = None, @@ -1485,7 +1485,7 @@ def update( Updates an existing custom OAuth App Integration. You can retrieve the custom OAuth app integration via :method:CustomAppIntegration/get. - :param integration_id: str + :param integration_id: str (optional) :param redirect_urls: List[str] (optional) List of OAuth redirect urls to be updated in the custom OAuth app integration :param scopes: List[str] (optional) @@ -1684,13 +1684,13 @@ def list( return query["page_token"] = json["next_page_token"] - def update(self, integration_id: str, *, token_access_policy: Optional[TokenAccessPolicy] = None): + def update(self, *, integration_id: Optional[str] = None, token_access_policy: Optional[TokenAccessPolicy] = None): """Updates Published OAuth App Integration. Updates an existing published OAuth App Integration. You can retrieve the published OAuth app integration via :method:PublishedAppIntegration/get. - :param integration_id: str + :param integration_id: str (optional) :param token_access_policy: :class:`TokenAccessPolicy` (optional) Token access policy to be updated in the published OAuth app integration @@ -1924,17 +1924,17 @@ def __init__(self, api_client): self._api = api_client def create( - self, service_principal_id: int, *, lifetime: Optional[str] = None + self, *, lifetime: Optional[str] = None, service_principal_id: Optional[int] = None ) -> CreateServicePrincipalSecretResponse: """Create service principal secret. Create a secret for the given service principal. - :param service_principal_id: int - The service principal ID. :param lifetime: str (optional) The lifetime of the secret in seconds. If this parameter is not provided, the secret will have a default lifetime of 730 days (63072000s). + :param service_principal_id: int (optional) + The service principal ID. :returns: :class:`CreateServicePrincipalSecretResponse` """ diff --git a/databricks/sdk/service/pipelines.py b/databricks/sdk/service/pipelines.py index 7e3ee328b..fc2b5162d 100755 --- a/databricks/sdk/service/pipelines.py +++ b/databricks/sdk/service/pipelines.py @@ -3826,16 +3826,19 @@ def list_updates( return ListUpdatesResponse.from_dict(res) def set_permissions( - self, pipeline_id: str, *, access_control_list: Optional[List[PipelineAccessControlRequest]] = None + self, + *, + access_control_list: Optional[List[PipelineAccessControlRequest]] = None, + pipeline_id: Optional[str] = None, ) -> PipelinePermissions: """Set pipeline permissions. Sets permissions on an object, replacing existing permissions if they exist. Deletes all direct permissions if none are specified. Objects can inherit permissions from their root object. - :param pipeline_id: str - The pipeline for which to get or manage permissions. :param access_control_list: List[:class:`PipelineAccessControlRequest`] (optional) + :param pipeline_id: str (optional) + The pipeline for which to get or manage permissions. :returns: :class:`PipelinePermissions` """ @@ -3852,11 +3855,11 @@ def set_permissions( def start_update( self, - pipeline_id: str, *, cause: Optional[StartUpdateCause] = None, full_refresh: Optional[bool] = None, full_refresh_selection: Optional[List[str]] = None, + pipeline_id: Optional[str] = None, refresh_selection: Optional[List[str]] = None, validate_only: Optional[bool] = None, ) -> StartUpdateResponse: @@ -3865,7 +3868,6 @@ def start_update( Starts a new update for the pipeline. If there is already an active update for the pipeline, the request will fail and the active update will remain running. - :param pipeline_id: str :param cause: :class:`StartUpdateCause` (optional) :param full_refresh: bool (optional) If true, this update will reset all tables before running. @@ -3873,6 +3875,7 @@ def start_update( A list of tables to update with fullRefresh. If both refresh_selection and full_refresh_selection are empty, this is a full graph update. Full Refresh on a table means that the states of the table will be reset before the refresh. + :param pipeline_id: str (optional) :param refresh_selection: List[str] (optional) A list of tables to update without fullRefresh. If both refresh_selection and full_refresh_selection are empty, this is a full graph update. Full Refresh on a table means that the states of the table @@ -3929,7 +3932,6 @@ def stop_and_wait(self, pipeline_id: str, timeout=timedelta(minutes=20)) -> GetP def update( self, - pipeline_id: str, *, allow_duplicate_names: Optional[bool] = None, budget_policy_id: Optional[str] = None, @@ -3951,6 +3953,7 @@ def update( name: Optional[str] = None, notifications: Optional[List[Notifications]] = None, photon: Optional[bool] = None, + pipeline_id: Optional[str] = None, restart_window: Optional[RestartWindow] = None, run_as: Optional[RunAs] = None, schema: Optional[str] = None, @@ -3963,8 +3966,6 @@ def update( Updates a pipeline with the supplied configuration. - :param pipeline_id: str - Unique identifier for this pipeline. :param allow_duplicate_names: bool (optional) If false, deployment will fail if name has changed and conflicts the name of another pipeline. :param budget_policy_id: str (optional) @@ -4009,6 +4010,8 @@ def update( List of notification settings for this pipeline. :param photon: bool (optional) Whether Photon is enabled for this pipeline. + :param pipeline_id: str (optional) + Unique identifier for this pipeline. :param restart_window: :class:`RestartWindow` (optional) Restart window of this pipeline. :param run_as: :class:`RunAs` (optional) @@ -4095,15 +4098,18 @@ def update( self._api.do("PUT", f"/api/2.0/pipelines/{pipeline_id}", body=body, headers=headers) def update_permissions( - self, pipeline_id: str, *, access_control_list: Optional[List[PipelineAccessControlRequest]] = None + self, + *, + access_control_list: Optional[List[PipelineAccessControlRequest]] = None, + pipeline_id: Optional[str] = None, ) -> PipelinePermissions: """Update pipeline permissions. Updates the permissions on a pipeline. Pipelines can inherit permissions from their root object. - :param pipeline_id: str - The pipeline for which to get or manage permissions. :param access_control_list: List[:class:`PipelineAccessControlRequest`] (optional) + :param pipeline_id: str (optional) + The pipeline for which to get or manage permissions. :returns: :class:`PipelinePermissions` """ diff --git a/databricks/sdk/service/provisioning.py b/databricks/sdk/service/provisioning.py index 42feb57bc..4828dd3b9 100755 --- a/databricks/sdk/service/provisioning.py +++ b/databricks/sdk/service/provisioning.py @@ -2838,12 +2838,12 @@ def list(self) -> Iterator[PrivateAccessSettings]: def replace( self, - private_access_settings_id: str, private_access_settings_name: str, region: str, *, allowed_vpc_endpoint_ids: Optional[List[str]] = None, private_access_level: Optional[PrivateAccessLevel] = None, + private_access_settings_id: Optional[str] = None, public_access_enabled: Optional[bool] = None, ): """Replace private access settings. @@ -2866,8 +2866,6 @@ def replace( [AWS PrivateLink]: https://aws.amazon.com/privatelink [Databricks article about PrivateLink]: https://docs.databricks.com/administration-guide/cloud-configurations/aws/privatelink.html - :param private_access_settings_id: str - Databricks Account API private access settings ID. :param private_access_settings_name: str The human-readable name of the private access settings object. :param region: str @@ -2891,6 +2889,8 @@ def replace( only VPC endpoints that are registered in your Databricks account connect to your workspace. * `ENDPOINT` level access allows only specified VPC endpoints connect to your workspace. For details, see `allowed_vpc_endpoint_ids`. + :param private_access_settings_id: str (optional) + Databricks Account API private access settings ID. :param public_access_enabled: bool (optional) Determines if the workspace can be accessed over public internet. For fully private workspaces, you can optionally specify `false`, but only if you implement both the front-end and the back-end @@ -3487,7 +3487,6 @@ def list(self) -> Iterator[Workspace]: def update( self, - workspace_id: int, *, aws_region: Optional[str] = None, credentials_id: Optional[str] = None, @@ -3498,6 +3497,7 @@ def update( private_access_settings_id: Optional[str] = None, storage_configuration_id: Optional[str] = None, storage_customer_managed_key_id: Optional[str] = None, + workspace_id: Optional[int] = None, ) -> Wait[Workspace]: """Update workspace configuration. @@ -3595,8 +3595,6 @@ def update( [Account Console]: https://docs.databricks.com/administration-guide/account-settings-e2/account-console-e2.html [Create a new workspace using the Account API]: http://docs.databricks.com/administration-guide/account-api/new-workspace.html - :param workspace_id: int - Workspace ID. :param aws_region: str (optional) The AWS region of the workspace's data plane (for example, `us-west-2`). This parameter is available only for updating failed workspaces. @@ -3624,6 +3622,8 @@ def update( :param storage_customer_managed_key_id: str (optional) The ID of the key configuration object for workspace storage. This parameter is available for updating both failed and running workspaces. + :param workspace_id: int (optional) + Workspace ID. :returns: Long-running operation waiter for :class:`Workspace`. @@ -3662,7 +3662,6 @@ def update( def update_and_wait( self, - workspace_id: int, *, aws_region: Optional[str] = None, credentials_id: Optional[str] = None, @@ -3673,6 +3672,7 @@ def update_and_wait( private_access_settings_id: Optional[str] = None, storage_configuration_id: Optional[str] = None, storage_customer_managed_key_id: Optional[str] = None, + workspace_id: Optional[int] = None, timeout=timedelta(minutes=20), ) -> Workspace: return self.update( diff --git a/databricks/sdk/service/serving.py b/databricks/sdk/service/serving.py index cd8a4eb1d..6a03a23a6 100755 --- a/databricks/sdk/service/serving.py +++ b/databricks/sdk/service/serving.py @@ -4503,18 +4503,22 @@ def logs(self, name: str, served_model_name: str) -> ServerLogsResponse: return ServerLogsResponse.from_dict(res) def patch( - self, name: str, *, add_tags: Optional[List[EndpointTag]] = None, delete_tags: Optional[List[str]] = None + self, + *, + add_tags: Optional[List[EndpointTag]] = None, + delete_tags: Optional[List[str]] = None, + name: Optional[str] = None, ) -> EndpointTags: """Update tags of a serving endpoint. Used to batch add and delete tags from a serving endpoint with a single API call. - :param name: str - The name of the serving endpoint who's tags to patch. This field is required. :param add_tags: List[:class:`EndpointTag`] (optional) List of endpoint tags to add :param delete_tags: List[str] (optional) List of tag keys to delete + :param name: str (optional) + The name of the serving endpoint who's tags to patch. This field is required. :returns: :class:`EndpointTags` """ @@ -4531,12 +4535,12 @@ def patch( res = self._api.do("PATCH", f"/api/2.0/serving-endpoints/{name}/tags", body=body, headers=headers) return EndpointTags.from_dict(res) - def put(self, name: str, *, rate_limits: Optional[List[RateLimit]] = None) -> PutResponse: + def put(self, *, name: Optional[str] = None, rate_limits: Optional[List[RateLimit]] = None) -> PutResponse: """Update rate limits of a serving endpoint. Deprecated: Please use AI Gateway to manage rate limits instead. - :param name: str + :param name: str (optional) The name of the serving endpoint whose rate limits are being updated. This field is required. :param rate_limits: List[:class:`RateLimit`] (optional) The list of endpoint rate limits. @@ -4556,11 +4560,11 @@ def put(self, name: str, *, rate_limits: Optional[List[RateLimit]] = None) -> Pu def put_ai_gateway( self, - name: str, *, fallback_config: Optional[FallbackConfig] = None, guardrails: Optional[AiGatewayGuardrails] = None, inference_table_config: Optional[AiGatewayInferenceTableConfig] = None, + name: Optional[str] = None, rate_limits: Optional[List[AiGatewayRateLimit]] = None, usage_tracking_config: Optional[AiGatewayUsageTrackingConfig] = None, ) -> PutAiGatewayResponse: @@ -4569,8 +4573,6 @@ def put_ai_gateway( Used to update the AI Gateway of a serving endpoint. NOTE: External model, provisioned throughput, and pay-per-token endpoints are fully supported; agent endpoints currently only support inference tables. - :param name: str - The name of the serving endpoint whose AI Gateway is being updated. This field is required. :param fallback_config: :class:`FallbackConfig` (optional) Configuration for traffic fallback which auto fallbacks to other served entities if the request to a served entity fails with certain error codes, to increase availability. @@ -4579,6 +4581,8 @@ def put_ai_gateway( :param inference_table_config: :class:`AiGatewayInferenceTableConfig` (optional) Configuration for payload logging using inference tables. Use these tables to monitor and audit data being sent to and received from model APIs and to improve model quality. + :param name: str (optional) + The name of the serving endpoint whose AI Gateway is being updated. This field is required. :param rate_limits: List[:class:`AiGatewayRateLimit`] (optional) Configuration for rate limits which can be set to limit endpoint traffic. :param usage_tracking_config: :class:`AiGatewayUsageTrackingConfig` (optional) @@ -4608,7 +4612,6 @@ def put_ai_gateway( def query( self, - name: str, *, dataframe_records: Optional[List[Any]] = None, dataframe_split: Optional[DataframeSplitInput] = None, @@ -4619,6 +4622,7 @@ def query( max_tokens: Optional[int] = None, messages: Optional[List[ChatMessage]] = None, n: Optional[int] = None, + name: Optional[str] = None, prompt: Optional[Any] = None, stop: Optional[List[str]] = None, stream: Optional[bool] = None, @@ -4626,8 +4630,6 @@ def query( ) -> QueryEndpointResponse: """Query a serving endpoint. - :param name: str - The name of the serving endpoint. This field is required. :param dataframe_records: List[Any] (optional) Pandas Dataframe input in the records orientation. :param dataframe_split: :class:`DataframeSplitInput` (optional) @@ -4654,6 +4656,8 @@ def query( The n (number of candidates) field used ONLY for __completions__ and __chat external & foundation model__ serving endpoints. This is an integer between 1 and 5 with a default of 1 and should only be used with other chat/completions query fields. + :param name: str (optional) + The name of the serving endpoint. This field is required. :param prompt: Any (optional) The prompt string (or array of strings) field used ONLY for __completions external & foundation model__ serving endpoints and should only be used with other completions query fields. @@ -4717,18 +4721,18 @@ def query( def set_permissions( self, - serving_endpoint_id: str, *, access_control_list: Optional[List[ServingEndpointAccessControlRequest]] = None, + serving_endpoint_id: Optional[str] = None, ) -> ServingEndpointPermissions: """Set serving endpoint permissions. Sets permissions on an object, replacing existing permissions if they exist. Deletes all direct permissions if none are specified. Objects can inherit permissions from their root object. - :param serving_endpoint_id: str - The serving endpoint for which to get or manage permissions. :param access_control_list: List[:class:`ServingEndpointAccessControlRequest`] (optional) + :param serving_endpoint_id: str (optional) + The serving endpoint for which to get or manage permissions. :returns: :class:`ServingEndpointPermissions` """ @@ -4747,9 +4751,9 @@ def set_permissions( def update_config( self, - name: str, *, auto_capture_config: Optional[AutoCaptureConfigInput] = None, + name: Optional[str] = None, served_entities: Optional[List[ServedEntityInput]] = None, served_models: Optional[List[ServedModelInput]] = None, traffic_config: Optional[TrafficConfig] = None, @@ -4760,13 +4764,13 @@ def update_config( served entities, and the endpoint's traffic config. An endpoint that already has an update in progress can not be updated until the current update completes or fails. - :param name: str - The name of the serving endpoint to update. This field is required. :param auto_capture_config: :class:`AutoCaptureConfigInput` (optional) Configuration for Inference Tables which automatically logs requests and responses to Unity Catalog. Note: this field is deprecated for creating new provisioned throughput endpoints, or updating existing provisioned throughput endpoints that never have inference table configured; in these cases please use AI Gateway to manage inference tables. + :param name: str (optional) + The name of the serving endpoint to update. This field is required. :param served_entities: List[:class:`ServedEntityInput`] (optional) The list of served entities under the serving endpoint config. :param served_models: List[:class:`ServedModelInput`] (optional) @@ -4802,9 +4806,9 @@ def update_config( def update_config_and_wait( self, - name: str, *, auto_capture_config: Optional[AutoCaptureConfigInput] = None, + name: Optional[str] = None, served_entities: Optional[List[ServedEntityInput]] = None, served_models: Optional[List[ServedModelInput]] = None, traffic_config: Optional[TrafficConfig] = None, @@ -4820,18 +4824,18 @@ def update_config_and_wait( def update_permissions( self, - serving_endpoint_id: str, *, access_control_list: Optional[List[ServingEndpointAccessControlRequest]] = None, + serving_endpoint_id: Optional[str] = None, ) -> ServingEndpointPermissions: """Update serving endpoint permissions. Updates the permissions on a serving endpoint. Serving endpoints can inherit permissions from their root object. - :param serving_endpoint_id: str - The serving endpoint for which to get or manage permissions. :param access_control_list: List[:class:`ServingEndpointAccessControlRequest`] (optional) + :param serving_endpoint_id: str (optional) + The serving endpoint for which to get or manage permissions. :returns: :class:`ServingEndpointPermissions` """ @@ -4881,7 +4885,6 @@ def _data_plane_info_query(self, name: str) -> DataPlaneInfo: def query( self, - name: str, *, dataframe_records: Optional[List[Any]] = None, dataframe_split: Optional[DataframeSplitInput] = None, @@ -4892,6 +4895,7 @@ def query( max_tokens: Optional[int] = None, messages: Optional[List[ChatMessage]] = None, n: Optional[int] = None, + name: Optional[str] = None, prompt: Optional[Any] = None, stop: Optional[List[str]] = None, stream: Optional[bool] = None, @@ -4899,8 +4903,6 @@ def query( ) -> QueryEndpointResponse: """Query a serving endpoint. - :param name: str - The name of the serving endpoint. This field is required. :param dataframe_records: List[Any] (optional) Pandas Dataframe input in the records orientation. :param dataframe_split: :class:`DataframeSplitInput` (optional) @@ -4927,6 +4929,8 @@ def query( The n (number of candidates) field used ONLY for __completions__ and __chat external & foundation model__ serving endpoints. This is an integer between 1 and 5 with a default of 1 and should only be used with other chat/completions query fields. + :param name: str (optional) + The name of the serving endpoint. This field is required. :param prompt: Any (optional) The prompt string (or array of strings) field used ONLY for __completions external & foundation model__ serving endpoints and should only be used with other completions query fields. diff --git a/databricks/sdk/service/settings.py b/databricks/sdk/service/settings.py index 673296a03..b52f33ad6 100755 --- a/databricks/sdk/service/settings.py +++ b/databricks/sdk/service/settings.py @@ -5434,11 +5434,11 @@ def list(self) -> Iterator[IpAccessListInfo]: def replace( self, - ip_access_list_id: str, label: str, list_type: ListType, enabled: bool, *, + ip_access_list_id: Optional[str] = None, ip_addresses: Optional[List[str]] = None, ): """Replace access list. @@ -5453,8 +5453,6 @@ def replace( returned with `error_code` value `INVALID_STATE`. It can take a few minutes for the changes to take effect. - :param ip_access_list_id: str - The ID for the corresponding IP access list :param label: str Label for the IP access list. This **cannot** be empty. :param list_type: :class:`ListType` @@ -5464,6 +5462,8 @@ def replace( range. IP addresses in the block list are excluded even if they are included in an allow list. :param enabled: bool Specifies whether this IP access list is enabled. + :param ip_access_list_id: str (optional) + The ID for the corresponding IP access list :param ip_addresses: List[str] (optional) @@ -5490,9 +5490,9 @@ def replace( def update( self, - ip_access_list_id: str, *, enabled: Optional[bool] = None, + ip_access_list_id: Optional[str] = None, ip_addresses: Optional[List[str]] = None, label: Optional[str] = None, list_type: Optional[ListType] = None, @@ -5513,10 +5513,10 @@ def update( It can take a few minutes for the changes to take effect. - :param ip_access_list_id: str - The ID for the corresponding IP access list :param enabled: bool (optional) Specifies whether this IP access list is enabled. + :param ip_access_list_id: str (optional) + The ID for the corresponding IP access list :param ip_addresses: List[str] (optional) :param label: str (optional) Label for the IP access list. This **cannot** be empty. @@ -7112,11 +7112,11 @@ def list(self) -> Iterator[IpAccessListInfo]: def replace( self, - ip_access_list_id: str, label: str, list_type: ListType, enabled: bool, *, + ip_access_list_id: Optional[str] = None, ip_addresses: Optional[List[str]] = None, ): """Replace access list. @@ -7132,8 +7132,6 @@ def replace( effect. Note that your resulting IP access list has no effect until you enable the feature. See :method:workspaceconf/setStatus. - :param ip_access_list_id: str - The ID for the corresponding IP access list :param label: str Label for the IP access list. This **cannot** be empty. :param list_type: :class:`ListType` @@ -7143,6 +7141,8 @@ def replace( range. IP addresses in the block list are excluded even if they are included in an allow list. :param enabled: bool Specifies whether this IP access list is enabled. + :param ip_access_list_id: str (optional) + The ID for the corresponding IP access list :param ip_addresses: List[str] (optional) @@ -7164,9 +7164,9 @@ def replace( def update( self, - ip_access_list_id: str, *, enabled: Optional[bool] = None, + ip_access_list_id: Optional[str] = None, ip_addresses: Optional[List[str]] = None, label: Optional[str] = None, list_type: Optional[ListType] = None, @@ -7188,10 +7188,10 @@ def update( It can take a few minutes for the changes to take effect. Note that your resulting IP access list has no effect until you enable the feature. See :method:workspaceconf/setStatus. - :param ip_access_list_id: str - The ID for the corresponding IP access list :param enabled: bool (optional) Specifies whether this IP access list is enabled. + :param ip_access_list_id: str (optional) + The ID for the corresponding IP access list :param ip_addresses: List[str] (optional) :param label: str (optional) Label for the IP access list. This **cannot** be empty. @@ -7618,19 +7618,19 @@ def list( query["page_token"] = json["next_page_token"] def update( - self, id: str, *, config: Optional[Config] = None, display_name: Optional[str] = None + self, *, config: Optional[Config] = None, display_name: Optional[str] = None, id: Optional[str] = None ) -> NotificationDestination: """Update a notification destination. Updates a notification destination. Requires workspace admin permissions. At least one field is required in the request body. - :param id: str - UUID identifying notification destination. :param config: :class:`Config` (optional) The configuration for the notification destination. Must wrap EXACTLY one of the nested configs. :param display_name: str (optional) The display name for the notification destination. + :param id: str (optional) + UUID identifying notification destination. :returns: :class:`NotificationDestination` """ diff --git a/databricks/sdk/service/sharing.py b/databricks/sdk/service/sharing.py index 7325e5fdd..248098395 100755 --- a/databricks/sdk/service/sharing.py +++ b/databricks/sdk/service/sharing.py @@ -2945,7 +2945,7 @@ def list_provider_share_assets( return ListProviderShareAssetsResponse.from_dict(res) def list_shares( - self, name: str, *, max_results: Optional[int] = None, page_token: Optional[str] = None + self, *, max_results: Optional[int] = None, name: Optional[str] = None, page_token: Optional[str] = None ) -> Iterator[ProviderShare]: """List shares by Provider. @@ -2953,8 +2953,6 @@ def list_shares( * the caller is a metastore admin, or * the caller is the owner. - :param name: str - Name of the provider in which to list shares. :param max_results: int (optional) Maximum number of shares to return. - when set to 0, the page length is set to a server configured value (recommended); - when set to a value greater than 0, the page length is the minimum of this @@ -2963,6 +2961,8 @@ def list_shares( returned shares might be less than the specified max_results size, even zero. The only definitive indication that no further shares can be fetched is when the next_page_token is unset from the response. + :param name: str (optional) + Name of the provider in which to list shares. :param page_token: str (optional) Opaque pagination token to go to next page based on previous query. @@ -2991,9 +2991,9 @@ def list_shares( def update( self, - name: str, *, comment: Optional[str] = None, + name: Optional[str] = None, new_name: Optional[str] = None, owner: Optional[str] = None, recipient_profile_str: Optional[str] = None, @@ -3004,10 +3004,10 @@ def update( owner of the provider. If the update changes the provider name, the caller must be both a metastore admin and the owner of the provider. - :param name: str - Name of the provider. :param comment: str (optional) Description about the provider. + :param name: str (optional) + Name of the provider. :param new_name: str (optional) New name for the provider. :param owner: str (optional) @@ -3265,18 +3265,18 @@ def list( return query["page_token"] = json["next_page_token"] - def rotate_token(self, name: str, existing_token_expire_in_seconds: int) -> RecipientInfo: + def rotate_token(self, existing_token_expire_in_seconds: int, *, name: Optional[str] = None) -> RecipientInfo: """Rotate a token. Refreshes the specified recipient's delta sharing authentication token with the provided token info. The caller must be the owner of the recipient. - :param name: str - The name of the Recipient. :param existing_token_expire_in_seconds: int The expiration time of the bearer token in ISO 8601 format. This will set the expiration_time of existing token only to a smaller timestamp, it cannot extend the expiration_time. Use 0 to expire the existing token immediately, negative number will return an error. + :param name: str (optional) + The name of the Recipient. :returns: :class:`RecipientInfo` """ @@ -3331,11 +3331,11 @@ def share_permissions( def update( self, - name: str, *, comment: Optional[str] = None, expiration_time: Optional[int] = None, ip_access_list: Optional[IpAccessList] = None, + name: Optional[str] = None, new_name: Optional[str] = None, owner: Optional[str] = None, properties_kvpairs: Optional[SecurablePropertiesKvPairs] = None, @@ -3346,14 +3346,14 @@ def update( the recipient. If the recipient name will be updated, the user must be both a metastore admin and the owner of the recipient. - :param name: str - Name of the recipient. :param comment: str (optional) Description about the recipient. :param expiration_time: int (optional) Expiration timestamp of the token, in epoch milliseconds. :param ip_access_list: :class:`IpAccessList` (optional) IP Access List + :param name: str (optional) + Name of the recipient. :param new_name: str (optional) New name for the recipient. . :param owner: str (optional) @@ -3543,9 +3543,9 @@ def share_permissions( def update( self, - name: str, *, comment: Optional[str] = None, + name: Optional[str] = None, new_name: Optional[str] = None, owner: Optional[str] = None, storage_root: Optional[str] = None, @@ -3569,10 +3569,10 @@ def update( Table removals through **update** do not require additional privileges. - :param name: str - The name of the share. :param comment: str (optional) User-provided free-form text description. + :param name: str (optional) + The name of the share. :param new_name: str (optional) New name for the share. :param owner: str (optional) @@ -3604,7 +3604,7 @@ def update( return ShareInfo.from_dict(res) def update_permissions( - self, name: str, *, changes: Optional[List[PermissionsChange]] = None + self, *, changes: Optional[List[PermissionsChange]] = None, name: Optional[str] = None ) -> UpdateSharePermissionsResponse: """Update permissions. @@ -3614,10 +3614,10 @@ def update_permissions( For new recipient grants, the user must also be the recipient owner or metastore admin. recipient revocations do not require additional privileges. - :param name: str - The name of the share. :param changes: List[:class:`PermissionsChange`] (optional) Array of permission changes. + :param name: str (optional) + The name of the share. :returns: :class:`UpdateSharePermissionsResponse` """ diff --git a/databricks/sdk/service/sql.py b/databricks/sdk/service/sql.py index a3746381c..0c5267032 100755 --- a/databricks/sdk/service/sql.py +++ b/databricks/sdk/service/sql.py @@ -8719,12 +8719,13 @@ def list( return query["page_token"] = json["next_page_token"] - def update(self, id: str, update_mask: str, *, alert: Optional[UpdateAlertRequestAlert] = None) -> Alert: + def update( + self, update_mask: str, *, alert: Optional[UpdateAlertRequestAlert] = None, id: Optional[str] = None + ) -> Alert: """Update an alert. Updates an alert. - :param id: str :param update_mask: str The field mask must be a single string, with multiple fields separated by commas (no spaces). The field path is relative to the resource object, using a dot (`.`) to navigate sub-fields (e.g., @@ -8736,6 +8737,7 @@ def update(self, id: str, update_mask: str, *, alert: Optional[UpdateAlertReques fields being updated and avoid using `*` wildcards, as it can lead to unintended results if the API changes in the future. :param alert: :class:`UpdateAlertRequestAlert` (optional) + :param id: str (optional) :returns: :class:`Alert` """ @@ -8883,7 +8885,15 @@ def list(self) -> Iterator[LegacyAlert]: res = self._api.do("GET", "/api/2.0/preview/sql/alerts", headers=headers) return [LegacyAlert.from_dict(v) for v in res] - def update(self, alert_id: str, name: str, options: AlertOptions, query_id: str, *, rearm: Optional[int] = None): + def update( + self, + name: str, + options: AlertOptions, + query_id: str, + *, + alert_id: Optional[str] = None, + rearm: Optional[int] = None, + ): """Update an alert. Updates an alert. @@ -8893,13 +8903,13 @@ def update(self, alert_id: str, name: str, options: AlertOptions, query_id: str, [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html - :param alert_id: str :param name: str Name of the alert. :param options: :class:`AlertOptions` Alert configuration options. :param query_id: str Query ID. + :param alert_id: str (optional) :param rearm: int (optional) Number of seconds after being triggered before the alert rearms itself and can be triggered again. If `null`, alert will never be triggered again. @@ -9015,13 +9025,11 @@ def trash_alert(self, id: str): self._api.do("DELETE", f"/api/2.0/alerts/{id}", headers=headers) - def update_alert(self, id: str, update_mask: str, *, alert: Optional[AlertV2] = None) -> AlertV2: + def update_alert(self, update_mask: str, *, alert: Optional[AlertV2] = None, id: Optional[str] = None) -> AlertV2: """Update an alert. Update alert - :param id: str - UUID identifying the alert. :param update_mask: str The field mask must be a single string, with multiple fields separated by commas (no spaces). The field path is relative to the resource object, using a dot (`.`) to navigate sub-fields (e.g., @@ -9033,6 +9041,8 @@ def update_alert(self, id: str, update_mask: str, *, alert: Optional[AlertV2] = fields being updated and avoid using `*` wildcards, as it can lead to unintended results if the API changes in the future. :param alert: :class:`AlertV2` (optional) + :param id: str (optional) + UUID identifying the alert. :returns: :class:`AlertV2` """ @@ -9117,23 +9127,23 @@ def delete(self, id: str): def update( self, - id: str, dashboard_id: str, options: WidgetOptions, width: int, *, + id: Optional[str] = None, text: Optional[str] = None, visualization_id: Optional[str] = None, ) -> Widget: """Update existing widget. - :param id: str - Widget ID returned by :method:dashboardwidgets/create :param dashboard_id: str Dashboard ID returned by :method:dashboards/create. :param options: :class:`WidgetOptions` :param width: int Width of a widget + :param id: str (optional) + Widget ID returned by :method:dashboardwidgets/create :param text: str (optional) If this is a textbox widget, the application displays this text. This field is ignored if the widget contains a visualization in the `visualization` field. @@ -9328,8 +9338,8 @@ def restore(self, dashboard_id: str): def update( self, - dashboard_id: str, *, + dashboard_id: Optional[str] = None, name: Optional[str] = None, run_as_role: Optional[RunAsRole] = None, tags: Optional[List[str]] = None, @@ -9341,7 +9351,7 @@ def update( **Note**: You cannot undo this operation. - :param dashboard_id: str + :param dashboard_id: str (optional) :param name: str (optional) The title of this dashboard that appears in list views and at the top of the dashboard page. :param run_as_role: :class:`RunAsRole` (optional) @@ -9661,12 +9671,13 @@ def list_visualizations( return query["page_token"] = json["next_page_token"] - def update(self, id: str, update_mask: str, *, query: Optional[UpdateQueryRequestQuery] = None) -> Query: + def update( + self, update_mask: str, *, id: Optional[str] = None, query: Optional[UpdateQueryRequestQuery] = None + ) -> Query: """Update a query. Updates a query. - :param id: str :param update_mask: str The field mask must be a single string, with multiple fields separated by commas (no spaces). The field path is relative to the resource object, using a dot (`.`) to navigate sub-fields (e.g., @@ -9677,6 +9688,7 @@ def update(self, id: str, update_mask: str, *, query: Optional[UpdateQueryReques A field mask of `*` indicates full replacement. It’s recommended to always explicitly list the fields being updated and avoid using `*` wildcards, as it can lead to unintended results if the API changes in the future. + :param id: str (optional) :param query: :class:`UpdateQueryRequestQuery` (optional) :returns: :class:`Query` @@ -9927,13 +9939,13 @@ def restore(self, query_id: str): def update( self, - query_id: str, *, data_source_id: Optional[str] = None, description: Optional[str] = None, name: Optional[str] = None, options: Optional[Any] = None, query: Optional[str] = None, + query_id: Optional[str] = None, run_as_role: Optional[RunAsRole] = None, tags: Optional[List[str]] = None, ) -> LegacyQuery: @@ -9948,7 +9960,6 @@ def update( [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html - :param query_id: str :param data_source_id: str (optional) Data source ID maps to the ID of the data source used by the resource and is distinct from the warehouse ID. [Learn more] @@ -9964,6 +9975,7 @@ def update( overridden at runtime. :param query: str (optional) The text of the query to be run. + :param query_id: str (optional) :param run_as_role: :class:`RunAsRole` (optional) Sets the **Run as** role for the object. Must be set to one of `"viewer"` (signifying "run as viewer" behavior) or `"owner"` (signifying "run as owner" behavior) @@ -10094,13 +10106,16 @@ def delete(self, id: str): self._api.do("DELETE", f"/api/2.0/sql/visualizations/{id}", headers=headers) def update( - self, id: str, update_mask: str, *, visualization: Optional[UpdateVisualizationRequestVisualization] = None + self, + update_mask: str, + *, + id: Optional[str] = None, + visualization: Optional[UpdateVisualizationRequestVisualization] = None, ) -> Visualization: """Update a visualization. Updates a visualization. - :param id: str :param update_mask: str The field mask must be a single string, with multiple fields separated by commas (no spaces). The field path is relative to the resource object, using a dot (`.`) to navigate sub-fields (e.g., @@ -10111,6 +10126,7 @@ def update( A field mask of `*` indicates full replacement. It’s recommended to always explicitly list the fields being updated and avoid using `*` wildcards, as it can lead to unintended results if the API changes in the future. + :param id: str (optional) :param visualization: :class:`UpdateVisualizationRequestVisualization` (optional) :returns: :class:`Visualization` @@ -10210,10 +10226,10 @@ def delete(self, id: str): def update( self, - id: str, *, created_at: Optional[str] = None, description: Optional[str] = None, + id: Optional[str] = None, name: Optional[str] = None, options: Optional[Any] = None, query: Optional[LegacyQuery] = None, @@ -10229,11 +10245,11 @@ def update( [Learn more]: https://docs.databricks.com/en/sql/dbsql-api-latest.html - :param id: str - The UUID for this visualization. :param created_at: str (optional) :param description: str (optional) A short description of this visualization. This is not displayed in the UI. + :param id: str (optional) + The UUID for this visualization. :param name: str (optional) The name of the visualization that appears on dashboards and the query screen. :param options: Any (optional) @@ -10844,7 +10860,6 @@ def delete(self, id: str): def edit( self, - id: str, *, auto_stop_mins: Optional[int] = None, channel: Optional[Channel] = None, @@ -10852,6 +10867,7 @@ def edit( creator_name: Optional[str] = None, enable_photon: Optional[bool] = None, enable_serverless_compute: Optional[bool] = None, + id: Optional[str] = None, instance_profile_arn: Optional[str] = None, max_num_clusters: Optional[int] = None, min_num_clusters: Optional[int] = None, @@ -10864,8 +10880,6 @@ def edit( Updates the configuration for a SQL warehouse. - :param id: str - Required. Id of the warehouse to configure. :param auto_stop_mins: int (optional) The amount of time in minutes that a SQL warehouse must be idle (i.e., no RUNNING queries) before it is automatically stopped. @@ -10890,6 +10904,8 @@ def edit( Defaults to false. :param enable_serverless_compute: bool (optional) Configures whether the warehouse should use serverless compute. + :param id: str (optional) + Required. Id of the warehouse to configure. :param instance_profile_arn: str (optional) Deprecated. Instance profile used to pass IAM role to the cluster :param max_num_clusters: int (optional) @@ -10962,7 +10978,6 @@ def edit( def edit_and_wait( self, - id: str, *, auto_stop_mins: Optional[int] = None, channel: Optional[Channel] = None, @@ -10970,6 +10985,7 @@ def edit_and_wait( creator_name: Optional[str] = None, enable_photon: Optional[bool] = None, enable_serverless_compute: Optional[bool] = None, + id: Optional[str] = None, instance_profile_arn: Optional[str] = None, max_num_clusters: Optional[int] = None, min_num_clusters: Optional[int] = None, @@ -11090,16 +11106,19 @@ def list(self, *, run_as_user_id: Optional[int] = None) -> Iterator[EndpointInfo return parsed if parsed is not None else [] def set_permissions( - self, warehouse_id: str, *, access_control_list: Optional[List[WarehouseAccessControlRequest]] = None + self, + *, + access_control_list: Optional[List[WarehouseAccessControlRequest]] = None, + warehouse_id: Optional[str] = None, ) -> WarehousePermissions: """Set SQL warehouse permissions. Sets permissions on an object, replacing existing permissions if they exist. Deletes all direct permissions if none are specified. Objects can inherit permissions from their root object. - :param warehouse_id: str - The SQL warehouse for which to get or manage permissions. :param access_control_list: List[:class:`WarehouseAccessControlRequest`] (optional) + :param warehouse_id: str (optional) + The SQL warehouse for which to get or manage permissions. :returns: :class:`WarehousePermissions` """ @@ -11229,16 +11248,19 @@ def stop_and_wait(self, id: str, timeout=timedelta(minutes=20)) -> GetWarehouseR return self.stop(id=id).result(timeout=timeout) def update_permissions( - self, warehouse_id: str, *, access_control_list: Optional[List[WarehouseAccessControlRequest]] = None + self, + *, + access_control_list: Optional[List[WarehouseAccessControlRequest]] = None, + warehouse_id: Optional[str] = None, ) -> WarehousePermissions: """Update SQL warehouse permissions. Updates the permissions on a SQL warehouse. SQL warehouses can inherit permissions from their root object. - :param warehouse_id: str - The SQL warehouse for which to get or manage permissions. :param access_control_list: List[:class:`WarehouseAccessControlRequest`] (optional) + :param warehouse_id: str (optional) + The SQL warehouse for which to get or manage permissions. :returns: :class:`WarehousePermissions` """ diff --git a/databricks/sdk/service/vectorsearch.py b/databricks/sdk/service/vectorsearch.py index e40a64bf2..816046292 100755 --- a/databricks/sdk/service/vectorsearch.py +++ b/databricks/sdk/service/vectorsearch.py @@ -1892,16 +1892,16 @@ def list_endpoints(self, *, page_token: Optional[str] = None) -> Iterator[Endpoi query["page_token"] = json["next_page_token"] def update_endpoint_budget_policy( - self, endpoint_name: str, budget_policy_id: str + self, budget_policy_id: str, *, endpoint_name: Optional[str] = None ) -> PatchEndpointBudgetPolicyResponse: """Update the budget policy of an endpoint. Update the budget policy of an endpoint - :param endpoint_name: str - Name of the vector search endpoint :param budget_policy_id: str The budget policy id to be applied + :param endpoint_name: str (optional) + Name of the vector search endpoint :returns: :class:`PatchEndpointBudgetPolicyResponse` """ @@ -1919,14 +1919,14 @@ def update_endpoint_budget_policy( return PatchEndpointBudgetPolicyResponse.from_dict(res) def update_endpoint_custom_tags( - self, endpoint_name: str, custom_tags: List[CustomTag] + self, custom_tags: List[CustomTag], *, endpoint_name: Optional[str] = None ) -> UpdateEndpointCustomTagsResponse: """Update the custom tags of an endpoint. - :param endpoint_name: str - Name of the vector search endpoint :param custom_tags: List[:class:`CustomTag`] The new custom tags for the vector search endpoint + :param endpoint_name: str (optional) + Name of the vector search endpoint :returns: :class:`UpdateEndpointCustomTagsResponse` """ @@ -2102,11 +2102,11 @@ def list_indexes(self, endpoint_name: str, *, page_token: Optional[str] = None) def query_index( self, - index_name: str, columns: List[str], *, columns_to_rerank: Optional[List[str]] = None, filters_json: Optional[str] = None, + index_name: Optional[str] = None, num_results: Optional[int] = None, query_text: Optional[str] = None, query_type: Optional[str] = None, @@ -2117,8 +2117,6 @@ def query_index( Query the specified vector index. - :param index_name: str - Name of the vector index to query. :param columns: List[str] List of column names to include in the response. :param columns_to_rerank: List[str] (optional) @@ -2131,6 +2129,8 @@ def query_index( - `{"id <": 5}`: Filter for id less than 5. - `{"id >": 5}`: Filter for id greater than 5. - `{"id <=": 5}`: Filter for id less than equal to 5. - `{"id >=": 5}`: Filter for id greater than equal to 5. - `{"id": 5}`: Filter for id equal to 5. + :param index_name: str (optional) + Name of the vector index to query. :param num_results: int (optional) Number of results to return. Defaults to 10. :param query_text: str (optional) @@ -2171,17 +2171,17 @@ def query_index( return QueryVectorIndexResponse.from_dict(res) def query_next_page( - self, index_name: str, *, endpoint_name: Optional[str] = None, page_token: Optional[str] = None + self, *, endpoint_name: Optional[str] = None, index_name: Optional[str] = None, page_token: Optional[str] = None ) -> QueryVectorIndexResponse: """Query next page. Use `next_page_token` returned from previous `QueryVectorIndex` or `QueryVectorIndexNextPage` request to fetch next page of results. - :param index_name: str - Name of the vector index to query. :param endpoint_name: str (optional) Name of the endpoint. + :param index_name: str (optional) + Name of the vector index to query. :param page_token: str (optional) Page token returned from previous `QueryVectorIndex` or `QueryVectorIndexNextPage` API. @@ -2203,14 +2203,18 @@ def query_next_page( return QueryVectorIndexResponse.from_dict(res) def scan_index( - self, index_name: str, *, last_primary_key: Optional[str] = None, num_results: Optional[int] = None + self, + *, + index_name: Optional[str] = None, + last_primary_key: Optional[str] = None, + num_results: Optional[int] = None, ) -> ScanVectorIndexResponse: """Scan an index. Scan the specified vector index and return the first `num_results` entries after the exclusive `primary_key`. - :param index_name: str + :param index_name: str (optional) Name of the vector index to scan. :param last_primary_key: str (optional) Primary key of the last entry returned in the previous scan. @@ -2249,15 +2253,17 @@ def sync_index(self, index_name: str): self._api.do("POST", f"/api/2.0/vector-search/indexes/{index_name}/sync", headers=headers) - def upsert_data_vector_index(self, index_name: str, inputs_json: str) -> UpsertDataVectorIndexResponse: + def upsert_data_vector_index( + self, inputs_json: str, *, index_name: Optional[str] = None + ) -> UpsertDataVectorIndexResponse: """Upsert data into an index. Handles the upserting of data into a specified vector index. - :param index_name: str - Name of the vector index where data is to be upserted. Must be a Direct Vector Access Index. :param inputs_json: str JSON string representing the data to be upserted. + :param index_name: str (optional) + Name of the vector index where data is to be upserted. Must be a Direct Vector Access Index. :returns: :class:`UpsertDataVectorIndexResponse` """ diff --git a/databricks/sdk/service/workspace.py b/databricks/sdk/service/workspace.py index 6753ad880..30fe191f0 100755 --- a/databricks/sdk/service/workspace.py +++ b/databricks/sdk/service/workspace.py @@ -2464,9 +2464,9 @@ def list(self) -> Iterator[CredentialInfo]: def update( self, - credential_id: int, git_provider: str, *, + credential_id: Optional[int] = None, git_username: Optional[str] = None, personal_access_token: Optional[str] = None, ): @@ -2474,12 +2474,12 @@ def update( Updates the specified Git credential. - :param credential_id: int - The ID for the corresponding credential to access. :param git_provider: str Git provider. This field is case-insensitive. The available Git providers are `gitHub`, `bitbucketCloud`, `gitLab`, `azureDevOpsServices`, `gitHubEnterprise`, `bitbucketServer`, `gitLabEnterpriseEdition` and `awsCodeCommit`. + :param credential_id: int (optional) + The ID for the corresponding credential to access. :param git_username: str (optional) The username or email provided with your Git provider account, depending on which provider you are using. For GitHub, GitHub Enterprise Server, or Azure DevOps Services, either email or username may @@ -2670,16 +2670,16 @@ def list(self, *, next_page_token: Optional[str] = None, path_prefix: Optional[s query["next_page_token"] = json["next_page_token"] def set_permissions( - self, repo_id: str, *, access_control_list: Optional[List[RepoAccessControlRequest]] = None + self, *, access_control_list: Optional[List[RepoAccessControlRequest]] = None, repo_id: Optional[str] = None ) -> RepoPermissions: """Set repo permissions. Sets permissions on an object, replacing existing permissions if they exist. Deletes all direct permissions if none are specified. Objects can inherit permissions from their root object. - :param repo_id: str - The repo for which to get or manage permissions. :param access_control_list: List[:class:`RepoAccessControlRequest`] (optional) + :param repo_id: str (optional) + The repo for which to get or manage permissions. :returns: :class:`RepoPermissions` """ @@ -2696,9 +2696,9 @@ def set_permissions( def update( self, - repo_id: int, *, branch: Optional[str] = None, + repo_id: Optional[int] = None, sparse_checkout: Optional[SparseCheckoutUpdate] = None, tag: Optional[str] = None, ): @@ -2707,10 +2707,10 @@ def update( Updates the repo to a different branch or tag, or updates the repo to the latest commit on the same branch. - :param repo_id: int - ID of the Git folder (repo) object in the workspace. :param branch: str (optional) Branch that the local version of the repo is checked out to. + :param repo_id: int (optional) + ID of the Git folder (repo) object in the workspace. :param sparse_checkout: :class:`SparseCheckoutUpdate` (optional) If specified, update the sparse checkout settings. The update will fail if sparse checkout is not enabled for the repo. @@ -2736,15 +2736,15 @@ def update( self._api.do("PATCH", f"/api/2.0/repos/{repo_id}", body=body, headers=headers) def update_permissions( - self, repo_id: str, *, access_control_list: Optional[List[RepoAccessControlRequest]] = None + self, *, access_control_list: Optional[List[RepoAccessControlRequest]] = None, repo_id: Optional[str] = None ) -> RepoPermissions: """Update repo permissions. Updates the permissions on a repo. Repos can inherit permissions from their root object. - :param repo_id: str - The repo for which to get or manage permissions. :param access_control_list: List[:class:`RepoAccessControlRequest`] (optional) + :param repo_id: str (optional) + The repo for which to get or manage permissions. :returns: :class:`RepoPermissions` """ @@ -3393,10 +3393,10 @@ def mkdirs(self, path: str): def set_permissions( self, - workspace_object_type: str, - workspace_object_id: str, *, access_control_list: Optional[List[WorkspaceObjectAccessControlRequest]] = None, + workspace_object_id: Optional[str] = None, + workspace_object_type: Optional[str] = None, ) -> WorkspaceObjectPermissions: """Set workspace object permissions. @@ -3404,11 +3404,11 @@ def set_permissions( permissions if none are specified. Objects can inherit permissions from their parent objects or root object. - :param workspace_object_type: str - The workspace object type for which to get or manage permissions. - :param workspace_object_id: str - The workspace object for which to get or manage permissions. :param access_control_list: List[:class:`WorkspaceObjectAccessControlRequest`] (optional) + :param workspace_object_id: str (optional) + The workspace object for which to get or manage permissions. + :param workspace_object_type: str (optional) + The workspace object type for which to get or manage permissions. :returns: :class:`WorkspaceObjectPermissions` """ @@ -3427,21 +3427,21 @@ def set_permissions( def update_permissions( self, - workspace_object_type: str, - workspace_object_id: str, *, access_control_list: Optional[List[WorkspaceObjectAccessControlRequest]] = None, + workspace_object_id: Optional[str] = None, + workspace_object_type: Optional[str] = None, ) -> WorkspaceObjectPermissions: """Update workspace object permissions. Updates the permissions on a workspace object. Workspace objects can inherit permissions from their parent objects or root object. - :param workspace_object_type: str - The workspace object type for which to get or manage permissions. - :param workspace_object_id: str - The workspace object for which to get or manage permissions. :param access_control_list: List[:class:`WorkspaceObjectAccessControlRequest`] (optional) + :param workspace_object_id: str (optional) + The workspace object for which to get or manage permissions. + :param workspace_object_type: str (optional) + The workspace object type for which to get or manage permissions. :returns: :class:`WorkspaceObjectPermissions` """