diff --git a/.codegen/_last_sha b/.codegen/_last_sha index ee0e1fa45..ab0b9f674 100644 --- a/.codegen/_last_sha +++ b/.codegen/_last_sha @@ -1 +1 @@ -c765e364f87ce050e4077db80b8ec800c9ec1ed9 \ No newline at end of file +7216eeb8c5e517080d626f64b36209fea64788b3 \ No newline at end of file diff --git a/.github/workflows/sync-label.yml b/.github/workflows/sync-label.yml new file mode 100644 index 000000000..6a7305dba --- /dev/null +++ b/.github/workflows/sync-label.yml @@ -0,0 +1,33 @@ +# This repository is a read-only mirror; the only PRs that should +# merge are the release sync PRs from the internal source of truth. +# This check fails unless the PR carries the `sync` label, which only +# maintainers can apply — making every merge a deliberate act. +# Temporary guard until release automation takes over merging. +name: Sync label + +on: + pull_request: + types: [opened, reopened, synchronize, labeled, unlabeled] + # The label gate runs at PR level — a PR can't enter the merge queue + # until this check passes there. Merge-group events carry no label + # context, so on them the job passes trivially; without this trigger + # a required sync-label check would stall every queue entry. + merge_group: + types: [checks_requested] + +jobs: + sync-label: + name: sync-label + runs-on: ubuntu-latest + steps: + - name: Merge queue — gate already applied at PR level + if: ${{ github.event_name == 'merge_group' }} + run: echo "merge group — sync label was enforced when the PR entered the queue." + - name: Require the `sync` label + if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'sync') }} + run: | + echo "::error::This PR does not carry the 'sync' label. This repository is a read-only mirror — only release sync PRs merge here. If this IS a release sync PR, a maintainer must apply the 'sync' label; community contributions are re-applied in the internal repository instead (see CONTRIBUTING.md)." + exit 1 + - name: Label present + if: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'sync') }} + run: echo "sync label present — this is a release sync PR." diff --git a/CHANGELOG.md b/CHANGELOG.md index a3fa01186..fe24da69a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,25 @@ # Version changelog -## Release v0.157.0 (2026-09-30) +## Release v0.158.0 (2026-10-01) + +### API Changes +* Add `aiDecide()` method for `workspaceClient.aiFunctions()` service. +* Add `listCommands()` method for `workspaceClient.sandbox()` service. +* Add `environmentVariables` field for `com.databricks.sdk.service.jobs.BaseRun`. +* Add `environmentVariables` field for `com.databricks.sdk.service.jobs.CreateJob`. +* Add `environmentVariables` field for `com.databricks.sdk.service.jobs.JobSettings`. +* Add `environmentVariables` field for `com.databricks.sdk.service.jobs.Run`. +* Add `environmentVariablesKey` field for `com.databricks.sdk.service.jobs.RunTask`. +* Add `environmentVariables` field for `com.databricks.sdk.service.jobs.SubmitRun`. +* Add `environmentVariablesKey` field for `com.databricks.sdk.service.jobs.SubmitTask`. +* Add `environmentVariablesKey` field for `com.databricks.sdk.service.jobs.Task`. +* Add `jobId` and `pipelineId` fields for `com.databricks.sdk.service.ml.MaterializedFeature`. +* Change `commandPath` field for `com.databricks.sdk.service.jobs.DeploymentSpec` to no longer be required. +* [Breaking] Change `commandPath` field for `com.databricks.sdk.service.jobs.DeploymentSpec` to no longer be required. +* Change `apiSecretRef` field for `com.databricks.sdk.service.ml.SchemaRegistryConfig` to no longer be required. +* [Breaking] Change `apiSecretRef` field for `com.databricks.sdk.service.ml.SchemaRegistryConfig` to no longer be required. + +## Release v0.157.0 (2026-09-25) ### API Changes * Add `com.databricks.sdk.service.mason` package. diff --git a/databricks-sdk-java/lockfile.json b/databricks-sdk-java/lockfile.json index efb46cff7..c39f4f1e8 100644 --- a/databricks-sdk-java/lockfile.json +++ b/databricks-sdk-java/lockfile.json @@ -1,7 +1,7 @@ { "artifactId": "databricks-sdk-java", "groupId": "com.databricks", - "version": "0.157.0", + "version": "0.158.0", "lockFileVersion": 1, "dependencies": [ { diff --git a/databricks-sdk-java/pom.xml b/databricks-sdk-java/pom.xml index 4c66fad64..27990837c 100644 --- a/databricks-sdk-java/pom.xml +++ b/databricks-sdk-java/pom.xml @@ -5,7 +5,7 @@ com.databricks databricks-sdk-parent - 0.157.0 + 0.158.0 databricks-sdk-java Databricks SDK for Java diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/core/UserAgent.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/core/UserAgent.java index e2d9c3c4a..5a67b6d37 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/core/UserAgent.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/core/UserAgent.java @@ -36,7 +36,7 @@ public String getValue() { // TODO: check if reading from // /META-INF/maven/com.databricks/databrics-sdk-java/pom.properties // or getClass().getPackage().getImplementationVersion() is enough. - private static final String version = "0.157.0"; + private static final String version = "0.158.0"; public static void withProduct(String product, String productVersion) { UserAgent.product = product; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aifunctions/AiDecideOptions.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aifunctions/AiDecideOptions.java new file mode 100644 index 000000000..2c1930ca3 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aifunctions/AiDecideOptions.java @@ -0,0 +1,43 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.aifunctions; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** ai_decide */ +@Generated +public class AiDecideOptions { + /** The function API version to invoke. Defaults to "1.0". Supported versions: ["1.0"]. */ + @JsonProperty("version") + private String version; + + public AiDecideOptions setVersion(String version) { + this.version = version; + return this; + } + + public String getVersion() { + return version; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AiDecideOptions that = (AiDecideOptions) o; + return Objects.equals(version, that.version); + } + + @Override + public int hashCode() { + return Objects.hash(version); + } + + @Override + public String toString() { + return new ToStringer(AiDecideOptions.class).add("version", version).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aifunctions/AiDecideRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aifunctions/AiDecideRequest.java new file mode 100644 index 000000000..3b0649760 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aifunctions/AiDecideRequest.java @@ -0,0 +1,121 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.aifunctions; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.JsonNode; +import java.util.Objects; + +@Generated +public class AiDecideRequest { + /** Function options. Omitted fields fall back to their documented defaults. */ + @JsonProperty("options") + private AiDecideOptions options; + + /** + * A JSON object mapping question IDs to their definitions. Choose a nonempty string for each ID; + * its answer is returned with the same ID in `response.answers`. + * + *

Each definition is an object with the required fields `type` and `instructions`. The + * `criteria` field is optional for the type `noul` but is required for the types `choice` and + * `score`. + * + *

The `instructions` field describes the judgment to make and can be a string, object, or + * array. Use an object or array to include supporting context alongside the instructions. + * + *

The `type` can be one of: + * + *

- `choice`: Selects one option from a defined set. Requires `criteria` to be an object + * mapping 1 to 255 nonempty option names to descriptions. The criteria description can be a + * string, object, array, or null when the name needs no additional detail. For example: + * + *

