diff --git a/.codegen/_last_sha b/.codegen/_last_sha index b7f7be504..a9645feac 100644 --- a/.codegen/_last_sha +++ b/.codegen/_last_sha @@ -1 +1 @@ -6005ee42f3882434563e5e1662aa0d95781ab781 \ No newline at end of file +874d8f1733df5029f169c35ed088d2f081eb6687 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cab005c8..ec85c1a6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Version changelog +## Release v0.169.0 (2026-11-19) + +### API Changes +* Add `delete_software_artifact()` and `delete_software_artifact_version()` methods for [w.software_artifacts](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/softwareartifacts/software_artifacts.html) workspace-level service. +* Add `high` enum value for `databricks.sdk.service.jobs.AiRuntimeTaskPriorityClass`. +* [Breaking] Remove `best_effort` enum value for `databricks.sdk.service.jobs.AiRuntimeTaskPriorityClass`. + ## Release v0.168.0 (2026-11-18) ### API Changes diff --git a/databricks/sdk/service/agentkit.py b/databricks/sdk/service/agentkit.py index b98a08f99..41da47272 100644 --- a/databricks/sdk/service/agentkit.py +++ b/databricks/sdk/service/agentkit.py @@ -440,8 +440,9 @@ class ManagedMemoryEntry: """Customer-provided identifier for the actor whose memory this entry represents.""" path: str - """Absolute, case-sensitive path identifying the entry within its actor and optional session. Paths - must begin with ``/`` and must not contain empty, ``.`` or ``..`` segments.""" + """Absolute, case-sensitive path identifying the entry within its actor and, until the deprecated + ``session_id`` is ignored, its optional session. Paths must begin with ``/`` and must not + contain empty, ``.`` or ``..`` segments.""" content: Optional[str] = None """Optional free-form memory content.""" @@ -458,8 +459,9 @@ class ManagedMemoryEntry: updates; assigned by the service on creation.""" session_id: Optional[str] = None - """Optional identifier for the session associated with this memory entry. When omitted, the entry - applies across the actor's sessions.""" + """Deprecated: memory entries will be identified by ``(actor_id, path)``, and the service will + ignore this field on writes and omit it from responses. Until then, an omitted value means the + entry applies across the actor's sessions.""" source_type: Optional[ManagedMemoryEntrySourceType] = None """Which writer created this entry. Caller sets this on Create; immutable after creation. The @@ -1241,7 +1243,8 @@ def create_memory( generates one when it is omitted. Returns ``ALREADY_EXISTS`` when an entry with the same actor, session, and path already exists. Omitted ``session_id`` is its own uniqueness key: two omitted-session entries with the same actor and path conflict, but an omitted-session entry does not - conflict with a session-scoped entry at the same actor and path. + conflict with a session-scoped entry at the same actor and path. ``session_id`` is deprecated: once it + is ignored, the uniqueness key becomes actor and path. :param parent: str Memory store that will contain the entry, in the form ``memory-stores/{managed_memory_store_id}``. @@ -1753,8 +1756,8 @@ def list_memories( view: Optional[ManagedMemoryEntryView] = None, ) -> Iterator[ManagedMemoryEntry]: """Lists memory entries for one actor. An exact ``path`` filters entries across sessions, ignoring - session metadata. Otherwise, ``session_id`` and ``path_prefix`` restrict the actor partition. ``view`` - controls whether each returned entry includes memory content. + session metadata. Otherwise, ``path_prefix`` and the deprecated ``session_id`` restrict the actor + partition. ``view`` controls whether each returned entry includes memory content. :param parent: str Memory store whose entries are listed, in the form ``memory-stores/{managed_memory_store_id}``. @@ -1768,8 +1771,9 @@ def list_memories( :param path_prefix: str (optional) Optional path prefix used to restrict entries within the actor partition. :param session_id: str (optional) - Optional session identifier. When set, only entries with this exact ``session_id`` are returned. - Omitted-session (cross-session) entries are not included. Ignored when path is set. + Deprecated: the service will ignore this filter. Until then, when set, only entries with this exact + ``session_id`` are returned, and omitted-session (cross-session) entries are not included. Ignored + when path is set. :param view: :class:`ManagedMemoryEntryView` (optional) Controls whether each returned entry includes memory content. Defaults to ``FULL``. @@ -2169,8 +2173,8 @@ def search_memories( Optional absolute, case-sensitive path prefix used to restrict searched entries within the actor partition. The prefix must begin with ``/`` and must not contain empty, ``.`` or ``..`` segments. :param session_id: str (optional) - Optional session identifier. When set, only entries with this exact ``session_id`` are searched. - Omitted-session (cross-session) entries are not included. + Deprecated: the service will ignore this filter. Until then, when set, only entries with this exact + ``session_id`` are searched, and omitted-session (cross-session) entries are not included. :param view: :class:`ManagedMemoryEntryView` (optional) Controls whether each returned entry includes memory content. Search scores are always returned. Defaults to ``FULL``. diff --git a/databricks/sdk/service/aifunctions.py b/databricks/sdk/service/aifunctions.py index 0f7b0a267..921cc0982 100644 --- a/databricks/sdk/service/aifunctions.py +++ b/databricks/sdk/service/aifunctions.py @@ -154,7 +154,8 @@ class AiDecideOptions: """ai_decide""" version: Optional[str] = None - """The function API version to invoke. Defaults to "1.0". Supported versions: ["1.0"].""" + """The function API version to invoke. If unset, the version is inferred per row. Supported + versions: ["1.0"].""" def as_dict(self) -> dict: """Serializes the AiDecideOptions into a dictionary suitable for use as a JSON request body.""" @@ -1004,7 +1005,8 @@ def ai_classify( :param labels: any The label set to classify as. Either a JSON array of label strings (e.g. ["spam", "not_spam"]), or a JSON object mapping each label to a description (e.g. {"spam": "unsolicited bulk message", - "not_spam": "a legitimate message"}). Accepts 2 to 500 labels, each 1 to 100 characters. + "not_spam": "a legitimate message"}). Accepts 2 to 500 labels, each 1 to 100 characters. When + multilabel is true, a single label is also accepted. :param options: :class:`AiClassifyOptions` (optional) Function options. Omitted fields fall back to their documented defaults. @@ -1032,7 +1034,9 @@ def ai_classify( def ai_decide(self, state: any, questions: any, *, options: Optional[AiDecideOptions] = None) -> AiDecideResponse: """Turn text and structured data into decisions your application can use. Define questions and criteria - to choose an option, estimate a probability, or assign a score given a provided state. + to choose an option, estimate a probability, or assign a score given a provided state. For REST API + requests, the default rate limit is 1,200 requests per minute per workspace. Contact your Databricks + account team to request a higher limit. :param state: any A string, JSON object, or array containing the content, related context, and examples needed to diff --git a/databricks/sdk/service/billing.py b/databricks/sdk/service/billing.py index 79be12aa4..cbf012521 100644 --- a/databricks/sdk/service/billing.py +++ b/databricks/sdk/service/billing.py @@ -626,7 +626,7 @@ def from_dict(cls, d: Dict[str, Any]) -> BudgetSpendStatus: @dataclass class CreateBillingUsageDashboardResponse: dashboard_id: Optional[str] = None - """The unique id of the usage dashboard.""" + """The ID of the AI/BI dashboard that was created.""" def as_dict(self) -> dict: """Serializes the CreateBillingUsageDashboardResponse into a dictionary suitable for use as a JSON request body.""" @@ -1119,10 +1119,10 @@ def from_dict(cls, d: Dict[str, Any]) -> Filter: @dataclass class GetBillingUsageDashboardResponse: dashboard_id: Optional[str] = None - """The unique id of the usage dashboard.""" + """The ID of the AI/BI dashboard. The ID is empty if no matching dashboard is found.""" dashboard_url: Optional[str] = None - """The URL of the usage dashboard.""" + """The URL of the dashboard in its workspace. The URL is empty if no matching dashboard is found.""" def as_dict(self) -> dict: """Serializes the GetBillingUsageDashboardResponse into a dictionary suitable for use as a JSON request body.""" @@ -2481,15 +2481,21 @@ def create( major_version: Optional[UsageDashboardMajorVersion] = None, workspace_id: Optional[int] = None, ) -> CreateBillingUsageDashboardResponse: - """Create a usage dashboard specified by workspaceId, accountId, and dashboard type. + """Imports a pre-built usage dashboard of the given type into a workspace. Each call imports a new + dashboard, even if the caller already created one of the same type in that workspace. The caller must + be an account admin and a user of the target workspace. See + https://docs.databricks.com/admin/account-settings/usage.html. :param dashboard_type: :class:`UsageDashboardType` (optional) Workspace level usage dashboard shows usage data for the specified workspace ID. Global level usage - dashboard shows usage data for all workspaces in the account. + dashboard shows usage data for all workspaces in the account. The request fails if the type is not + set. :param major_version: :class:`UsageDashboardMajorVersion` (optional) - The major version of the usage dashboard template to use. Defaults to VERSION_1. + The major version of the usage dashboard template to import. Version 2 adds cost forecasting and + object-level cost drill-down. :param workspace_id: int (optional) - The workspace ID of the workspace in which the usage dashboard is created. + The ID of the workspace to import the usage dashboard into. The workspace must be running, belong to + the account, and not be a disaster recovery secondary. :returns: :class:`CreateBillingUsageDashboardResponse` """ @@ -2512,13 +2518,17 @@ def create( def get( self, *, dashboard_type: Optional[UsageDashboardType] = None, workspace_id: Optional[int] = None ) -> GetBillingUsageDashboardResponse: - """Get a usage dashboard specified by workspaceId, accountId, and dashboard type. + """Gets the most recent usage dashboard of the given type that the caller created. The response is empty + if no such dashboard exists, if it has been deleted, or if the caller can no longer access its + workspace. :param dashboard_type: :class:`UsageDashboardType` (optional) Workspace level usage dashboard shows usage data for the specified workspace ID. Global level usage - dashboard shows usage data for all workspaces in the account. + dashboard shows usage data for all workspaces in the account. The request fails if the type is not + set. :param workspace_id: int (optional) - The workspace ID of the workspace in which the usage dashboard is created. + The ID of the workspace that contains the usage dashboard. If omitted, the most recently created + dashboard of the given type across all workspaces in the account is returned. :returns: :class:`GetBillingUsageDashboardResponse` """ diff --git a/databricks/sdk/service/catalog.py b/databricks/sdk/service/catalog.py index 0278a787d..7e9454a8b 100644 --- a/databricks/sdk/service/catalog.py +++ b/databricks/sdk/service/catalog.py @@ -1775,7 +1775,8 @@ class ConnectionInfo: """Unique identifier of the Connection.""" connection_type: Optional[ConnectionType] = None - """The type of connection.""" + """The type of external data source or service that the connection reaches. The connection type + determines which keys are required in options and cannot be changed after creation.""" created_at: Optional[int] = None """Time at which this connection was created, in epoch milliseconds.""" @@ -1784,10 +1785,12 @@ class ConnectionInfo: """Username of connection creator.""" credential_type: Optional[CredentialType] = None - """The type of credential.""" + """The type of credential that is used to authenticate to the external data source. The server + derives it from the connection type and the keys present in options.""" environment_settings: Optional[EnvironmentSettings] = None - """[Create,Update:OPT] Connection environment settings as EnvironmentSettings object.""" + """Environment settings for the connection, such as the Java libraries that it needs and the + environment version.""" full_name: Optional[str] = None """Full name of connection.""" @@ -1802,21 +1805,25 @@ class ConnectionInfo: """A map of key-value properties attached to the securable.""" owner: Optional[str] = None - """Username of current owner of the connection.""" + """Username of the current owner of the connection. The creator becomes the owner at creation, and + ownership can be transferred on update.""" properties: Optional[Dict[str, str]] = None """A map of key-value properties attached to the securable.""" provisioning_info: Optional[ProvisioningInfo] = None + """Provisioning status of the connection.""" read_only: Optional[bool] = None - """If the connection is read only.""" + """Whether the connection is read only. All connections are currently read only, so a value set on + create or update is ignored.""" secrets: Optional[Dict[str, str]] = None """A map of option names to UC Secret references. Keys are connection option names (same as in OptionsKVPairs) and values are UC Secret fully qualified names.""" securable_type: Optional[SecurableType] = None + """The type of Unity Catalog securable. This is always CONNECTION.""" updated_at: Optional[int] = None """Time at which this connection was updated, in epoch milliseconds.""" @@ -1825,7 +1832,7 @@ class ConnectionInfo: """Username of user who last modified connection.""" url: Optional[str] = None - """URL of the remote data source, extracted from options.""" + """URL of the remote data source. The server derives it from the host, port and path options.""" def as_dict(self) -> dict: """Serializes the ConnectionInfo into a dictionary suitable for use as a JSON request body.""" @@ -2260,6 +2267,11 @@ def from_dict(cls, d: Dict[str, Any]) -> CreateAccountsStorageCredential: @dataclass class CreateFunction: + """A user-defined function (UDF) registered in Unity Catalog. A function belongs to a schema and is + referenced as catalog_name.schema_name.function_name. Its body is either a SQL expression or + query, or source code in an external language such as Python. See + https://docs.databricks.com/aws/en/udf/unity-catalog for an overview.""" + name: str """Name of function, relative to parent schema.""" @@ -2270,62 +2282,76 @@ class CreateFunction: """Name of parent Schema relative to its parent Catalog.""" input_params: FunctionParameterInfos - """Function input parameters.""" + """Input parameters of the function. When it is set, parameters must contain at least one entry. A + function that takes no arguments omits input_params, even though the Create request schema marks + it as required.""" data_type: ColumnTypeName - """Scalar function return data type.""" + """Data type of the value the function returns. A table function uses TABLE_TYPE and describes its + result columns in return_params, except for a polymorphic Python UDTF, which omits them.""" full_data_type: str - """Pretty printed function data type.""" + """Return data type of the function in SQL syntax, including any type parameters such as precision + and scale.""" routine_body: CreateFunctionRoutineBody - """Function language. When **EXTERNAL** is used, the language of the routine function should be - specified in the **external_language** field, and the **return_params** of the function cannot - be used (as **TABLE** return type is not supported), and the **sql_data_access** field must be - **NO_SQL**.""" + """Language of the function body. SQL means that routine_definition holds a SQL expression or + query. EXTERNAL means that it holds source code in the language named by external_language, and + sql_data_access must then be NO_SQL.""" routine_definition: str - """Function body.""" + """Body of the function. For a SQL function it is the expression or query that computes the result; + for an EXTERNAL function it is the source code of the function. It is omitted when the caller + can only browse the function.""" parameter_style: CreateFunctionParameterStyle - """Function parameter style. **S** is the value for SQL.""" + """How arguments are passed to the function body. S means that each argument is passed as a single + scalar value.""" is_deterministic: bool - """Whether the function is deterministic.""" + """Whether the function returns the same result for the same arguments. It corresponds to the + DETERMINISTIC characteristic of CREATE FUNCTION.""" sql_data_access: CreateFunctionSqlDataAccess - """Function SQL data access.""" + """How the function body interacts with SQL data. CONTAINS_SQL means that the body contains SQL but + reads no table or view, READS_SQL_DATA means that it reads a table or view, and NO_SQL is + required for EXTERNAL functions.""" is_null_call: bool - """Function null call.""" + """Whether the function is a null-call function in the sense of the SQL standard, which returns + NULL whenever any argument is NULL.""" security_type: CreateFunctionSecurityType - """Function security type.""" + """Whose privileges the function body runs with. DEFINER runs it with the privileges of the + function owner.""" specific_name: str - """Specific name of the function; Reserved for future use.""" + """Specific name of the function. Set it to the same value as name.""" comment: Optional[str] = None """User-provided free-form text description.""" external_language: Optional[str] = None - """External function language.""" + """Language of the function body for an EXTERNAL function. It is required when routine_body is + EXTERNAL.""" external_name: Optional[str] = None - """External function name.""" + """Name of the function in its external language. It is reserved for future use.""" properties: Optional[str] = None """JSON-serialized key-value pair map, encoded (escaped) as a string.""" return_params: Optional[FunctionParameterInfos] = None - """Table function return parameters.""" + """Result columns of a table function. Set it when data_type is TABLE_TYPE, except for a + polymorphic Python UDTF (an EXTERNAL Python function with full_data_type "()"), which must not + set it.""" routine_dependencies: Optional[DependencyList] = None """Function dependencies. For external UDFs, dependencies may contain only credential, secret, or volume objects.""" sql_path: Optional[str] = None - """List of schemes whose objects can be referenced without qualification.""" + """List of schemas whose objects can be referenced without qualification.""" def as_dict(self) -> dict: """Serializes the CreateFunction into a dictionary suitable for use as a JSON request body.""" @@ -4840,6 +4866,11 @@ def from_dict(cls, d: Dict[str, Any]) -> FunctionDependency: @dataclass class FunctionInfo: + """A user-defined function (UDF) registered in Unity Catalog. A function belongs to a schema and is + referenced as catalog_name.schema_name.function_name. Its body is either a SQL expression or + query, or source code in an external language such as Python. See + https://docs.databricks.com/aws/en/udf/unity-catalog for an overview.""" + browse_only: Optional[bool] = None """Indicates whether the principal is limited to retrieving metadata for the associated object through the BROWSE privilege when include_browse is enabled in the request.""" @@ -4857,16 +4888,19 @@ class FunctionInfo: """Username of function creator.""" data_type: Optional[ColumnTypeName] = None - """Scalar function return data type.""" + """Data type of the value the function returns. A table function uses TABLE_TYPE and describes its + result columns in return_params, except for a polymorphic Python UDTF, which omits them.""" external_language: Optional[str] = None - """External function language.""" + """Language of the function body for an EXTERNAL function. It is required when routine_body is + EXTERNAL.""" external_name: Optional[str] = None - """External function name.""" + """Name of the function in its external language. It is reserved for future use.""" full_data_type: Optional[str] = None - """Pretty printed function data type.""" + """Return data type of the function in SQL syntax, including any type parameters such as precision + and scale.""" full_name: Optional[str] = None """Full name of Function, in form of **catalog_name**.**schema_name**.**function_name**""" @@ -4875,13 +4909,17 @@ class FunctionInfo: """Id of Function, relative to parent schema.""" input_params: Optional[FunctionParameterInfos] = None - """Function input parameters.""" + """Input parameters of the function. When it is set, parameters must contain at least one entry. A + function that takes no arguments omits input_params, even though the Create request schema marks + it as required.""" is_deterministic: Optional[bool] = None - """Whether the function is deterministic.""" + """Whether the function returns the same result for the same arguments. It corresponds to the + DETERMINISTIC characteristic of CREATE FUNCTION.""" is_null_call: Optional[bool] = None - """Function null call.""" + """Whether the function is a null-call function in the sense of the SQL standard, which returns + NULL whenever any argument is NULL.""" metastore_id: Optional[str] = None """Unique identifier of parent metastore.""" @@ -4893,22 +4931,26 @@ class FunctionInfo: """Username of current owner of the function.""" parameter_style: Optional[FunctionInfoParameterStyle] = None - """Function parameter style. **S** is the value for SQL.""" + """How arguments are passed to the function body. S means that each argument is passed as a single + scalar value.""" properties: Optional[str] = None """JSON-serialized key-value pair map, encoded (escaped) as a string.""" return_params: Optional[FunctionParameterInfos] = None - """Table function return parameters.""" + """Result columns of a table function. Set it when data_type is TABLE_TYPE, except for a + polymorphic Python UDTF (an EXTERNAL Python function with full_data_type "()"), which must not + set it.""" routine_body: Optional[FunctionInfoRoutineBody] = None - """Function language. When **EXTERNAL** is used, the language of the routine function should be - specified in the **external_language** field, and the **return_params** of the function cannot - be used (as **TABLE** return type is not supported), and the **sql_data_access** field must be - **NO_SQL**.""" + """Language of the function body. SQL means that routine_definition holds a SQL expression or + query. EXTERNAL means that it holds source code in the language named by external_language, and + sql_data_access must then be NO_SQL.""" routine_definition: Optional[str] = None - """Function body.""" + """Body of the function. For a SQL function it is the expression or query that computes the result; + for an EXTERNAL function it is the source code of the function. It is omitted when the caller + can only browse the function.""" routine_dependencies: Optional[DependencyList] = None """Function dependencies. For external UDFs, dependencies may contain only credential, secret, or @@ -4918,16 +4960,19 @@ class FunctionInfo: """Name of parent Schema relative to its parent Catalog.""" security_type: Optional[FunctionInfoSecurityType] = None - """Function security type.""" + """Whose privileges the function body runs with. DEFINER runs it with the privileges of the + function owner.""" specific_name: Optional[str] = None - """Specific name of the function; Reserved for future use.""" + """Specific name of the function. Set it to the same value as name.""" sql_data_access: Optional[FunctionInfoSqlDataAccess] = None - """Function SQL data access.""" + """How the function body interacts with SQL data. CONTAINS_SQL means that the body contains SQL but + reads no table or view, READS_SQL_DATA means that it reads a table or view, and NO_SQL is + required for EXTERNAL functions.""" sql_path: Optional[str] = None - """List of schemes whose objects can be referenced without qualification.""" + """List of schemas whose objects can be referenced without qualification.""" updated_at: Optional[int] = None """Time at which this function was last modified, in epoch milliseconds.""" @@ -5127,31 +5172,35 @@ class FunctionParameterInfo: """Name of Parameter.""" type_text: str - """Full data type spec, SQL/catalogString text.""" + """Data type of the parameter in SQL syntax, including any type parameters such as precision and + scale.""" type_name: ColumnTypeName """Name of type (INT, STRUCT, MAP, etc.)""" position: int - """Ordinal position of column (starting at position 0).""" + """Zero-based position of the parameter in the parameter list. Positions must be unique and + consecutive.""" comment: Optional[str] = None """User-provided free-form text description.""" parameter_default: Optional[str] = None - """Default value of the parameter.""" + """Default value of the parameter as a SQL expression, used when a call omits the argument.""" parameter_mode: Optional[FunctionParameterMode] = None - """Function parameter mode.""" + """Direction of the parameter. Only IN parameters, which pass a value into the function, are + supported.""" parameter_type: Optional[FunctionParameterType] = None - """Function parameter type.""" + """Whether the entry is an input parameter (PARAM) or a result column of a table function (COLUMN).""" type_interval_type: Optional[str] = None - """Format of IntervalType.""" + """Unit range of the data type for INTERVAL parameters. It is unset for other types.""" type_json: Optional[str] = None - """Full data type spec, JSON-serialized.""" + """Data type of the parameter as the JSON representation of a Spark SQL struct field, with name, + type, nullable and metadata keys.""" type_precision: Optional[int] = None """Digits of precision; required on Create for DecimalTypes.""" @@ -5239,6 +5288,7 @@ def from_dict(cls, d: Dict[str, Any]) -> FunctionParameterInfo: @dataclass class FunctionParameterInfos: parameters: Optional[List[FunctionParameterInfo]] = None + """The parameters that make up the list, ordered by position.""" def as_dict(self) -> dict: """Serializes the FunctionParameterInfos into a dictionary suitable for use as a JSON request body.""" @@ -5275,6 +5325,7 @@ class GcpOauthToken: https://developers.google.com/identity/protocols/oauth2/service-account""" oauth_token: Optional[str] = None + """The OAuth 2.0 access token to pass as a bearer token to Google Cloud APIs.""" def as_dict(self) -> dict: """Serializes the GcpOauthToken into a dictionary suitable for use as a JSON request body.""" @@ -5334,18 +5385,25 @@ def from_dict(cls, d: Dict[str, Any]) -> GcpPubsub: @dataclass class GenerateTemporaryPathCredentialResponse: aws_temp_credentials: Optional[AwsCredentials] = None + """Temporary AWS credentials that can be used to sign AWS API requests.""" azure_aad: Optional[AzureActiveDirectoryToken] = None + """A Microsoft Entra ID (formerly Azure Active Directory) token that is issued for the credential's + identity.""" azure_user_delegation_sas: Optional[AzureUserDelegationSas] = None + """An Azure user delegation shared access signature (SAS) that grants access to the requested + storage path.""" expiration_time: Optional[int] = None """Server time when the credential will expire, in epoch milliseconds. The API client is advised to cache the credential given this expiration time.""" gcp_oauth_token: Optional[GcpOauthToken] = None + """A GCP OAuth 2.0 access token that is issued for the credential's service account.""" r2_temp_credentials: Optional[R2Credentials] = None + """Temporary Cloudflare R2 credentials that can be used with the R2 S3-compatible API.""" url: Optional[str] = None """The URL of the storage path accessible by the temporary credential.""" @@ -5409,7 +5467,8 @@ class GenerateTemporaryServiceCredentialAzureOptions: resources: Optional[List[str]] = None """The resources to which the temporary Azure credential should apply. These resources are the scopes that are passed to the token provider (see - https://learn.microsoft.com/python/api/azure-core/azure.core.credentials.tokencredential?view=azure-python)""" + https://learn.microsoft.com/python/api/azure-core/azure.core.credentials.tokencredential?view=azure-python). + Exactly one resource is supported, and its URL must end with the ``.default`` scope.""" def as_dict(self) -> dict: """Serializes the GenerateTemporaryServiceCredentialAzureOptions into a dictionary suitable for use as a JSON request body.""" @@ -5438,7 +5497,9 @@ class GenerateTemporaryServiceCredentialGcpOptions: scopes: Optional[List[str]] = None """The scopes to which the temporary GCP credential should apply. These resources are the scopes that are passed to the token provider (see - https://google-auth.readthedocs.io/en/latest/reference/google.auth.html#google.auth.credentials.Credentials)""" + https://google-auth.readthedocs.io/en/latest/reference/google.auth.html#google.auth.credentials.Credentials). + Each scope must be a Google OAuth 2.0 scope URL on the ``googleapis.com`` or + ``www.googleapis.com`` host.""" def as_dict(self) -> dict: """Serializes the GenerateTemporaryServiceCredentialGcpOptions into a dictionary suitable for use as a JSON request body.""" @@ -5463,18 +5524,25 @@ def from_dict(cls, d: Dict[str, Any]) -> GenerateTemporaryServiceCredentialGcpOp @dataclass class GenerateTemporaryTableCredentialResponse: aws_temp_credentials: Optional[AwsCredentials] = None + """Temporary AWS credentials that can be used to sign AWS API requests.""" azure_aad: Optional[AzureActiveDirectoryToken] = None + """A Microsoft Entra ID (formerly Azure Active Directory) token that is issued for the credential's + identity.""" azure_user_delegation_sas: Optional[AzureUserDelegationSas] = None + """An Azure user delegation shared access signature (SAS) that grants access to the requested + storage path.""" expiration_time: Optional[int] = None """Server time when the credential will expire, in epoch milliseconds. The API client is advised to cache the credential given this expiration time.""" gcp_oauth_token: Optional[GcpOauthToken] = None + """A GCP OAuth 2.0 access token that is issued for the credential's service account.""" r2_temp_credentials: Optional[R2Credentials] = None + """Temporary Cloudflare R2 credentials that can be used with the R2 S3-compatible API.""" url: Optional[str] = None """The URL of the storage path accessible by the temporary credential.""" @@ -5534,18 +5602,25 @@ def from_dict(cls, d: Dict[str, Any]) -> GenerateTemporaryTableCredentialRespons @dataclass class GenerateTemporaryVolumeCredentialResponse: aws_temp_credentials: Optional[AwsCredentials] = None + """Temporary AWS credentials that can be used to sign AWS API requests.""" azure_aad: Optional[AzureActiveDirectoryToken] = None + """A Microsoft Entra ID (formerly Azure Active Directory) token that is issued for the credential's + identity.""" azure_user_delegation_sas: Optional[AzureUserDelegationSas] = None + """An Azure user delegation shared access signature (SAS) that grants access to the requested + storage path.""" expiration_time: Optional[int] = None """Server time when the credential will expire, in epoch milliseconds. The API client is advised to cache the credential given this expiration time.""" gcp_oauth_token: Optional[GcpOauthToken] = None + """A GCP OAuth 2.0 access token that is issued for the credential's service account.""" r2_temp_credentials: Optional[R2Credentials] = None + """Temporary Cloudflare R2 credentials that can be used with the R2 S3-compatible API.""" url: Optional[str] = None """The URL of the storage path accessible by the temporary credential.""" @@ -13259,16 +13334,21 @@ def from_dict(cls, d: Dict[str, Any]) -> TagValueExtraction: @dataclass class TemporaryCredentials: aws_temp_credentials: Optional[AwsCredentials] = None + """Temporary AWS credentials that can be used to sign AWS API requests.""" azure_aad: Optional[AzureActiveDirectoryToken] = None + """A Microsoft Entra ID (formerly Azure Active Directory) token that is issued for the credential's + identity.""" expiration_time: Optional[int] = None """Server time when the credential will expire, in epoch milliseconds. The API client is advised to cache the credential given this expiration time.""" gcp_oauth_token: Optional[GcpOauthToken] = None + """A GCP OAuth 2.0 access token that is issued for the credential's service account.""" r2_temp_credentials: Optional[R2Credentials] = None + """Temporary Cloudflare R2 credentials that can be used with the R2 S3-compatible API.""" def as_dict(self) -> dict: """Serializes the TemporaryCredentials into a dictionary suitable for use as a JSON request body.""" @@ -15915,20 +15995,23 @@ def create( :param name: str Name of the connection. :param connection_type: :class:`ConnectionType` - The type of connection. + The type of external data source or service that the connection reaches. The connection type + determines which keys are required in options and cannot be changed after creation. :param options: Dict[str,str] A map of key-value properties attached to the securable. :param comment: str (optional) User-provided free-form text description. :param environment_settings: :class:`EnvironmentSettings` (optional) - [Create,Update:OPT] Connection environment settings as EnvironmentSettings object. + Environment settings for the connection, such as the Java libraries that it needs and the + environment version. :param parent: str (optional) Parent schema for schema-level connections, in format "schemas/{catalog}.{schema}". Absent for metastore-level (L1) connections. :param properties: Dict[str,str] (optional) A map of key-value properties attached to the securable. :param read_only: bool (optional) - If the connection is read only. + Whether the connection is read only. All connections are currently read only, so a value set on + create or update is ignored. :param secrets: Dict[str,str] (optional) A map of option names to UC Secret references. Keys are connection option names (same as in OptionsKVPairs) and values are UC Secret fully qualified names. @@ -15987,7 +16070,7 @@ def delete(self, name: str): self._api.do("DELETE", f"/api/2.1/unity-catalog/connections/{name}", headers=headers) def get(self, name: str) -> ConnectionInfo: - """Gets a connection from it's name. + """Gets a connection from its name. :param name: str Name of the connection. @@ -16071,18 +16154,21 @@ def update( owner: Optional[str] = None, secrets: Optional[Dict[str, str]] = None, ) -> ConnectionInfo: - """Updates the connection that matches the supplied name. + """Updates the connection that matches the supplied name. When options are provided, they replace the + existing options of the connection, so include every key that the connection type requires. :param name: str Name of the connection. :param options: Dict[str,str] A map of key-value properties attached to the securable. :param environment_settings: :class:`EnvironmentSettings` (optional) - [Create,Update:OPT] Connection environment settings as EnvironmentSettings object. + Environment settings for the connection, such as the Java libraries that it needs and the + environment version. :param new_name: str (optional) New name for the connection. :param owner: str (optional) - Username of current owner of the connection. + Username of the current owner of the connection. The creator becomes the owner at creation, and + ownership can be transferred on update. :param secrets: Dict[str,str] (optional) A map of option names to UC Secret references. Keys are connection option names (same as in OptionsKVPairs) and values are UC Secret fully qualified names. @@ -16234,12 +16320,16 @@ def generate_temporary_service_credential( gcp_options: Optional[GenerateTemporaryServiceCredentialGcpOptions] = None, ) -> TemporaryCredentials: """Returns a set of temporary credentials generated using the specified service credential. The caller - must be a metastore admin or have the metastore privilege **ACCESS** on the service credential. + must be a metastore admin or have the **ACCESS** privilege on the service credential. :param credential_name: str The name of the service credential used to generate a temporary credential :param azure_options: :class:`GenerateTemporaryServiceCredentialAzureOptions` (optional) + Options for an Azure service credential. They are required when the service credential uses an Azure + managed identity. :param gcp_options: :class:`GenerateTemporaryServiceCredentialGcpOptions` (optional) + Options for a GCP service credential. They are required when the service credential uses a + Databricks-managed GCP service account. :returns: :class:`TemporaryCredentials` """ @@ -17420,9 +17510,9 @@ def delete(self, name: str, *, force: Optional[bool] = None): :param name: str The fully-qualified name of the function (of the form - **catalog_name**.**schema_name**.**function__name**) . + **catalog_name**.**schema_name**.**function_name**). :param force: bool (optional) - Force deletion even if the function is notempty. + Force deletion even if the function is not empty. """ @@ -17450,7 +17540,7 @@ def get(self, name: str, *, include_browse: Optional[bool] = None) -> FunctionIn :param name: str The fully-qualified name of the function (of the form - **catalog_name**.**schema_name**.**function__name**). + **catalog_name**.**schema_name**.**function_name**). :param include_browse: bool (optional) Whether to include functions in the response for which the principal can only access selective metadata for @@ -17558,7 +17648,7 @@ def update(self, name: str, *, owner: Optional[str] = None) -> FunctionInfo: :param name: str The fully-qualified name of the function (of the form - **catalog_name**.**schema_name**.**function__name**). + **catalog_name**.**schema_name**.**function_name**). :param owner: str (optional) Username of current owner of the function. diff --git a/databricks/sdk/service/cleanrooms.py b/databricks/sdk/service/cleanrooms.py index d42e68546..6a5c9de77 100644 --- a/databricks/sdk/service/cleanrooms.py +++ b/databricks/sdk/service/cleanrooms.py @@ -192,7 +192,7 @@ class CleanRoomAsset: **asset_type** is **FOREIGN_TABLE**""" foreign_table_local_details: Optional[CleanRoomAssetForeignTableLocalDetails] = None - """Local details for a foreign that are only available to its owner. Present if and only if + """Local details for a foreign table that are only available to its owner. Present if and only if **asset_type** is **FOREIGN_TABLE**""" jar_analysis: Optional[CleanRoomAssetJarAnalysis] = None @@ -207,7 +207,9 @@ class CleanRoomAsset: """The alias of the collaborator who owns this asset""" status: Optional[CleanRoomAssetStatusEnum] = None - """Status of the asset""" + """The sharing status of the asset. ``PERMISSION_DENIED`` means the clean room owner no longer has + the privileges needed on the underlying Unity Catalog object, so the asset is not shared into + the clean room.""" table: Optional[CleanRoomAssetTable] = None """Table details available to all collaborators of the clean room. Present if and only if @@ -2130,7 +2132,8 @@ def get(self, clean_room_name: str, asset_type: CleanRoomAssetAssetType, name: s return CleanRoomAsset.from_dict(res) def list(self, clean_room_name: str, *, page_token: Optional[str] = None) -> Iterator[CleanRoomAsset]: - """List assets. + """List the assets in a clean room. Listed assets do not include their asset-type specific details, such + as table columns or notebook content; use the get method to retrieve them. :param clean_room_name: str Name of the clean room. diff --git a/databricks/sdk/service/dashboards.py b/databricks/sdk/service/dashboards.py index bef097278..17b947f00 100644 --- a/databricks/sdk/service/dashboards.py +++ b/databricks/sdk/service/dashboards.py @@ -514,13 +514,16 @@ class GenieEvalAssessment(Enum): @dataclass class GenieEvalResponse: response: Optional[str] = None - """The response content (either text or SQL query).""" + """The content of this entry is the SQL statement when ``response_type`` is SQL, or Genie's text + answer when it is TEXT.""" response_type: Optional[GenieEvalResponseType] = None - """Type of response""" + """Whether this entry is a SQL statement or a text answer.""" sql_execution_result: Optional[sql.StatementResponse] = None - """SQL Statement Execution response.""" + """Result of executing the SQL statement, only set when ``response_type`` is SQL. The value has the + structure of a `Statement Execution API response + `__.""" def as_dict(self) -> dict: """Serializes the GenieEvalResponse into a dictionary suitable for use as a JSON request body.""" @@ -575,16 +578,21 @@ class GenieEvalResult: """The ID of the benchmark question that was evaluated.""" benchmark_answer: Optional[str] = None - """Stored snapshot of original benchmark answer text.""" + """Benchmark SQL statement that defines the expected answer, as it was when the run started.""" created_by_user: Optional[int] = None - """User ID who created evaluation result.""" + """ID of the user who started the evaluation run.""" question: Optional[str] = None - """Stored snapshot of original benchmark question text.""" + """Text of the benchmark question as it was when the run started. Later edits to the question do + not change it.""" status: Optional[EvaluationStatusType] = None - """Current status of this evaluation result.""" + """Current status of this result. NOT_STARTED and RUNNING mean the question has not finished. DONE + means Genie answered and the response was assessed. EVALUATION_FAILED means Genie could not + answer the question or the benchmark SQL could not run. EVALUATION_CANCELLED and + EVALUATION_TIMEOUT mean the run was cancelled or its background job stopped before this question + finished.""" def as_dict(self) -> dict: """Serializes the GenieEvalResult into a dictionary suitable for use as a JSON request body.""" @@ -652,10 +660,14 @@ class GenieEvalResultDetails: """The ID of the benchmark question that was evaluated.""" actual_response: Optional[List[GenieEvalResponse]] = None - """The actual response generated by Genie.""" + """Genie's response to the benchmark question. A SQL entry carries the generated statement and its + execution result, and a TEXT entry carries Genie's text answer. The list is empty when Genie + produced no response.""" assessment: Optional[GenieEvalAssessment] = None - """Assessment of the evaluation result: good, bad, or needs review""" + """Outcome of comparing Genie's response with the benchmark. GOOD means the results matched, BAD + means they differed, and NEEDS_REVIEW means the comparison was inconclusive and a person should + review the result. The value is only meaningful once the result status is DONE.""" assessment_reasons: Optional[List[ScoreReason]] = None """Reasons for the assessment score. @@ -711,13 +723,16 @@ class GenieEvalResultDetails: - LLM_JUDGE_SEMANTIC_ERROR (deprecated)""" eval_run_status: Optional[EvaluationStatusType] = None - """Current status of the evaluation run.""" + """Current status of this evaluation result, not of the whole run. Once the status is DONE, the + response and automatic assessment are complete. A user can still change the assessment manually.""" expected_response: Optional[List[GenieEvalResponse]] = None - """The expected responses from the benchmark.""" + """The expected answer from the benchmark question: one SQL entry with the benchmark SQL statement + and its execution result.""" manual_assessment: Optional[bool] = None - """Whether this evaluation was manually assessed.""" + """Whether a user set the assessment manually after reviewing the result. A manual assessment + replaces the automatic one and clears ``assessment_reasons``.""" def as_dict(self) -> dict: """Serializes the GenieEvalResultDetails into a dictionary suitable for use as a JSON request body.""" @@ -783,7 +798,11 @@ def from_dict(cls, d: Dict[str, Any]) -> GenieEvalResultDetails: @dataclass class GenieEvalRunResponse: - """A benchmark evaluation run. The public benchmark API currently evaluates chat-mode responses.""" + """A benchmark evaluation run. A run asks Genie each selected benchmark question in a Genie space, + compares every response with the benchmark SQL, and records one evaluation result per question. + Runs execute asynchronously; poll the run until its status is terminal, then list its results. + All evaluation run methods require CAN EDIT permission on the space. The public benchmark API + currently evaluates chat-mode responses.""" eval_run_id: str """The unique identifier for the evaluation run.""" @@ -792,19 +811,27 @@ class GenieEvalRunResponse: """Timestamp when the evaluation run was created (milliseconds since epoch).""" eval_run_status: Optional[EvaluationStatusType] = None - """Current status of the evaluation run.""" + """Current status of the run, derived from the statuses of its results. Unless a result has timed + out or the run has been cancelled, the run is RUNNING while any question has not finished. It is + DONE once every question has finished, whether it was scored or failed. EVALUATION_CANCELLED + means the run was cancelled before all questions finished, and EVALUATION_TIMEOUT means the + background evaluation job stopped before they did. DONE, EVALUATION_CANCELLED and + EVALUATION_TIMEOUT are terminal run statuses. NOT_STARTED and EVALUATION_FAILED appear only on + individual results.""" last_updated_timestamp: Optional[int] = None """Timestamp when the evaluation run was last updated (milliseconds since epoch).""" num_correct: Optional[int] = None - """Number of questions answered correctly.""" + """Number of questions whose result is assessed GOOD, including results assessed manually.""" num_done: Optional[int] = None - """Number of questions that have been completed.""" + """Number of questions that have finished, either scored (DONE) or failed (EVALUATION_FAILED). + Cancelled and timed-out questions are not counted.""" num_needs_review: Optional[int] = None - """Number of questions that need manual review.""" + """Number of finished questions whose result is assessed NEEDS_REVIEW and has not been reviewed + manually yet.""" num_questions: Optional[int] = None """Total number of questions in the evaluation run.""" @@ -3122,7 +3149,10 @@ def genie_cancel_response(self, agent_id: str, conversation_id: str, response_id def genie_create_eval_run( self, space_id: str, *, benchmark_question_ids: Optional[List[str]] = None ) -> GenieEvalRunResponse: - """Creates and runs chat-mode evaluations for multiple benchmark questions in a Genie space. + """Starts a benchmark evaluation run that asks Genie each selected benchmark question in a Genie space + and compares every response with the benchmark SQL. The run executes asynchronously: the response is + the new run with its current status. If it is still running, poll with the get method until the status + is terminal. :param space_id: str The ID associated with the Genie space where the evaluations will be executed. @@ -3149,7 +3179,9 @@ def genie_create_eval_run( return GenieEvalRunResponse.from_dict(res) def genie_get_eval_result_details(self, space_id: str, eval_run_id: str, result_id: str) -> GenieEvalResultDetails: - """Get details for evaluation results. + """Gets the full result for one benchmark question in an evaluation run: its assessment and the reasons + for it, Genie's response with the SQL execution result, and the expected response from the benchmark. + The result must belong to the given run. :param space_id: str The ID associated with the Genie space where the evaluation run is located. @@ -3175,11 +3207,13 @@ def genie_get_eval_result_details(self, space_id: str, eval_run_id: str, result_ return GenieEvalResultDetails.from_dict(res) def genie_get_eval_run(self, space_id: str, eval_run_id: str) -> GenieEvalRunResponse: - """Get evaluation run details. + """Gets the current status and summary counts of a benchmark evaluation run. Poll this method until + ``eval_run_status`` is terminal: DONE, EVALUATION_CANCELLED or EVALUATION_TIMEOUT. :param space_id: str The ID associated with the Genie space where the evaluation run is located. :param eval_run_id: str + The ID of the evaluation run, as returned when the run was created. :returns: :class:`GenieEvalRunResponse` """ @@ -3198,7 +3232,9 @@ def genie_get_eval_run(self, space_id: str, eval_run_id: str) -> GenieEvalRunRes def genie_list_eval_results( self, space_id: str, eval_run_id: str, *, page_size: Optional[int] = None, page_token: Optional[str] = None ) -> GenieListEvalResultsResponse: - """List evaluation results for a specific evaluation run. + """Lists the results of a benchmark evaluation run, one per benchmark question. Each entry carries the + result status and a snapshot of the question and benchmark answer; the assessment and Genie's response + are available through the result details method. :param space_id: str The ID associated with the Genie space where the evaluation run is located. @@ -3233,7 +3269,8 @@ def genie_list_eval_results( def genie_list_eval_runs( self, space_id: str, *, page_size: Optional[int] = None, page_token: Optional[str] = None ) -> GenieListEvalRunsResponse: - """Lists all evaluation runs in a space. + """Lists the benchmark evaluation runs in a Genie space with the current status and summary counts of + each run. :param space_id: str The ID associated with the Genie space where the evaluation run is located. diff --git a/databricks/sdk/service/dataclassification.py b/databricks/sdk/service/dataclassification.py index 074e40ae4..7acab6a64 100644 --- a/databricks/sdk/service/dataclassification.py +++ b/databricks/sdk/service/dataclassification.py @@ -32,7 +32,9 @@ class AutoTaggingConfig: classification_tag: str """The Classification Tag. For built-in classes this is a system tag (e.g., "class.name", - "class.location"); for custom classes it is a user-defined governance tag key.""" + "class.location"); for custom classes it is a user-defined governance tag key. The built-in tags + are listed at + https://docs.databricks.com/aws/en/data-governance/unity-catalog/data-classification-tags.""" auto_tagging_mode: AutoTaggingConfigAutoTaggingMode """Whether auto-tagging is enabled or disabled for this classification tag.""" @@ -80,20 +82,21 @@ class CatalogConfig: - It has no unique identifier of its own and uses its parent catalog's identifier (catalog_name)""" auto_tag_configs: Optional[List[AutoTaggingConfig]] = None - """List of auto-tagging configurations for this catalog. Empty list means no auto-tagging is - enabled.""" + """Auto-tagging configurations that apply to this catalog. Each entry overrides the metastore-level + auto-tagging setting for its classification tag; tags without an entry inherit the + metastore-level setting.""" excluded_schemas: Optional[CatalogConfigSchemaNames] = None """Schemas to exclude from the scan, each named relative to the parent catalog. If specified, all - schemas except the specified ones will be scanned. Mutually exclusive with ``included_schemas``: - only one may be set per request. If neither ``included_schemas`` nor ``excluded_schemas`` is - set, all schemas are scanned.""" + schemas except the specified ones will be scanned, including schemas created later. Mutually + exclusive with ``included_schemas``: only one may be set per request. If neither + ``included_schemas`` nor ``excluded_schemas`` is set, all schemas are scanned.""" included_schemas: Optional[CatalogConfigSchemaNames] = None """Schemas to include in the scan, each named relative to the parent catalog. If specified, only - listed schemas will be scanned. Mutually exclusive with ``excluded_schemas``: only one may be - set per request. If neither ``included_schemas`` nor ``excluded_schemas`` is set, all schemas - are scanned.""" + listed schemas will be scanned. Schemas created later are not scanned until you add them to the + list. Mutually exclusive with ``excluded_schemas``: only one may be set per request. If neither + ``included_schemas`` nor ``excluded_schemas`` is set, all schemas are scanned.""" name: Optional[str] = None """Resource name in the format: catalogs/{catalog_name}/config.""" @@ -173,12 +176,12 @@ def __init__(self, api_client): def create_catalog_config(self, parent: str, catalog_config: CatalogConfig) -> CatalogConfig: """Create Data Classification configuration for a catalog. - Creates a new config resource, which enables Data Classification for the specified catalog. - - - The config must not already exist for the catalog. + Creates a new config resource, which enables Data Classification for the specified catalog. The + catalog must not already have a config. Creating the config starts a scan of the selected schemas and + schedules recurring scans. :param parent: str - Parent resource in the format: catalogs/{catalog_name} + Name of the catalog to enable, in the format catalogs/{catalog_name}. :param catalog_config: :class:`CatalogConfig` The configuration to create. @@ -202,8 +205,12 @@ def create_catalog_config(self, parent: str, catalog_config: CatalogConfig) -> C def delete_catalog_config(self, name: str): """Delete Data Classification configuration for a catalog. + Deleting the config disables Data Classification for the catalog and stops its scheduled scans. Tags + that auto-tagging already applied to columns are not removed. Deleting a config that does not exist + succeeds. + :param name: str - Resource name in the format: catalogs/{catalog_name}/config + Resource name of the config, in the format catalogs/{catalog_name}/config. """ @@ -222,7 +229,7 @@ def get_catalog_config(self, name: str) -> CatalogConfig: """Get the Data Classification configuration for a catalog. :param name: str - Resource name in the format: catalogs/{catalog_name}/config + Resource name of the config, in the format catalogs/{catalog_name}/config. :returns: :class:`CatalogConfig` """ @@ -241,9 +248,8 @@ def get_catalog_config(self, name: str) -> CatalogConfig: def update_catalog_config(self, name: str, catalog_config: CatalogConfig, update_mask: FieldMask) -> CatalogConfig: """Update the Data Classification configuration for a catalog. - - The config must already exist for the catalog. - - Updates fields specified in the update_mask. Use update_mask field to perform partial updates of the - configuration. + The config must already exist for the catalog. Only the fields named in ``update_mask`` change; the + other fields keep their current values. :param name: str Resource name in the format: catalogs/{catalog_name}/config. @@ -251,7 +257,8 @@ def update_catalog_config(self, name: str, catalog_config: CatalogConfig, update The configuration to apply to the catalog. The name field in catalog_config identifies which resource to update. :param update_mask: FieldMask - Field mask specifying which fields to update. + Comma-separated list of the fields of catalog_config to update, for example ``included_schemas`` or + ``auto_tag_configs``. :returns: :class:`CatalogConfig` """ diff --git a/databricks/sdk/service/dataquality.py b/databricks/sdk/service/dataquality.py index 71a9f4f14..7fa041ec4 100644 --- a/databricks/sdk/service/dataquality.py +++ b/databricks/sdk/service/dataquality.py @@ -47,7 +47,8 @@ class AnomalyDetectionConfig: """Anomaly Detection Configurations.""" excluded_table_full_names: Optional[List[str]] = None - """List of fully qualified table names to exclude from anomaly detection.""" + """List of fully qualified table names to exclude from anomaly detection. Format: + ``catalog.schema.table_name``.""" notification_settings: Optional[NotificationSettings] = None """Who to alert when anomaly detection finds unhealthy tables in this schema. Applicable to @@ -125,9 +126,8 @@ class CronSchedule: `__.""" timezone_id: str - """A Java timezone id. The schedule for a job will be resolved with respect to this timezone. See - `Java TimeZone `_ for details. - The timezone id (e.g., ``America/Los_Angeles``) in which to evaluate the quartz expression.""" + """The Java timezone ID in which the cron expression is evaluated. See `Java TimeZone + `__ for the supported IDs.""" pause_status: Optional[CronSchedulePauseStatus] = None """Read only field that indicates whether the schedule is paused or not.""" @@ -176,22 +176,25 @@ class DataProfilingConfig: """Data Profiling Configurations.""" output_schema_id: str - """ID of the schema where output tables are created.""" + """The UUID of the Unity Catalog schema where the profile and drift metrics tables are created.""" assets_dir: Optional[str] = None - """Field for specifying the absolute path to a custom directory to store data-monitoring assets. - Normally prepopulated to a default user location via UI and Python APIs.""" + """The absolute workspace path of the directory where the monitor's assets, such as the dashboard, + are stored. The UI and the Python APIs normally prepopulate a default user location.""" baseline_table_name: Optional[str] = None - """Baseline table name. Baseline data is used to compute drift from the data in the monitored - ``table_name``. The baseline table and the monitored table shall have the same schema.""" + """The fully qualified name of a baseline table. Format: ``catalog.schema.table_name``. Drift + metrics compare the monitored table against the baseline data, so the two tables must have the + same schema.""" custom_metrics: Optional[List[DataProfilingCustomMetric]] = None - """Custom metrics.""" + """Custom metrics to compute in addition to the built-in ones. See `custom metrics + `__.""" dashboard_id: Optional[str] = None - """Id of dashboard that visualizes the computed metrics. This can be empty if the monitor is in - PENDING state.""" + """The ID of the dashboard that visualizes the computed metrics. It is empty while the monitor is + pending, when the dashboard was skipped with ``skip_builtin_dashboard``, or when the caller is + in a different workspace from the one where the monitor was created.""" drift_metrics_table_name: Optional[str] = None """Table that stores drift metrics data. Format: ``catalog.schema.table_name``.""" @@ -200,7 +203,8 @@ class DataProfilingConfig: """The warehouse for dashboard creation""" inference_log: Optional[InferenceLogConfig] = None - """``Analysis Configuration`` for monitoring inference log tables.""" + """Profiles an inference log table, which stores the requests and predictions of a model. Metrics + are computed per time window and include model quality metrics.""" latest_monitor_failure_message: Optional[str] = None """The latest error message for a monitor failure.""" @@ -211,16 +215,18 @@ class DataProfilingConfig: indicate corrupted monitor_version numbers.""" monitored_table_name: Optional[str] = None - """Unity Catalog table to monitor. Format: ``catalog.schema.table_name``""" + """The fully qualified name of the monitored table. Format: ``catalog.schema.table_name``.""" notification_settings: Optional[NotificationSettings] = None - """Field for specifying notification settings.""" + """Who to notify about this monitor's refreshes. Only ``on_failure`` with ``email_addresses`` is + supported here.""" profile_metrics_table_name: Optional[str] = None """Table that stores profile metrics data. Format: ``catalog.schema.table_name``.""" schedule: Optional[CronSchedule] = None - """The cron schedule.""" + """The schedule on which the monitor refreshes its metrics. Refreshes can also be triggered on + demand through the Refresh resource.""" skip_builtin_dashboard: Optional[bool] = None """Whether to skip creating a default dashboard summarizing data quality metrics.""" @@ -228,23 +234,27 @@ class DataProfilingConfig: slicing_exprs: Optional[List[str]] = None """List of column expressions to slice data with for targeted analysis. The data is grouped by each expression independently, resulting in a separate slice for each predicate and its complements. - For example ``slicing_exprs=[“col_1”, “col_2 > 10”]`` will generate the following - slices: two slices for ``col_2 > 10`` (True and False), and one slice per unique value in - ``col1``. For high-cardinality columns, only the top 100 unique values by frequency will - generate slices.""" + For example ``slicing_exprs=["col_1", "col_2 > 10"]`` will generate the following slices: two + slices for ``col_2 > 10`` (True and False), and one slice per unique value in ``col_1``. For + high-cardinality columns, only the top 100 unique values by frequency will generate slices.""" snapshot: Optional[SnapshotConfig] = None - """``Analysis Configuration`` for monitoring snapshot tables.""" + """Profiles the full contents of the table. Metrics are computed over all rows at each refresh.""" status: Optional[DataProfilingStatus] = None - """The data profiling monitor status.""" + """The status of the monitor. ``DATA_PROFILING_STATUS_PENDING`` means the monitor's assets are + being created or updated. ``DATA_PROFILING_STATUS_ACTIVE`` means the monitor is ready and can be + refreshed. ``DATA_PROFILING_STATUS_FAILED`` and ``DATA_PROFILING_STATUS_ERROR`` mean the monitor + is not operational, and ``latest_monitor_failure_message`` describes the cause when one was + recorded. ``DATA_PROFILING_STATUS_DELETE_PENDING`` means the monitor is being deleted.""" time_series: Optional[TimeSeriesConfig] = None - """``Analysis Configuration`` for monitoring time series tables.""" + """Profiles a time series table. Metrics are computed per time window, as defined by + ``timestamp_column`` and ``granularities``.""" warehouse_id: Optional[str] = None - """Optional argument to specify the warehouse for dashboard creation. If not specified, the first - running warehouse will be used.""" + """The ID of the SQL warehouse used to create the dashboard. If not specified, the first running + warehouse the caller can access is used.""" def as_dict(self) -> dict: """Serializes the DataProfilingConfig into a dictionary suitable for use as a JSON request body.""" @@ -380,10 +390,15 @@ class DataProfilingCustomMetric: ``":table"`` to indicate that the metric needs information from multiple columns.""" output_data_type: str - """The output type of the custom metric.""" + """Specifies the Spark SQL data type of the metric value, either as a plain type name or as a + JSON-encoded StructField.""" type: DataProfilingCustomMetricType - """The type of the custom metric.""" + """The type of the custom metric. ``DATA_PROFILING_CUSTOM_METRIC_TYPE_AGGREGATE`` metrics depend + only on the columns of the input table, ``DATA_PROFILING_CUSTOM_METRIC_TYPE_DERIVED`` metrics + depend only on previously computed aggregate metrics, and + ``DATA_PROFILING_CUSTOM_METRIC_TYPE_DRIFT`` metrics depend on previously computed aggregate or + derived metrics.""" def as_dict(self) -> dict: """Serializes the DataProfilingCustomMetric into a dictionary suitable for use as a JSON request body.""" @@ -450,22 +465,24 @@ class InferenceLogConfig: """Inference log configuration.""" problem_type: InferenceProblemType - """Problem type the model aims to solve.""" + """The type of problem the model solves. It determines which model quality metrics are computed.""" timestamp_column: str - """Column for the timestamp.""" + """Column containing the timestamp of each inference request. Its type must be TIMESTAMP or + convertible to a timestamp.""" granularities: List[AggregationGranularity] """List of granularities to use when aggregating data into time windows based on their timestamp.""" prediction_column: str - """Column for the prediction.""" + """Column containing the model's predicted values.""" model_id_column: str - """Column for the model identifier.""" + """Column containing the ID of the model that produced each prediction. A slice is created + automatically for each distinct model ID.""" label_column: Optional[str] = None - """Column for the label.""" + """Column containing the ground truth for the model's predictions.""" def as_dict(self) -> dict: """Serializes the InferenceLogConfig into a dictionary suitable for use as a JSON request body.""" @@ -526,8 +543,10 @@ class ListMonitorResponse: """Response for listing Monitors.""" monitors: Optional[List[Monitor]] = None + """The monitors on this page.""" next_page_token: Optional[str] = None + """Pagination token to pass as ``page_token`` to fetch the next page.""" def as_dict(self) -> dict: """Serializes the ListMonitorResponse into a dictionary suitable for use as a JSON request body.""" @@ -587,7 +606,9 @@ def from_dict(cls, d: Dict[str, Any]) -> ListRefreshResponse: @dataclass class Monitor: - """Monitor for the data quality of unity catalog entities such as schema or table.""" + """A data quality monitor on a Unity Catalog object. A ``schema`` monitor runs anomaly detection on + the tables in the schema and is configured through ``anomaly_detection_config``. A ``table`` + monitor profiles a single table and is configured through ``data_profiling_config``.""" object_type: str """The type of the monitored object. Can be one of the following: ``schema`` or ``table``.""" @@ -611,11 +632,12 @@ class Monitor: ``table`` > go to the ``Details`` tab > the ``Table ID`` field.""" anomaly_detection_config: Optional[AnomalyDetectionConfig] = None - """Anomaly Detection Configuration, applicable to ``schema`` object types.""" + """Anomaly detection settings. Required when ``object_type`` is ``schema``. When reading a + ``table`` monitor, this holds the settings of the parent schema's monitor if the schema has one.""" data_profiling_config: Optional[DataProfilingConfig] = None - """Data Profiling Configuration, applicable to ``table`` object types. Exactly one ``Analysis - Configuration`` must be present.""" + """Data profiling settings. Required when ``object_type`` is ``table``. Exactly one of + ``inference_log``, ``time_series`` or ``snapshot`` must be set.""" def as_dict(self) -> dict: """Serializes the Monitor into a dictionary suitable for use as a JSON request body.""" @@ -670,7 +692,8 @@ class NotificationDestination: email_addresses: Optional[List[str]] = None """The list of email addresses to send the notification to. A maximum of 5 email addresses is - supported.""" + supported. Only supported on table monitors, via ``data_profiling_config``; rejected on schema + monitors.""" def as_dict(self) -> dict: """Serializes the NotificationDestination into a dictionary suitable for use as a JSON request body.""" @@ -709,7 +732,8 @@ class NotificationSettings: """Settings for sending notifications on the data quality monitoring.""" on_failure: Optional[NotificationDestination] = None - """Destinations to send notifications on failure/timeout.""" + """Recipients to notify when a refresh of the monitor fails or times out. Only supported on table + monitors, via ``data_profiling_config``, and only ``email_addresses`` is accepted there.""" on_unhealthy_table: Optional[NotificationDestination] = None """Recipients to notify when anomaly detection finds unhealthy tables in the schema. Each recipient @@ -889,7 +913,8 @@ class TimeSeriesConfig: """Time series analysis configuration.""" timestamp_column: str - """Column for the timestamp.""" + """Column containing the timestamp of each row. Its type must be TIMESTAMP or convertible to a + timestamp.""" granularities: List[AggregationGranularity] """List of granularities to use when aggregating data into time windows based on their timestamp.""" @@ -1074,12 +1099,15 @@ def create_refresh(self, object_type: str, object_id: str, refresh: Refresh) -> return Refresh.from_dict(res) def delete_monitor(self, object_type: str, object_id: str): - """Delete a data quality monitor on Unity Catalog object. + """Delete a data quality monitor on a Unity Catalog object. For the ``table`` ``object_type``, the caller must have either of the following sets of permissions: - **MANAGE** and **USE_CATALOG** on the table's parent catalog. **USE_CATALOG** on the table's parent - catalog, and **MANAGE** and **USE_SCHEMA** on the table's parent schema. **USE_CATALOG** on the - table's parent catalog, **USE_SCHEMA** on the table's parent schema, and **MANAGE** on the table. + + 1. **MANAGE** and **USE_CATALOG** on the table's parent catalog. + 2. **USE_CATALOG** on the table's parent catalog, and **MANAGE** and **USE_SCHEMA** on the table's + parent schema. + 3. **USE_CATALOG** on the table's parent catalog, **USE_SCHEMA** on the table's parent schema, and + **MANAGE** on the table. Note that the metric tables and dashboard will not be deleted as part of this call; those assets must be manually cleaned up (if desired). @@ -1271,7 +1299,9 @@ def list_monitor(self, *, page_size: Optional[int] = None, page_token: Optional[ """(Unimplemented) List data quality monitors. :param page_size: int (optional) + The maximum number of monitors to return in one page. :param page_token: str (optional) + Pagination token from a previous response, used to fetch the next page. :returns: Iterator over :class:`Monitor` """ @@ -1369,7 +1399,8 @@ def list_refresh( query["page_token"] = json["next_page_token"] def update_monitor(self, object_type: str, object_id: str, monitor: Monitor, update_mask: str) -> Monitor: - """Update a data quality monitor on Unity Catalog object. + """Update a data quality monitor on a Unity Catalog object. Only the fields named in ``update_mask`` are + changed. For the ``table`` ``object_type``, the caller must have either of the following sets of permissions: @@ -1403,7 +1434,7 @@ def update_monitor(self, object_type: str, object_id: str, monitor: Monitor, upd 2. In `Catalog Explorer `__ > select the ``table`` > go to the ``Details`` tab > the ``Table ID`` field. :param monitor: :class:`Monitor` - The monitor to update. + The new values for the monitor. Only the fields named in ``update_mask`` are applied. :param update_mask: str The field mask to specify which fields to update as a comma-separated list. Example value: ``data_profiling_config.custom_metrics,data_profiling_config.schedule.quartz_cron_expression`` diff --git a/databricks/sdk/service/environments.py b/databricks/sdk/service/environments.py index 39ced537b..e2590a005 100644 --- a/databricks/sdk/service/environments.py +++ b/databricks/sdk/service/environments.py @@ -90,14 +90,21 @@ def from_dict(cls, d: Dict[str, Any]) -> DatabricksServiceExceptionWithDetailsPr class DefaultWorkspaceBaseEnvironment: """A singleton resource representing the default workspace base environment configuration. This resource contains the workspace base environments that are used as defaults for serverless - notebooks and jobs in the workspace, for both CPU and GPU compute types.""" + notebooks and jobs in the workspace, for both CPU and GPU compute types. + + When cpu_workspace_base_environment or gpu_workspace_base_environment is unset, new serverless + notebooks for that compute type use the Databricks Standard base environment: the latest stable + standard environment version provided by Databricks, with no workspace base environment applied. + The workspace settings page shows this as Standard Latest.""" cpu_workspace_base_environment: Optional[str] = None - """The default workspace base environment for CPU compute. Format: + """The default workspace base environment for CPU compute. If unset, CPU compute defaults to the + Databricks Standard base environment (Standard Latest). Format: workspace-base-environments/{workspace_base_environment}""" gpu_workspace_base_environment: Optional[str] = None - """The default workspace base environment for GPU compute. Format: + """The default workspace base environment for GPU compute. If unset, GPU compute defaults to the + Databricks Standard base environment (Standard Latest). Format: workspace-base-environments/{workspace_base_environment}""" name: Optional[str] = None @@ -603,7 +610,8 @@ def delete_workspace_base_environment(self, name: str): def get_default_workspace_base_environment(self, name: str) -> DefaultWorkspaceBaseEnvironment: """Gets the default WorkspaceBaseEnvironment configuration for the workspace. Returns the current default - base environment settings for both CPU and GPU compute. + base environment settings for both CPU and GPU compute. An unset CPU or GPU field means that compute + type uses the Databricks Standard base environment. :param name: str A static resource name of the default workspace base environment. Format: @@ -747,7 +755,9 @@ def update_default_workspace_base_environment( self, name: str, default_workspace_base_environment: DefaultWorkspaceBaseEnvironment, update_mask: FieldMask ) -> DefaultWorkspaceBaseEnvironment: """Updates the default WorkspaceBaseEnvironment configuration for the workspace. Sets the specified base - environments as the workspace defaults for CPU and/or GPU compute. + environments as the workspace defaults for CPU and/or GPU compute. Unsetting a default makes that + compute type use the Databricks Standard base environment. The Standard base environment has no + resource name, so unsetting the field is the only way to select it. :param name: str The resource name of this singleton resource. Format: default-workspace-base-environment @@ -760,7 +770,9 @@ def update_default_workspace_base_environment( To unset one or both defaults, include the field path(s) in the mask and omit them from the request body. To unset both, you must list both paths explicitly — the wildcard '*' cannot be used to - unset fields. + unset fields. Unsetting a default makes that compute type use the Databricks Standard base + environment. The Standard base environment has no resource name, so unsetting the field is the only + way to select it. :returns: :class:`DefaultWorkspaceBaseEnvironment` """ diff --git a/databricks/sdk/service/genieagents.py b/databricks/sdk/service/genieagents.py index 20324dd33..b8fc5348d 100644 --- a/databricks/sdk/service/genieagents.py +++ b/databricks/sdk/service/genieagents.py @@ -379,10 +379,10 @@ class GenieAgentDataSources: """Unity Catalog MCP connections, sorted by ``mcp_connection``.""" tables: Optional[List[GenieAgentTable]] = None - """Unity Catalog tables, views, and metric views, in the order they were added.""" + """Unity Catalog tables, views, and metric views, sorted by ``identifier``.""" volumes: Optional[List[GenieAgentVolume]] = None - """Unity Catalog volumes, in the order they were added.""" + """Unity Catalog volumes, sorted by ``path``.""" def as_dict(self) -> dict: """Serializes the GenieAgentDataSources into a dictionary suitable for use as a JSON request body.""" diff --git a/databricks/sdk/service/iam.py b/databricks/sdk/service/iam.py index 92ea12c38..71e194f21 100644 --- a/databricks/sdk/service/iam.py +++ b/databricks/sdk/service/iam.py @@ -29,15 +29,16 @@ @dataclass class AccessControlRequest: group_name: Optional[str] = None - """name of the group""" + """Display name of the group.""" permission_level: Optional[PermissionLevel] = None + """Permission level to grant to the principal.""" service_principal_name: Optional[str] = None - """application ID of a service principal""" + """Application ID of the service principal.""" user_name: Optional[str] = None - """name of the user""" + """Username of the user, which is the user's email address.""" def as_dict(self) -> dict: """Serializes the AccessControlRequest into a dictionary suitable for use as a JSON request body.""" @@ -79,19 +80,19 @@ def from_dict(cls, d: Dict[str, Any]) -> AccessControlRequest: @dataclass class AccessControlResponse: all_permissions: Optional[List[Permission]] = None - """All permissions.""" + """Permission levels the principal holds on the object, both granted directly and inherited.""" display_name: Optional[str] = None """Display name of the user or service principal.""" group_name: Optional[str] = None - """name of the group""" + """Display name of the group.""" service_principal_name: Optional[str] = None - """Name of the service principal.""" + """Application ID of the service principal.""" user_name: Optional[str] = None - """name of the user""" + """Username of the user, which is the user's email address.""" def as_dict(self) -> dict: """Serializes the AccessControlResponse into a dictionary suitable for use as a JSON request body.""" @@ -616,7 +617,7 @@ def from_dict(cls, d: Dict[str, Any]) -> GetPasswordPermissionLevelsResponse: @dataclass class GetPermissionLevelsResponse: permission_levels: Optional[List[PermissionsDescription]] = None - """Specific permission levels""" + """Permission levels that can be granted on objects of the requested type.""" def as_dict(self) -> dict: """Serializes the GetPermissionLevelsResponse into a dictionary suitable for use as a JSON request body.""" @@ -1212,11 +1213,20 @@ def from_dict(cls, d: Dict[str, Any]) -> Name: @dataclass class ObjectPermissions: + """The permissions set on an object, with one entry per principal that holds a permission on it.""" + access_control_list: Optional[List[AccessControlResponse]] = None + """Permissions on the object, with one entry per principal. Each entry lists the principal's direct + and inherited permission levels.""" object_id: Optional[str] = None + """Path that identifies the object in the access control list, built from the object type and the + object id.""" object_type: Optional[str] = None + """Type of the object, as recorded in the access control list. It can differ from the + ``request_object_type`` path segment, for example a request for ``clusters`` returns + ``cluster``.""" def as_dict(self) -> dict: """Serializes the ObjectPermissions into a dictionary suitable for use as a JSON request body.""" @@ -1535,10 +1545,15 @@ class PatchSchema(Enum): @dataclass class Permission: inherited: Optional[bool] = None + """Whether the permission is inherited from a parent object or the root object instead of being + granted directly on the object.""" inherited_from_object: Optional[List[str]] = None + """Paths of the objects the permission is inherited from. It is only set when ``inherited`` is + true.""" permission_level: Optional[PermissionLevel] = None + """Permission level the principal holds on the object.""" def as_dict(self) -> dict: """Serializes the Permission into a dictionary suitable for use as a JSON request body.""" @@ -1704,8 +1719,10 @@ def from_dict(cls, d: Dict[str, Any]) -> PermissionOutput: @dataclass class PermissionsDescription: description: Optional[str] = None + """Human-readable description of the permission level.""" permission_level: Optional[PermissionLevel] = None + """Permission level that can be granted on the object.""" def as_dict(self) -> dict: """Serializes the PermissionsDescription into a dictionary suitable for use as a JSON request body.""" @@ -3905,7 +3922,9 @@ def get(self, request_object_type: str, request_object_id: str) -> ObjectPermiss queries, registered-models, repos, serving-endpoints, supervisor-agents, vector-search-endpoints, or warehouses. :param request_object_id: str - The id of the request object. + The id of the object. It is the id that the object's own API uses, for example the cluster id for + clusters, the job id for jobs, and the workspace object id for notebooks and directories. For the + ``authorization`` object type, use ``tokens`` to manage token permissions. :returns: :class:`ObjectPermissions` """ @@ -3931,6 +3950,9 @@ def get_permission_levels(self, request_object_type: str, request_object_id: str queries, registered-models, repos, serving-endpoints, supervisor-agents, vector-search-endpoints, or warehouses. :param request_object_id: str + The id of the object. It is the id that the object's own API uses, for example the cluster id for + clusters, the job id for jobs, and the workspace object id for notebooks and directories. For the + ``authorization`` object type, use ``tokens`` to manage token permissions. :returns: :class:`GetPermissionLevelsResponse` """ @@ -3955,9 +3977,10 @@ def set( *, access_control_list: Optional[List[AccessControlRequest]] = None, ) -> ObjectPermissions: - """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 parent objects or root - object. + """Sets permissions on an object, replacing all direct permissions with the ones in the request. + Principals that are not in the request lose their direct permissions on the object, and all direct + permissions are deleted if none are specified. Objects can inherit permissions from their parent + objects or root object. :param request_object_type: str The type of the request object. Can be one of the following: alerts, alertsv2, authorization, @@ -3966,8 +3989,13 @@ def set( queries, registered-models, repos, serving-endpoints, supervisor-agents, vector-search-endpoints, or warehouses. :param request_object_id: str - The id of the request object. + The id of the object. It is the id that the object's own API uses, for example the cluster id for + clusters, the job id for jobs, and the workspace object id for notebooks and directories. For the + ``authorization`` object type, use ``tokens`` to manage token permissions. :param access_control_list: List[:class:`AccessControlRequest`] (optional) + Permissions to apply to the object, with one entry per principal. Each entry names exactly one + principal through ``user_name``, ``group_name`` or ``service_principal_name`` and the + ``permission_level`` for that principal. :returns: :class:`ObjectPermissions` """ @@ -3996,8 +4024,9 @@ def update( *, access_control_list: Optional[List[AccessControlRequest]] = None, ) -> ObjectPermissions: - """Updates the permissions on an object. Objects can inherit permissions from their parent objects or - root object. + """Updates the permissions on an object by adding or changing the permissions of the principals in the + request. Principals that are not in the request keep their existing permissions. Objects can inherit + permissions from their parent objects or root object. :param request_object_type: str The type of the request object. Can be one of the following: alerts, alertsv2, authorization, @@ -4006,8 +4035,13 @@ def update( queries, registered-models, repos, serving-endpoints, supervisor-agents, vector-search-endpoints, or warehouses. :param request_object_id: str - The id of the request object. + The id of the object. It is the id that the object's own API uses, for example the cluster id for + clusters, the job id for jobs, and the workspace object id for notebooks and directories. For the + ``authorization`` object type, use ``tokens`` to manage token permissions. :param access_control_list: List[:class:`AccessControlRequest`] (optional) + Permissions to apply to the object, with one entry per principal. Each entry names exactly one + principal through ``user_name``, ``group_name`` or ``service_principal_name`` and the + ``permission_level`` for that principal. :returns: :class:`ObjectPermissions` """ diff --git a/databricks/sdk/service/iamv2.py b/databricks/sdk/service/iamv2.py index c2ebf846e..dedde2ce6 100644 --- a/databricks/sdk/service/iamv2.py +++ b/databricks/sdk/service/iamv2.py @@ -29,7 +29,11 @@ @dataclass class DirectGroupMember: - """A user, service principal, or group that's a direct member of a group.""" + """A user, service principal, or group that's a direct member of a group. To address a membership, + put its resource name in the URL: ``GET + /api/2.0/identity/accounts/{account_id}/groups/{group_id}/direct-members/{principal_id}`` in + account APIs, or ``GET /api/2.0/identity/groups/{group_id}/direct-members/{principal_id}`` in + workspace APIs.""" principal_id: int """The Databricks ID of the member.""" @@ -161,7 +165,9 @@ class ExternalGroup: """A group from your identity provider (IdP), identified by its ID in your IdP. This resource is read-only. Getting an external group syncs its name and parent groups from your IdP, and adds it to your account if it isn't already there. If your account has group visibility filters, the - group must match them.""" + group must match them. To address an external group, put its resource name in the URL: ``GET + /api/2.0/identity/accounts/{account_id}/external-groups/{external_group_id}`` in account APIs, + or ``GET /api/2.0/identity/external-groups/{external_group_id}`` in workspace APIs.""" account_id: Optional[str] = None """The ID of the account that contains the group.""" @@ -228,7 +234,12 @@ class ExternalServicePrincipal: """A service principal from your identity provider (IdP), identified by its ID in your IdP. This resource is read-only and requires Microsoft Entra ID as your IdP. Getting an external service principal syncs its details and group memberships from your IdP, and adds it to your account if - it isn't already there.""" + it isn't already there. To address an external service principal, put its resource name in the + URL: ``GET + /api/2.0/identity/accounts/{account_id}/external-service-principals/{external_service_principal_id}`` + in account APIs, or ``GET + /api/2.0/identity/external-service-principals/{external_service_principal_id}`` in workspace + APIs.""" account_id: Optional[str] = None """The ID of the account that contains the service principal.""" @@ -312,7 +323,10 @@ def from_dict(cls, d: Dict[str, Any]) -> ExternalServicePrincipal: class ExternalUser: """A user from your identity provider (IdP), identified by their ID in your IdP. This resource is read-only. Getting an external user syncs the user's details and group memberships from your - IdP, and adds the user to your account if they aren't already there.""" + IdP, and adds the user to your account if they aren't already there. To address an external + user, put its resource name in the URL: ``GET + /api/2.0/identity/accounts/{account_id}/external-users/{external_user_id}`` in account APIs, or + ``GET /api/2.0/identity/external-users/{external_user_id}`` in workspace APIs.""" account_id: Optional[str] = None """The ID of the account that contains the user.""" @@ -434,7 +448,9 @@ def from_dict(cls, d: Dict[str, Any]) -> FullName: @dataclass class Group: - """A group in your Databricks account.""" + """A group in your Databricks account. To address a group, put its resource name in the URL: ``GET + /api/2.0/identity/accounts/{account_id}/groups/{group_id}`` in account APIs, or ``GET + /api/2.0/identity/groups/{group_id}`` in workspace APIs.""" account_id: Optional[str] = None """The ID of the account that contains the group.""" @@ -526,7 +542,10 @@ class IdentityVisibilityFilter: parent groups is already in your account. Local Databricks groups are always visible. You can only create group filters. Filters don't affect provisioning or sign-in for users and - service principals. You can't change a filter: to change a rule, delete it and create a new one.""" + service principals. You can't change a filter: to change a rule, delete it and create a new one. + + To address a filter, put its resource name in the URL: ``GET + /api/2.0/identity/accounts/{account_id}/identity-visibility-filters/{identity_visibility_filter_id}``.""" principal_type: PrincipalType """The type of principal the filter applies to. Set it to ``GROUP``. Other types aren't supported.""" @@ -1024,7 +1043,10 @@ def from_dict(cls, d: Dict[str, Any]) -> ResolveUserResponse: @dataclass class ServicePrincipal: - """A service principal in your Databricks account.""" + """A service principal in your Databricks account. To address a service principal, put its resource + name in the URL: ``GET + /api/2.0/identity/accounts/{account_id}/service-principals/{service_principal_id}`` in account + APIs, or ``GET /api/2.0/identity/service-principals/{service_principal_id}`` in workspace APIs.""" display_name: str """The service principal's display name.""" @@ -1121,7 +1143,11 @@ class State(Enum): @dataclass class TransitiveParentGroup: - """A group that a principal belongs to, either directly or through another group.""" + """A group that a principal belongs to, either directly or through another group. To list a + principal's parent groups, put the principal's resource name in the URL: ``GET + /api/2.0/identity/accounts/{account_id}/principals/{principal_id}/transitive-parent-groups`` in + account APIs, or ``GET /api/2.0/identity/principals/{principal_id}/transitive-parent-groups`` in + workspace APIs.""" account_id: Optional[str] = None """The ID of the account that contains the group.""" @@ -1178,7 +1204,9 @@ def from_dict(cls, d: Dict[str, Any]) -> TransitiveParentGroup: @dataclass class User: - """A user in your Databricks account.""" + """A user in your Databricks account. To address a user, put its resource name in the URL: ``GET + /api/2.0/identity/accounts/{account_id}/users/{user_id}`` in account APIs, or ``GET + /api/2.0/identity/users/{user_id}`` in workspace APIs.""" username: str """The user's username, which is their email address. It can't be changed after the user is @@ -1416,7 +1444,12 @@ class WorkspaceAssignment: ``entitlements`` is the only field you set. ``effective_entitlements`` also includes the entitlements the principal gets through its groups. An assignment must grant at least one - entitlement. To remove a principal's direct access, delete the assignment.""" + entitlement. To remove a principal's direct access, delete the assignment. + + To address an assignment, put its resource name in the URL: ``GET + /api/2.0/identity/accounts/{account_id}/workspaces/{workspace_id}/workspace-assignments/{principal_id}`` + in account APIs, or ``GET /api/2.0/identity/workspace-assignments/{principal_id}`` in workspace + APIs.""" principal_id: int """The Databricks ID of the assigned user, service principal, or group. It can't be changed after @@ -1602,7 +1635,8 @@ def from_dict(cls, d: Dict[str, Any]) -> WorkspaceAssignmentDetail: class WorkspaceIdentityDetail: """A user, service principal, or group's status in a workspace, and whether it has access to the workspace directly or through a group. Update it to activate or deactivate a user or service - principal in the workspace.""" + principal in the workspace. To address it, put its resource name in the URL: ``GET + /api/2.0/identity/principals/{principal_id}/workspace-identity-detail``.""" assignment_type: Optional[WorkspaceIdentityDetailAssignmentType] = None """Whether the principal is assigned to the workspace directly or has access through a group.""" diff --git a/databricks/sdk/service/jobs.py b/databricks/sdk/service/jobs.py index afef8e522..ed602a9de 100644 --- a/databricks/sdk/service/jobs.py +++ b/databricks/sdk/service/jobs.py @@ -632,7 +632,7 @@ class AiRuntimeTaskPriorityClass(Enum): """Scheduling priority class for a workload — its priority and preemptability when the scheduler ranks pending work.""" - BEST_EFFORT = "BEST_EFFORT" + HIGH = "HIGH" NORMAL = "NORMAL" @@ -4675,8 +4675,10 @@ class JobSettings: """Job-level parameter definitions""" parent_path: Optional[str] = None - """Path of the job parent folder in workspace file tree. If absent, the job doesn't have a - workspace object.""" + """Path of the job parent folder in workspace file tree. If absent, the job doesn't have a parent + folder. + + Example: /Workspace/Projects/my_project""" performance_target: Optional[PerformanceTarget] = None """The performance mode on a serverless job. This field determines the level of compute performance @@ -12087,8 +12089,10 @@ def create( :param parameters: List[:class:`JobParameterDefinition`] (optional) Job-level parameter definitions :param parent_path: str (optional) - Path of the job parent folder in workspace file tree. If absent, the job doesn't have a workspace - object. + Path of the job parent folder in workspace file tree. If absent, the job doesn't have a parent + folder. + + Example: /Workspace/Projects/my_project :param performance_target: :class:`PerformanceTarget` (optional) The performance mode on a serverless job. This field determines the level of compute performance or cost-efficiency for the run. The performance target does not apply to tasks that run on Serverless diff --git a/databricks/sdk/service/lakewatch.py b/databricks/sdk/service/lakewatch.py index 3c663b07f..a37a334c8 100644 --- a/databricks/sdk/service/lakewatch.py +++ b/databricks/sdk/service/lakewatch.py @@ -614,7 +614,9 @@ class Datasource: schedule: Schedule """Schedule on which the datasource's ingestion job runs. A datasource cannot be paused, so a request that sets ``schedule.enabled`` to ``false`` is rejected. Continuous schedules are not - supported for Unity Catalog connection datasources.""" + supported for Unity Catalog connection datasources. For an existing-table datasource, runs must + be no further apart than the shorter of the source table's + ``delta.deletedFileRetentionDuration`` and ``delta.logRetentionDuration``.""" annotations: Optional[Dict[str, str]] = None """Free-form key-value annotations on the datasource, managed by the client.""" @@ -2870,9 +2872,9 @@ class RuleView(Enum): class Schedule: """Defines when a recurring job executes. - Exactly one of the timing modes (``at_least_every``, ``cron_expression``, ``continuous``) must - be set; combining them or setting none is rejected by the server. ``compute_group`` and - ``enabled`` are orthogonal to the timing.""" + Exactly one of the timing modes (``at_least_every``, ``cron_expression``, ``continuous``, + ``file_arrival``) must be set; combining them or setting none is rejected by the server. + ``compute_group`` and ``enabled`` are orthogonal to the timing.""" at_least_every: Optional[str] = None """Duration string defining the minimum cadence. May contain components for days, hours, minutes, diff --git a/databricks/sdk/service/marketplace.py b/databricks/sdk/service/marketplace.py index bc1459c86..b1461cf10 100644 --- a/databricks/sdk/service/marketplace.py +++ b/databricks/sdk/service/marketplace.py @@ -163,12 +163,16 @@ class ContactInfo: """contact info for the consumer requesting data or performing a listing installation""" company: Optional[str] = None + """Company of the consumer contact.""" email: Optional[str] = None + """Email address of the consumer contact.""" first_name: Optional[str] = None + """First name of the consumer contact.""" last_name: Optional[str] = None + """Last name of the consumer contact.""" def as_dict(self) -> dict: """Serializes the ContactInfo into a dictionary suitable for use as a JSON request body.""" @@ -263,9 +267,10 @@ def from_dict(cls, d: Dict[str, Any]) -> CreateExchangeResponse: @dataclass class CreateFileResponse: file_info: Optional[FileInfo] = None + """Metadata of the created file.""" upload_url: Optional[str] = None - """Pre-signed POST URL to blob storage""" + """Short-lived URL for uploading the file content with an HTTP PUT request.""" def as_dict(self) -> dict: """Serializes the CreateFileResponse into a dictionary suitable for use as a JSON request body.""" @@ -294,6 +299,7 @@ def from_dict(cls, d: Dict[str, Any]) -> CreateFileResponse: @dataclass class CreateListingResponse: listing_id: Optional[str] = None + """ID of the created listing.""" def as_dict(self) -> dict: """Serializes the CreateListingResponse into a dictionary suitable for use as a JSON request body.""" @@ -342,6 +348,7 @@ def from_dict(cls, d: Dict[str, Any]) -> CreatePersonalizationRequestResponse: @dataclass class CreateProviderResponse: id: Optional[str] = None + """ID of the created provider profile.""" def as_dict(self) -> dict: """Serializes the CreateProviderResponse into a dictionary suitable for use as a JSON request body.""" @@ -378,8 +385,10 @@ class DataRefresh(Enum): @dataclass class DataRefreshInfo: interval: int + """Number of time units. Must be greater than zero.""" unit: DataRefresh + """Time unit that the interval is expressed in.""" def as_dict(self) -> dict: """Serializes the DataRefreshInfo into a dictionary suitable for use as a JSON request body.""" @@ -757,26 +766,35 @@ def from_dict(cls, d: Dict[str, Any]) -> ExchangeListing: @dataclass class FileInfo: created_at: Optional[int] = None + """Time the file was created, in epoch milliseconds.""" display_name: Optional[str] = None """Name displayed to users for applicable files, e.g. embedded notebooks""" download_link: Optional[str] = None + """Short-lived URL for downloading the file content.""" file_parent: Optional[FileParent] = None + """Provider or listing that the file belongs to.""" id: Optional[str] = None + """ID of the file.""" marketplace_file_type: Optional[MarketplaceFileType] = None + """Purpose of the file, such as a provider icon or a notebook attached to a listing.""" mime_type: Optional[str] = None + """MIME type of the file content, for example text/html for notebooks or image/png for icons.""" status: Optional[FileStatus] = None + """Processing status of the file. New files start in FILE_STATUS_STAGING and become + FILE_STATUS_PUBLISHED after Databricks has sanitized them.""" status_message: Optional[str] = None """Populated if status is in a failed state with more information on reason for the failure.""" updated_at: Optional[int] = None + """Time the file was last updated, in epoch milliseconds.""" def as_dict(self) -> dict: """Serializes the FileInfo into a dictionary suitable for use as a JSON request body.""" @@ -848,8 +866,10 @@ def from_dict(cls, d: Dict[str, Any]) -> FileInfo: @dataclass class FileParent: file_parent_type: Optional[FileParentType] = None + """Type of the parent: PROVIDER for provider icons, LISTING for notebooks attached to a listing.""" parent_id: Optional[str] = None + """ID of the provider or listing that the file belongs to.""" def as_dict(self) -> dict: """Serializes the FileParent into a dictionary suitable for use as a JSON request body.""" @@ -920,6 +940,7 @@ def from_dict(cls, d: Dict[str, Any]) -> GetExchangeResponse: @dataclass class GetFileResponse: file_info: Optional[FileInfo] = None + """Metadata of the file.""" def as_dict(self) -> dict: """Serializes the GetFileResponse into a dictionary suitable for use as a JSON request body.""" @@ -944,7 +965,7 @@ def from_dict(cls, d: Dict[str, Any]) -> GetFileResponse: @dataclass class GetLatestVersionProviderAnalyticsDashboardResponse: version: Optional[int] = None - """version here is latest logical version of the dashboard template""" + """Latest available version of the dashboard template.""" def as_dict(self) -> dict: """Serializes the GetLatestVersionProviderAnalyticsDashboardResponse into a dictionary suitable for use as a JSON request body.""" @@ -1002,6 +1023,7 @@ def from_dict(cls, d: Dict[str, Any]) -> GetListingContentMetadataResponse: @dataclass class GetListingResponse: listing: Optional[Listing] = None + """The requested listing.""" def as_dict(self) -> dict: """Serializes the GetListingResponse into a dictionary suitable for use as a JSON request body.""" @@ -1026,8 +1048,10 @@ def from_dict(cls, d: Dict[str, Any]) -> GetListingResponse: @dataclass class GetListingsResponse: listings: Optional[List[Listing]] = None + """Listings on this page.""" next_page_token: Optional[str] = None + """Token for the next page. Not set when there are no more results.""" def as_dict(self) -> dict: """Serializes the GetListingsResponse into a dictionary suitable for use as a JSON request body.""" @@ -1080,6 +1104,7 @@ def from_dict(cls, d: Dict[str, Any]) -> GetPersonalizationRequestResponse: @dataclass class GetProviderResponse: provider: Optional[ProviderInfo] = None + """The requested provider profile.""" def as_dict(self) -> dict: """Serializes the GetProviderResponse into a dictionary suitable for use as a JSON request body.""" @@ -1276,8 +1301,10 @@ def from_dict(cls, d: Dict[str, Any]) -> ListAllInstallationsResponse: @dataclass class ListAllPersonalizationRequestsResponse: next_page_token: Optional[str] = None + """Token for the next page. Not set when there are no more results.""" personalization_requests: Optional[List[PersonalizationRequest]] = None + """Personalization requests on this page.""" def as_dict(self) -> dict: """Serializes the ListAllPersonalizationRequestsResponse into a dictionary suitable for use as a JSON request body.""" @@ -1402,8 +1429,10 @@ def from_dict(cls, d: Dict[str, Any]) -> ListExchangesResponse: @dataclass class ListFilesResponse: file_infos: Optional[List[FileInfo]] = None + """Files on this page.""" next_page_token: Optional[str] = None + """Token for the next page. Not set when there are no more results.""" def as_dict(self) -> dict: """Serializes the ListFilesResponse into a dictionary suitable for use as a JSON request body.""" @@ -1561,11 +1590,14 @@ def from_dict(cls, d: Dict[str, Any]) -> ListListingsResponse: @dataclass class ListProviderAnalyticsDashboardResponse: id: str + """Marketplace-specific ID of the dashboard record. Use it as the ``id`` when updating the + dashboard.""" dashboard_id: str - """dashboard_id will be used to open Lakeview dashboard.""" + """ID of the AI/BI dashboard in the workspace. Use it to open the dashboard.""" version: Optional[int] = None + """Version of the dashboard template that the dashboard was created or last updated from.""" def as_dict(self) -> dict: """Serializes the ListProviderAnalyticsDashboardResponse into a dictionary suitable for use as a JSON request body.""" @@ -1598,8 +1630,10 @@ def from_dict(cls, d: Dict[str, Any]) -> ListProviderAnalyticsDashboardResponse: @dataclass class ListProvidersResponse: next_page_token: Optional[str] = None + """Token for the next page. Not set when there are no more results.""" providers: Optional[List[ProviderInfo]] = None + """Provider profiles on this page.""" def as_dict(self) -> dict: """Serializes the ListProvidersResponse into a dictionary suitable for use as a JSON request body.""" @@ -1629,11 +1663,19 @@ def from_dict(cls, d: Dict[str, Any]) -> ListProvidersResponse: @dataclass class Listing: + """A Marketplace listing: a data product that a provider offers to consumers. The summary holds the + listing's identity, status and sharing configuration, and the detail holds the descriptive + content that consumers see on the listing page.""" + summary: ListingSummary + """Identity, status and sharing configuration of the listing.""" detail: Optional[ListingDetail] = None + """Descriptive content shown to consumers on the listing page, such as the description, links and + data attributes.""" id: Optional[str] = None + """ID of the listing. Assigned by the server; not allowed in create requests.""" def as_dict(self) -> dict: """Serializes the Listing into a dictionary suitable for use as a JSON request body.""" @@ -1670,7 +1712,8 @@ def from_dict(cls, d: Dict[str, Any]) -> Listing: @dataclass class ListingDetail: assets: Optional[List[AssetType]] = None - """Type of assets included in the listing. eg. GIT_REPO, DATA_TABLE, MODEL, NOTEBOOK""" + """Types of assets included in the listing. At least one is required unless the listing is a DRAFT. + Duplicate values are ignored.""" collection_date_end: Optional[int] = None """The ending date timestamp for when the data spans""" @@ -1688,10 +1731,15 @@ class ListingDetail: """Where/how the data is sourced""" description: Optional[str] = None + """Detailed description of the data product. Supports basic Markdown formatting such as bold, + italics and lists.""" documentation_link: Optional[str] = None + """URL of documentation that helps consumers use the data product.""" embedded_notebook_file_infos: Optional[List[FileInfo]] = None + """Sample notebooks attached to the listing. Create each notebook with createFile, using the + EMBEDDED_NOTEBOOK file type and the listing as the parent, and reference it here.""" file_ids: Optional[List[str]] = None @@ -1699,30 +1747,29 @@ class ListingDetail: """Which geo region the listing data is collected from""" license: Optional[str] = None - """ID 20, 21 removed don't use License of the data asset - Required for listings with model based - assets""" + """License of the data asset. Required for listings with model-based assets.""" pricing_model: Optional[str] = None """What the pricing model is (e.g. paid, subscription, paid upfront); should only be present if cost is paid""" privacy_policy_link: Optional[str] = None + """URL of the privacy policy for the listing. Defaults to the provider profile's privacy policy + link when empty.""" size: Optional[float] = None """size of the dataset in GB""" support_link: Optional[str] = None + """URL where consumers can get support for the listing.""" tags: Optional[List[ListingTag]] = None - """Listing tags - Simple key value pair to annotate listings. When should I use tags vs dedicated - fields? Using tags avoids the need to add new columns in the database for new annotations. - However, this should be used sparingly since tags are stored as key value pair. Use tags only: - - 1. If the field is optional and won't need to have NOT NULL integrity check - 2. The value is fairly fixed, static and low cardinality (eg. enums). - 3. The value won't be used in filters or joins with other tables.""" + """Tags that annotate the listing with fixed, low-cardinality values, such as supported languages + or tasks.""" terms_of_service: Optional[str] = None + """URL of the terms of service for the listing. Defaults to the provider profile's terms of service + link when empty.""" update_frequency: Optional[DataRefreshInfo] = None """How often data is updated""" @@ -1896,6 +1943,8 @@ def from_dict(cls, d: Dict[str, Any]) -> ListingFulfillment: @dataclass class ListingSetting: visibility: Optional[Visibility] = None + """PUBLIC listings are visible to all consumers in the Marketplace. PRIVATE listings are visible + only to members of the private exchanges that they are shared in.""" def as_dict(self) -> dict: """Serializes the ListingSetting into a dictionary suitable for use as a JSON request body.""" @@ -1934,44 +1983,68 @@ class ListingStatus(Enum): @dataclass class ListingSummary: name: str + """Display name of the listing. Must start with a letter or digit and be at most 100 characters.""" listing_type: ListingType + """How consumers get access to the listing. STANDARD listings are instantly available; PERSONALIZED + listings require the provider to approve each consumer request. Cannot be changed after the + listing is created.""" categories: Optional[List[Category]] = None + """Categories that consumers can use to filter listings. They also appear as tags on the listing + tile and detail page.""" created_at: Optional[int] = None + """Time the listing was created, in epoch milliseconds.""" created_by: Optional[str] = None + """Name of the user who created the listing.""" created_by_id: Optional[int] = None + """ID of the user who created the listing.""" exchange_ids: Optional[List[str]] = None + """IDs of the private exchanges that the listing is shared in. A listing can be linked to at most + 10 exchanges.""" git_repo: Optional[RepoInfo] = None - """if a git repo is being created, a listing will be initialized with this field as opposed to a - share""" + """Git repository that holds the listing's assets, used instead of a share for notebook and Git + repo listings. A listing cannot have both a share and a Git repo.""" provider_id: Optional[str] = None + """ID of the provider profile that owns the listing.""" provider_region: Optional[RegionInfo] = None + """Cloud and region of the provider's Unity Catalog metastore. Not allowed in create requests.""" published_at: Optional[int] = None published_by: Optional[str] = None setting: Optional[ListingSetting] = None + """Listing settings, such as whether the listing is visible in the public Marketplace or only in + private exchanges.""" share: Optional[ShareInfo] = None + """Delta Sharing share that holds the listing's data assets. Required to publish a STANDARD + listing, except for app and MCP server listings; notebook and Git repo listings can use git_repo + instead. The caller must have access to the share.""" status: Optional[ListingStatus] = None + """Publication status of the listing. Only PUBLISHED listings are visible to consumers; create a + listing as DRAFT and set the status to PUBLISHED when it is ready.""" subtitle: Optional[str] = None + """One-line subtitle shown with the listing name.""" updated_at: Optional[int] = None + """Time the listing was last updated, in epoch milliseconds.""" updated_by: Optional[str] = None + """Name of the user who last updated the listing.""" updated_by_id: Optional[int] = None + """ID of the user who last updated the listing.""" def as_dict(self) -> dict: """Serializes the ListingSummary into a dictionary suitable for use as a JSON request body.""" @@ -2136,38 +2209,54 @@ class MarketplaceFileType(Enum): @dataclass class PersonalizationRequest: consumer_region: RegionInfo + """Cloud and region of the consumer's Unity Catalog metastore.""" comment: Optional[str] = None + """Comment that the consumer entered with the request.""" contact_info: Optional[ContactInfo] = None + """Contact details that the consumer entered with the request.""" created_at: Optional[int] = None + """Time the request was created, in epoch milliseconds.""" id: Optional[str] = None + """ID of the personalization request.""" intended_use: Optional[str] = None + """How the consumer intends to use the data product, as entered with the request.""" is_from_lighthouse: Optional[bool] = None listing_id: Optional[str] = None + """ID of the listing that the request was made for.""" listing_name: Optional[str] = None + """Name of the listing that the request was made for.""" metastore_id: Optional[str] = None + """ID of the consumer's Unity Catalog metastore.""" provider_id: Optional[str] = None + """ID of the provider profile that owns the listing.""" recipient_type: Optional[DeltaSharingRecipientType] = None + """How the consumer receives the shared data: DELTA_SHARING_RECIPIENT_TYPE_DATABRICKS for a + consumer on a Databricks workspace, DELTA_SHARING_RECIPIENT_TYPE_OPEN for a consumer on another + platform who uses a credential file.""" share: Optional[ShareInfo] = None """Share information is required for data listings but should be empty/ignored for non-data listings (MCP and App).""" status: Optional[PersonalizationRequestStatus] = None + """Current status of the request.""" status_message: Optional[str] = None + """Reason that the provider gave in the most recent status update.""" updated_at: Optional[int] = None + """Time the request was last updated, in epoch milliseconds.""" def as_dict(self) -> dict: """Serializes the PersonalizationRequest into a dictionary suitable for use as a JSON request body.""" @@ -2276,6 +2365,7 @@ class PersonalizationRequestStatus(Enum): @dataclass class ProviderAnalyticsDashboard: id: str + """Marketplace-specific ID of the dashboard record, distinct from the AI/BI dashboard ID.""" def as_dict(self) -> dict: """Serializes the ProviderAnalyticsDashboard into a dictionary suitable for use as a JSON request body.""" @@ -2300,34 +2390,53 @@ def from_dict(cls, d: Dict[str, Any]) -> ProviderAnalyticsDashboard: @dataclass class ProviderInfo: name: str + """Display name of the provider. Consumers can filter listings by provider name.""" business_contact_email: str + """Email address that Databricks uses to contact the provider. Not shown to consumers.""" term_of_service_link: str + """URL of the provider's terms of service. Shown on all of the provider's listings unless a listing + sets its own terms of service.""" privacy_policy_link: str + """URL of the provider's privacy policy. Shown on all of the provider's listings unless a listing + sets its own privacy policy.""" company_website_link: Optional[str] = None + """URL of the provider's website. Shown on all of the provider's listings.""" dark_mode_icon_file_id: Optional[str] = None + """ID of the provider icon file used in dark mode, created with createFile using the PROVIDER_ICON + file type.""" dark_mode_icon_file_path: Optional[str] = None + """URL for downloading the dark mode provider icon. Populated by the server from + dark_mode_icon_file_id.""" description: Optional[str] = None + """Description of the provider organization, shown on the provider profile and on all of its + listings.""" icon_file_id: Optional[str] = None + """ID of the provider icon file, created with createFile using the PROVIDER_ICON file type.""" icon_file_path: Optional[str] = None + """URL for downloading the provider icon. Populated by the server from icon_file_id.""" id: Optional[str] = None + """ID of the provider profile. Assigned by the server; not allowed in create or update requests.""" is_featured: Optional[bool] = None - """is_featured is accessible by consumers only""" + """Whether Databricks features the provider in the Marketplace. Set by Databricks; not allowed in + create or update requests.""" published_by: Optional[str] = None """published_by is only applicable to data aggregators (e.g. Crux)""" support_contact_email: Optional[str] = None + """Email address that consumers can use to request support. Shown on all of the provider's + listings.""" def as_dict(self) -> dict: """Serializes the ProviderInfo into a dictionary suitable for use as a JSON request body.""" @@ -2419,8 +2528,10 @@ def from_dict(cls, d: Dict[str, Any]) -> ProviderInfo: @dataclass class RegionInfo: cloud: Optional[str] = None + """Cloud provider: aws, azure or gcp.""" region: Optional[str] = None + """Cloud region, for example us-west-2.""" def as_dict(self) -> dict: """Serializes the RegionInfo into a dictionary suitable for use as a JSON request body.""" @@ -2555,6 +2666,7 @@ def from_dict(cls, d: Dict[str, Any]) -> SearchListingsResponse: @dataclass class ShareInfo: name: str + """Name of the Delta Sharing share in the provider's Unity Catalog metastore.""" type: ListingShareType @@ -2814,6 +2926,7 @@ def from_dict(cls, d: Dict[str, Any]) -> UpdateInstallationResponse: @dataclass class UpdateListingResponse: listing: Optional[Listing] = None + """The updated listing.""" def as_dict(self) -> dict: """Serializes the UpdateListingResponse into a dictionary suitable for use as a JSON request body.""" @@ -2838,6 +2951,7 @@ def from_dict(cls, d: Dict[str, Any]) -> UpdateListingResponse: @dataclass class UpdatePersonalizationRequestResponse: request: Optional[PersonalizationRequest] = None + """The updated personalization request.""" def as_dict(self) -> dict: """Serializes the UpdatePersonalizationRequestResponse into a dictionary suitable for use as a JSON request body.""" @@ -2862,12 +2976,13 @@ def from_dict(cls, d: Dict[str, Any]) -> UpdatePersonalizationRequestResponse: @dataclass class UpdateProviderAnalyticsDashboardResponse: id: str - """id & version should be the same as the request""" + """Marketplace-specific ID of the dashboard record, the same as in the request.""" dashboard_id: str - """this is newly created Lakeview dashboard for the user""" + """ID of the AI/BI dashboard that now contains the updated template.""" version: Optional[int] = None + """Version of the dashboard template that the dashboard now uses.""" def as_dict(self) -> dict: """Serializes the UpdateProviderAnalyticsDashboardResponse into a dictionary suitable for use as a JSON request body.""" @@ -2900,6 +3015,7 @@ def from_dict(cls, d: Dict[str, Any]) -> UpdateProviderAnalyticsDashboardRespons @dataclass class UpdateProviderResponse: provider: Optional[ProviderInfo] = None + """The updated provider profile.""" def as_dict(self) -> dict: """Serializes the UpdateProviderResponse into a dictionary suitable for use as a JSON request body.""" @@ -3961,12 +4077,20 @@ def create( *, display_name: Optional[str] = None, ) -> CreateFileResponse: - """Create a file. Currently, only provider icons and attached notebooks are supported. + """Creates a file and returns a short-lived URL for uploading its content with an HTTP PUT request. Only + provider icons (PROVIDER_ICON files on a PROVIDER parent) and sample notebooks (EMBEDDED_NOTEBOOK + files on a LISTING parent) are supported. :param file_parent: :class:`FileParent` + Provider profile or listing to attach the file to. :param marketplace_file_type: :class:`MarketplaceFileType` + Purpose of the file. PROVIDER_ICON requires a PROVIDER parent; EMBEDDED_NOTEBOOK requires a LISTING + parent. :param mime_type: str + MIME type of the file content: text/html for notebooks; image/png, image/jpeg or image/svg+xml for + icons. :param display_name: str (optional) + Name shown to consumers for the file, for example a notebook title. At most 255 characters. :returns: :class:`CreateFileResponse` """ @@ -3993,9 +4117,10 @@ def create( return CreateFileResponse.from_dict(res) def delete(self, file_id: str): - """Delete a file + """Deletes a file. Fails if the file is still in use. :param file_id: str + ID of the file to delete. """ @@ -4011,9 +4136,10 @@ def delete(self, file_id: str): self._api.do("DELETE", f"/api/2.0/marketplace-provider/files/{file_id}", headers=headers) def get(self, file_id: str) -> GetFileResponse: - """Get a file + """Gets a file's metadata, including a short-lived download URL. :param file_id: str + ID of the file. :returns: :class:`GetFileResponse` """ @@ -4032,11 +4158,14 @@ def get(self, file_id: str) -> GetFileResponse: def list( self, file_parent: FileParent, *, page_size: Optional[int] = None, page_token: Optional[str] = None ) -> Iterator[FileInfo]: - """List files attached to a parent entity. + """Lists the files attached to a provider profile or a listing. :param file_parent: :class:`FileParent` + Provider profile or listing whose files to list. :param page_size: int (optional) + Maximum number of results to return per page. :param page_token: str (optional) + Token from the next_page_token field of a previous response. Omit to get the first page. :returns: Iterator over :class:`FileInfo` """ @@ -4074,9 +4203,12 @@ def __init__(self, api_client): self._api = api_client def create(self, listing: Listing) -> CreateListingResponse: - """Create a new listing + """Creates a listing under one of the caller's provider profiles. The listing name, provider ID and + visibility are required, and the caller must have access to any share that the listing references. + Returns the ID of the new listing. :param listing: :class:`Listing` + Listing to create. :returns: :class:`CreateListingResponse` """ @@ -4097,9 +4229,11 @@ def create(self, listing: Listing) -> CreateListingResponse: return CreateListingResponse.from_dict(res) def delete(self, id: str): - """Delete a listing + """Deletes a listing permanently. The underlying share is not deleted, and consumers who already have + access to the share keep that access until it is revoked in Delta Sharing. :param id: str + ID of the listing to delete. """ @@ -4115,7 +4249,7 @@ def delete(self, id: str): self._api.do("DELETE", f"/api/2.0/marketplace-provider/listings/{id}", headers=headers) def get(self, id: str) -> GetListingResponse: - """Get a listing + """Gets a listing owned by one of the caller's provider profiles. :param id: str @@ -4134,10 +4268,12 @@ def get(self, id: str) -> GetListingResponse: return GetListingResponse.from_dict(res) def list(self, *, page_size: Optional[int] = None, page_token: Optional[str] = None) -> Iterator[Listing]: - """List listings owned by this provider + """Lists the listings owned by the provider profiles in the caller's account. :param page_size: int (optional) + Maximum number of results to return per page. :param page_token: str (optional) + Token from the next_page_token field of a previous response. Omit to get the first page. :returns: Iterator over :class:`Listing` """ @@ -4165,10 +4301,13 @@ def list(self, *, page_size: Optional[int] = None, page_token: Optional[str] = N query["page_token"] = json["next_page_token"] def update(self, id: str, listing: Listing) -> UpdateListingResponse: - """Update a listing + """Updates a listing. Send the full listing definition; the listing type cannot be changed after the + listing is created, and changing the share re-links the listing to the new share. :param id: str + ID of the listing to update. :param listing: :class:`Listing` + Full definition of the listing, including the fields that are not changing. :returns: :class:`UpdateListingResponse` """ @@ -4241,13 +4380,22 @@ def update( reason: Optional[str] = None, share: Optional[ShareInfo] = None, ) -> UpdatePersonalizationRequestResponse: - """Update personalization request. This method only permits updating the status of the request. + """Updates the status of a personalization request; other properties of the request cannot be changed. + Fulfilling a request grants the consumer access to the share, and denying a fulfilled request revokes + that access. The listing must be published. :param listing_id: str + ID of the listing that the request was made for. :param request_id: str + ID of the personalization request. :param status: :class:`PersonalizationRequestStatus` + New status of the request. Allowed transitions: NEW or REQUEST_PENDING to REQUEST_PENDING, FULFILLED + or DENIED; FULFILLED to DENIED; DENIED to REQUEST_PENDING. :param reason: str (optional) + Message for the consumer that explains the status change, at most 255 characters. :param share: :class:`ShareInfo` (optional) + Share to grant the consumer access to. Required when fulfilling a request for a listing with data + assets and not allowed with other statuses. Ignored for app and MCP server listings. :returns: :class:`UpdatePersonalizationRequestResponse` """ @@ -4284,8 +4432,9 @@ def __init__(self, api_client): self._api = api_client def create(self) -> ProviderAnalyticsDashboard: - """Create provider analytics dashboard. Returns Marketplace specific ``id``. Not to be confused with the - Lakeview dashboard id. + """Creates the Provider Analytics Dashboard in the caller's workspace from the latest template. Fails if + the dashboard already exists. Returns the Marketplace-specific ``id`` of the dashboard record, which + is distinct from the AI/BI dashboard ID. :returns: :class:`ProviderAnalyticsDashboard` @@ -4305,7 +4454,8 @@ def create(self) -> ProviderAnalyticsDashboard: return ProviderAnalyticsDashboard.from_dict(res) def get(self) -> ListProviderAnalyticsDashboardResponse: - """Get provider analytics dashboard. + """Gets the Provider Analytics Dashboard that was created for the caller's account. Returns an empty + response if the dashboard has not been created yet. :returns: :class:`ListProviderAnalyticsDashboardResponse` @@ -4323,7 +4473,7 @@ def get(self) -> ListProviderAnalyticsDashboardResponse: return ListProviderAnalyticsDashboardResponse.from_dict(res) def get_latest_version(self) -> GetLatestVersionProviderAnalyticsDashboardResponse: - """Get latest version of provider analytics dashboard. + """Gets the latest available version of the Provider Analytics Dashboard template. :returns: :class:`GetLatestVersionProviderAnalyticsDashboardResponse` @@ -4341,13 +4491,15 @@ def get_latest_version(self) -> GetLatestVersionProviderAnalyticsDashboardRespon return GetLatestVersionProviderAnalyticsDashboardResponse.from_dict(res) def update(self, id: str, *, version: Optional[int] = None) -> UpdateProviderAnalyticsDashboardResponse: - """Update provider analytics dashboard. + """Updates the Provider Analytics Dashboard to a newer version of the template. The requested version + must be newer than the version that the dashboard currently uses. :param id: str - id is immutable property and can't be updated. + Marketplace-specific ID of the dashboard record, as returned when the dashboard was created or + retrieved. :param version: int (optional) - this is the version of the dashboard template we want to update our user to current expectation is - that it should be equal to latest version of the dashboard template + Version of the dashboard template to update to. Must be newer than the version that the dashboard + currently uses; use the version returned by getLatestVersionProviderAnalyticsDashboard. :returns: :class:`UpdateProviderAnalyticsDashboardResponse` """ @@ -4375,9 +4527,10 @@ def __init__(self, api_client): self._api = api_client def create(self, provider: ProviderInfo) -> CreateProviderResponse: - """Create a provider + """Creates a provider profile in the caller's account. Returns the ID of the new profile. :param provider: :class:`ProviderInfo` + Provider profile to create. :returns: :class:`CreateProviderResponse` """ @@ -4398,9 +4551,10 @@ def create(self, provider: ProviderInfo) -> CreateProviderResponse: return CreateProviderResponse.from_dict(res) def delete(self, id: str): - """Delete provider + """Deletes a provider profile and all of the listings that it owns. :param id: str + ID of the provider profile to delete. """ @@ -4416,7 +4570,7 @@ def delete(self, id: str): self._api.do("DELETE", f"/api/2.0/marketplace-provider/providers/{id}", headers=headers) def get(self, id: str) -> GetProviderResponse: - """Get provider profile + """Gets a provider profile by ID. :param id: str @@ -4435,10 +4589,12 @@ def get(self, id: str) -> GetProviderResponse: return GetProviderResponse.from_dict(res) def list(self, *, page_size: Optional[int] = None, page_token: Optional[str] = None) -> Iterator[ProviderInfo]: - """List provider profiles for account. + """Lists the provider profiles in the caller's account. :param page_size: int (optional) + Maximum number of results to return per page. :param page_token: str (optional) + Token from the next_page_token field of a previous response. Omit to get the first page. :returns: Iterator over :class:`ProviderInfo` """ @@ -4466,10 +4622,12 @@ def list(self, *, page_size: Optional[int] = None, page_token: Optional[str] = N query["page_token"] = json["next_page_token"] def update(self, id: str, provider: ProviderInfo) -> UpdateProviderResponse: - """Update provider profile + """Updates a provider profile. Send the full profile definition. :param id: str + ID of the provider profile to update. :param provider: :class:`ProviderInfo` + Full definition of the provider profile, including the fields that are not changing. :returns: :class:`UpdateProviderResponse` """ diff --git a/databricks/sdk/service/oauth2.py b/databricks/sdk/service/oauth2.py index 3da3e550a..6b0264d18 100644 --- a/databricks/sdk/service/oauth2.py +++ b/databricks/sdk/service/oauth2.py @@ -70,7 +70,7 @@ def from_dict(cls, d: Dict[str, Any]) -> CreateCustomAppIntegrationOutput: @dataclass class CreatePublishedAppIntegrationOutput: integration_id: Optional[str] = None - """Unique integration id for the published OAuth app""" + """ID of the published OAuth app integration.""" def as_dict(self) -> dict: """Serializes the CreatePublishedAppIntegrationOutput into a dictionary suitable for use as a JSON request body.""" @@ -449,21 +449,29 @@ def from_dict(cls, d: Dict[str, Any]) -> GetCustomAppIntegrationsOutput: @dataclass class GetPublishedAppIntegrationOutput: + """A published OAuth app integration enables an OAuth app published by Databricks, such as Power BI + or Tableau Desktop, for the account. Databricks manages the app's client ID, redirect URLs and + scopes; the integration only sets the lifetimes of the tokens issued to the app. To register + your own application, use a custom OAuth app integration instead. See + https://docs.databricks.com/aws/en/integrations/enable-disable-oauth.""" + app_id: Optional[str] = None - """App-id of the published app integration""" + """ID of the published OAuth app, as returned in app_id by the list of published OAuth apps.""" create_time: Optional[str] = None + """Time the integration was created, as an ISO 8601 timestamp.""" created_by: Optional[int] = None + """ID of the user who created the integration.""" integration_id: Optional[str] = None - """Unique integration id for the published OAuth app""" + """ID of the published OAuth app integration in the account.""" name: Optional[str] = None - """Display name of the published OAuth app""" + """Display name of the published OAuth app.""" token_access_policy: Optional[TokenAccessPolicy] = None - """Token access policy""" + """Lifetimes of the access and refresh tokens issued to the app.""" def as_dict(self) -> dict: """Serializes the GetPublishedAppIntegrationOutput into a dictionary suitable for use as a JSON request body.""" @@ -518,6 +526,7 @@ class GetPublishedAppIntegrationsOutput: """List of Published OAuth App Integrations defined for the account.""" next_page_token: Optional[str] = None + """Token for the next page of results. If not present, there are no more results to show.""" def as_dict(self) -> dict: """Serializes the GetPublishedAppIntegrationsOutput into a dictionary suitable for use as a JSON request body.""" @@ -732,7 +741,7 @@ class PublishedAppOutput: """Unique ID of the published OAuth app.""" client_id: Optional[str] = None - """Client ID of the published OAuth app. It is the client_id in the OAuth flow""" + """Client ID of the published OAuth app. The app sends it as client_id in the OAuth flow.""" description: Optional[str] = None """Description of the published OAuth app.""" @@ -1432,9 +1441,12 @@ def create( `__. :param app_id: str (optional) - App id of the OAuth published app integration. For example power-bi, tableau-deskop + ID of the published OAuth app to enable, as returned in app_id by the list of published OAuth apps. + The short legacy IDs of the original published apps, such as power-bi and tableau-desktop, are also + accepted. The request fails if the app is already enabled for the account. :param token_access_policy: :class:`TokenAccessPolicy` (optional) - Token access policy + Lifetimes of the tokens issued to the app. If omitted, the app's default token lifetimes apply. If + set, both TTL fields are required. :returns: :class:`CreatePublishedAppIntegrationOutput` """ @@ -1458,11 +1470,12 @@ def create( return CreatePublishedAppIntegrationOutput.from_dict(res) def delete(self, integration_id: str): - """Delete an existing Published OAuth App Integration. You can retrieve the published OAuth app - integration via `PublishedAppIntegration/get - `__. + """Delete an existing Published OAuth App Integration. The app can no longer be used to sign in to the + account until it is enabled again with `PublishedAppIntegration/create + `__. :param integration_id: str + ID of the published OAuth app integration to delete. """ @@ -1481,6 +1494,7 @@ def get(self, integration_id: str) -> GetPublishedAppIntegrationOutput: """Gets the Published OAuth App Integration for the given integration id. :param integration_id: str + ID of the published OAuth app integration. :returns: :class:`GetPublishedAppIntegrationOutput` """ @@ -1499,10 +1513,12 @@ def get(self, integration_id: str) -> GetPublishedAppIntegrationOutput: def list( self, *, page_size: Optional[int] = None, page_token: Optional[str] = None ) -> Iterator[GetPublishedAppIntegrationOutput]: - """Get the list of published OAuth app integrations for the specified Databricks account + """Get the list of published OAuth app integrations for the specified Databricks account. :param page_size: int (optional) + Maximum number of integrations to return in one page, at most 1000. :param page_token: str (optional) + Token from the next_page_token field of a previous response. Omit it to request the first page. :returns: Iterator over :class:`GetPublishedAppIntegrationOutput` """ @@ -1536,8 +1552,11 @@ def update(self, integration_id: str, *, token_access_policy: Optional[TokenAcce `__. :param integration_id: str + ID of the published OAuth app integration to update. :param token_access_policy: :class:`TokenAccessPolicy` (optional) - Token access policy to be updated in the published OAuth app integration + New token lifetimes for the app. Both TTL fields are required when the policy is set; the single-use + refresh token settings keep their current values when omitted. If the policy is omitted, the + integration is left unchanged. """ diff --git a/databricks/sdk/service/pipelines.py b/databricks/sdk/service/pipelines.py index 5fa980365..b625dbb9d 100644 --- a/databricks/sdk/service/pipelines.py +++ b/databricks/sdk/service/pipelines.py @@ -3813,7 +3813,9 @@ class PipelineSpec: parent_path: Optional[str] = None """Path of the pipeline parent folder in workspace file tree. - If absent, the pipeline doesn't have a workspace object.""" + If absent, the pipeline doesn't have a parent folder. + + Example: /Workspace/Projects/my_project""" photon: Optional[bool] = None """Whether Photon is enabled for this pipeline.""" @@ -6364,7 +6366,9 @@ def clone( :param parent_path: str (optional) Path of the pipeline parent folder in workspace file tree. - If absent, the pipeline doesn't have a workspace object. + If absent, the pipeline doesn't have a parent folder. + + Example: /Workspace/Projects/my_project :param photon: bool (optional) Whether Photon is enabled for this pipeline. :param restart_window: :class:`RestartWindow` (optional) @@ -6526,6 +6530,10 @@ def create( :param allow_duplicate_names: bool (optional) If false, deployment will fail if name conflicts with that of another pipeline. + + Ignored when ``parent_path`` is set. A pipeline in a workspace folder must have a name that is + unique within that folder, and creation fails if the folder already contains an object with the same + name. :param budget_policy_id: str (optional) ID (UUID) of the serverless budget policy applied to this pipeline. Only supported for serverless pipelines. @@ -6585,7 +6593,9 @@ def create( :param parent_path: str (optional) Path of the pipeline parent folder in workspace file tree. - If absent, the pipeline doesn't have a workspace object. + If absent, the pipeline doesn't have a parent folder. + + Example: /Workspace/Projects/my_project :param photon: bool (optional) Whether Photon is enabled for this pipeline. :param restart_window: :class:`RestartWindow` (optional) @@ -7195,7 +7205,10 @@ def update( :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. + If false, deployment will fail if name has changed and conflicts with the name of another pipeline. + + Ignored when the pipeline is in a workspace folder or the request sets ``parent_path``. Renaming or + moving such a pipeline fails if the target folder already contains an object with the same name. :param budget_policy_id: str (optional) ID (UUID) of the serverless budget policy applied to this pipeline. Only supported for serverless pipelines. @@ -7255,7 +7268,9 @@ def update( :param parent_path: str (optional) Path of the pipeline parent folder in workspace file tree. - If absent, the pipeline doesn't have a workspace object. + If absent, the pipeline doesn't have a parent folder. + + Example: /Workspace/Projects/my_project :param photon: bool (optional) Whether Photon is enabled for this pipeline. :param restart_window: :class:`RestartWindow` (optional) diff --git a/databricks/sdk/service/postgres.py b/databricks/sdk/service/postgres.py index 65dbdea65..ccb4c746a 100644 --- a/databricks/sdk/service/postgres.py +++ b/databricks/sdk/service/postgres.py @@ -3758,6 +3758,7 @@ class Role: """Role represents a Postgres role within a Branch.""" create_time: Optional[Timestamp] = None + """A timestamp indicating when the role was created.""" name: Optional[str] = None """Output only. The full resource path of the role. Format: @@ -3781,6 +3782,7 @@ class Role: attributes.""" update_time: Optional[Timestamp] = None + """A timestamp indicating when the role was last updated.""" def as_dict(self) -> dict: """Serializes the Role into a dictionary suitable for use as a JSON request body.""" @@ -3842,10 +3844,13 @@ class RoleAttributes: underscores between words.""" bypassrls: Optional[bool] = None + """Whether the role bypasses every row-level security policy (the Postgres BYPASSRLS attribute).""" createdb: Optional[bool] = None + """Whether the role can create databases (the Postgres CREATEDB attribute).""" createrole: Optional[bool] = None + """Whether the role can create, alter and drop other roles (the Postgres CREATEROLE attribute).""" def as_dict(self) -> dict: """Serializes the RoleAttributes into a dictionary suitable for use as a JSON request body.""" @@ -3921,7 +3926,7 @@ def from_dict(cls, d: Dict[str, Any]) -> RoleOperationMetadata: @dataclass class RoleRoleSpec: attributes: Optional[RoleAttributes] = None - """The desired API-exposed Postgres role attribute to associate with the role. Optional.""" + """The Postgres role attributes to grant to the role.""" auth_method: Optional[RoleAuthMethod] = None """Controls how the Postgres role authenticates when a client opens a database connection. @@ -3947,7 +3952,9 @@ class RoleRoleSpec: This value cannot be changed after creation.""" identity_type: Optional[RoleIdentityType] = None - """The type of role. When specifying a managed-identity, the chosen postgres_role must be a valid: + """The type of Databricks identity that backs the role. Leave unset to create a native Postgres + role that is not associated with a Databricks identity. When specifying a managed-identity, the + chosen postgres_role must be a valid: - application ID for SERVICE_PRINCIPAL - user email for USER @@ -4022,15 +4029,16 @@ def from_dict(cls, d: Dict[str, Any]) -> RoleRoleSpec: @dataclass class RoleRoleStatus: attributes: Optional[RoleAttributes] = None - """The PG role attributes associated with the role.""" + """The Postgres role attributes currently granted to the role.""" auth_method: Optional[RoleAuthMethod] = None + """How the role authenticates when it connects to Postgres.""" identity_type: Optional[RoleIdentityType] = None - """The type of the role.""" + """The type of Databricks identity that backs the role, if any.""" membership_roles: Optional[List[RoleMembershipRole]] = None - """An enum value for a standard role that this role is a member of.""" + """The standard roles that the role is currently a member of.""" postgres_role: Optional[str] = None """The name of the Postgres role.""" @@ -5493,8 +5501,8 @@ def create_role( The ID used to identify and manage the Role resource through the API. The Postgres role name is specified in ``spec.postgres_role``. - This value should be 4-63 characters, and valid characters are lowercase letters, numbers, and - hyphens, as defined by RFC 1123. + This value should be 3-63 characters, start with a lowercase letter, end with a lowercase letter or + digit, and contain only lowercase letters, digits, and hyphens. If role_id is not specified in the request, it is generated automatically. @@ -5801,7 +5809,8 @@ def delete_role(self, name: str, *, reassign_owned_to: Optional[str] = None) -> projects/{project_id}/branches/{branch_id}/roles/{role_id} :param reassign_owned_to: str (optional) Reassign objects. If this is set, all objects owned by the role are reassigned to the role specified - in this parameter. + in this parameter. The role must already exist. Format: + projects/{project_id}/branches/{branch_id}/roles/{role_id} NOTE: setting this requires spinning up a compute to succeed, since it involves running SQL queries. diff --git a/databricks/sdk/service/settings.py b/databricks/sdk/service/settings.py index c9a1bef2a..baf7af3b7 100644 --- a/databricks/sdk/service/settings.py +++ b/databricks/sdk/service/settings.py @@ -145,6 +145,9 @@ def from_dict(cls, d: Dict[str, Any]) -> AccountNetworkPolicy: @dataclass class AibiDashboardEmbeddingAccessPolicy: access_policy_type: AibiDashboardEmbeddingAccessPolicyAccessPolicyType + """Where AI/BI dashboards can be embedded: in any domain (ALLOW_ALL_DOMAINS), only in the approved + domains configured for the workspace (ALLOW_APPROVED_DOMAINS), or nowhere (DENY_ALL_DOMAINS). + Defaults to ALLOW_APPROVED_DOMAINS.""" def as_dict(self) -> dict: """Serializes the AibiDashboardEmbeddingAccessPolicy into a dictionary suitable for use as a JSON request body.""" @@ -229,6 +232,9 @@ def from_dict(cls, d: Dict[str, Any]) -> AibiDashboardEmbeddingAccessPolicySetti @dataclass class AibiDashboardEmbeddingApprovedDomains: approved_domains: Optional[List[str]] = None + """Domains allowed to host embedded AI/BI dashboards. A leading wildcard allows every subdomain of + a domain. The list applies, and can only be changed, while the embedding access policy is + ALLOW_APPROVED_DOMAINS.""" def as_dict(self) -> dict: """Serializes the AibiDashboardEmbeddingApprovedDomains into a dictionary suitable for use as a JSON request body.""" @@ -381,14 +387,25 @@ def from_dict(cls, d: Dict[str, Any]) -> BooleanMessage: @dataclass class ClusterAutoRestartMessage: can_toggle: Optional[bool] = None + """Whether the workspace can change the enabled state. Databricks computes this value: it is false + when the compliance security profile forces the feature on or when the workspace lacks the + Enhanced Security and Compliance entitlement. A value sent in an update request has no effect.""" enabled: Optional[bool] = None + """Whether automatic cluster update is enabled for the workspace. The effective value is always + true while the compliance security profile is enabled on the workspace.""" enablement_details: Optional[ClusterAutoRestartMessageEnablementDetails] = None + """Why the feature is forced on or unavailable. Databricks sets these details for information only; + they do not determine whether the feature is enabled.""" maintenance_window: Optional[ClusterAutoRestartMessageMaintenanceWindow] = None + """When the maintenance window runs. When unset, it defaults to the first Sunday of every month at + 01:00 UTC.""" restart_even_if_no_updates_available: Optional[bool] = None + """Whether compute resources restart during every maintenance window even when no update is + available. When false, they restart only when an update is available.""" def as_dict(self) -> dict: """Serializes the ClusterAutoRestartMessage into a dictionary suitable for use as a JSON request body.""" @@ -444,8 +461,8 @@ class ClusterAutoRestartMessageEnablementDetails: """The feature is force enabled if compliance mode is active""" unavailable_for_disabled_entitlement: Optional[bool] = None - """The feature is unavailable if the corresponding entitlement disabled (see - getShieldEntitlementEnable)""" + """The feature is unavailable because the workspace does not have the Enhanced Security and + Compliance entitlement.""" unavailable_for_non_enterprise_tier: Optional[bool] = None """The feature is unavailable if the customer doesn't have enterprise tier""" @@ -485,6 +502,7 @@ def from_dict(cls, d: Dict[str, Any]) -> ClusterAutoRestartMessageEnablementDeta @dataclass class ClusterAutoRestartMessageMaintenanceWindow: week_day_based_schedule: Optional[ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule] = None + """Schedule anchored to a day of the week, either every week or on given weeks of the month.""" def as_dict(self) -> dict: """Serializes the ClusterAutoRestartMessageMaintenanceWindow into a dictionary suitable for use as a JSON request body.""" @@ -523,10 +541,14 @@ class ClusterAutoRestartMessageMaintenanceWindowDayOfWeek(Enum): @dataclass class ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule: day_of_week: Optional[ClusterAutoRestartMessageMaintenanceWindowDayOfWeek] = None + """Day of the week on which the maintenance window starts.""" frequency: Optional[ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequency] = None + """How often the maintenance window occurs: every week, or only on the listed occurrences of the + day of the week within each month.""" window_start_time: Optional[ClusterAutoRestartMessageMaintenanceWindowWindowStartTime] = None + """Time of day, in UTC, at which the maintenance window starts.""" def as_dict(self) -> dict: """Serializes the ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule into a dictionary suitable for use as a JSON request body.""" @@ -575,8 +597,10 @@ class ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequency(Enum): @dataclass class ClusterAutoRestartMessageMaintenanceWindowWindowStartTime: hours: Optional[int] = None + """Hour of the day on a 24-hour clock.""" minutes: Optional[int] = None + """Minute of the hour.""" def as_dict(self) -> dict: """Serializes the ClusterAutoRestartMessageMaintenanceWindowWindowStartTime into a dictionary suitable for use as a JSON request body.""" @@ -5956,6 +5980,13 @@ def from_dict(cls, d: Dict[str, Any]) -> PublicTokenInfo: @dataclass class RestrictWorkspaceAdminsMessage: status: RestrictWorkspaceAdminsMessageStatus + """Controls what workspace admins can do with service principal tokens and job identities. With + ALLOW_ALL, workspace admins can create personal access tokens on behalf of any service principal + in the workspace, change a job owner to any workspace user, and set a job's run_as identity to + any workspace user or to a service principal they have the Service Principal User role on. With + RESTRICT_TOKENS_AND_JOB_RUN_AS, they can only create tokens for service principals they have the + Service Principal User role on, change a job owner to themselves, and set run_as to themselves + or to a service principal they have that role on.""" disable_gov_tag_creation: Optional[bool] = None """When true, workspace admins cannot create governance tags. ALLOW_ALL status does not override diff --git a/databricks/sdk/service/settingsv2.py b/databricks/sdk/service/settingsv2.py index c146cf19d..9771beb01 100644 --- a/databricks/sdk/service/settingsv2.py +++ b/databricks/sdk/service/settingsv2.py @@ -27,6 +27,9 @@ @dataclass class AibiDashboardEmbeddingAccessPolicy: access_policy_type: AibiDashboardEmbeddingAccessPolicyAccessPolicyType + """Where AI/BI dashboards can be embedded: in any domain (ALLOW_ALL_DOMAINS), only in the approved + domains configured for the workspace (ALLOW_APPROVED_DOMAINS), or nowhere (DENY_ALL_DOMAINS). + Defaults to ALLOW_APPROVED_DOMAINS.""" def as_dict(self) -> dict: """Serializes the AibiDashboardEmbeddingAccessPolicy into a dictionary suitable for use as a JSON request body.""" @@ -59,6 +62,9 @@ class AibiDashboardEmbeddingAccessPolicyAccessPolicyType(Enum): @dataclass class AibiDashboardEmbeddingApprovedDomains: approved_domains: Optional[List[str]] = None + """Domains allowed to host embedded AI/BI dashboards. A leading wildcard allows every subdomain of + a domain. The list applies, and can only be changed, while the embedding access policy is + ALLOW_APPROVED_DOMAINS.""" def as_dict(self) -> dict: """Serializes the AibiDashboardEmbeddingApprovedDomains into a dictionary suitable for use as a JSON request body.""" @@ -83,6 +89,9 @@ def from_dict(cls, d: Dict[str, Any]) -> AibiDashboardEmbeddingApprovedDomains: @dataclass class AllowedAppsUserApiScopesMessage: allowed_scopes: Optional[List[str]] = None + """OAuth scopes that app developers can request when an app acts on behalf of a user. A list with + the single entry * allows every supported scope and cannot be combined with other scopes. An + empty list disables user authorization for apps.""" def as_dict(self) -> dict: """Serializes the AllowedAppsUserApiScopesMessage into a dictionary suitable for use as a JSON request body.""" @@ -131,14 +140,25 @@ def from_dict(cls, d: Dict[str, Any]) -> BooleanMessage: @dataclass class ClusterAutoRestartMessage: can_toggle: Optional[bool] = None + """Whether the workspace can change the enabled state. Databricks computes this value: it is false + when the compliance security profile forces the feature on or when the workspace lacks the + Enhanced Security and Compliance entitlement. A value sent in an update request has no effect.""" enabled: Optional[bool] = None + """Whether automatic cluster update is enabled for the workspace. The effective value is always + true while the compliance security profile is enabled on the workspace.""" enablement_details: Optional[ClusterAutoRestartMessageEnablementDetails] = None + """Why the feature is forced on or unavailable. Databricks sets these details for information only; + they do not determine whether the feature is enabled.""" maintenance_window: Optional[ClusterAutoRestartMessageMaintenanceWindow] = None + """When the maintenance window runs. When unset, it defaults to the first Sunday of every month at + 01:00 UTC.""" restart_even_if_no_updates_available: Optional[bool] = None + """Whether compute resources restart during every maintenance window even when no update is + available. When false, they restart only when an update is available.""" def as_dict(self) -> dict: """Serializes the ClusterAutoRestartMessage into a dictionary suitable for use as a JSON request body.""" @@ -194,8 +214,8 @@ class ClusterAutoRestartMessageEnablementDetails: """The feature is force enabled if compliance mode is active""" unavailable_for_disabled_entitlement: Optional[bool] = None - """The feature is unavailable if the corresponding entitlement disabled (see - getShieldEntitlementEnable)""" + """The feature is unavailable because the workspace does not have the Enhanced Security and + Compliance entitlement.""" unavailable_for_non_enterprise_tier: Optional[bool] = None """The feature is unavailable if the customer doesn't have enterprise tier""" @@ -235,6 +255,7 @@ def from_dict(cls, d: Dict[str, Any]) -> ClusterAutoRestartMessageEnablementDeta @dataclass class ClusterAutoRestartMessageMaintenanceWindow: week_day_based_schedule: Optional[ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule] = None + """Schedule anchored to a day of the week, either every week or on given weeks of the month.""" def as_dict(self) -> dict: """Serializes the ClusterAutoRestartMessageMaintenanceWindow into a dictionary suitable for use as a JSON request body.""" @@ -273,10 +294,14 @@ class ClusterAutoRestartMessageMaintenanceWindowDayOfWeek(Enum): @dataclass class ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule: day_of_week: Optional[ClusterAutoRestartMessageMaintenanceWindowDayOfWeek] = None + """Day of the week on which the maintenance window starts.""" frequency: Optional[ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequency] = None + """How often the maintenance window occurs: every week, or only on the listed occurrences of the + day of the week within each month.""" window_start_time: Optional[ClusterAutoRestartMessageMaintenanceWindowWindowStartTime] = None + """Time of day, in UTC, at which the maintenance window starts.""" def as_dict(self) -> dict: """Serializes the ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule into a dictionary suitable for use as a JSON request body.""" @@ -325,8 +350,10 @@ class ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequency(Enum): @dataclass class ClusterAutoRestartMessageMaintenanceWindowWindowStartTime: hours: Optional[int] = None + """Hour of the day on a 24-hour clock.""" minutes: Optional[int] = None + """Minute of the hour.""" def as_dict(self) -> dict: """Serializes the ClusterAutoRestartMessageMaintenanceWindowWindowStartTime into a dictionary suitable for use as a JSON request body.""" @@ -1298,6 +1325,9 @@ def from_dict(cls, d: Dict[str, Any]) -> ListWorkspaceSettingsMetadataResponse: @dataclass class OperationalEmailCustomRecipientMessage: email: Optional[str] = None + """Email address that receives this workspace's operational emails in addition to the workspace + admins. Use a distribution list address to reach several people. An empty string clears the + additional recipient.""" def as_dict(self) -> dict: """Serializes the OperationalEmailCustomRecipientMessage into a dictionary suitable for use as a JSON request body.""" @@ -1322,6 +1352,9 @@ def from_dict(cls, d: Dict[str, Any]) -> OperationalEmailCustomRecipientMessage: @dataclass class PersonalComputeMessage: value: Optional[PersonalComputeMessagePersonalComputeMessageEnum] = None + """ON grants all users in all workspaces of the account access to the Personal Compute default + policy. DELEGATE moves control to each workspace, where users or groups must be added to the + policy's permissions before they can create compute with it.""" def as_dict(self) -> dict: """Serializes the PersonalComputeMessage into a dictionary suitable for use as a JSON request body.""" @@ -1370,6 +1403,13 @@ class PreviewPhase(Enum): @dataclass class RestrictWorkspaceAdminsMessage: status: RestrictWorkspaceAdminsMessageStatus + """Controls what workspace admins can do with service principal tokens and job identities. With + ALLOW_ALL, workspace admins can create personal access tokens on behalf of any service principal + in the workspace, change a job owner to any workspace user, and set a job's run_as identity to + any workspace user or to a service principal they have the Service Principal User role on. With + RESTRICT_TOKENS_AND_JOB_RUN_AS, they can only create tokens for service principals they have the + Service Principal User role on, change a job owner to themselves, and set run_as to themselves + or to a service principal they have that role on.""" disable_gov_tag_creation: Optional[bool] = None """When true, workspace admins cannot create governance tags. ALLOW_ALL status does not override @@ -1409,6 +1449,14 @@ class RestrictWorkspaceAdminsMessageStatus(Enum): @dataclass class Setting: + """A setting and its value at the workspace or account scope. Each setting has one value type, so + one value field applies to it: a primitive wrapper (boolean_val, string_val or integer_val) or a + setting-specific message. The settings metadata endpoint reports the field each setting uses. + When updating a setting, set only the value field that matches its type. Responses return that + field with the value configured at this scope, if one is set, together with the matching + effective_* field, which holds the value in effect after Databricks applies account policies and + defaults.""" + aibi_dashboard_embedding_access_policy: Optional[AibiDashboardEmbeddingAccessPolicy] = None """Setting value for aibi_dashboard_embedding_access_policy setting. This is the setting value set by consumers, check effective_aibi_dashboard_embedding_access_policy for final setting value.""" @@ -1491,7 +1539,7 @@ class Setting: effective_integer_val for final setting value.""" name: Optional[str] = None - """Name of the setting.""" + """Name of the setting. The settings metadata endpoint lists the names available at each scope.""" operational_email_custom_recipient: Optional[OperationalEmailCustomRecipientMessage] = None """Setting value for operational_email_custom_recipient setting. This is the setting value set by @@ -1873,8 +1921,12 @@ class WorkspaceLabelMessage: """Workspace label and color for display (e.g. in account console).""" color: Optional[str] = None + """Color of the label badge. The supported colors are coral, lemon, lime, turquoise, indigo, purple + and pink. It is an empty string when no label is set.""" label: Optional[str] = None + """Text of the label shown next to the workspace name in the top navigation bar. An empty string + means no label is set.""" def as_dict(self) -> dict: """Serializes the WorkspaceLabelMessage into a dictionary suitable for use as a JSON request body.""" @@ -2097,11 +2149,11 @@ def __init__(self, api_client): self._api = api_client def get_public_workspace_setting(self, name: str) -> Setting: - """Get a setting value at workspace level. See :method:settingsv2/listworkspacesettingsmetadata for list - of setting available via public APIs. + """Get a setting value at workspace level. See :method:settingsv2/listworkspacesettingsmetadata for the + list of settings available via public APIs. :param name: str - Name of the setting + Name of the setting to retrieve. :returns: :class:`Setting` """ @@ -2161,15 +2213,15 @@ def list_workspace_settings_metadata( query["page_token"] = json["next_page_token"] def patch_public_workspace_setting(self, name: str, setting: Setting) -> Setting: - """Patch a setting value at workspace level. See :method:settingsv2/listworkspacesettingsmetadata for - list of setting available via public APIs at workspace level. To determine the correct field to + """Patch a setting value at workspace level. See :method:settingsv2/listworkspacesettingsmetadata for the + list of settings available via public APIs at workspace level. To determine the correct field to include in a patch request, refer to the type field of the setting returned in the :method:settingsv2/listworkspacesettingsmetadata response. Note: Page refresh is required for changes to take effect in UI. :param name: str - Name of the setting + Name of the setting to update. :param setting: :class:`Setting` :returns: :class:`Setting` diff --git a/databricks/sdk/service/softwareartifacts.py b/databricks/sdk/service/softwareartifacts.py index 6770f44f4..76f65afd5 100644 --- a/databricks/sdk/service/softwareartifacts.py +++ b/databricks/sdk/service/softwareartifacts.py @@ -332,6 +332,52 @@ class SoftwareArtifactsAPI: def __init__(self, api_client): self._api = api_client + def delete_software_artifact(self, name: str, *, force: Optional[bool] = None): + """Deletes a software artifact. Fails if the artifact still has versions unless ``force`` is set. + + :param name: str + Resource name of the software artifact, of the form + ``software-artifacts/{catalog}.{schema}.{artifact}``. + :param force: bool (optional) + Force deletion even if the software artifact has versions, deleting them with it. Default is false. + + + """ + + query = {} + if force is not None: + query["force"] = force + headers = { + "Accept": "application/json", + } + + cfg = self._api._cfg + if cfg.workspace_id: + headers["X-Databricks-Workspace-Id"] = cfg.workspace_id + + self._api.do("DELETE", f"/api/2.1/unity-catalog/{name}", query=query, headers=headers) + + def delete_software_artifact_version(self, name: str): + """Deletes a software artifact version. + + :param name: str + Resource name of the version, of the form + ``software-artifacts/{catalog}.{schema}.{artifact}/versions/{version}``, where ``{version}`` is the + version's content digest, for example ``sha256:``. + + + """ + + headers = { + "Accept": "application/json", + } + + cfg = self._api._cfg + if cfg.workspace_id: + headers["X-Databricks-Workspace-Id"] = cfg.workspace_id + + self._api.do("DELETE", f"/api/2.1/unity-catalog/{name}", headers=headers) + def get_software_artifact(self, name: str) -> SoftwareArtifact: """Gets a software artifact by its resource name. Returns ``NOT_FOUND`` if the artifact does not exist. diff --git a/databricks/sdk/service/sql.py b/databricks/sdk/service/sql.py index 2628464f1..fead671c8 100644 --- a/databricks/sdk/service/sql.py +++ b/databricks/sdk/service/sql.py @@ -1260,8 +1260,11 @@ class Channel: chosen only when ``dbsql_version`` is specified.""" dbsql_version: Optional[str] = None + """Databricks SQL version to pin to. Set it if and only if name is CHANNEL_NAME_CUSTOM.""" name: Optional[ChannelName] = None + """Channel to follow. CHANNEL_NAME_CURRENT is the default, and CHANNEL_NAME_PREVIEW carries the + upcoming Databricks SQL release for testing.""" def as_dict(self) -> dict: """Serializes the Channel into a dictionary suitable for use as a JSON request body.""" @@ -2476,8 +2479,10 @@ def from_dict(cls, d: Dict[str, Any]) -> Empty: @dataclass class EndpointConfPair: key: Optional[str] = None + """Name of the configuration parameter.""" value: Optional[str] = None + """Value of the configuration parameter.""" def as_dict(self) -> dict: """Serializes the EndpointConfPair into a dictionary suitable for use as a JSON request body.""" @@ -2578,7 +2583,7 @@ class EndpointInfo: Defaults to 120 mins""" channel: Optional[Channel] = None - """Channel Details""" + """Channel that determines which Databricks SQL version the warehouse runs.""" cluster_size: Optional[str] = None """Size of the clusters allocated for this warehouse. Increasing the size of a spark cluster allows @@ -2599,7 +2604,7 @@ class EndpointInfo: - 5X-Large""" creator_name: Optional[str] = None - """warehouse creator name""" + """Name of the user who created the warehouse. Set by the server and ignored in requests.""" customer_version_label: Optional[str] = None """Compute version label for a REALTIME warehouse. This field is output only.""" @@ -2616,13 +2621,13 @@ class EndpointInfo: """Optional health status. Assume the warehouse is healthy if this field is not set.""" id: Optional[str] = None - """unique identifier for warehouse""" + """Unique identifier of the warehouse.""" instance_profile_arn: Optional[str] = None """Deprecated. Instance profile used to pass IAM role to the cluster""" jdbc_url: Optional[str] = None - """the jdbc connection string for this warehouse""" + """JDBC connection string for the warehouse.""" max_dbu: Optional[int] = None """Maximum compute capacity of a real-time SQL warehouse, in DBU per hour. Must be at least the @@ -2653,18 +2658,19 @@ class EndpointInfo: Defaults to 1""" name: Optional[str] = None - """Logical name for the cluster. + """Logical name for the warehouse. Supported values: - Must be unique within an org. - - Must be less than 100 characters.""" + - Must be 1 to 100 characters.""" num_active_sessions: Optional[int] = None """Deprecated. current number of active sessions for the warehouse""" num_clusters: Optional[int] = None - """current number of clusters running for the service""" + """Number of clusters currently allocated to the warehouse, including clusters that are still + starting.""" odbc_params: Optional[OdbcParams] = None """ODBC parameters for the SQL warehouse""" @@ -2681,13 +2687,16 @@ class EndpointInfo: - When absent, the warehouse is treated as having a multiplier of 1.0.""" spot_instance_policy: Optional[SpotInstancePolicy] = None - """Configurations whether the endpoint should use spot instances.""" + """Configures whether the warehouse should use spot instances. COST_OPTIMIZED uses spot instances + where the cloud provider supports them, and RELIABILITY_OPTIMIZED uses on-demand instances only.""" state: Optional[State] = None - """state of the endpoint""" + """Current state of the warehouse.""" statement_timeout: Optional[int] = None - """Warehouse statement timeout in seconds.""" + """Maximum time in seconds that a statement can run on this warehouse before it is cancelled. Set + to 0 to remove the warehouse-level timeout. Changing the value of a running warehouse restarts + it. See https://docs.databricks.com/aws/en/sql/language-manual/parameters/statement_timeout.""" tags: Optional[EndpointTags] = None """A set of key-value pairs that will be tagged on all resources (e.g., AWS instances and EBS @@ -2848,8 +2857,11 @@ class EndpointInfoWarehouseType(Enum): @dataclass class EndpointTagPair: key: Optional[str] = None + """Tag key. Keys must be unique within the warehouse and cannot use the keys that Databricks + reserves for the tags it sets automatically.""" value: Optional[str] = None + """Tag value. Keys and values must follow the tagging rules of the cloud provider.""" def as_dict(self) -> dict: """Serializes the EndpointTagPair into a dictionary suitable for use as a JSON request body.""" @@ -2878,6 +2890,7 @@ def from_dict(cls, d: Dict[str, Any]) -> EndpointTagPair: @dataclass class EndpointTags: custom_tags: Optional[List[EndpointTagPair]] = None + """User-defined tags, applied in addition to the tags Databricks sets automatically.""" def as_dict(self) -> dict: """Serializes the EndpointTags into a dictionary suitable for use as a JSON request body.""" @@ -2982,7 +2995,7 @@ class ExternalLink: next_chunk_index: Optional[int] = None """When fetching, provides the ``chunk_index`` for the *next* chunk. If absent, indicates there are no more chunks. The next chunk can be fetched with a - :method:statementexecution/getstatementresultchunkn request.""" + :method:statementexecution/getStatementResultChunkN request.""" next_chunk_internal_link: Optional[str] = None """When fetching, provides a link to fetch the *next* chunk. If absent, indicates there are no more @@ -3264,7 +3277,7 @@ class GetWarehouseResponse: Defaults to 120 mins""" channel: Optional[Channel] = None - """Channel Details""" + """Channel that determines which Databricks SQL version the warehouse runs.""" cluster_size: Optional[str] = None """Size of the clusters allocated for this warehouse. Increasing the size of a spark cluster allows @@ -3285,7 +3298,7 @@ class GetWarehouseResponse: - 5X-Large""" creator_name: Optional[str] = None - """warehouse creator name""" + """Name of the user who created the warehouse. Set by the server and ignored in requests.""" customer_version_label: Optional[str] = None """Compute version label for a REALTIME warehouse. This field is output only.""" @@ -3302,13 +3315,13 @@ class GetWarehouseResponse: """Optional health status. Assume the warehouse is healthy if this field is not set.""" id: Optional[str] = None - """unique identifier for warehouse""" + """Unique identifier of the warehouse.""" instance_profile_arn: Optional[str] = None """Deprecated. Instance profile used to pass IAM role to the cluster""" jdbc_url: Optional[str] = None - """the jdbc connection string for this warehouse""" + """JDBC connection string for the warehouse.""" max_dbu: Optional[int] = None """Maximum compute capacity of a real-time SQL warehouse, in DBU per hour. Must be at least the @@ -3339,18 +3352,19 @@ class GetWarehouseResponse: Defaults to 1""" name: Optional[str] = None - """Logical name for the cluster. + """Logical name for the warehouse. Supported values: - Must be unique within an org. - - Must be less than 100 characters.""" + - Must be 1 to 100 characters.""" num_active_sessions: Optional[int] = None """Deprecated. current number of active sessions for the warehouse""" num_clusters: Optional[int] = None - """current number of clusters running for the service""" + """Number of clusters currently allocated to the warehouse, including clusters that are still + starting.""" odbc_params: Optional[OdbcParams] = None """ODBC parameters for the SQL warehouse""" @@ -3367,13 +3381,16 @@ class GetWarehouseResponse: - When absent, the warehouse is treated as having a multiplier of 1.0.""" spot_instance_policy: Optional[SpotInstancePolicy] = None - """Configurations whether the endpoint should use spot instances.""" + """Configures whether the warehouse should use spot instances. COST_OPTIMIZED uses spot instances + where the cloud provider supports them, and RELIABILITY_OPTIMIZED uses on-demand instances only.""" state: Optional[State] = None - """state of the endpoint""" + """Current state of the warehouse.""" statement_timeout: Optional[int] = None - """Warehouse statement timeout in seconds.""" + """Maximum time in seconds that a statement can run on this warehouse before it is cancelled. Set + to 0 to remove the warehouse-level timeout. Changing the value of a running warehouse restarts + it. See https://docs.databricks.com/aws/en/sql/language-manual/parameters/statement_timeout.""" tags: Optional[EndpointTags] = None """A set of key-value pairs that will be tagged on all resources (e.g., AWS instances and EBS @@ -3540,8 +3557,10 @@ class GetWorkspaceWarehouseConfigResponse: """Deprecated: Use sql_configuration_parameters""" data_access_config: Optional[List[EndpointConfPair]] = None - """Spark confs for external hive metastore configuration JSON serialized size must be less than <= - 512K""" + """Spark configuration applied to every warehouse in the workspace, for example to connect to an + external Hive metastore or to configure access to cloud storage. Only allowlisted keys are + accepted, and the JSON-serialized size must be at most 512 KB. See + https://docs.databricks.com/aws/en/admin/sql/data-access-configuration.""" enable_serverless_compute: Optional[bool] = None """Deprecated: only setting this to true is allowed.""" @@ -3550,14 +3569,13 @@ class GetWorkspaceWarehouseConfigResponse: """List of Warehouse Types allowed in this workspace (limits allowed value of the type field in CreateWarehouse and EditWarehouse). Note: Some types cannot be disabled, they don't need to be specified in SetWorkspaceWarehouseConfig. Note: Disabling a type may cause existing warehouses - to be converted to another type. Used by frontend to save specific type availability in the - warehouse create and edit form UI.""" + to be converted to another type.""" global_param: Optional[RepeatedEndpointConfPairs] = None """Deprecated: Use sql_configuration_parameters""" google_service_account: Optional[str] = None - """GCP only: Google Service Account used to pass to cluster to access Google Cloud Storage""" + """GCP only: Google service account that the warehouse clusters use to access Google Cloud Storage.""" instance_profile_arn: Optional[str] = None """AWS Only: The instance profile used to pass an IAM role to the SQL warehouses. This @@ -3567,7 +3585,9 @@ class GetWorkspaceWarehouseConfigResponse: """Security policy for warehouses""" sql_configuration_parameters: Optional[RepeatedEndpointConfPairs] = None - """SQL configuration parameters""" + """SQL configuration parameters applied to every warehouse in the workspace. Only parameters that + can be set at the workspace scope are accepted. See + https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-parameters.""" def as_dict(self) -> dict: """Serializes the GetWorkspaceWarehouseConfigResponse into a dictionary suitable for use as a JSON request body.""" @@ -4740,12 +4760,16 @@ class ObjectTypePlural(Enum): @dataclass class OdbcParams: hostname: Optional[str] = None + """Hostname of the workspace to connect to.""" path: Optional[str] = None + """HTTP path of the warehouse.""" port: Optional[int] = None + """The connection port is always 443.""" protocol: Optional[str] = None + """The transport protocol is always https.""" def as_dict(self) -> dict: """Serializes the OdbcParams into a dictionary suitable for use as a JSON request body.""" @@ -5946,6 +5970,7 @@ class RepeatedEndpointConfPairs: """Deprecated: Use configuration_pairs""" configuration_pairs: Optional[List[EndpointConfPair]] = None + """Configuration parameters, each a key-value pair.""" def as_dict(self) -> dict: """Serializes the RepeatedEndpointConfPairs into a dictionary suitable for use as a JSON request body.""" @@ -6012,11 +6037,13 @@ class ResultData: formatted as a string. Null values are encoded as JSON ``null``.""" external_links: Optional[List[ExternalLink]] = None + """Short-lived cloud-storage links to the result data, used with the ``EXTERNAL_LINKS`` + disposition.""" next_chunk_index: Optional[int] = None """When fetching, provides the ``chunk_index`` for the *next* chunk. If absent, indicates there are no more chunks. The next chunk can be fetched with a - :method:statementexecution/getstatementresultchunkn request.""" + :method:statementexecution/getStatementResultChunkN request.""" next_chunk_internal_link: Optional[str] = None """When fetching, provides a link to fetch the *next* chunk. If absent, indicates there are no more @@ -6094,8 +6121,10 @@ class ResultManifest: """Array of result set chunk metadata.""" format: Optional[Format] = None + """The format of the result data, as requested with ``format``.""" schema: Optional[ResultSchema] = None + """The schema of the result set: the ordered list of column descriptions.""" total_byte_count: Optional[int] = None """The total number of bytes in the result set. This field is not available when using ``INLINE`` @@ -6167,8 +6196,10 @@ class ResultSchema: """The schema is an ordered list of column descriptions.""" column_count: Optional[int] = None + """The number of columns in the result set.""" columns: Optional[List[ColumnInfo]] = None + """The column descriptions, in result set order.""" def as_dict(self) -> dict: """Serializes the ResultSchema into a dictionary suitable for use as a JSON request body.""" @@ -6212,6 +6243,7 @@ class SchedulePauseStatus(Enum): @dataclass class ServiceError: error_code: Optional[ServiceErrorCode] = None + """The error code that classifies the failure.""" message: Optional[str] = None """A brief summary of the error condition.""" @@ -6419,14 +6451,21 @@ class StatementResponse: higher concurrency, and takes ``warehouse_id`` as a path parameter.""" manifest: Optional[ResultManifest] = None + """The schema and metadata of the result set. Present when ``status.state`` is ``SUCCEEDED``.""" result: Optional[ResultData] = None + """Contains the result data of a single chunk when using ``INLINE`` disposition. When using + ``EXTERNAL_LINKS`` disposition, the array ``external_links`` is used instead to provide + short-lived cloud-storage URLs to the result data in cloud storage. Exactly one of these + alternatives is used. Calls to ``getResultData`` return the link for the requested chunk; + ``executeStatement`` and ``getStatementResult`` responses can contain links for multiple chunks.""" statement_id: Optional[str] = None """The statement ID is returned upon successfully submitting a SQL statement, and is a required reference for all subsequent calls.""" status: Optional[StatementStatus] = None + """The execution state of the statement and, if it failed, the error details.""" def as_dict(self) -> dict: """Serializes the StatementResponse into a dictionary suitable for use as a JSON request body.""" @@ -6479,6 +6518,7 @@ class StatementStatus: """The status response includes execution state and if relevant, error information.""" error: Optional[ServiceError] = None + """The error that caused the statement to fail. Only populated when ``state`` is ``FAILED``.""" sql_state: Optional[str] = None """SQLSTATE error code returned when the statement execution fails. Only populated when the @@ -7603,6 +7643,7 @@ class WarehouseTypePair: CreateWarehouse and EditWarehouse""" warehouse_type: Optional[WarehouseTypePairWarehouseType] = None + """Warehouse type that this entry enables or disables.""" def as_dict(self) -> dict: """Serializes the WarehouseTypePair into a dictionary suitable for use as a JSON request body.""" @@ -9856,9 +9897,16 @@ def execute_statement( The parameters can be passed in the request body as follows: - ``{ ..., "statement": "SELECT * FROM my_table WHERE name = :my_name AND date = :my_date", - "parameters": [ { "name": "my_name", "value": "the name" }, { "name": "my_date", "value": - "2020-01-01", "type": "DATE" } ] }`` + .. code-block:: + + { + ..., + "statement": "SELECT * FROM my_table WHERE name = :my_name AND date = :my_date", + "parameters": [ + { "name": "my_name", "value": "the name" }, + { "name": "my_date", "value": "2020-01-01", "type": "DATE" } + ] + } Currently, positional parameters denoted by a ``?`` marker are not supported by the Databricks SQL Statement Execution API. @@ -9976,6 +10024,7 @@ def get_statement_result_chunk_n(self, statement_id: str, chunk_index: int) -> R The statement ID is returned upon successfully submitting a SQL statement, and is a required reference for all subsequent calls. :param chunk_index: int + The zero-based index of the result chunk to fetch. :returns: :class:`ResultData` """ @@ -10097,7 +10146,7 @@ def create( Defaults to 120 mins :param channel: :class:`Channel` (optional) - Channel Details + Channel that determines which Databricks SQL version the warehouse runs. :param cluster_size: str (optional) Size of the clusters allocated for this warehouse. Increasing the size of a spark cluster allows you to run larger queries on it. If you want to increase the number of concurrent queries, please tune @@ -10116,7 +10165,7 @@ def create( - 4X-Large - 5X-Large :param creator_name: str (optional) - warehouse creator name + Name of the user who created the warehouse. Set by the server and ignored in requests. :param customer_version_label: str (optional) Compute version label for a REALTIME warehouse. This field is output only. :param enable_photon: bool (optional) @@ -10152,12 +10201,12 @@ def create( Defaults to 1 :param name: str (optional) - Logical name for the cluster. + Logical name for the warehouse. Supported values: - Must be unique within an org. - - Must be less than 100 characters. + - Must be 1 to 100 characters. :param reyden_cluster_size_multiplier: float (optional) Cluster size multiplier for Reyden warehouses. Scales the effective compute capacity relative to the nominal virtual cluster size. Only meaningful when the warehouse is of Reyden type. @@ -10169,9 +10218,12 @@ def create( - Values above the configured maximum are capped at that maximum. - When absent, the warehouse is treated as having a multiplier of 1.0. :param spot_instance_policy: :class:`SpotInstancePolicy` (optional) - Configurations whether the endpoint should use spot instances. + Configures whether the warehouse should use spot instances. COST_OPTIMIZED uses spot instances where + the cloud provider supports them, and RELIABILITY_OPTIMIZED uses on-demand instances only. :param statement_timeout: int (optional) - Warehouse statement timeout in seconds. + Maximum time in seconds that a statement can run on this warehouse before it is cancelled. Set to 0 + to remove the warehouse-level timeout. Changing the value of a running warehouse restarts it. See + https://docs.databricks.com/aws/en/sql/language-manual/parameters/statement_timeout. :param tags: :class:`EndpointTags` (optional) A set of key-value pairs that will be tagged on all resources (e.g., AWS instances and EBS volumes) associated with this SQL warehouse. @@ -10393,7 +10445,7 @@ def edit( Defaults to 120 mins :param channel: :class:`Channel` (optional) - Channel Details + Channel that determines which Databricks SQL version the warehouse runs. :param cluster_size: str (optional) Size of the clusters allocated for this warehouse. Increasing the size of a spark cluster allows you to run larger queries on it. If you want to increase the number of concurrent queries, please tune @@ -10412,7 +10464,7 @@ def edit( - 4X-Large - 5X-Large :param creator_name: str (optional) - warehouse creator name + Name of the user who created the warehouse. Set by the server and ignored in requests. :param customer_version_label: str (optional) Compute version label for a REALTIME warehouse. This field is output only. :param enable_photon: bool (optional) @@ -10448,12 +10500,12 @@ def edit( Defaults to 1 :param name: str (optional) - Logical name for the cluster. + Logical name for the warehouse. Supported values: - Must be unique within an org. - - Must be less than 100 characters. + - Must be 1 to 100 characters. :param reyden_cluster_size_multiplier: float (optional) Cluster size multiplier for Reyden warehouses. Scales the effective compute capacity relative to the nominal virtual cluster size. Only meaningful when the warehouse is of Reyden type. @@ -10465,9 +10517,12 @@ def edit( - Values above the configured maximum are capped at that maximum. - When absent, the warehouse is treated as having a multiplier of 1.0. :param spot_instance_policy: :class:`SpotInstancePolicy` (optional) - Configurations whether the endpoint should use spot instances. + Configures whether the warehouse should use spot instances. COST_OPTIMIZED uses spot instances where + the cloud provider supports them, and RELIABILITY_OPTIMIZED uses on-demand instances only. :param statement_timeout: int (optional) - Warehouse statement timeout in seconds. + Maximum time in seconds that a statement can run on this warehouse before it is cancelled. Set to 0 + to remove the warehouse-level timeout. Changing the value of a running warehouse restarts it. See + https://docs.databricks.com/aws/en/sql/language-manual/parameters/statement_timeout. :param tags: :class:`EndpointTags` (optional) A set of key-value pairs that will be tagged on all resources (e.g., AWS instances and EBS volumes) associated with this SQL warehouse. @@ -10813,26 +10868,30 @@ def set_workspace_warehouse_config( :param config_param: :class:`RepeatedEndpointConfPairs` (optional) Deprecated: Use sql_configuration_parameters :param data_access_config: List[:class:`EndpointConfPair`] (optional) - Spark confs for external hive metastore configuration JSON serialized size must be less than <= 512K + Spark configuration applied to every warehouse in the workspace, for example to connect to an + external Hive metastore or to configure access to cloud storage. Only allowlisted keys are accepted, + and the JSON-serialized size must be at most 512 KB. See + https://docs.databricks.com/aws/en/admin/sql/data-access-configuration. :param enable_serverless_compute: bool (optional) Deprecated: only setting this to true is allowed. :param enabled_warehouse_types: List[:class:`WarehouseTypePair`] (optional) List of Warehouse Types allowed in this workspace (limits allowed value of the type field in CreateWarehouse and EditWarehouse). Note: Some types cannot be disabled, they don't need to be specified in SetWorkspaceWarehouseConfig. Note: Disabling a type may cause existing warehouses to be - converted to another type. Used by frontend to save specific type availability in the warehouse - create and edit form UI. + converted to another type. :param global_param: :class:`RepeatedEndpointConfPairs` (optional) Deprecated: Use sql_configuration_parameters :param google_service_account: str (optional) - GCP only: Google Service Account used to pass to cluster to access Google Cloud Storage + GCP only: Google service account that the warehouse clusters use to access Google Cloud Storage. :param instance_profile_arn: str (optional) AWS Only: The instance profile used to pass an IAM role to the SQL warehouses. This configuration is also applied to the workspace's serverless compute for notebooks and jobs. :param security_policy: :class:`SetWorkspaceWarehouseConfigRequestSecurityPolicy` (optional) Security policy for warehouses :param sql_configuration_parameters: :class:`RepeatedEndpointConfPairs` (optional) - SQL configuration parameters + SQL configuration parameters applied to every warehouse in the workspace. Only parameters that can + be set at the workspace scope are accepted. See + https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-parameters. """ diff --git a/databricks/sdk/service/statementexecutionv2.py b/databricks/sdk/service/statementexecutionv2.py index 66ae86cdb..ce4cb89f4 100644 --- a/databricks/sdk/service/statementexecutionv2.py +++ b/databricks/sdk/service/statementexecutionv2.py @@ -999,9 +999,16 @@ def execute_statement( The parameters can be passed in the request body as follows: - ``{ ..., "statement": "SELECT * FROM my_table WHERE name = :my_name AND date = :my_date", - "parameters": [ { "name": "my_name", "value": "the name" }, { "name": "my_date", "value": - "2020-01-01", "type": "DATE" } ] }`` + .. code-block:: + + { + ..., + "statement": "SELECT * FROM my_table WHERE name = :my_name AND date = :my_date", + "parameters": [ + { "name": "my_name", "value": "the name" }, + { "name": "my_date", "value": "2020-01-01", "type": "DATE" } + ] + } Currently, positional parameters denoted by a ``?`` marker are not supported by the Databricks SQL Statement Execution API. diff --git a/databricks/sdk/service/tags.py b/databricks/sdk/service/tags.py index 3cab52c02..4899572c1 100644 --- a/databricks/sdk/service/tags.py +++ b/databricks/sdk/service/tags.py @@ -148,19 +148,29 @@ def from_dict(cls, d: Dict[str, Any]) -> TagAssignment: @dataclass class TagPolicy: + """A tag policy makes a tag key governed and defines the values that can be assigned to it. + Governed tags are enforced across all workspaces in the account, and only users with the ASSIGN + permission on the governed tag can assign it. See + https://docs.databricks.com/aws/en/admin/governed-tags/.""" + tag_key: str + """The tag key that this policy governs. Tag keys are case-sensitive.""" create_time: Optional[str] = None """Timestamp when the tag policy was created""" description: Optional[str] = None + """A description of the governed tag, such as its purpose or the meaning of its values.""" id: Optional[str] = None + """The unique identifier of the tag policy, generated when the policy is created.""" update_time: Optional[str] = None """Timestamp when the tag policy was last updated""" values: Optional[List[Value]] = None + """The allowed values of the governed tag. Only these values can be assigned to the tag key, and + each value must be unique. A policy without values defines a key-only governed tag.""" def as_dict(self) -> dict: """Serializes the TagPolicy into a dictionary suitable for use as a JSON request body.""" @@ -211,7 +221,10 @@ def from_dict(cls, d: Dict[str, Any]) -> TagPolicy: @dataclass class Value: + """An allowed value of a governed tag.""" + name: str + """The value that can be assigned to the tag key. Values are case-sensitive.""" def as_dict(self) -> dict: """Serializes the Value into a dictionary suitable for use as a JSON request body.""" @@ -275,6 +288,7 @@ def delete_tag_policy(self, tag_key: str): `__. :param tag_key: str + The key of the governed tag whose policy to delete. """ @@ -297,6 +311,7 @@ def get_tag_policy(self, tag_key: str) -> TagPolicy: `__. :param tag_key: str + The key of the governed tag whose policy to get. :returns: :class:`TagPolicy` """ @@ -361,17 +376,11 @@ def update_tag_policy(self, tag_key: str, tag_policy: TagPolicy, update_mask: st `__. :param tag_key: str + The tag key that this policy governs. Tag keys are case-sensitive. :param tag_policy: :class:`TagPolicy` :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., - ``author.given_name``). Specification of elements in sequence or map fields is not allowed, as only - the entire collection field can be specified. Field names must exactly match the resource field - names. - - 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. + The comma-separated list of tag policy fields to update. When the mask includes ``values``, the + values in the request replace all existing allowed values. :returns: :class:`TagPolicy` """ diff --git a/databricks/sdk/service/workspace.py b/databricks/sdk/service/workspace.py index ab3f25e5b..ca3422608 100644 --- a/databricks/sdk/service/workspace.py +++ b/databricks/sdk/service/workspace.py @@ -31,7 +31,7 @@ class AclItem: associated scope point.""" principal: str - """The principal in which the permission is applied.""" + """The user name or group name of an existing Databricks principal that the permission applies to.""" permission: AclPermission """The permission level applied to the principal.""" @@ -73,10 +73,10 @@ class AzureKeyVaultSecretScopeMetadata: """The metadata of the Azure KeyVault for a secret scope of type ``AZURE_KEYVAULT``""" resource_id: str - """The resource id of the azure KeyVault that user wants to associate the scope with.""" + """The Azure resource ID of the key vault to associate with the scope.""" dns_name: str - """The DNS of the KeyVault""" + """The DNS name of the key vault, for example ``https://my-key-vault.vault.azure.net/``.""" def as_dict(self) -> dict: """Serializes the AzureKeyVaultSecretScopeMetadata into a dictionary suitable for use as a JSON request body.""" @@ -1384,8 +1384,7 @@ def from_dict(cls, d: Dict[str, Any]) -> RepoPermissionsDescription: class ScopeBackendType(Enum): - """The types of secret scope backends in the Secret Manager. Azure KeyVault backed secret scopes - will be supported in a later release.""" + """The types of secret scope backends in the Secret Manager.""" AZURE_KEYVAULT = "AZURE_KEYVAULT" DATABRICKS = "DATABRICKS" @@ -1428,15 +1427,15 @@ def from_dict(cls, d: Dict[str, Any]) -> SecretMetadata: @dataclass class SecretScope: - """An organizational resource for storing secrets. Secret scopes can be different types - (Databricks-managed, Azure KeyVault backed, etc), and ACLs can be applied to control permissions - for all secrets within a scope.""" + """An organizational resource for storing secrets. A secret scope is either Databricks-backed or + Azure Key Vault-backed, and ACLs can be applied to control permissions for all secrets within a + scope.""" backend_type: Optional[ScopeBackendType] = None """The type of secret scope backend.""" keyvault_metadata: Optional[AzureKeyVaultSecretScopeMetadata] = None - """The metadata for the secret scope if the type is ``AZURE_KEYVAULT``""" + """The metadata for the secret scope if the type is ``AZURE_KEYVAULT``.""" name: Optional[str] = None """A unique name to identify the secret scope.""" @@ -2370,36 +2369,23 @@ def create_scope( The scope name must consist of alphanumeric characters, dashes, underscores, and periods, and may not exceed 128 characters. - Example request: - - .. code:: - - { "scope": "my-simple-databricks-scope", "initial_manage_principal": "users" "scope_backend_type": - "databricks|azure_keyvault", - - below is only required if scope type is azure_keyvault - - "backend_azure_keyvault": { "resource_id": - "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/xxxx/providers/Microsoft.KeyVault/vaults/xxxx", - "tenant_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "dns_name": "https://xxxx.vault.azure.net/", } } - If ``initial_manage_principal`` is specified, the initial ACL applied to the scope is applied to the supplied principal (user or group) with ``MANAGE`` permissions. The only supported principal for this option is the group ``users``, which contains all users in the workspace. If ``initial_manage_principal`` is not specified, the initial ACL with ``MANAGE`` permission applied to the scope is assigned to the API request issuer's user identity. - If ``scope_backend_type`` is ``azure_keyvault``, a secret scope is created with secrets from a given - Azure KeyVault. The caller must provide the keyvault_resource_id and the tenant_id for the key vault. - If ``scope_backend_type`` is ``databricks`` or is unspecified, an empty secret scope is created and - stored in Databricks's own storage. + If ``scope_backend_type`` is ``AZURE_KEYVAULT``, a secret scope is created with secrets from an + existing Azure key vault. The caller must provide the key vault's resource ID and DNS name in + ``backend_azure_keyvault``. If ``scope_backend_type`` is ``DATABRICKS`` or is unspecified, an empty + secret scope is created and stored in Databricks-managed storage. Throws ``RESOURCE_ALREADY_EXISTS`` if a scope with the given name already exists. Throws ``RESOURCE_LIMIT_EXCEEDED`` if maximum number of scopes in the workspace is exceeded. Throws ``INVALID_PARAMETER_VALUE`` if the scope name is invalid. Throws ``BAD_REQUEST`` if request violated - constraints. Throws ``CUSTOMER_UNAUTHORIZED`` if normal user attempts to create a scope with name - reserved for databricks internal usage. Throws ``UNAUTHENTICATED`` if unable to verify user access - permission on Azure KeyVault + constraints. Throws ``CUSTOMER_UNAUTHORIZED`` if the scope name is reserved for Databricks internal + use. Throws ``UNAUTHENTICATED`` if Databricks cannot verify the caller's access to the Azure key + vault. :param scope: str Scope name requested by the user. Scope names are unique. @@ -2408,7 +2394,7 @@ def create_scope( :param initial_manage_principal: str (optional) The principal that is initially granted ``MANAGE`` permission to the created scope. :param scope_backend_type: :class:`ScopeBackendType` (optional) - The backend type the scope will be created with. If not specified, will default to ``DATABRICKS`` + The backend type of the new scope. Defaults to ``DATABRICKS``. """ @@ -2437,12 +2423,6 @@ def delete_acl(self, scope: str, principal: str): Users must have the ``MANAGE`` permission to invoke this API. - Example request: - - .. code:: - - { "scope": "my-secret-scope", "principal": "data-scientists" } - Throws ``RESOURCE_DOES_NOT_EXIST`` if no such secret scope, principal, or ACL exists. Throws ``PERMISSION_DENIED`` if the user does not have permission to make this API call. Throws ``INVALID_PARAMETER_VALUE`` if the permission or principal is invalid. @@ -2473,15 +2453,8 @@ def delete_acl(self, scope: str, principal: str): def delete_scope(self, scope: str): """Deletes a secret scope. - Example request: - - .. code:: - - { "scope": "my-secret-scope" } - Throws ``RESOURCE_DOES_NOT_EXIST`` if the scope does not exist. Throws ``PERMISSION_DENIED`` if the - user does not have permission to make this API call. Throws ``BAD_REQUEST`` if system user attempts to - delete internal secret scope. + user does not have permission to make this API call. :param scope: str Name of the scope to delete. @@ -2508,8 +2481,7 @@ def delete_secret(self, scope: str, key: str): Throws ``RESOURCE_DOES_NOT_EXIST`` if no such secret scope or secret exists. Throws ``PERMISSION_DENIED`` if the user does not have permission to make this API call. Throws - ``BAD_REQUEST`` if system user attempts to delete an internal secret, or request is made against Azure - KeyVault backed scope. + ``BAD_REQUEST`` if the request is made against an Azure Key Vault-backed scope. :param scope: str The name of the scope that contains the secret to delete. @@ -2540,12 +2512,6 @@ def get_acl(self, scope: str, principal: str) -> AclItem: Users must have the ``MANAGE`` permission to invoke this API. - Example response: - - .. code:: - - { "principal": "data-scientists", "permission": "READ" } - Throws ``RESOURCE_DOES_NOT_EXIST`` if no such secret scope exists. Throws ``PERMISSION_DENIED`` if the user does not have permission to make this API call. Throws ``INVALID_PARAMETER_VALUE`` if the permission or principal is invalid. @@ -2617,13 +2583,6 @@ def list_acls(self, scope: str) -> Iterator[AclItem]: Users must have the ``MANAGE`` permission to invoke this API. - Example response: - - .. code:: - - { "acls": [{ "principal": "admins", "permission": "MANAGE" },{ "principal": "data-scientists", - "permission": "READ" }] } - Throws ``RESOURCE_DOES_NOT_EXIST`` if no such secret scope exists. Throws ``PERMISSION_DENIED`` if the user does not have permission to make this API call. @@ -2651,13 +2610,6 @@ def list_acls(self, scope: str) -> Iterator[AclItem]: def list_scopes(self) -> Iterator[SecretScope]: """Lists all secret scopes available in the workspace. - Example response: - - .. code:: - - { "scopes": [{ "name": "my-databricks-scope", "backend_type": "DATABRICKS" },{ "name": "mount-points", - "backend_type": "DATABRICKS" }] } - Throws ``PERMISSION_DENIED`` if the user does not have permission to make this API call. @@ -2713,31 +2665,16 @@ def put_acl(self, scope: str, principal: str, permission: AclPermission): - ``WRITE`` - Allowed to read and write to this secret scope. - ``READ`` - Allowed to read this secret scope and list what secrets are available. - Note that in general, secret values can only be read from within a command on a cluster (for example, - through a notebook). There is no API to read the actual secret value material outside of a cluster. - However, the user's permission will be applied based on who is executing the command, and they must - have at least READ permission. - Users must have the ``MANAGE`` permission to invoke this API. - Example request: - - .. code:: - - { "scope": "my-secret-scope", "principal": "data-scientists", "permission": "READ" } - - The principal is a user or group name corresponding to an existing Databricks principal to be granted - or revoked access. - - Throws ``RESOURCE_DOES_NOT_EXIST`` if no such secret scope exists. Throws ``RESOURCE_ALREADY_EXISTS`` - if a permission for the principal already exists. Throws ``INVALID_PARAMETER_VALUE`` if the permission - or principal is invalid. Throws ``PERMISSION_DENIED`` if the user does not have permission to make - this API call. + Throws ``RESOURCE_DOES_NOT_EXIST`` if no such secret scope exists. Throws ``INVALID_PARAMETER_VALUE`` + if the permission or principal is invalid. Throws ``PERMISSION_DENIED`` if the user does not have + permission to make this API call. :param scope: str The name of the scope to apply permissions to. :param principal: str - The principal in which the permission is applied. + The user name or group name of an existing Databricks principal that the permission applies to. :param permission: :class:`AclPermission` The permission level applied to the principal. diff --git a/databricks/sdk/version.py b/databricks/sdk/version.py index 6eb09b92d..b2d86a0ca 100644 --- a/databricks/sdk/version.py +++ b/databricks/sdk/version.py @@ -1 +1 @@ -__version__ = "0.168.0" +__version__ = "0.169.0" diff --git a/docs/account/billing/usage_dashboards.rst b/docs/account/billing/usage_dashboards.rst index 5c325ba2e..f6cd3ec77 100644 --- a/docs/account/billing/usage_dashboards.rst +++ b/docs/account/billing/usage_dashboards.rst @@ -10,28 +10,38 @@ .. py:method:: create( [, dashboard_type: Optional[UsageDashboardType], major_version: Optional[UsageDashboardMajorVersion], workspace_id: Optional[int]]) -> CreateBillingUsageDashboardResponse - Create a usage dashboard specified by workspaceId, accountId, and dashboard type. + Imports a pre-built usage dashboard of the given type into a workspace. Each call imports a new + dashboard, even if the caller already created one of the same type in that workspace. The caller must + be an account admin and a user of the target workspace. See + https://docs.databricks.com/admin/account-settings/usage.html. :param dashboard_type: :class:`UsageDashboardType` (optional) Workspace level usage dashboard shows usage data for the specified workspace ID. Global level usage - dashboard shows usage data for all workspaces in the account. + dashboard shows usage data for all workspaces in the account. The request fails if the type is not + set. :param major_version: :class:`UsageDashboardMajorVersion` (optional) - The major version of the usage dashboard template to use. Defaults to VERSION_1. + The major version of the usage dashboard template to import. Version 2 adds cost forecasting and + object-level cost drill-down. :param workspace_id: int (optional) - The workspace ID of the workspace in which the usage dashboard is created. + The ID of the workspace to import the usage dashboard into. The workspace must be running, belong to + the account, and not be a disaster recovery secondary. :returns: :class:`CreateBillingUsageDashboardResponse` .. py:method:: get( [, dashboard_type: Optional[UsageDashboardType], workspace_id: Optional[int]]) -> GetBillingUsageDashboardResponse - Get a usage dashboard specified by workspaceId, accountId, and dashboard type. + Gets the most recent usage dashboard of the given type that the caller created. The response is empty + if no such dashboard exists, if it has been deleted, or if the caller can no longer access its + workspace. :param dashboard_type: :class:`UsageDashboardType` (optional) Workspace level usage dashboard shows usage data for the specified workspace ID. Global level usage - dashboard shows usage data for all workspaces in the account. + dashboard shows usage data for all workspaces in the account. The request fails if the type is not + set. :param workspace_id: int (optional) - The workspace ID of the workspace in which the usage dashboard is created. + The ID of the workspace that contains the usage dashboard. If omitted, the most recently created + dashboard of the given type across all workspaces in the account is returned. :returns: :class:`GetBillingUsageDashboardResponse` \ No newline at end of file diff --git a/docs/account/oauth2/published_app_integration.rst b/docs/account/oauth2/published_app_integration.rst index 2b4a2b5d3..2379d267d 100644 --- a/docs/account/oauth2/published_app_integration.rst +++ b/docs/account/oauth2/published_app_integration.rst @@ -15,20 +15,24 @@ `__. :param app_id: str (optional) - App id of the OAuth published app integration. For example power-bi, tableau-deskop + ID of the published OAuth app to enable, as returned in app_id by the list of published OAuth apps. + The short legacy IDs of the original published apps, such as power-bi and tableau-desktop, are also + accepted. The request fails if the app is already enabled for the account. :param token_access_policy: :class:`TokenAccessPolicy` (optional) - Token access policy + Lifetimes of the tokens issued to the app. If omitted, the app's default token lifetimes apply. If + set, both TTL fields are required. :returns: :class:`CreatePublishedAppIntegrationOutput` .. py:method:: delete(integration_id: str) - Delete an existing Published OAuth App Integration. You can retrieve the published OAuth app - integration via `PublishedAppIntegration/get - `__. + Delete an existing Published OAuth App Integration. The app can no longer be used to sign in to the + account until it is enabled again with `PublishedAppIntegration/create + `__. :param integration_id: str + ID of the published OAuth app integration to delete. @@ -38,16 +42,19 @@ Gets the Published OAuth App Integration for the given integration id. :param integration_id: str + ID of the published OAuth app integration. :returns: :class:`GetPublishedAppIntegrationOutput` .. py:method:: list( [, page_size: Optional[int], page_token: Optional[str]]) -> Iterator[GetPublishedAppIntegrationOutput] - Get the list of published OAuth app integrations for the specified Databricks account + Get the list of published OAuth app integrations for the specified Databricks account. :param page_size: int (optional) + Maximum number of integrations to return in one page, at most 1000. :param page_token: str (optional) + Token from the next_page_token field of a previous response. Omit it to request the first page. :returns: Iterator over :class:`GetPublishedAppIntegrationOutput` @@ -59,8 +66,11 @@ `__. :param integration_id: str + ID of the published OAuth app integration to update. :param token_access_policy: :class:`TokenAccessPolicy` (optional) - Token access policy to be updated in the published OAuth app integration + New token lifetimes for the app. Both TTL fields are required when the policy is set; the single-use + refresh token settings keep their current values when omitted. If the policy is omitted, the + integration is left unchanged. \ No newline at end of file diff --git a/docs/dbdataclasses/jobs.rst b/docs/dbdataclasses/jobs.rst index 2399d3587..c5d892717 100644 --- a/docs/dbdataclasses/jobs.rst +++ b/docs/dbdataclasses/jobs.rst @@ -61,8 +61,8 @@ These dataclasses are used in the SDK to represent API requests and responses fo Scheduling priority class for a workload — its priority and preemptability when the scheduler ranks pending work. - .. py:attribute:: BEST_EFFORT - :value: "BEST_EFFORT" + .. py:attribute:: HIGH + :value: "HIGH" .. py:attribute:: NORMAL :value: "NORMAL" diff --git a/docs/dbdataclasses/workspace.rst b/docs/dbdataclasses/workspace.rst index 0a8a05112..2f53ce11e 100644 --- a/docs/dbdataclasses/workspace.rst +++ b/docs/dbdataclasses/workspace.rst @@ -247,7 +247,7 @@ These dataclasses are used in the SDK to represent API requests and responses fo .. py:class:: ScopeBackendType - The types of secret scope backends in the Secret Manager. Azure KeyVault backed secret scopes will be supported in a later release. + The types of secret scope backends in the Secret Manager. .. py:attribute:: AZURE_KEYVAULT :value: "AZURE_KEYVAULT" diff --git a/docs/workspace/agentkit/agent_kit.rst b/docs/workspace/agentkit/agent_kit.rst index 3cb675bfc..f5924c553 100644 --- a/docs/workspace/agentkit/agent_kit.rst +++ b/docs/workspace/agentkit/agent_kit.rst @@ -38,7 +38,8 @@ generates one when it is omitted. Returns ``ALREADY_EXISTS`` when an entry with the same actor, session, and path already exists. Omitted ``session_id`` is its own uniqueness key: two omitted-session entries with the same actor and path conflict, but an omitted-session entry does not - conflict with a session-scoped entry at the same actor and path. + conflict with a session-scoped entry at the same actor and path. ``session_id`` is deprecated: once it + is ignored, the uniqueness key becomes actor and path. :param parent: str Memory store that will contain the entry, in the form ``memory-stores/{managed_memory_store_id}``. @@ -284,8 +285,8 @@ .. py:method:: list_memories(parent: str, actor_id: str [, page_size: Optional[int], page_token: Optional[str], path_prefix: Optional[str], session_id: Optional[str], view: Optional[ManagedMemoryEntryView]]) -> Iterator[ManagedMemoryEntry] Lists memory entries for one actor. An exact ``path`` filters entries across sessions, ignoring - session metadata. Otherwise, ``session_id`` and ``path_prefix`` restrict the actor partition. ``view`` - controls whether each returned entry includes memory content. + session metadata. Otherwise, ``path_prefix`` and the deprecated ``session_id`` restrict the actor + partition. ``view`` controls whether each returned entry includes memory content. :param parent: str Memory store whose entries are listed, in the form ``memory-stores/{managed_memory_store_id}``. @@ -299,8 +300,9 @@ :param path_prefix: str (optional) Optional path prefix used to restrict entries within the actor partition. :param session_id: str (optional) - Optional session identifier. When set, only entries with this exact ``session_id`` are returned. - Omitted-session (cross-session) entries are not included. Ignored when path is set. + Deprecated: the service will ignore this filter. Until then, when set, only entries with this exact + ``session_id`` are returned, and omitted-session (cross-session) entries are not included. Ignored + when path is set. :param view: :class:`ManagedMemoryEntryView` (optional) Controls whether each returned entry includes memory content. Defaults to ``FULL``. @@ -460,8 +462,8 @@ Optional absolute, case-sensitive path prefix used to restrict searched entries within the actor partition. The prefix must begin with ``/`` and must not contain empty, ``.`` or ``..`` segments. :param session_id: str (optional) - Optional session identifier. When set, only entries with this exact ``session_id`` are searched. - Omitted-session (cross-session) entries are not included. + Deprecated: the service will ignore this filter. Until then, when set, only entries with this exact + ``session_id`` are searched, and omitted-session (cross-session) entries are not included. :param view: :class:`ManagedMemoryEntryView` (optional) Controls whether each returned entry includes memory content. Search scores are always returned. Defaults to ``FULL``. diff --git a/docs/workspace/aifunctions/ai_functions.rst b/docs/workspace/aifunctions/ai_functions.rst index 2b88e7bbc..d82054560 100644 --- a/docs/workspace/aifunctions/ai_functions.rst +++ b/docs/workspace/aifunctions/ai_functions.rst @@ -18,7 +18,8 @@ :param labels: any The label set to classify as. Either a JSON array of label strings (e.g. ["spam", "not_spam"]), or a JSON object mapping each label to a description (e.g. {"spam": "unsolicited bulk message", - "not_spam": "a legitimate message"}). Accepts 2 to 500 labels, each 1 to 100 characters. + "not_spam": "a legitimate message"}). Accepts 2 to 500 labels, each 1 to 100 characters. When + multilabel is true, a single label is also accepted. :param options: :class:`AiClassifyOptions` (optional) Function options. Omitted fields fall back to their documented defaults. @@ -28,7 +29,9 @@ .. py:method:: ai_decide(state: any, questions: any [, options: Optional[AiDecideOptions]]) -> AiDecideResponse Turn text and structured data into decisions your application can use. Define questions and criteria - to choose an option, estimate a probability, or assign a score given a provided state. + to choose an option, estimate a probability, or assign a score given a provided state. For REST API + requests, the default rate limit is 1,200 requests per minute per workspace. Contact your Databricks + account team to request a higher limit. :param state: any A string, JSON object, or array containing the content, related context, and examples needed to diff --git a/docs/workspace/catalog/connections.rst b/docs/workspace/catalog/connections.rst index ead2f7f55..0bfa5bd60 100644 --- a/docs/workspace/catalog/connections.rst +++ b/docs/workspace/catalog/connections.rst @@ -48,20 +48,23 @@ :param name: str Name of the connection. :param connection_type: :class:`ConnectionType` - The type of connection. + The type of external data source or service that the connection reaches. The connection type + determines which keys are required in options and cannot be changed after creation. :param options: Dict[str,str] A map of key-value properties attached to the securable. :param comment: str (optional) User-provided free-form text description. :param environment_settings: :class:`EnvironmentSettings` (optional) - [Create,Update:OPT] Connection environment settings as EnvironmentSettings object. + Environment settings for the connection, such as the Java libraries that it needs and the + environment version. :param parent: str (optional) Parent schema for schema-level connections, in format "schemas/{catalog}.{schema}". Absent for metastore-level (L1) connections. :param properties: Dict[str,str] (optional) A map of key-value properties attached to the securable. :param read_only: bool (optional) - If the connection is read only. + Whether the connection is read only. All connections are currently read only, so a value set on + create or update is ignored. :param secrets: Dict[str,str] (optional) A map of option names to UC Secret references. Keys are connection option names (same as in OptionsKVPairs) and values are UC Secret fully qualified names. @@ -118,7 +121,7 @@ # cleanup w.connections.delete(name=conn_create.name) - Gets a connection from it's name. + Gets a connection from its name. :param name: str Name of the connection. @@ -203,18 +206,21 @@ # cleanup w.connections.delete(name=conn_create.name) - Updates the connection that matches the supplied name. + Updates the connection that matches the supplied name. When options are provided, they replace the + existing options of the connection, so include every key that the connection type requires. :param name: str Name of the connection. :param options: Dict[str,str] A map of key-value properties attached to the securable. :param environment_settings: :class:`EnvironmentSettings` (optional) - [Create,Update:OPT] Connection environment settings as EnvironmentSettings object. + Environment settings for the connection, such as the Java libraries that it needs and the + environment version. :param new_name: str (optional) New name for the connection. :param owner: str (optional) - Username of current owner of the connection. + Username of the current owner of the connection. The creator becomes the owner at creation, and + ownership can be transferred on update. :param secrets: Dict[str,str] (optional) A map of option names to UC Secret references. Keys are connection option names (same as in OptionsKVPairs) and values are UC Secret fully qualified names. diff --git a/docs/workspace/catalog/credentials.rst b/docs/workspace/catalog/credentials.rst index fec6710d9..873000759 100644 --- a/docs/workspace/catalog/credentials.rst +++ b/docs/workspace/catalog/credentials.rst @@ -61,12 +61,16 @@ .. py:method:: generate_temporary_service_credential(credential_name: str [, azure_options: Optional[GenerateTemporaryServiceCredentialAzureOptions], gcp_options: Optional[GenerateTemporaryServiceCredentialGcpOptions]]) -> TemporaryCredentials Returns a set of temporary credentials generated using the specified service credential. The caller - must be a metastore admin or have the metastore privilege **ACCESS** on the service credential. + must be a metastore admin or have the **ACCESS** privilege on the service credential. :param credential_name: str The name of the service credential used to generate a temporary credential :param azure_options: :class:`GenerateTemporaryServiceCredentialAzureOptions` (optional) + Options for an Azure service credential. They are required when the service credential uses an Azure + managed identity. :param gcp_options: :class:`GenerateTemporaryServiceCredentialGcpOptions` (optional) + Options for a GCP service credential. They are required when the service credential uses a + Databricks-managed GCP service account. :returns: :class:`TemporaryCredentials` diff --git a/docs/workspace/catalog/functions.rst b/docs/workspace/catalog/functions.rst index af6b04262..832dfc446 100644 --- a/docs/workspace/catalog/functions.rst +++ b/docs/workspace/catalog/functions.rst @@ -40,9 +40,9 @@ :param name: str The fully-qualified name of the function (of the form - **catalog_name**.**schema_name**.**function__name**) . + **catalog_name**.**schema_name**.**function_name**). :param force: bool (optional) - Force deletion even if the function is notempty. + Force deletion even if the function is not empty. @@ -60,7 +60,7 @@ :param name: str The fully-qualified name of the function (of the form - **catalog_name**.**schema_name**.**function__name**). + **catalog_name**.**schema_name**.**function_name**). :param include_browse: bool (optional) Whether to include functions in the response for which the principal can only access selective metadata for @@ -118,7 +118,7 @@ :param name: str The fully-qualified name of the function (of the form - **catalog_name**.**schema_name**.**function__name**). + **catalog_name**.**schema_name**.**function_name**). :param owner: str (optional) Username of current owner of the function. diff --git a/docs/workspace/cleanrooms/clean_room_assets.rst b/docs/workspace/cleanrooms/clean_room_assets.rst index 2e9928442..50b103ad9 100644 --- a/docs/workspace/cleanrooms/clean_room_assets.rst +++ b/docs/workspace/cleanrooms/clean_room_assets.rst @@ -68,7 +68,8 @@ .. py:method:: list(clean_room_name: str [, page_token: Optional[str]]) -> Iterator[CleanRoomAsset] - List assets. + List the assets in a clean room. Listed assets do not include their asset-type specific details, such + as table columns or notebook content; use the get method to retrieve them. :param clean_room_name: str Name of the clean room. diff --git a/docs/workspace/dashboards/genie.rst b/docs/workspace/dashboards/genie.rst index 4a48feae4..0fec101d2 100644 --- a/docs/workspace/dashboards/genie.rst +++ b/docs/workspace/dashboards/genie.rst @@ -189,7 +189,10 @@ .. py:method:: genie_create_eval_run(space_id: str [, benchmark_question_ids: Optional[List[str]]]) -> GenieEvalRunResponse - Creates and runs chat-mode evaluations for multiple benchmark questions in a Genie space. + Starts a benchmark evaluation run that asks Genie each selected benchmark question in a Genie space + and compares every response with the benchmark SQL. The run executes asynchronously: the response is + the new run with its current status. If it is still running, poll with the get method until the status + is terminal. :param space_id: str The ID associated with the Genie space where the evaluations will be executed. @@ -202,7 +205,9 @@ .. py:method:: genie_get_eval_result_details(space_id: str, eval_run_id: str, result_id: str) -> GenieEvalResultDetails - Get details for evaluation results. + Gets the full result for one benchmark question in an evaluation run: its assessment and the reasons + for it, Genie's response with the SQL execution result, and the expected response from the benchmark. + The result must belong to the given run. :param space_id: str The ID associated with the Genie space where the evaluation run is located. @@ -216,18 +221,22 @@ .. py:method:: genie_get_eval_run(space_id: str, eval_run_id: str) -> GenieEvalRunResponse - Get evaluation run details. + Gets the current status and summary counts of a benchmark evaluation run. Poll this method until + ``eval_run_status`` is terminal: DONE, EVALUATION_CANCELLED or EVALUATION_TIMEOUT. :param space_id: str The ID associated with the Genie space where the evaluation run is located. :param eval_run_id: str + The ID of the evaluation run, as returned when the run was created. :returns: :class:`GenieEvalRunResponse` .. py:method:: genie_list_eval_results(space_id: str, eval_run_id: str [, page_size: Optional[int], page_token: Optional[str]]) -> GenieListEvalResultsResponse - List evaluation results for a specific evaluation run. + Lists the results of a benchmark evaluation run, one per benchmark question. Each entry carries the + result status and a snapshot of the question and benchmark answer; the assessment and Genie's response + are available through the result details method. :param space_id: str The ID associated with the Genie space where the evaluation run is located. @@ -243,7 +252,8 @@ .. py:method:: genie_list_eval_runs(space_id: str [, page_size: Optional[int], page_token: Optional[str]]) -> GenieListEvalRunsResponse - Lists all evaluation runs in a space. + Lists the benchmark evaluation runs in a Genie space with the current status and summary counts of + each run. :param space_id: str The ID associated with the Genie space where the evaluation run is located. diff --git a/docs/workspace/dataclassification/data_classification.rst b/docs/workspace/dataclassification/data_classification.rst index 4771c7c54..2393037b0 100644 --- a/docs/workspace/dataclassification/data_classification.rst +++ b/docs/workspace/dataclassification/data_classification.rst @@ -12,12 +12,12 @@ Create Data Classification configuration for a catalog. - Creates a new config resource, which enables Data Classification for the specified catalog. - - - The config must not already exist for the catalog. + Creates a new config resource, which enables Data Classification for the specified catalog. The + catalog must not already have a config. Creating the config starts a scan of the selected schemas and + schedules recurring scans. :param parent: str - Parent resource in the format: catalogs/{catalog_name} + Name of the catalog to enable, in the format catalogs/{catalog_name}. :param catalog_config: :class:`CatalogConfig` The configuration to create. @@ -28,8 +28,12 @@ Delete Data Classification configuration for a catalog. + Deleting the config disables Data Classification for the catalog and stops its scheduled scans. Tags + that auto-tagging already applied to columns are not removed. Deleting a config that does not exist + succeeds. + :param name: str - Resource name in the format: catalogs/{catalog_name}/config + Resource name of the config, in the format catalogs/{catalog_name}/config. @@ -39,7 +43,7 @@ Get the Data Classification configuration for a catalog. :param name: str - Resource name in the format: catalogs/{catalog_name}/config + Resource name of the config, in the format catalogs/{catalog_name}/config. :returns: :class:`CatalogConfig` @@ -48,9 +52,8 @@ Update the Data Classification configuration for a catalog. - - The config must already exist for the catalog. - - Updates fields specified in the update_mask. Use update_mask field to perform partial updates of the - configuration. + The config must already exist for the catalog. Only the fields named in ``update_mask`` change; the + other fields keep their current values. :param name: str Resource name in the format: catalogs/{catalog_name}/config. @@ -58,7 +61,8 @@ The configuration to apply to the catalog. The name field in catalog_config identifies which resource to update. :param update_mask: FieldMask - Field mask specifying which fields to update. + Comma-separated list of the fields of catalog_config to update, for example ``included_schemas`` or + ``auto_tag_configs``. :returns: :class:`CatalogConfig` \ No newline at end of file diff --git a/docs/workspace/dataquality/data_quality.rst b/docs/workspace/dataquality/data_quality.rst index d52565c9d..a85966fe9 100644 --- a/docs/workspace/dataquality/data_quality.rst +++ b/docs/workspace/dataquality/data_quality.rst @@ -109,12 +109,15 @@ .. py:method:: delete_monitor(object_type: str, object_id: str) - Delete a data quality monitor on Unity Catalog object. + Delete a data quality monitor on a Unity Catalog object. For the ``table`` ``object_type``, the caller must have either of the following sets of permissions: - **MANAGE** and **USE_CATALOG** on the table's parent catalog. **USE_CATALOG** on the table's parent - catalog, and **MANAGE** and **USE_SCHEMA** on the table's parent schema. **USE_CATALOG** on the - table's parent catalog, **USE_SCHEMA** on the table's parent schema, and **MANAGE** on the table. + + 1. **MANAGE** and **USE_CATALOG** on the table's parent catalog. + 2. **USE_CATALOG** on the table's parent catalog, and **MANAGE** and **USE_SCHEMA** on the table's + parent schema. + 3. **USE_CATALOG** on the table's parent catalog, **USE_SCHEMA** on the table's parent schema, and + **MANAGE** on the table. Note that the metric tables and dashboard will not be deleted as part of this call; those assets must be manually cleaned up (if desired). @@ -264,7 +267,9 @@ (Unimplemented) List data quality monitors. :param page_size: int (optional) + The maximum number of monitors to return in one page. :param page_token: str (optional) + Pagination token from a previous response, used to fetch the next page. :returns: Iterator over :class:`Monitor` @@ -313,7 +318,8 @@ .. py:method:: update_monitor(object_type: str, object_id: str, monitor: Monitor, update_mask: str) -> Monitor - Update a data quality monitor on Unity Catalog object. + Update a data quality monitor on a Unity Catalog object. Only the fields named in ``update_mask`` are + changed. For the ``table`` ``object_type``, the caller must have either of the following sets of permissions: @@ -347,7 +353,7 @@ 2. In `Catalog Explorer `__ > select the ``table`` > go to the ``Details`` tab > the ``Table ID`` field. :param monitor: :class:`Monitor` - The monitor to update. + The new values for the monitor. Only the fields named in ``update_mask`` are applied. :param update_mask: str The field mask to specify which fields to update as a comma-separated list. Example value: ``data_profiling_config.custom_metrics,data_profiling_config.schedule.quartz_cron_expression`` diff --git a/docs/workspace/environments/environments.rst b/docs/workspace/environments/environments.rst index 42312da4e..4b437b06d 100644 --- a/docs/workspace/environments/environments.rst +++ b/docs/workspace/environments/environments.rst @@ -45,7 +45,8 @@ .. py:method:: get_default_workspace_base_environment(name: str) -> DefaultWorkspaceBaseEnvironment Gets the default WorkspaceBaseEnvironment configuration for the workspace. Returns the current default - base environment settings for both CPU and GPU compute. + base environment settings for both CPU and GPU compute. An unset CPU or GPU field means that compute + type uses the Databricks Standard base environment. :param name: str A static resource name of the default workspace base environment. Format: @@ -121,7 +122,9 @@ .. py:method:: update_default_workspace_base_environment(name: str, default_workspace_base_environment: DefaultWorkspaceBaseEnvironment, update_mask: FieldMask) -> DefaultWorkspaceBaseEnvironment Updates the default WorkspaceBaseEnvironment configuration for the workspace. Sets the specified base - environments as the workspace defaults for CPU and/or GPU compute. + environments as the workspace defaults for CPU and/or GPU compute. Unsetting a default makes that + compute type use the Databricks Standard base environment. The Standard base environment has no + resource name, so unsetting the field is the only way to select it. :param name: str The resource name of this singleton resource. Format: default-workspace-base-environment @@ -134,7 +137,9 @@ To unset one or both defaults, include the field path(s) in the mask and omit them from the request body. To unset both, you must list both paths explicitly — the wildcard '*' cannot be used to - unset fields. + unset fields. Unsetting a default makes that compute type use the Databricks Standard base + environment. The Standard base environment has no resource name, so unsetting the field is the only + way to select it. :returns: :class:`DefaultWorkspaceBaseEnvironment` diff --git a/docs/workspace/iam/permissions.rst b/docs/workspace/iam/permissions.rst index dc00a81ab..392c55e9e 100644 --- a/docs/workspace/iam/permissions.rst +++ b/docs/workspace/iam/permissions.rst @@ -64,7 +64,9 @@ queries, registered-models, repos, serving-endpoints, supervisor-agents, vector-search-endpoints, or warehouses. :param request_object_id: str - The id of the request object. + The id of the object. It is the id that the object's own API uses, for example the cluster id for + clusters, the job id for jobs, and the workspace object id for notebooks and directories. For the + ``authorization`` object type, use ``tokens`` to manage token permissions. :returns: :class:`ObjectPermissions` @@ -97,6 +99,9 @@ queries, registered-models, repos, serving-endpoints, supervisor-agents, vector-search-endpoints, or warehouses. :param request_object_id: str + The id of the object. It is the id that the object's own API uses, for example the cluster id for + clusters, the job id for jobs, and the workspace object id for notebooks and directories. For the + ``authorization`` object type, use ``tokens`` to manage token permissions. :returns: :class:`GetPermissionLevelsResponse` @@ -135,9 +140,10 @@ # cleanup w.groups.delete(id=group.id) - 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 parent objects or root - object. + Sets permissions on an object, replacing all direct permissions with the ones in the request. + Principals that are not in the request lose their direct permissions on the object, and all direct + permissions are deleted if none are specified. Objects can inherit permissions from their parent + objects or root object. :param request_object_type: str The type of the request object. Can be one of the following: alerts, alertsv2, authorization, @@ -146,16 +152,22 @@ queries, registered-models, repos, serving-endpoints, supervisor-agents, vector-search-endpoints, or warehouses. :param request_object_id: str - The id of the request object. + The id of the object. It is the id that the object's own API uses, for example the cluster id for + clusters, the job id for jobs, and the workspace object id for notebooks and directories. For the + ``authorization`` object type, use ``tokens`` to manage token permissions. :param access_control_list: List[:class:`AccessControlRequest`] (optional) + Permissions to apply to the object, with one entry per principal. Each entry names exactly one + principal through ``user_name``, ``group_name`` or ``service_principal_name`` and the + ``permission_level`` for that principal. :returns: :class:`ObjectPermissions` .. py:method:: update(request_object_type: str, request_object_id: str [, access_control_list: Optional[List[AccessControlRequest]]]) -> ObjectPermissions - Updates the permissions on an object. Objects can inherit permissions from their parent objects or - root object. + Updates the permissions on an object by adding or changing the permissions of the principals in the + request. Principals that are not in the request keep their existing permissions. Objects can inherit + permissions from their parent objects or root object. :param request_object_type: str The type of the request object. Can be one of the following: alerts, alertsv2, authorization, @@ -164,8 +176,13 @@ queries, registered-models, repos, serving-endpoints, supervisor-agents, vector-search-endpoints, or warehouses. :param request_object_id: str - The id of the request object. + The id of the object. It is the id that the object's own API uses, for example the cluster id for + clusters, the job id for jobs, and the workspace object id for notebooks and directories. For the + ``authorization`` object type, use ``tokens`` to manage token permissions. :param access_control_list: List[:class:`AccessControlRequest`] (optional) + Permissions to apply to the object, with one entry per principal. Each entry names exactly one + principal through ``user_name``, ``group_name`` or ``service_principal_name`` and the + ``permission_level`` for that principal. :returns: :class:`ObjectPermissions` \ No newline at end of file diff --git a/docs/workspace/jobs/jobs.rst b/docs/workspace/jobs/jobs.rst index 3a26d3803..2c32966aa 100644 --- a/docs/workspace/jobs/jobs.rst +++ b/docs/workspace/jobs/jobs.rst @@ -242,8 +242,10 @@ :param parameters: List[:class:`JobParameterDefinition`] (optional) Job-level parameter definitions :param parent_path: str (optional) - Path of the job parent folder in workspace file tree. If absent, the job doesn't have a workspace - object. + Path of the job parent folder in workspace file tree. If absent, the job doesn't have a parent + folder. + + Example: /Workspace/Projects/my_project :param performance_target: :class:`PerformanceTarget` (optional) The performance mode on a serverless job. This field determines the level of compute performance or cost-efficiency for the run. The performance target does not apply to tasks that run on Serverless diff --git a/docs/workspace/marketplace/provider_files.rst b/docs/workspace/marketplace/provider_files.rst index 0120e52a7..e457eabc2 100644 --- a/docs/workspace/marketplace/provider_files.rst +++ b/docs/workspace/marketplace/provider_files.rst @@ -8,41 +8,54 @@ .. py:method:: create(file_parent: FileParent, marketplace_file_type: MarketplaceFileType, mime_type: str [, display_name: Optional[str]]) -> CreateFileResponse - Create a file. Currently, only provider icons and attached notebooks are supported. + Creates a file and returns a short-lived URL for uploading its content with an HTTP PUT request. Only + provider icons (PROVIDER_ICON files on a PROVIDER parent) and sample notebooks (EMBEDDED_NOTEBOOK + files on a LISTING parent) are supported. :param file_parent: :class:`FileParent` + Provider profile or listing to attach the file to. :param marketplace_file_type: :class:`MarketplaceFileType` + Purpose of the file. PROVIDER_ICON requires a PROVIDER parent; EMBEDDED_NOTEBOOK requires a LISTING + parent. :param mime_type: str + MIME type of the file content: text/html for notebooks; image/png, image/jpeg or image/svg+xml for + icons. :param display_name: str (optional) + Name shown to consumers for the file, for example a notebook title. At most 255 characters. :returns: :class:`CreateFileResponse` .. py:method:: delete(file_id: str) - Delete a file + Deletes a file. Fails if the file is still in use. :param file_id: str + ID of the file to delete. .. py:method:: get(file_id: str) -> GetFileResponse - Get a file + Gets a file's metadata, including a short-lived download URL. :param file_id: str + ID of the file. :returns: :class:`GetFileResponse` .. py:method:: list(file_parent: FileParent [, page_size: Optional[int], page_token: Optional[str]]) -> Iterator[FileInfo] - List files attached to a parent entity. + Lists the files attached to a provider profile or a listing. :param file_parent: :class:`FileParent` + Provider profile or listing whose files to list. :param page_size: int (optional) + Maximum number of results to return per page. :param page_token: str (optional) + Token from the next_page_token field of a previous response. Omit to get the first page. :returns: Iterator over :class:`FileInfo` \ No newline at end of file diff --git a/docs/workspace/marketplace/provider_listings.rst b/docs/workspace/marketplace/provider_listings.rst index 253dc8679..6fad2fef3 100644 --- a/docs/workspace/marketplace/provider_listings.rst +++ b/docs/workspace/marketplace/provider_listings.rst @@ -9,25 +9,30 @@ .. py:method:: create(listing: Listing) -> CreateListingResponse - Create a new listing + Creates a listing under one of the caller's provider profiles. The listing name, provider ID and + visibility are required, and the caller must have access to any share that the listing references. + Returns the ID of the new listing. :param listing: :class:`Listing` + Listing to create. :returns: :class:`CreateListingResponse` .. py:method:: delete(id: str) - Delete a listing + Deletes a listing permanently. The underlying share is not deleted, and consumers who already have + access to the share keep that access until it is revoked in Delta Sharing. :param id: str + ID of the listing to delete. .. py:method:: get(id: str) -> GetListingResponse - Get a listing + Gets a listing owned by one of the caller's provider profiles. :param id: str @@ -36,20 +41,25 @@ .. py:method:: list( [, page_size: Optional[int], page_token: Optional[str]]) -> Iterator[Listing] - List listings owned by this provider + Lists the listings owned by the provider profiles in the caller's account. :param page_size: int (optional) + Maximum number of results to return per page. :param page_token: str (optional) + Token from the next_page_token field of a previous response. Omit to get the first page. :returns: Iterator over :class:`Listing` .. py:method:: update(id: str, listing: Listing) -> UpdateListingResponse - Update a listing + Updates a listing. Send the full listing definition; the listing type cannot be changed after the + listing is created, and changing the share re-links the listing to the new share. :param id: str + ID of the listing to update. :param listing: :class:`Listing` + Full definition of the listing, including the fields that are not changing. :returns: :class:`UpdateListingResponse` \ No newline at end of file diff --git a/docs/workspace/marketplace/provider_personalization_requests.rst b/docs/workspace/marketplace/provider_personalization_requests.rst index 43ce06ca8..9f69629f0 100644 --- a/docs/workspace/marketplace/provider_personalization_requests.rst +++ b/docs/workspace/marketplace/provider_personalization_requests.rst @@ -20,13 +20,22 @@ .. py:method:: update(listing_id: str, request_id: str, status: PersonalizationRequestStatus [, reason: Optional[str], share: Optional[ShareInfo]]) -> UpdatePersonalizationRequestResponse - Update personalization request. This method only permits updating the status of the request. + Updates the status of a personalization request; other properties of the request cannot be changed. + Fulfilling a request grants the consumer access to the share, and denying a fulfilled request revokes + that access. The listing must be published. :param listing_id: str + ID of the listing that the request was made for. :param request_id: str + ID of the personalization request. :param status: :class:`PersonalizationRequestStatus` + New status of the request. Allowed transitions: NEW or REQUEST_PENDING to REQUEST_PENDING, FULFILLED + or DENIED; FULFILLED to DENIED; DENIED to REQUEST_PENDING. :param reason: str (optional) + Message for the consumer that explains the status change, at most 255 characters. :param share: :class:`ShareInfo` (optional) + Share to grant the consumer access to. Required when fulfilling a request for a listing with data + assets and not allowed with other statuses. Ignored for app and MCP server listings. :returns: :class:`UpdatePersonalizationRequestResponse` \ No newline at end of file diff --git a/docs/workspace/marketplace/provider_provider_analytics_dashboards.rst b/docs/workspace/marketplace/provider_provider_analytics_dashboards.rst index a6003001e..a4e1798dd 100644 --- a/docs/workspace/marketplace/provider_provider_analytics_dashboards.rst +++ b/docs/workspace/marketplace/provider_provider_analytics_dashboards.rst @@ -8,8 +8,9 @@ .. py:method:: create() -> ProviderAnalyticsDashboard - Create provider analytics dashboard. Returns Marketplace specific ``id``. Not to be confused with the - Lakeview dashboard id. + Creates the Provider Analytics Dashboard in the caller's workspace from the latest template. Fails if + the dashboard already exists. Returns the Marketplace-specific ``id`` of the dashboard record, which + is distinct from the AI/BI dashboard ID. :returns: :class:`ProviderAnalyticsDashboard` @@ -17,7 +18,8 @@ .. py:method:: get() -> ListProviderAnalyticsDashboardResponse - Get provider analytics dashboard. + Gets the Provider Analytics Dashboard that was created for the caller's account. Returns an empty + response if the dashboard has not been created yet. :returns: :class:`ListProviderAnalyticsDashboardResponse` @@ -25,7 +27,7 @@ .. py:method:: get_latest_version() -> GetLatestVersionProviderAnalyticsDashboardResponse - Get latest version of provider analytics dashboard. + Gets the latest available version of the Provider Analytics Dashboard template. :returns: :class:`GetLatestVersionProviderAnalyticsDashboardResponse` @@ -33,13 +35,15 @@ .. py:method:: update(id: str [, version: Optional[int]]) -> UpdateProviderAnalyticsDashboardResponse - Update provider analytics dashboard. + Updates the Provider Analytics Dashboard to a newer version of the template. The requested version + must be newer than the version that the dashboard currently uses. :param id: str - id is immutable property and can't be updated. + Marketplace-specific ID of the dashboard record, as returned when the dashboard was created or + retrieved. :param version: int (optional) - this is the version of the dashboard template we want to update our user to current expectation is - that it should be equal to latest version of the dashboard template + Version of the dashboard template to update to. Must be newer than the version that the dashboard + currently uses; use the version returned by getLatestVersionProviderAnalyticsDashboard. :returns: :class:`UpdateProviderAnalyticsDashboardResponse` \ No newline at end of file diff --git a/docs/workspace/marketplace/provider_providers.rst b/docs/workspace/marketplace/provider_providers.rst index 8d7a9cb34..4852d2535 100644 --- a/docs/workspace/marketplace/provider_providers.rst +++ b/docs/workspace/marketplace/provider_providers.rst @@ -8,25 +8,27 @@ .. py:method:: create(provider: ProviderInfo) -> CreateProviderResponse - Create a provider + Creates a provider profile in the caller's account. Returns the ID of the new profile. :param provider: :class:`ProviderInfo` + Provider profile to create. :returns: :class:`CreateProviderResponse` .. py:method:: delete(id: str) - Delete provider + Deletes a provider profile and all of the listings that it owns. :param id: str + ID of the provider profile to delete. .. py:method:: get(id: str) -> GetProviderResponse - Get provider profile + Gets a provider profile by ID. :param id: str @@ -35,20 +37,24 @@ .. py:method:: list( [, page_size: Optional[int], page_token: Optional[str]]) -> Iterator[ProviderInfo] - List provider profiles for account. + Lists the provider profiles in the caller's account. :param page_size: int (optional) + Maximum number of results to return per page. :param page_token: str (optional) + Token from the next_page_token field of a previous response. Omit to get the first page. :returns: Iterator over :class:`ProviderInfo` .. py:method:: update(id: str, provider: ProviderInfo) -> UpdateProviderResponse - Update provider profile + Updates a provider profile. Send the full profile definition. :param id: str + ID of the provider profile to update. :param provider: :class:`ProviderInfo` + Full definition of the provider profile, including the fields that are not changing. :returns: :class:`UpdateProviderResponse` \ No newline at end of file diff --git a/docs/workspace/pipelines/pipelines.rst b/docs/workspace/pipelines/pipelines.rst index bb8e2a9a9..da966746b 100644 --- a/docs/workspace/pipelines/pipelines.rst +++ b/docs/workspace/pipelines/pipelines.rst @@ -95,7 +95,9 @@ :param parent_path: str (optional) Path of the pipeline parent folder in workspace file tree. - If absent, the pipeline doesn't have a workspace object. + If absent, the pipeline doesn't have a parent folder. + + Example: /Workspace/Projects/my_project :param photon: bool (optional) Whether Photon is enabled for this pipeline. :param restart_window: :class:`RestartWindow` (optional) @@ -173,6 +175,10 @@ :param allow_duplicate_names: bool (optional) If false, deployment will fail if name conflicts with that of another pipeline. + + Ignored when ``parent_path`` is set. A pipeline in a workspace folder must have a name that is + unique within that folder, and creation fails if the folder already contains an object with the same + name. :param budget_policy_id: str (optional) ID (UUID) of the serverless budget policy applied to this pipeline. Only supported for serverless pipelines. @@ -232,7 +238,9 @@ :param parent_path: str (optional) Path of the pipeline parent folder in workspace file tree. - If absent, the pipeline doesn't have a workspace object. + If absent, the pipeline doesn't have a parent folder. + + Example: /Workspace/Projects/my_project :param photon: bool (optional) Whether Photon is enabled for this pipeline. :param restart_window: :class:`RestartWindow` (optional) @@ -628,7 +636,10 @@ :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. + If false, deployment will fail if name has changed and conflicts with the name of another pipeline. + + Ignored when the pipeline is in a workspace folder or the request sets ``parent_path``. Renaming or + moving such a pipeline fails if the target folder already contains an object with the same name. :param budget_policy_id: str (optional) ID (UUID) of the serverless budget policy applied to this pipeline. Only supported for serverless pipelines. @@ -688,7 +699,9 @@ :param parent_path: str (optional) Path of the pipeline parent folder in workspace file tree. - If absent, the pipeline doesn't have a workspace object. + If absent, the pipeline doesn't have a parent folder. + + Example: /Workspace/Projects/my_project :param photon: bool (optional) Whether Photon is enabled for this pipeline. :param restart_window: :class:`RestartWindow` (optional) diff --git a/docs/workspace/postgres/postgres.rst b/docs/workspace/postgres/postgres.rst index 17b8094fa..3e92f6f6a 100644 --- a/docs/workspace/postgres/postgres.rst +++ b/docs/workspace/postgres/postgres.rst @@ -210,8 +210,8 @@ The ID used to identify and manage the Role resource through the API. The Postgres role name is specified in ``spec.postgres_role``. - This value should be 4-63 characters, and valid characters are lowercase letters, numbers, and - hyphens, as defined by RFC 1123. + This value should be 3-63 characters, start with a lowercase letter, end with a lowercase letter or + digit, and contain only lowercase letters, digits, and hyphens. If role_id is not specified in the request, it is generated automatically. @@ -371,7 +371,8 @@ projects/{project_id}/branches/{branch_id}/roles/{role_id} :param reassign_owned_to: str (optional) Reassign objects. If this is set, all objects owned by the role are reassigned to the role specified - in this parameter. + in this parameter. The role must already exist. Format: + projects/{project_id}/branches/{branch_id}/roles/{role_id} NOTE: setting this requires spinning up a compute to succeed, since it involves running SQL queries. diff --git a/docs/workspace/settingsv2/workspace_settings_v2.rst b/docs/workspace/settingsv2/workspace_settings_v2.rst index 2df9012b4..93de54187 100644 --- a/docs/workspace/settingsv2/workspace_settings_v2.rst +++ b/docs/workspace/settingsv2/workspace_settings_v2.rst @@ -8,11 +8,11 @@ .. py:method:: get_public_workspace_setting(name: str) -> Setting - Get a setting value at workspace level. See :method:settingsv2/listworkspacesettingsmetadata for list - of setting available via public APIs. + Get a setting value at workspace level. See :method:settingsv2/listworkspacesettingsmetadata for the + list of settings available via public APIs. :param name: str - Name of the setting + Name of the setting to retrieve. :returns: :class:`Setting` @@ -39,15 +39,15 @@ .. py:method:: patch_public_workspace_setting(name: str, setting: Setting) -> Setting - Patch a setting value at workspace level. See :method:settingsv2/listworkspacesettingsmetadata for - list of setting available via public APIs at workspace level. To determine the correct field to + Patch a setting value at workspace level. See :method:settingsv2/listworkspacesettingsmetadata for the + list of settings available via public APIs at workspace level. To determine the correct field to include in a patch request, refer to the type field of the setting returned in the :method:settingsv2/listworkspacesettingsmetadata response. Note: Page refresh is required for changes to take effect in UI. :param name: str - Name of the setting + Name of the setting to update. :param setting: :class:`Setting` :returns: :class:`Setting` diff --git a/docs/workspace/softwareartifacts/software_artifacts.rst b/docs/workspace/softwareartifacts/software_artifacts.rst index e4c1ff6fe..c7d8b3f2f 100644 --- a/docs/workspace/softwareartifacts/software_artifacts.rst +++ b/docs/workspace/softwareartifacts/software_artifacts.rst @@ -6,6 +6,31 @@ Manage software artifacts and their versions in Unity Catalog. + .. py:method:: delete_software_artifact(name: str [, force: Optional[bool]]) + + Deletes a software artifact. Fails if the artifact still has versions unless ``force`` is set. + + :param name: str + Resource name of the software artifact, of the form + ``software-artifacts/{catalog}.{schema}.{artifact}``. + :param force: bool (optional) + Force deletion even if the software artifact has versions, deleting them with it. Default is false. + + + + + .. py:method:: delete_software_artifact_version(name: str) + + Deletes a software artifact version. + + :param name: str + Resource name of the version, of the form + ``software-artifacts/{catalog}.{schema}.{artifact}/versions/{version}``, where ``{version}`` is the + version's content digest, for example ``sha256:``. + + + + .. py:method:: get_software_artifact(name: str) -> SoftwareArtifact Gets a software artifact by its resource name. Returns ``NOT_FOUND`` if the artifact does not exist. diff --git a/docs/workspace/sql/statement_execution.rst b/docs/workspace/sql/statement_execution.rst index 5a6066bdc..2130dbc55 100644 --- a/docs/workspace/sql/statement_execution.rst +++ b/docs/workspace/sql/statement_execution.rst @@ -258,9 +258,16 @@ The parameters can be passed in the request body as follows: - ``{ ..., "statement": "SELECT * FROM my_table WHERE name = :my_name AND date = :my_date", - "parameters": [ { "name": "my_name", "value": "the name" }, { "name": "my_date", "value": - "2020-01-01", "type": "DATE" } ] }`` + .. code-block:: + + { + ..., + "statement": "SELECT * FROM my_table WHERE name = :my_name AND date = :my_date", + "parameters": [ + { "name": "my_name", "value": "the name" }, + { "name": "my_date", "value": "2020-01-01", "type": "DATE" } + ] + } Currently, positional parameters denoted by a ``?`` marker are not supported by the Databricks SQL Statement Execution API. @@ -332,6 +339,7 @@ The statement ID is returned upon successfully submitting a SQL statement, and is a required reference for all subsequent calls. :param chunk_index: int + The zero-based index of the result chunk to fetch. :returns: :class:`ResultData` \ No newline at end of file diff --git a/docs/workspace/sql/warehouses.rst b/docs/workspace/sql/warehouses.rst index aeb1dd141..c042af213 100644 --- a/docs/workspace/sql/warehouses.rst +++ b/docs/workspace/sql/warehouses.rst @@ -48,7 +48,7 @@ Defaults to 120 mins :param channel: :class:`Channel` (optional) - Channel Details + Channel that determines which Databricks SQL version the warehouse runs. :param cluster_size: str (optional) Size of the clusters allocated for this warehouse. Increasing the size of a spark cluster allows you to run larger queries on it. If you want to increase the number of concurrent queries, please tune @@ -67,7 +67,7 @@ - 4X-Large - 5X-Large :param creator_name: str (optional) - warehouse creator name + Name of the user who created the warehouse. Set by the server and ignored in requests. :param customer_version_label: str (optional) Compute version label for a REALTIME warehouse. This field is output only. :param enable_photon: bool (optional) @@ -103,12 +103,12 @@ Defaults to 1 :param name: str (optional) - Logical name for the cluster. + Logical name for the warehouse. Supported values: - Must be unique within an org. - - Must be less than 100 characters. + - Must be 1 to 100 characters. :param reyden_cluster_size_multiplier: float (optional) Cluster size multiplier for Reyden warehouses. Scales the effective compute capacity relative to the nominal virtual cluster size. Only meaningful when the warehouse is of Reyden type. @@ -120,9 +120,12 @@ - Values above the configured maximum are capped at that maximum. - When absent, the warehouse is treated as having a multiplier of 1.0. :param spot_instance_policy: :class:`SpotInstancePolicy` (optional) - Configurations whether the endpoint should use spot instances. + Configures whether the warehouse should use spot instances. COST_OPTIMIZED uses spot instances where + the cloud provider supports them, and RELIABILITY_OPTIMIZED uses on-demand instances only. :param statement_timeout: int (optional) - Warehouse statement timeout in seconds. + Maximum time in seconds that a statement can run on this warehouse before it is cancelled. Set to 0 + to remove the warehouse-level timeout. Changing the value of a running warehouse restarts it. See + https://docs.databricks.com/aws/en/sql/language-manual/parameters/statement_timeout. :param tags: :class:`EndpointTags` (optional) A set of key-value pairs that will be tagged on all resources (e.g., AWS instances and EBS volumes) associated with this SQL warehouse. @@ -230,7 +233,7 @@ Defaults to 120 mins :param channel: :class:`Channel` (optional) - Channel Details + Channel that determines which Databricks SQL version the warehouse runs. :param cluster_size: str (optional) Size of the clusters allocated for this warehouse. Increasing the size of a spark cluster allows you to run larger queries on it. If you want to increase the number of concurrent queries, please tune @@ -249,7 +252,7 @@ - 4X-Large - 5X-Large :param creator_name: str (optional) - warehouse creator name + Name of the user who created the warehouse. Set by the server and ignored in requests. :param customer_version_label: str (optional) Compute version label for a REALTIME warehouse. This field is output only. :param enable_photon: bool (optional) @@ -285,12 +288,12 @@ Defaults to 1 :param name: str (optional) - Logical name for the cluster. + Logical name for the warehouse. Supported values: - Must be unique within an org. - - Must be less than 100 characters. + - Must be 1 to 100 characters. :param reyden_cluster_size_multiplier: float (optional) Cluster size multiplier for Reyden warehouses. Scales the effective compute capacity relative to the nominal virtual cluster size. Only meaningful when the warehouse is of Reyden type. @@ -302,9 +305,12 @@ - Values above the configured maximum are capped at that maximum. - When absent, the warehouse is treated as having a multiplier of 1.0. :param spot_instance_policy: :class:`SpotInstancePolicy` (optional) - Configurations whether the endpoint should use spot instances. + Configures whether the warehouse should use spot instances. COST_OPTIMIZED uses spot instances where + the cloud provider supports them, and RELIABILITY_OPTIMIZED uses on-demand instances only. :param statement_timeout: int (optional) - Warehouse statement timeout in seconds. + Maximum time in seconds that a statement can run on this warehouse before it is cancelled. Set to 0 + to remove the warehouse-level timeout. Changing the value of a running warehouse restarts it. See + https://docs.databricks.com/aws/en/sql/language-manual/parameters/statement_timeout. :param tags: :class:`EndpointTags` (optional) A set of key-value pairs that will be tagged on all resources (e.g., AWS instances and EBS volumes) associated with this SQL warehouse. @@ -475,26 +481,30 @@ :param config_param: :class:`RepeatedEndpointConfPairs` (optional) Deprecated: Use sql_configuration_parameters :param data_access_config: List[:class:`EndpointConfPair`] (optional) - Spark confs for external hive metastore configuration JSON serialized size must be less than <= 512K + Spark configuration applied to every warehouse in the workspace, for example to connect to an + external Hive metastore or to configure access to cloud storage. Only allowlisted keys are accepted, + and the JSON-serialized size must be at most 512 KB. See + https://docs.databricks.com/aws/en/admin/sql/data-access-configuration. :param enable_serverless_compute: bool (optional) Deprecated: only setting this to true is allowed. :param enabled_warehouse_types: List[:class:`WarehouseTypePair`] (optional) List of Warehouse Types allowed in this workspace (limits allowed value of the type field in CreateWarehouse and EditWarehouse). Note: Some types cannot be disabled, they don't need to be specified in SetWorkspaceWarehouseConfig. Note: Disabling a type may cause existing warehouses to be - converted to another type. Used by frontend to save specific type availability in the warehouse - create and edit form UI. + converted to another type. :param global_param: :class:`RepeatedEndpointConfPairs` (optional) Deprecated: Use sql_configuration_parameters :param google_service_account: str (optional) - GCP only: Google Service Account used to pass to cluster to access Google Cloud Storage + GCP only: Google service account that the warehouse clusters use to access Google Cloud Storage. :param instance_profile_arn: str (optional) AWS Only: The instance profile used to pass an IAM role to the SQL warehouses. This configuration is also applied to the workspace's serverless compute for notebooks and jobs. :param security_policy: :class:`SetWorkspaceWarehouseConfigRequestSecurityPolicy` (optional) Security policy for warehouses :param sql_configuration_parameters: :class:`RepeatedEndpointConfPairs` (optional) - SQL configuration parameters + SQL configuration parameters applied to every warehouse in the workspace. Only parameters that can + be set at the workspace scope are accepted. See + https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-parameters. diff --git a/docs/workspace/statementexecutionv2/statement_execution_v2.rst b/docs/workspace/statementexecutionv2/statement_execution_v2.rst index b2fb22d29..0e9869bf6 100644 --- a/docs/workspace/statementexecutionv2/statement_execution_v2.rst +++ b/docs/workspace/statementexecutionv2/statement_execution_v2.rst @@ -175,9 +175,16 @@ The parameters can be passed in the request body as follows: - ``{ ..., "statement": "SELECT * FROM my_table WHERE name = :my_name AND date = :my_date", - "parameters": [ { "name": "my_name", "value": "the name" }, { "name": "my_date", "value": - "2020-01-01", "type": "DATE" } ] }`` + .. code-block:: + + { + ..., + "statement": "SELECT * FROM my_table WHERE name = :my_name AND date = :my_date", + "parameters": [ + { "name": "my_name", "value": "the name" }, + { "name": "my_date", "value": "2020-01-01", "type": "DATE" } + ] + } Currently, positional parameters denoted by a ``?`` marker are not supported by the Databricks SQL Statement Execution API. diff --git a/docs/workspace/tags/tag_policies.rst b/docs/workspace/tags/tag_policies.rst index f2300e69e..2df1ed2c4 100644 --- a/docs/workspace/tags/tag_policies.rst +++ b/docs/workspace/tags/tag_policies.rst @@ -30,6 +30,7 @@ `__. :param tag_key: str + The key of the governed tag whose policy to delete. @@ -43,6 +44,7 @@ `__. :param tag_key: str + The key of the governed tag whose policy to get. :returns: :class:`TagPolicy` @@ -74,17 +76,11 @@ `__. :param tag_key: str + The tag key that this policy governs. Tag keys are case-sensitive. :param tag_policy: :class:`TagPolicy` :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., - ``author.given_name``). Specification of elements in sequence or map fields is not allowed, as only - the entire collection field can be specified. Field names must exactly match the resource field - names. - - 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. + The comma-separated list of tag policy fields to update. When the mask includes ``values``, the + values in the request replace all existing allowed values. :returns: :class:`TagPolicy` \ No newline at end of file diff --git a/docs/workspace/workspace/secrets.rst b/docs/workspace/workspace/secrets.rst index 663766291..a6f9937db 100644 --- a/docs/workspace/workspace/secrets.rst +++ b/docs/workspace/workspace/secrets.rst @@ -42,36 +42,23 @@ The scope name must consist of alphanumeric characters, dashes, underscores, and periods, and may not exceed 128 characters. - Example request: - - .. code:: - - { "scope": "my-simple-databricks-scope", "initial_manage_principal": "users" "scope_backend_type": - "databricks|azure_keyvault", - - below is only required if scope type is azure_keyvault - - "backend_azure_keyvault": { "resource_id": - "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/xxxx/providers/Microsoft.KeyVault/vaults/xxxx", - "tenant_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "dns_name": "https://xxxx.vault.azure.net/", } } - If ``initial_manage_principal`` is specified, the initial ACL applied to the scope is applied to the supplied principal (user or group) with ``MANAGE`` permissions. The only supported principal for this option is the group ``users``, which contains all users in the workspace. If ``initial_manage_principal`` is not specified, the initial ACL with ``MANAGE`` permission applied to the scope is assigned to the API request issuer's user identity. - If ``scope_backend_type`` is ``azure_keyvault``, a secret scope is created with secrets from a given - Azure KeyVault. The caller must provide the keyvault_resource_id and the tenant_id for the key vault. - If ``scope_backend_type`` is ``databricks`` or is unspecified, an empty secret scope is created and - stored in Databricks's own storage. + If ``scope_backend_type`` is ``AZURE_KEYVAULT``, a secret scope is created with secrets from an + existing Azure key vault. The caller must provide the key vault's resource ID and DNS name in + ``backend_azure_keyvault``. If ``scope_backend_type`` is ``DATABRICKS`` or is unspecified, an empty + secret scope is created and stored in Databricks-managed storage. Throws ``RESOURCE_ALREADY_EXISTS`` if a scope with the given name already exists. Throws ``RESOURCE_LIMIT_EXCEEDED`` if maximum number of scopes in the workspace is exceeded. Throws ``INVALID_PARAMETER_VALUE`` if the scope name is invalid. Throws ``BAD_REQUEST`` if request violated - constraints. Throws ``CUSTOMER_UNAUTHORIZED`` if normal user attempts to create a scope with name - reserved for databricks internal usage. Throws ``UNAUTHENTICATED`` if unable to verify user access - permission on Azure KeyVault + constraints. Throws ``CUSTOMER_UNAUTHORIZED`` if the scope name is reserved for Databricks internal + use. Throws ``UNAUTHENTICATED`` if Databricks cannot verify the caller's access to the Azure key + vault. :param scope: str Scope name requested by the user. Scope names are unique. @@ -80,7 +67,7 @@ :param initial_manage_principal: str (optional) The principal that is initially granted ``MANAGE`` permission to the created scope. :param scope_backend_type: :class:`ScopeBackendType` (optional) - The backend type the scope will be created with. If not specified, will default to ``DATABRICKS`` + The backend type of the new scope. Defaults to ``DATABRICKS``. @@ -91,12 +78,6 @@ Users must have the ``MANAGE`` permission to invoke this API. - Example request: - - .. code:: - - { "scope": "my-secret-scope", "principal": "data-scientists" } - Throws ``RESOURCE_DOES_NOT_EXIST`` if no such secret scope, principal, or ACL exists. Throws ``PERMISSION_DENIED`` if the user does not have permission to make this API call. Throws ``INVALID_PARAMETER_VALUE`` if the permission or principal is invalid. @@ -113,15 +94,8 @@ Deletes a secret scope. - Example request: - - .. code:: - - { "scope": "my-secret-scope" } - Throws ``RESOURCE_DOES_NOT_EXIST`` if the scope does not exist. Throws ``PERMISSION_DENIED`` if the - user does not have permission to make this API call. Throws ``BAD_REQUEST`` if system user attempts to - delete internal secret scope. + user does not have permission to make this API call. :param scope: str Name of the scope to delete. @@ -136,8 +110,7 @@ Throws ``RESOURCE_DOES_NOT_EXIST`` if no such secret scope or secret exists. Throws ``PERMISSION_DENIED`` if the user does not have permission to make this API call. Throws - ``BAD_REQUEST`` if system user attempts to delete an internal secret, or request is made against Azure - KeyVault backed scope. + ``BAD_REQUEST`` if the request is made against an Azure Key Vault-backed scope. :param scope: str The name of the scope that contains the secret to delete. @@ -153,12 +126,6 @@ Users must have the ``MANAGE`` permission to invoke this API. - Example response: - - .. code:: - - { "principal": "data-scientists", "permission": "READ" } - Throws ``RESOURCE_DOES_NOT_EXIST`` if no such secret scope exists. Throws ``PERMISSION_DENIED`` if the user does not have permission to make this API call. Throws ``INVALID_PARAMETER_VALUE`` if the permission or principal is invalid. @@ -223,13 +190,6 @@ Users must have the ``MANAGE`` permission to invoke this API. - Example response: - - .. code:: - - { "acls": [{ "principal": "admins", "permission": "MANAGE" },{ "principal": "data-scientists", - "permission": "READ" }] } - Throws ``RESOURCE_DOES_NOT_EXIST`` if no such secret scope exists. Throws ``PERMISSION_DENIED`` if the user does not have permission to make this API call. @@ -254,13 +214,6 @@ Lists all secret scopes available in the workspace. - Example response: - - .. code:: - - { "scopes": [{ "name": "my-databricks-scope", "backend_type": "DATABRICKS" },{ "name": "mount-points", - "backend_type": "DATABRICKS" }] } - Throws ``PERMISSION_DENIED`` if the user does not have permission to make this API call. @@ -345,31 +298,16 @@ - ``WRITE`` - Allowed to read and write to this secret scope. - ``READ`` - Allowed to read this secret scope and list what secrets are available. - Note that in general, secret values can only be read from within a command on a cluster (for example, - through a notebook). There is no API to read the actual secret value material outside of a cluster. - However, the user's permission will be applied based on who is executing the command, and they must - have at least READ permission. - Users must have the ``MANAGE`` permission to invoke this API. - Example request: - - .. code:: - - { "scope": "my-secret-scope", "principal": "data-scientists", "permission": "READ" } - - The principal is a user or group name corresponding to an existing Databricks principal to be granted - or revoked access. - - Throws ``RESOURCE_DOES_NOT_EXIST`` if no such secret scope exists. Throws ``RESOURCE_ALREADY_EXISTS`` - if a permission for the principal already exists. Throws ``INVALID_PARAMETER_VALUE`` if the permission - or principal is invalid. Throws ``PERMISSION_DENIED`` if the user does not have permission to make - this API call. + Throws ``RESOURCE_DOES_NOT_EXIST`` if no such secret scope exists. Throws ``INVALID_PARAMETER_VALUE`` + if the permission or principal is invalid. Throws ``PERMISSION_DENIED`` if the user does not have + permission to make this API call. :param scope: str The name of the scope to apply permissions to. :param principal: str - The principal in which the permission is applied. + The user name or group name of an existing Databricks principal that the permission applies to. :param permission: :class:`AclPermission` The permission level applied to the principal.