```json { "team": { "type": "choice", "instructions": "Which team should handle this + * ticket?", "criteria": { "billing": "Payments, charges, and refunds", "technical_support": null + * } } } ``` + * + *

- `noul`: Estimates the probability that the answer to a true-or-false question is true. + * `criteria` can take the fields `true` or `false`, or both, with descriptions that are strings, + * objects, or arrays. Omit `criteria` to use the question alone. For example, both of the + * following are valid: + * + *

```json { "escalate": { "type": "noul", "instructions": "Does this ticket need escalation?", + * "criteria": { "true": "Suspected fraud or an exception to standard policy", "false": "A routine + * issue frontline support can resolve" } } } ``` + * + *

or + * + *

```json { "escalate": { "type": "noul", "instructions": "Does this ticket need escalation?" + * } } ``` + * + *

- `score`: Rates the state on an ordered scale. Requires `criteria` to be an array of 2 to + * 10 level descriptions, ordered from low to high. Descriptions can be strings, objects, or + * arrays. Array positions define levels starting at 0. For example: + * + *

```json { "urgency": { "type": "score", "instructions": "How urgent is this ticket?", + * "criteria": [ "Routine: can wait a few days", "Time-sensitive: needs attention today", + * "Critical: needs immediate action" ] } } ``` + */ + @JsonProperty("questions") + private JsonNode questions; + + /** + * A string, JSON object, or array containing the content, related context, and examples needed to + * answer the provided questions. For example, provide a support message, a conversation, or + * records describing the current state of an application. All questions receive this same state. + */ + @JsonProperty("state") + private JsonNode state; + + public AiDecideRequest setOptions(AiDecideOptions options) { + this.options = options; + return this; + } + + public AiDecideOptions getOptions() { + return options; + } + + public AiDecideRequest setQuestions(JsonNode questions) { + this.questions = questions; + return this; + } + + public JsonNode getQuestions() { + return questions; + } + + public AiDecideRequest setState(JsonNode state) { + this.state = state; + return this; + } + + public JsonNode getState() { + return state; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AiDecideRequest that = (AiDecideRequest) o; + return Objects.equals(options, that.options) + && Objects.equals(questions, that.questions) + && Objects.equals(state, that.state); + } + + @Override + public int hashCode() { + return Objects.hash(options, questions, state); + } + + @Override + public String toString() { + return new ToStringer(AiDecideRequest.class) + .add("options", options) + .add("questions", questions) + .add("state", state) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aifunctions/AiDecideResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aifunctions/AiDecideResponse.java new file mode 100644 index 000000000..da50c46cc --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aifunctions/AiDecideResponse.java @@ -0,0 +1,87 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.aifunctions; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.JsonNode; +import java.util.Objects; + +@Generated +public class AiDecideResponse { + /** Metadata identifying the function API version used for this request. */ + @JsonProperty("metadata") + private AiDecideResponseMetadata metadata; + + /** + * A JSON object containing an `answers` map with one answer for each question, keyed by the same + * IDs as `questions`. + * + *

Each answer has a `type` matching its question and the following fields: + * + *

- `choice`: choice is the highest-probability option from `criteria`. `probabilities` maps + * every option name to its probability. `confidence` is a number from 0 to 1 indicating how well + * the state supports the assessment. The `probabilities` values sum to 1. For example: + * + *

```json { "answers": { "team": { "type": "choice", "choice": "billing", "probabilities": { + * "billing": 0.85, "technical_support": 0.15 }, "confidence": 0.9 } } } ``` + * + *

- `noul`: `probability` is a number from 0 to 1 estimating the probability that the answer + * is true. For example: + * + *

```json { "answers": { "escalate": { "type": "noul", "probability": 0.8 } } } ``` + * + *

- `score`: score is the probability-weighted mean of the zero-based level indices. It can + * fall between levels, from 0 to the number of levels minus 1. `probabilities` maps each level + * index to its probability, and `legend` maps each index to its original description. Both maps + * use string keys such as "0", "1", and "2". `confidence` is a number from 0 to 1 indicating how + * well the state supports the assessment. The `probabilities` values sum to 1. For example: + * + *

```json { "answers": { "urgency": { "type": "score", "score": 1.6, "probabilities": { "0": + * 0.1, "1": 0.2, "2": 0.7 }, "legend": { "0": "Routine: can wait a few days", "1": + * "Time-sensitive: needs attention today", "2": "Critical: needs immediate action" }, + * "confidence": 0.85 } } } ``` + */ + @JsonProperty("response") + private JsonNode response; + + public AiDecideResponse setMetadata(AiDecideResponseMetadata metadata) { + this.metadata = metadata; + return this; + } + + public AiDecideResponseMetadata getMetadata() { + return metadata; + } + + public AiDecideResponse setResponse(JsonNode response) { + this.response = response; + return this; + } + + public JsonNode getResponse() { + return response; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AiDecideResponse that = (AiDecideResponse) o; + return Objects.equals(metadata, that.metadata) && Objects.equals(response, that.response); + } + + @Override + public int hashCode() { + return Objects.hash(metadata, response); + } + + @Override + public String toString() { + return new ToStringer(AiDecideResponse.class) + .add("metadata", metadata) + .add("response", response) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aifunctions/AiDecideResponseMetadata.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aifunctions/AiDecideResponseMetadata.java new file mode 100644 index 000000000..99b3fccf9 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aifunctions/AiDecideResponseMetadata.java @@ -0,0 +1,42 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.aifunctions; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +@Generated +public class AiDecideResponseMetadata { + /** The function API version used to evaluate the request. */ + @JsonProperty("version") + private String version; + + public AiDecideResponseMetadata setVersion(String version) { + this.version = version; + return this; + } + + public String getVersion() { + return version; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AiDecideResponseMetadata that = (AiDecideResponseMetadata) o; + return Objects.equals(version, that.version); + } + + @Override + public int hashCode() { + return Objects.hash(version); + } + + @Override + public String toString() { + return new ToStringer(AiDecideResponseMetadata.class).add("version", version).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aifunctions/AiFunctionsAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aifunctions/AiFunctionsAPI.java index 84ae787e5..9044b6f01 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aifunctions/AiFunctionsAPI.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aifunctions/AiFunctionsAPI.java @@ -32,6 +32,14 @@ public AiClassifyResponse aiClassify(AiClassifyRequest request) { return impl.aiClassify(request); } + /** + * 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. + */ + public AiDecideResponse aiDecide(AiDecideRequest request) { + return impl.aiDecide(request); + } + /** * Extracts structured data from text and documents according to a provided schema. For REST API * requests, the default rate limit is 120 requests per minute per workspace. Contact your diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aifunctions/AiFunctionsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aifunctions/AiFunctionsImpl.java index 747365ee7..2a311d65d 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aifunctions/AiFunctionsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aifunctions/AiFunctionsImpl.java @@ -34,6 +34,24 @@ public AiClassifyResponse aiClassify(AiClassifyRequest request) { } } + @Override + public AiDecideResponse aiDecide(AiDecideRequest request) { + String path = "/api/2.0/ai-functions/ai-decide"; + try { + Request req = new Request("POST", path, apiClient.serialize(request)); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + req.withHeader("Content-Type", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, AiDecideResponse.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + @Override public AiExtractResponse aiExtract(AiExtractRequest request) { String path = "/api/2.0/ai-functions/ai-extract"; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aifunctions/AiFunctionsService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aifunctions/AiFunctionsService.java index 53be8cc4d..b6a21d11d 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aifunctions/AiFunctionsService.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/aifunctions/AiFunctionsService.java @@ -19,6 +19,12 @@ public interface AiFunctionsService { */ AiClassifyResponse aiClassify(AiClassifyRequest aiClassifyRequest); + /** + * 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. + */ + AiDecideResponse aiDecide(AiDecideRequest aiDecideRequest); + /** * Extracts structured data from text and documents according to a provided schema. For REST API * requests, the default rate limit is 120 requests per minute per workspace. Contact your diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/InstancePoolAwsAttributes.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/InstancePoolAwsAttributes.java index 6e7b6041b..53392a9c0 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/InstancePoolAwsAttributes.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/InstancePoolAwsAttributes.java @@ -10,7 +10,14 @@ /** Attributes set during instance pool creation which are related to Amazon Web Services. */ @Generated public class InstancePoolAwsAttributes { - /** Availability type used for the spot nodes. */ + /** + * Availability type used for the instances in the pool. Supports on-demand, spot, and + * spot-with-fallback (the pool acquires spot instances first, and falls back to on-demand + * instances when spot capacity is unavailable). + * + *

You can change this value on an existing pool. New clusters use the updated availability, + * and existing clusters keep the availability they launched with. + */ @JsonProperty("availability") private InstancePoolAwsAttributesAvailability availability; @@ -36,6 +43,9 @@ public class InstancePoolAwsAttributes { * instances are requested for this cluster, only spot instances whose bid price percentage * matches this field will be considered. Note that, for safety, we enforce this field to be no * more than 10000. + * + *

You can change this value on an existing pool. New clusters use the updated bid price, and + * existing clusters keep the bid price they launched with. */ @JsonProperty("spot_bid_price_percent") private Long spotBidPricePercent; @@ -47,6 +57,15 @@ public class InstancePoolAwsAttributes { * deployment resides in the "us-east-1" region. This is an optional field at cluster creation, * and if not specified, a default zone will be used. The list of available zones as well as the * default value can be found by using the `List Zones` method. + * + *

Set this field to "auto" to enable Auto-AZ, in which case Databricks selects the + * availability zone for each cluster independently when the cluster launches, and retries another + * zone if the cluster can't be fulfilled because of insufficient capacity or quota. All nodes in + * a cluster land in the same zone, and different clusters backed by the pool can run in different + * zones. + * + *

You can change the zone on an existing pool. New clusters use the updated zone, and existing + * clusters keep the zone they launched with. */ @JsonProperty("zone_id") private String zoneId; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/InstancePoolAzureAttributes.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/InstancePoolAzureAttributes.java index d90c86452..083d77f2c 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/InstancePoolAzureAttributes.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/InstancePoolAzureAttributes.java @@ -10,7 +10,14 @@ /** Attributes set during instance pool creation which are related to Azure. */ @Generated public class InstancePoolAzureAttributes { - /** Availability type used for the spot nodes. */ + /** + * Availability type used for the instances in the pool. Supports on-demand, spot, and + * spot-with-fallback (the pool acquires spot instances first, and falls back to on-demand + * instances when spot capacity is unavailable). + * + *

You can change this value on an existing pool. New clusters use the updated availability, + * and existing clusters keep the availability they launched with. + */ @JsonProperty("availability") private InstancePoolAzureAttributesAvailability availability; @@ -40,6 +47,9 @@ public class InstancePoolAzureAttributes { * value 2 would be a max price of $2.00 USD per hour. If you set the max price to be -1, the VM * won't be evicted based on price. The price for the VM will be the current price for spot or the * price for a standard VM, which ever is less, as long as there is capacity and quota available. + * + *

You can change this value on an existing pool. New clusters use the updated max price, and + * existing clusters keep the max price they launched with. */ @JsonProperty("spot_bid_max_price") private Double spotBidMaxPrice; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/InstancePoolGcpAttributes.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/InstancePoolGcpAttributes.java index 774dcaf5a..0d3ef3450 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/InstancePoolGcpAttributes.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/compute/InstancePoolGcpAttributes.java @@ -10,7 +10,14 @@ /** Attributes set during instance pool creation which are related to GCP. */ @Generated public class InstancePoolGcpAttributes { - /** */ + /** + * Availability type for the instances in the pool. One of: + * + *

- `ON_DEMAND_GCP`: the pool uses on-demand instances only. - `PREEMPTIBLE_GCP`: the pool + * uses preemptible instances only. - `PREEMPTIBLE_WITH_FALLBACK_GCP`: the pool acquires + * preemptible instances first, and falls back to on-demand instances when preemptible capacity is + * unavailable. + */ @JsonProperty("gcp_availability") private GcpAvailability gcpAvailability; @@ -33,11 +40,17 @@ public class InstancePoolGcpAttributes { * creation, and if not specified, a default zone will be used. * *

This field can be one of the following: - "HA" => High availability, spread nodes across - * availability zones for a Databricks deployment region - A GCP availability zone => Pick One of - * the available zones for (machine type + region) from - * https://cloud.google.com/compute/docs/regions-zones (e.g. "us-west1-a"). + * availability zones for a Databricks deployment region - "auto" => Auto-AZ. Databricks selects + * the availability zone for each cluster independently when the cluster launches, and retries + * another zone if the cluster can't be fulfilled because of insufficient capacity or quota. All + * nodes in a cluster land in the same zone, and different clusters backed by the pool can run in + * different zones. - A GCP availability zone => Pick One of the available zones for (machine type + * + region) from https://cloud.google.com/compute/docs/regions-zones (e.g. "us-west1-a"). * *

If empty, Databricks picks an availability zone to schedule the cluster on. + * + *

You can change the zone on an existing pool. New clusters use the updated zone, and existing + * clusters keep the zone they launched with. */ @JsonProperty("zone_id") private String zoneId; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieAPI.java index 12944360a..d51289504 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieAPI.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieAPI.java @@ -152,7 +152,7 @@ public DownloadMessageAttachmentVisualizationResponse downloadMessageAttachmentV /** * Download a rendered image of a message visualization attachment. The response body is the raw * PNG image, not a JSON payload. This is only available if the attachment is a visualization and - * the message status is `COMPLETED`. This endpoint is not supported for Private Link workspaces. + * the message status is `COMPLETED`. */ public DownloadMessageAttachmentVisualizationResponse downloadMessageAttachmentVisualization( DownloadMessageAttachmentVisualizationRequest request) { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieService.java index 2d39eaf14..36198c6c2 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieService.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GenieService.java @@ -39,7 +39,7 @@ void deleteConversationMessage( /** * Download a rendered image of a message visualization attachment. The response body is the raw * PNG image, not a JSON payload. This is only available if the attachment is a visualization and - * the message status is `COMPLETED`. This endpoint is not supported for Private Link workspaces. + * the message status is `COMPLETED`. */ DownloadMessageAttachmentVisualizationResponse downloadMessageAttachmentVisualization( DownloadMessageAttachmentVisualizationRequest downloadMessageAttachmentVisualizationRequest); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/BaseRun.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/BaseRun.java index d64419342..8a48267cc 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/BaseRun.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/BaseRun.java @@ -83,6 +83,14 @@ public class BaseRun { @JsonProperty("end_time") private Long endTime; + /** + * Snapshot of `JobSettings.environment_variables` as it was at run launch — the full list of + * named environment-variable entries the job defined. To find which entry a given task ran with, + * look at `RunTaskSettings.environment_variables_key`. + */ + @JsonProperty("environment_variables") + private Collection environmentVariables; + /** * The time in milliseconds it took to execute the commands in the JAR or notebook until they * completed, failed, timed out, were cancelled, or encountered an unexpected error. The duration @@ -328,6 +336,15 @@ public Long getEndTime() { return endTime; } + public BaseRun setEnvironmentVariables(Collection environmentVariables) { + this.environmentVariables = environmentVariables; + return this; + } + + public Collection getEnvironmentVariables() { + return environmentVariables; + } + public BaseRun setExecutionDuration(Long executionDuration) { this.executionDuration = executionDuration; return this; @@ -577,6 +594,7 @@ public boolean equals(Object o) { && Objects.equals(effectivePerformanceTarget, that.effectivePerformanceTarget) && Objects.equals(effectiveUsagePolicyId, that.effectiveUsagePolicyId) && Objects.equals(endTime, that.endTime) + && Objects.equals(environmentVariables, that.environmentVariables) && Objects.equals(executionDuration, that.executionDuration) && Objects.equals(gitSource, that.gitSource) && Objects.equals(hasMore, that.hasMore) @@ -618,6 +636,7 @@ public int hashCode() { effectivePerformanceTarget, effectiveUsagePolicyId, endTime, + environmentVariables, executionDuration, gitSource, hasMore, @@ -659,6 +678,7 @@ public String toString() { .add("effectivePerformanceTarget", effectivePerformanceTarget) .add("effectiveUsagePolicyId", effectiveUsagePolicyId) .add("endTime", endTime) + .add("environmentVariables", environmentVariables) .add("executionDuration", executionDuration) .add("gitSource", gitSource) .add("hasMore", hasMore) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/CreateJob.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/CreateJob.java index d89d8a37e..84a93c76d 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/CreateJob.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/CreateJob.java @@ -59,6 +59,15 @@ public class CreateJob { @JsonProperty("email_notifications") private JobEmailNotifications emailNotifications; + /** + * Named environment-variable entries that tasks can reference by key from + * `TaskSettings.environment_variables_key`. Each entry's `spec` holds inline `variables` and + * optional `.env` `files`. Maximum 10 entries per job. A task can reference at most one entry + * from this list. + */ + @JsonProperty("environment_variables") + private Collection environmentVariables; + /** * A list of task execution environment specifications that can be referenced by tasks that use * serverless compute or a compute resource that uses Environments mode. @@ -285,6 +294,16 @@ public JobEmailNotifications getEmailNotifications() { return emailNotifications; } + public CreateJob setEnvironmentVariables( + Collection environmentVariables) { + this.environmentVariables = environmentVariables; + return this; + } + + public Collection getEnvironmentVariables() { + return environmentVariables; + } + public CreateJob setEnvironments(Collection environments) { this.environments = environments; return this; @@ -486,6 +505,7 @@ public boolean equals(Object o) { && Objects.equals(description, that.description) && Objects.equals(editMode, that.editMode) && Objects.equals(emailNotifications, that.emailNotifications) + && Objects.equals(environmentVariables, that.environmentVariables) && Objects.equals(environments, that.environments) && Objects.equals(format, that.format) && Objects.equals(gitSource, that.gitSource) @@ -519,6 +539,7 @@ public int hashCode() { description, editMode, emailNotifications, + environmentVariables, environments, format, gitSource, @@ -552,6 +573,7 @@ public String toString() { .add("description", description) .add("editMode", editMode) .add("emailNotifications", emailNotifications) + .add("environmentVariables", environmentVariables) .add("environments", environments) .add("format", format) .add("gitSource", gitSource) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobEnvironmentVariables.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobEnvironmentVariables.java new file mode 100644 index 000000000..0ed43d819 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobEnvironmentVariables.java @@ -0,0 +1,67 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.jobs; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** + * A named environment-variable entry, defined once at the job level and referenced by key from one + * or more tasks. Entries live on `JobSettings.environment_variables`, and tasks select one via + * `TaskSettings.environment_variables_key`. + */ +@Generated +public class JobEnvironmentVariables { + /** + * Identifier for this entry. Must be unique within `JobSettings.environment_variables`. Tasks + * reference it from `TaskSettings.environment_variables_key`. + */ + @JsonProperty("environment_variables_key") + private String environmentVariablesKey; + + /** The environment variable specification. */ + @JsonProperty("spec") + private JobEnvironmentVariablesSpec spec; + + public JobEnvironmentVariables setEnvironmentVariablesKey(String environmentVariablesKey) { + this.environmentVariablesKey = environmentVariablesKey; + return this; + } + + public String getEnvironmentVariablesKey() { + return environmentVariablesKey; + } + + public JobEnvironmentVariables setSpec(JobEnvironmentVariablesSpec spec) { + this.spec = spec; + return this; + } + + public JobEnvironmentVariablesSpec getSpec() { + return spec; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + JobEnvironmentVariables that = (JobEnvironmentVariables) o; + return Objects.equals(environmentVariablesKey, that.environmentVariablesKey) + && Objects.equals(spec, that.spec); + } + + @Override + public int hashCode() { + return Objects.hash(environmentVariablesKey, spec); + } + + @Override + public String toString() { + return new ToStringer(JobEnvironmentVariables.class) + .add("environmentVariablesKey", environmentVariablesKey) + .add("spec", spec) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobEnvironmentVariablesSpec.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobEnvironmentVariablesSpec.java new file mode 100644 index 000000000..4eb8fe7b6 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobEnvironmentVariablesSpec.java @@ -0,0 +1,87 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.jobs; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Collection; +import java.util.Map; +import java.util.Objects; + +/** + * The environment variables and files associated with a job environment variable entry. Runtime + * environment variables override inline `variables`, which override values from `files`, on + * duplicate keys. + */ +@Generated +public class JobEnvironmentVariablesSpec { + /** + * Workspace (`/Workspace/...`) or UC Volumes (`/Volumes/...`) paths to `.env` files. Maximum 5 + * files. Files are read, parsed, and merged at task execution time, not at job creation or update + * API call time. + * + *

File format: each line containing a variable must be exactly `KEY=VALUE`. Empty and + * whitespace-only lines, and lines beginning with `#`, are ignored. Keys must match the same + * regex as inlined variable names (`^[A-Za-z_][A-Za-z0-9_]*$`); the value continues to the end of + * the line. No other syntax is supported — no inline comments, no quoted values, no escape + * sequences, no variable interpolation. Any other line that does not match the `KEY=VALUE` shape + * fails the run. + * + *

Size limits: maximum 32,768 bytes (32 KiB) per file on disk; maximum 1,024 bytes (1 KiB) per + * `KEY=VALUE` line combined. Files or lines exceeding these limits fail the run. + * + *

On a duplicate key, the later file wins; `variables` override values from any file. + */ + @JsonProperty("files") + private Collection files; + + /** + * Environment variables specified directly as key/value pairs. Maximum 20 entries. + * + *

Each key must be 1 to 256 characters and match `^[A-Za-z_][A-Za-z0-9_]*$`: it must start + * with an ASCII letter or underscore and contain only ASCII letters, digits, and underscores. + * Each value can be any Unicode string of up to 512 characters, including an empty string. + */ + @JsonProperty("variables") + private Map variables; + + public JobEnvironmentVariablesSpec setFiles(Collection files) { + this.files = files; + return this; + } + + public Collection getFiles() { + return files; + } + + public JobEnvironmentVariablesSpec setVariables(Map variables) { + this.variables = variables; + return this; + } + + public Map getVariables() { + return variables; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + JobEnvironmentVariablesSpec that = (JobEnvironmentVariablesSpec) o; + return Objects.equals(files, that.files) && Objects.equals(variables, that.variables); + } + + @Override + public int hashCode() { + return Objects.hash(files, variables); + } + + @Override + public String toString() { + return new ToStringer(JobEnvironmentVariablesSpec.class) + .add("files", files) + .add("variables", variables) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobSettings.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobSettings.java index 9db2217e9..c8011c5fa 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobSettings.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobSettings.java @@ -55,6 +55,15 @@ public class JobSettings { @JsonProperty("email_notifications") private JobEmailNotifications emailNotifications; + /** + * Named environment-variable entries that tasks can reference by key from + * `TaskSettings.environment_variables_key`. Each entry's `spec` holds inline `variables` and + * optional `.env` `files`. Maximum 10 entries per job. A task can reference at most one entry + * from this list. + */ + @JsonProperty("environment_variables") + private Collection environmentVariables; + /** * A list of task execution environment specifications that can be referenced by tasks that use * serverless compute or a compute resource that uses Environments mode. @@ -272,6 +281,16 @@ public JobEmailNotifications getEmailNotifications() { return emailNotifications; } + public JobSettings setEnvironmentVariables( + Collection environmentVariables) { + this.environmentVariables = environmentVariables; + return this; + } + + public Collection getEnvironmentVariables() { + return environmentVariables; + } + public JobSettings setEnvironments(Collection environments) { this.environments = environments; return this; @@ -472,6 +491,7 @@ public boolean equals(Object o) { && Objects.equals(description, that.description) && Objects.equals(editMode, that.editMode) && Objects.equals(emailNotifications, that.emailNotifications) + && Objects.equals(environmentVariables, that.environmentVariables) && Objects.equals(environments, that.environments) && Objects.equals(format, that.format) && Objects.equals(gitSource, that.gitSource) @@ -504,6 +524,7 @@ public int hashCode() { description, editMode, emailNotifications, + environmentVariables, environments, format, gitSource, @@ -536,6 +557,7 @@ public String toString() { .add("description", description) .add("editMode", editMode) .add("emailNotifications", emailNotifications) + .add("environmentVariables", environmentVariables) .add("environments", environments) .add("format", format) .add("gitSource", gitSource) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/Run.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/Run.java index af0d6c6c4..c8fb4053e 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/Run.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/Run.java @@ -84,6 +84,14 @@ public class Run { @JsonProperty("end_time") private Long endTime; + /** + * Snapshot of `JobSettings.environment_variables` as it was at run launch — the full list of + * named environment-variable entries the job defined. To find which entry a given task ran with, + * look at `RunTaskSettings.environment_variables_key`. + */ + @JsonProperty("environment_variables") + private Collection environmentVariables; + /** * The time in milliseconds it took to execute the commands in the JAR or notebook until they * completed, failed, timed out, were cancelled, or encountered an unexpected error. The duration @@ -337,6 +345,15 @@ public Long getEndTime() { return endTime; } + public Run setEnvironmentVariables(Collection environmentVariables) { + this.environmentVariables = environmentVariables; + return this; + } + + public Collection getEnvironmentVariables() { + return environmentVariables; + } + public Run setExecutionDuration(Long executionDuration) { this.executionDuration = executionDuration; return this; @@ -604,6 +621,7 @@ public boolean equals(Object o) { && Objects.equals(effectivePerformanceTarget, that.effectivePerformanceTarget) && Objects.equals(effectiveUsagePolicyId, that.effectiveUsagePolicyId) && Objects.equals(endTime, that.endTime) + && Objects.equals(environmentVariables, that.environmentVariables) && Objects.equals(executionDuration, that.executionDuration) && Objects.equals(gitSource, that.gitSource) && Objects.equals(hasMore, that.hasMore) @@ -647,6 +665,7 @@ public int hashCode() { effectivePerformanceTarget, effectiveUsagePolicyId, endTime, + environmentVariables, executionDuration, gitSource, hasMore, @@ -690,6 +709,7 @@ public String toString() { .add("effectivePerformanceTarget", effectivePerformanceTarget) .add("effectiveUsagePolicyId", effectiveUsagePolicyId) .add("endTime", endTime) + .add("environmentVariables", environmentVariables) .add("executionDuration", executionDuration) .add("gitSource", gitSource) .add("hasMore", hasMore) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/RunTask.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/RunTask.java index 49bed2e70..e45da37be 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/RunTask.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/RunTask.java @@ -155,6 +155,15 @@ public class RunTask { @JsonProperty("environment_key") private String environmentKey; + /** + * Reference to a `JobEnvironmentVariables` entry defined in `RunSettings.environment_variables` + * for one-time runs or preserved in `Run.environment_variables` for run snapshots. The selected + * entry's variables are applied to this task at execution time. This field supports serverless + * tasks using environment version 5 or later. + */ + @JsonProperty("environment_variables_key") + private String environmentVariablesKey; + /** * The time in milliseconds it took to execute the commands in the JAR or notebook until they * completed, failed, timed out, were cancelled, or encountered an unexpected error. The duration @@ -558,6 +567,15 @@ public String getEnvironmentKey() { return environmentKey; } + public RunTask setEnvironmentVariablesKey(String environmentVariablesKey) { + this.environmentVariablesKey = environmentVariablesKey; + return this; + } + + public String getEnvironmentVariablesKey() { + return environmentVariablesKey; + } + public RunTask setExecutionDuration(Long executionDuration) { this.executionDuration = executionDuration; return this; @@ -899,6 +917,7 @@ public boolean equals(Object o) { && Objects.equals(emailNotifications, that.emailNotifications) && Objects.equals(endTime, that.endTime) && Objects.equals(environmentKey, that.environmentKey) + && Objects.equals(environmentVariablesKey, that.environmentVariablesKey) && Objects.equals(executionDuration, that.executionDuration) && Objects.equals(existingClusterId, that.existingClusterId) && Objects.equals(forEachTask, that.forEachTask) @@ -960,6 +979,7 @@ public int hashCode() { emailNotifications, endTime, environmentKey, + environmentVariablesKey, executionDuration, existingClusterId, forEachTask, @@ -1021,6 +1041,7 @@ public String toString() { .add("emailNotifications", emailNotifications) .add("endTime", endTime) .add("environmentKey", environmentKey) + .add("environmentVariablesKey", environmentVariablesKey) .add("executionDuration", executionDuration) .add("existingClusterId", existingClusterId) .add("forEachTask", forEachTask) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/SubmitRun.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/SubmitRun.java index a9b7b7fb3..defa32a3a 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/SubmitRun.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/SubmitRun.java @@ -25,6 +25,15 @@ public class SubmitRun { @JsonProperty("email_notifications") private JobEmailNotifications emailNotifications; + /** + * Named environment-variable entries that tasks of this one-time run can reference by key from + * `RunTaskSettings.environment_variables_key`. Each entry's `spec` holds inline `variables` and + * optional `.env` `files`. Handled identically to `JobSettings.environment_variables`. Maximum 10 + * entries. Entries are independent of one another — there is no cross-entry merging. + */ + @JsonProperty("environment_variables") + private Collection environmentVariables; + /** * A list of task execution environment specifications that can be referenced by tasks of this * run. @@ -145,6 +154,16 @@ public JobEmailNotifications getEmailNotifications() { return emailNotifications; } + public SubmitRun setEnvironmentVariables( + Collection environmentVariables) { + this.environmentVariables = environmentVariables; + return this; + } + + public Collection getEnvironmentVariables() { + return environmentVariables; + } + public SubmitRun setEnvironments(Collection environments) { this.environments = environments; return this; @@ -270,6 +289,7 @@ public boolean equals(Object o) { return Objects.equals(accessControlList, that.accessControlList) && Objects.equals(budgetPolicyId, that.budgetPolicyId) && Objects.equals(emailNotifications, that.emailNotifications) + && Objects.equals(environmentVariables, that.environmentVariables) && Objects.equals(environments, that.environments) && Objects.equals(gitSource, that.gitSource) && Objects.equals(health, that.health) @@ -291,6 +311,7 @@ public int hashCode() { accessControlList, budgetPolicyId, emailNotifications, + environmentVariables, environments, gitSource, health, @@ -312,6 +333,7 @@ public String toString() { .add("accessControlList", accessControlList) .add("budgetPolicyId", budgetPolicyId) .add("emailNotifications", emailNotifications) + .add("environmentVariables", environmentVariables) .add("environments", environments) .add("gitSource", gitSource) .add("health", health) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/SubmitTask.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/SubmitTask.java index e49637ac7..ff60cd2be 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/SubmitTask.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/SubmitTask.java @@ -101,6 +101,15 @@ public class SubmitTask { @JsonProperty("environment_key") private String environmentKey; + /** + * Reference to a `JobEnvironmentVariables` entry defined in `RunSettings.environment_variables` + * for one-time runs or preserved in `Run.environment_variables` for run snapshots. The selected + * entry's variables are applied to this task at execution time. This field supports serverless + * tasks using environment version 5 or later. + */ + @JsonProperty("environment_variables_key") + private String environmentVariablesKey; + /** * If existing_cluster_id, the ID of an existing cluster that is used for all runs. When running * jobs or tasks on an existing cluster, you may need to manually restart the cluster if it stops @@ -380,6 +389,15 @@ public String getEnvironmentKey() { return environmentKey; } + public SubmitTask setEnvironmentVariablesKey(String environmentVariablesKey) { + this.environmentVariablesKey = environmentVariablesKey; + return this; + } + + public String getEnvironmentVariablesKey() { + return environmentVariablesKey; + } + public SubmitTask setExistingClusterId(String existingClusterId) { this.existingClusterId = existingClusterId; return this; @@ -616,6 +634,7 @@ public boolean equals(Object o) { && Objects.equals(disabled, that.disabled) && Objects.equals(emailNotifications, that.emailNotifications) && Objects.equals(environmentKey, that.environmentKey) + && Objects.equals(environmentVariablesKey, that.environmentVariablesKey) && Objects.equals(existingClusterId, that.existingClusterId) && Objects.equals(forEachTask, that.forEachTask) && Objects.equals(genAiComputeTask, that.genAiComputeTask) @@ -660,6 +679,7 @@ public int hashCode() { disabled, emailNotifications, environmentKey, + environmentVariablesKey, existingClusterId, forEachTask, genAiComputeTask, @@ -704,6 +724,7 @@ public String toString() { .add("disabled", disabled) .add("emailNotifications", emailNotifications) .add("environmentKey", environmentKey) + .add("environmentVariablesKey", environmentVariablesKey) .add("existingClusterId", existingClusterId) .add("forEachTask", forEachTask) .add("genAiComputeTask", genAiComputeTask) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/Task.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/Task.java index dccdff591..5cc163a05 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/Task.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/Task.java @@ -102,6 +102,14 @@ public class Task { @JsonProperty("environment_key") private String environmentKey; + /** + * Reference to a `JobEnvironmentVariables` entry defined in `JobSettings.environment_variables`. + * The selected entry's variables are applied to this task at execution time. This field supports + * serverless tasks using environment version 5 or later. + */ + @JsonProperty("environment_variables_key") + private String environmentVariablesKey; + /** * If existing_cluster_id, the ID of an existing cluster that is used for all runs. When running * jobs or tasks on an existing cluster, you may need to manually restart the cluster if it stops @@ -392,6 +400,15 @@ public String getEnvironmentKey() { return environmentKey; } + public Task setEnvironmentVariablesKey(String environmentVariablesKey) { + this.environmentVariablesKey = environmentVariablesKey; + return this; + } + + public String getEnvironmentVariablesKey() { + return environmentVariablesKey; + } + public Task setExistingClusterId(String existingClusterId) { this.existingClusterId = existingClusterId; return this; @@ -637,6 +654,7 @@ public boolean equals(Object o) { && Objects.equals(disabled, that.disabled) && Objects.equals(emailNotifications, that.emailNotifications) && Objects.equals(environmentKey, that.environmentKey) + && Objects.equals(environmentVariablesKey, that.environmentVariablesKey) && Objects.equals(existingClusterId, that.existingClusterId) && Objects.equals(forEachTask, that.forEachTask) && Objects.equals(genAiComputeTask, that.genAiComputeTask) @@ -682,6 +700,7 @@ public int hashCode() { disabled, emailNotifications, environmentKey, + environmentVariablesKey, existingClusterId, forEachTask, genAiComputeTask, @@ -727,6 +746,7 @@ public String toString() { .add("disabled", disabled) .add("emailNotifications", emailNotifications) .add("environmentKey", environmentKey) + .add("environmentVariablesKey", environmentVariablesKey) .add("existingClusterId", existingClusterId) .add("forEachTask", forEachTask) .add("genAiComputeTask", genAiComputeTask) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializedFeature.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializedFeature.java index 1601311e5..26765cb84 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializedFeature.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializedFeature.java @@ -36,6 +36,13 @@ public class MaterializedFeature { @JsonProperty("is_online") private Boolean isOnline; + /** + * The ID of the job that materializes the feature. This is present for both batch and streaming + * features. + */ + @JsonProperty("job_id") + private Long jobId; + /** * The timestamp when the pipeline last ran and updated the materialized feature values. If the * pipeline has not run yet, this field will be null. @@ -62,6 +69,13 @@ public class MaterializedFeature { @JsonProperty("online_store_config") private OnlineStoreConfig onlineStoreConfig; + /** + * The ID of the pipeline that materializes this feature. This is only present for streaming + * features. + */ + @JsonProperty("pipeline_id") + private String pipelineId; + /** * The schedule state of the materialization pipeline. Hidden from GraphQL: being deprecated, so * not exposed to Catalog Explorer. @@ -145,6 +159,15 @@ public Boolean getIsOnline() { return isOnline; } + public MaterializedFeature setJobId(Long jobId) { + this.jobId = jobId; + return this; + } + + public Long getJobId() { + return jobId; + } + public MaterializedFeature setLastMaterializationTime(String lastMaterializationTime) { this.lastMaterializationTime = lastMaterializationTime; return this; @@ -190,6 +213,15 @@ public OnlineStoreConfig getOnlineStoreConfig() { return onlineStoreConfig; } + public MaterializedFeature setPipelineId(String pipelineId) { + this.pipelineId = pipelineId; + return this; + } + + public String getPipelineId() { + return pipelineId; + } + public MaterializedFeature setPipelineScheduleState( MaterializedFeaturePipelineScheduleState pipelineScheduleState) { this.pipelineScheduleState = pipelineScheduleState; @@ -246,11 +278,13 @@ public boolean equals(Object o) { && Objects.equals(cronScheduleTrigger, that.cronScheduleTrigger) && Objects.equals(featureName, that.featureName) && Objects.equals(isOnline, that.isOnline) + && Objects.equals(jobId, that.jobId) && Objects.equals(lastMaterializationTime, that.lastMaterializationTime) && Objects.equals(latestBackfillOperation, that.latestBackfillOperation) && Objects.equals(materializedFeatureId, that.materializedFeatureId) && Objects.equals(offlineStoreConfig, that.offlineStoreConfig) && Objects.equals(onlineStoreConfig, that.onlineStoreConfig) + && Objects.equals(pipelineId, that.pipelineId) && Objects.equals(pipelineScheduleState, that.pipelineScheduleState) && Objects.equals(streamingMode, that.streamingMode) && Objects.equals(tableName, that.tableName) @@ -266,11 +300,13 @@ public int hashCode() { cronScheduleTrigger, featureName, isOnline, + jobId, lastMaterializationTime, latestBackfillOperation, materializedFeatureId, offlineStoreConfig, onlineStoreConfig, + pipelineId, pipelineScheduleState, streamingMode, tableName, @@ -286,11 +322,13 @@ public String toString() { .add("cronScheduleTrigger", cronScheduleTrigger) .add("featureName", featureName) .add("isOnline", isOnline) + .add("jobId", jobId) .add("lastMaterializationTime", lastMaterializationTime) .add("latestBackfillOperation", latestBackfillOperation) .add("materializedFeatureId", materializedFeatureId) .add("offlineStoreConfig", offlineStoreConfig) .add("onlineStoreConfig", onlineStoreConfig) + .add("pipelineId", pipelineId) .add("pipelineScheduleState", pipelineScheduleState) .add("streamingMode", streamingMode) .add("tableName", tableName) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SchemaRegistryConfig.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SchemaRegistryConfig.java index 3ccb3fa16..9bb50227b 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SchemaRegistryConfig.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/SchemaRegistryConfig.java @@ -12,7 +12,10 @@ */ @Generated public class SchemaRegistryConfig { - /** Reference to the schema registry API secret in a Databricks secret scope. */ + /** + * Reference to the schema registry API secret in a Databricks secret scope. Set this only if + * required for authentication for the schema registry. + */ @JsonProperty("api_secret_ref") private SecretScopeReference apiSecretRef; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/ClonePipelineRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/ClonePipelineRequest.java index 7460e626e..c3d1dc5a2 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/ClonePipelineRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/ClonePipelineRequest.java @@ -59,7 +59,11 @@ public class ClonePipelineRequest { @JsonProperty("deployment") private PipelineDeployment deployment; - /** Whether the pipeline is in Development mode. Defaults to false. */ + /** + * Whether the pipeline is in Development mode. Defaults to false. + * + *

Deprecated: set development mode for each update instead. + */ @JsonProperty("development") private Boolean development; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/CreatePipeline.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/CreatePipeline.java index d78fe8967..baeb327ba 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/CreatePipeline.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/CreatePipeline.java @@ -54,7 +54,11 @@ public class CreatePipeline { @JsonProperty("deployment") private PipelineDeployment deployment; - /** Whether the pipeline is in Development mode. Defaults to false. */ + /** + * Whether the pipeline is in Development mode. Defaults to false. + * + *

Deprecated: set development mode for each update instead. + */ @JsonProperty("development") private Boolean development; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/EditPipeline.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/EditPipeline.java index ab684e467..ecaffc6cf 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/EditPipeline.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/EditPipeline.java @@ -57,7 +57,11 @@ public class EditPipeline { @JsonProperty("deployment") private PipelineDeployment deployment; - /** Whether the pipeline is in Development mode. Defaults to false. */ + /** + * Whether the pipeline is in Development mode. Defaults to false. + * + *

Deprecated: set development mode for each update instead. + */ @JsonProperty("development") private Boolean development; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/PipelineSpec.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/PipelineSpec.java index a3cc82a41..bdc347c0f 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/PipelineSpec.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/PipelineSpec.java @@ -50,7 +50,11 @@ public class PipelineSpec { @JsonProperty("deployment") private PipelineDeployment deployment; - /** Whether the pipeline is in Development mode. Defaults to false. */ + /** + * Whether the pipeline is in Development mode. Defaults to false. + * + *

Deprecated: set development mode for each update instead. + */ @JsonProperty("development") private Boolean development; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/Command.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/Command.java new file mode 100644 index 000000000..45d65b2e5 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/Command.java @@ -0,0 +1,124 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.sandbox; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Collection; +import java.util.Objects; + +/** A single command execution. */ +@Generated +public class Command { + /** Arguments passed to the program. */ + @JsonProperty("args") + private Collection args; + + /** The program that was executed. */ + @JsonProperty("cmd") + private String cmd; + + /** Stable identifier for this command. */ + @JsonProperty("command_id") + private String commandId; + + /** + * Process exit code. Only present when finished is true and the process exited normally (not + * killed by signal or failed to start). + */ + @JsonProperty("exit_code") + private Long exitCode; + + /** Whether the command has finished executing. */ + @JsonProperty("finished") + private Boolean finished; + + /** PID of the spawned process. Absent if the process failed to start. */ + @JsonProperty("pid") + private Long pid; + + public Command setArgs(Collection args) { + this.args = args; + return this; + } + + public Collection getArgs() { + return args; + } + + public Command setCmd(String cmd) { + this.cmd = cmd; + return this; + } + + public String getCmd() { + return cmd; + } + + public Command setCommandId(String commandId) { + this.commandId = commandId; + return this; + } + + public String getCommandId() { + return commandId; + } + + public Command setExitCode(Long exitCode) { + this.exitCode = exitCode; + return this; + } + + public Long getExitCode() { + return exitCode; + } + + public Command setFinished(Boolean finished) { + this.finished = finished; + return this; + } + + public Boolean getFinished() { + return finished; + } + + public Command setPid(Long pid) { + this.pid = pid; + return this; + } + + public Long getPid() { + return pid; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Command that = (Command) o; + return Objects.equals(args, that.args) + && Objects.equals(cmd, that.cmd) + && Objects.equals(commandId, that.commandId) + && Objects.equals(exitCode, that.exitCode) + && Objects.equals(finished, that.finished) + && Objects.equals(pid, that.pid); + } + + @Override + public int hashCode() { + return Objects.hash(args, cmd, commandId, exitCode, finished, pid); + } + + @Override + public String toString() { + return new ToStringer(Command.class) + .add("args", args) + .add("cmd", cmd) + .add("commandId", commandId) + .add("exitCode", exitCode) + .add("finished", finished) + .add("pid", pid) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/ListCommandsRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/ListCommandsRequest.java new file mode 100644 index 000000000..6c2961235 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/ListCommandsRequest.java @@ -0,0 +1,82 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.sandbox; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.QueryParam; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.Objects; + +@Generated +public class ListCommandsRequest { + /** + * Maximum number of commands to return. The server may return fewer. If unspecified, the server + * returns all commands. + */ + @JsonIgnore + @QueryParam("page_size") + private Long pageSize; + + /** + * Page token returned by a previous ListCommands call. Use this to retrieve the next page of + * results. + */ + @JsonIgnore + @QueryParam("page_token") + private String pageToken; + + /** The sandbox whose commands to list, in the form `sandboxes/{sandbox_id}`. */ + @JsonIgnore private String parent; + + public ListCommandsRequest setPageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + public Long getPageSize() { + return pageSize; + } + + public ListCommandsRequest setPageToken(String pageToken) { + this.pageToken = pageToken; + return this; + } + + public String getPageToken() { + return pageToken; + } + + public ListCommandsRequest setParent(String parent) { + this.parent = parent; + return this; + } + + public String getParent() { + return parent; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ListCommandsRequest that = (ListCommandsRequest) o; + return Objects.equals(pageSize, that.pageSize) + && Objects.equals(pageToken, that.pageToken) + && Objects.equals(parent, that.parent); + } + + @Override + public int hashCode() { + return Objects.hash(pageSize, pageToken, parent); + } + + @Override + public String toString() { + return new ToStringer(ListCommandsRequest.class) + .add("pageSize", pageSize) + .add("pageToken", pageToken) + .add("parent", parent) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/ListCommandsResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/ListCommandsResponse.java new file mode 100644 index 000000000..8525cecbb --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/ListCommandsResponse.java @@ -0,0 +1,61 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.sandbox; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Collection; +import java.util.Objects; + +/** Response listing tracked command executions. */ +@Generated +public class ListCommandsResponse { + /** Commands in this page of results. */ + @JsonProperty("commands") + private Collection commands; + + /** Token to retrieve the next page. Empty when there are no more results. */ + @JsonProperty("next_page_token") + private String nextPageToken; + + public ListCommandsResponse setCommands(Collection commands) { + this.commands = commands; + return this; + } + + public Collection getCommands() { + return commands; + } + + public ListCommandsResponse setNextPageToken(String nextPageToken) { + this.nextPageToken = nextPageToken; + return this; + } + + public String getNextPageToken() { + return nextPageToken; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ListCommandsResponse that = (ListCommandsResponse) o; + return Objects.equals(commands, that.commands) + && Objects.equals(nextPageToken, that.nextPageToken); + } + + @Override + public int hashCode() { + return Objects.hash(commands, nextPageToken); + } + + @Override + public String toString() { + return new ToStringer(ListCommandsResponse.class) + .add("commands", commands) + .add("nextPageToken", nextPageToken) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/SandboxAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/SandboxAPI.java index d8ce6ba87..757f066a5 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/SandboxAPI.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/SandboxAPI.java @@ -58,6 +58,15 @@ public Sandbox getSandbox(GetSandboxRequest request) { return impl.getSandbox(request); } + public ListCommandsResponse listCommands(String parent) { + return listCommands(new ListCommandsRequest().setParent(parent)); + } + + /** Lists the tracked command executions (running and completed) in a sandbox. */ + public ListCommandsResponse listCommands(ListCommandsRequest request) { + return impl.listCommands(request); + } + /** Lists all Sandboxes. */ public Iterable listSandboxes(ListSandboxesRequest request) { return Paginator.newTokenPagination( diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/SandboxImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/SandboxImpl.java index 9662eed0a..647a39400 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/SandboxImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/SandboxImpl.java @@ -86,6 +86,23 @@ public Sandbox getSandbox(GetSandboxRequest request) { } } + @Override + public ListCommandsResponse listCommands(ListCommandsRequest request) { + String path = String.format("/api/2.0/sandbox-exec/%s/commands", request.getParent()); + try { + Request req = new Request("GET", path); + + ApiClient.setQuery(req, request); + req.withHeader("Accept", "application/json"); + if (apiClient.workspaceId() != null) { + req.withHeader("X-Databricks-Workspace-Id", apiClient.workspaceId()); + } + return apiClient.execute(req, ListCommandsResponse.class); + } catch (IOException e) { + throw new DatabricksException("IO error: " + e.getMessage(), e); + } + } + @Override public ListSandboxesResponse listSandboxes(ListSandboxesRequest request) { String path = "/api/2.0/sandboxes"; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/SandboxService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/SandboxService.java index 387275b87..fc23ccb54 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/SandboxService.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sandbox/SandboxService.java @@ -29,6 +29,9 @@ ExecuteCommandSyncResponse executeCommandSync( /** Retrieves a Sandbox by name. */ Sandbox getSandbox(GetSandboxRequest getSandboxRequest); + /** Lists the tracked command executions (running and completed) in a sandbox. */ + ListCommandsResponse listCommands(ListCommandsRequest listCommandsRequest); + /** Lists all Sandboxes. */ ListSandboxesResponse listSandboxes(ListSandboxesRequest listSandboxesRequest); diff --git a/examples/docs/pom.xml b/examples/docs/pom.xml index 31ea69b68..decf52c96 100644 --- a/examples/docs/pom.xml +++ b/examples/docs/pom.xml @@ -24,7 +24,7 @@ com.databricks databricks-sdk-java - 0.157.0 + 0.158.0 diff --git a/examples/spring-boot-oauth-u2m-demo/pom.xml b/examples/spring-boot-oauth-u2m-demo/pom.xml index dceed2ea7..c7ce8ef89 100644 --- a/examples/spring-boot-oauth-u2m-demo/pom.xml +++ b/examples/spring-boot-oauth-u2m-demo/pom.xml @@ -40,7 +40,7 @@ com.databricks databricks-sdk-java - 0.157.0 + 0.158.0 diff --git a/lockfile.json b/lockfile.json index 40025b1af..7e08b4e88 100644 --- a/lockfile.json +++ b/lockfile.json @@ -1,7 +1,7 @@ { "artifactId": "databricks-sdk-parent", "groupId": "com.databricks", - "version": "0.157.0", + "version": "0.158.0", "lockFileVersion": 1, "dependencies": [], "mavenPlugins": [], diff --git a/pom.xml b/pom.xml index 71ab7ded2..9bffcb13a 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.databricks databricks-sdk-parent - 0.157.0 + 0.158.0 pom Databricks SDK for Java The Databricks SDK for Java includes functionality to accelerate development with Java for diff --git a/shaded/pom.xml b/shaded/pom.xml index 733606797..57f6a31de 100644 --- a/shaded/pom.xml +++ b/shaded/pom.xml @@ -4,7 +4,7 @@ 4.0.0 - 0.157.0 + 0.158.0 com.databricks