diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index 5f4b5086..a2ba58aa 100644 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -d25296d2f4aa7bd6195c816fdf82e0f960f775da \ No newline at end of file +f2385add116e3716c8a90a0b68e204deb40f996c \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index a1050873..bee3c7e6 100755 --- a/.gitattributes +++ b/.gitattributes @@ -269,6 +269,7 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/FunctionsAP databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/FunctionsImpl.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/FunctionsService.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/GcpOauthToken.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/GcpServiceAccountKey.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/GenerateTemporaryServiceCredentialAzureOptions.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/GenerateTemporaryServiceCredentialRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/GenerateTemporaryTableCredentialRequest.java linguist-generated=true diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bb9782c..c6550a72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # Version changelog +## [Release] Release v0.36.0 + +### Internal Changes + + * Update Jobs GetRun API to support paginated responses for jobs and ForEach tasks ([#386](https://github.com/databricks/databricks-sdk-java/pull/386)). + +### API Changes: + + * Added `servicePrincipalClientId` field for `com.databricks.sdk.service.apps.App`. + * Added `azureServicePrincipal`, `gcpServiceAccountKey` and `readOnly` fields for `com.databricks.sdk.service.catalog.CreateCredentialRequest`. + * Added `azureServicePrincipal`, `readOnly` and `usedForManagedStorage` fields for `com.databricks.sdk.service.catalog.CredentialInfo`. + * Added `azureServicePrincipal` and `readOnly` fields for `com.databricks.sdk.service.catalog.UpdateCredentialRequest`. + * Added `externalLocationName`, `readOnly` and `url` fields for `com.databricks.sdk.service.catalog.ValidateCredentialRequest`. + * Added `isDir` field for `com.databricks.sdk.service.catalog.ValidateCredentialResponse`. + * Changed `createCredential()` and `generateTemporaryServiceCredential()` methods for `workspaceClient.credentials()` service with new required argument order. + * Changed `accessConnectorId` field for `com.databricks.sdk.service.catalog.AzureManagedIdentity` to be required. + * Changed `accessConnectorId` field for `com.databricks.sdk.service.catalog.AzureManagedIdentity` to be required. + * Changed `name` field for `com.databricks.sdk.service.catalog.CreateCredentialRequest` to be required. + * Changed `credentialName` field for `com.databricks.sdk.service.catalog.GenerateTemporaryServiceCredentialRequest` to be required. + +OpenAPI SHA: f2385add116e3716c8a90a0b68e204deb40f996c, Date: 2024-11-15 + ## [Release] Release v0.35.0 ### New Features and Improvements diff --git a/databricks-sdk-java/pom.xml b/databricks-sdk-java/pom.xml index 8a531596..94302c4e 100644 --- a/databricks-sdk-java/pom.xml +++ b/databricks-sdk-java/pom.xml @@ -5,7 +5,7 @@ com.databricks databricks-sdk-parent - 0.35.0 + 0.36.0 databricks-sdk-java diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/App.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/App.java index dce0c059..87ef8d04 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/App.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/App.java @@ -62,6 +62,10 @@ public class App { @JsonProperty("resources") private Collection resources; + /** */ + @JsonProperty("service_principal_client_id") + private String servicePrincipalClientId; + /** */ @JsonProperty("service_principal_id") private Long servicePrincipalId; @@ -172,6 +176,15 @@ public Collection getResources() { return resources; } + public App setServicePrincipalClientId(String servicePrincipalClientId) { + this.servicePrincipalClientId = servicePrincipalClientId; + return this; + } + + public String getServicePrincipalClientId() { + return servicePrincipalClientId; + } + public App setServicePrincipalId(Long servicePrincipalId) { this.servicePrincipalId = servicePrincipalId; return this; @@ -232,6 +245,7 @@ public boolean equals(Object o) { && Objects.equals(name, that.name) && Objects.equals(pendingDeployment, that.pendingDeployment) && Objects.equals(resources, that.resources) + && Objects.equals(servicePrincipalClientId, that.servicePrincipalClientId) && Objects.equals(servicePrincipalId, that.servicePrincipalId) && Objects.equals(servicePrincipalName, that.servicePrincipalName) && Objects.equals(updateTime, that.updateTime) @@ -252,6 +266,7 @@ public int hashCode() { name, pendingDeployment, resources, + servicePrincipalClientId, servicePrincipalId, servicePrincipalName, updateTime, @@ -272,6 +287,7 @@ public String toString() { .add("name", name) .add("pendingDeployment", pendingDeployment) .add("resources", resources) + .add("servicePrincipalClientId", servicePrincipalClientId) .add("servicePrincipalId", servicePrincipalId) .add("servicePrincipalName", servicePrincipalName) .add("updateTime", updateTime) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/UpdateAppRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/UpdateAppRequest.java index 4727ea97..09baf63a 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/UpdateAppRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/UpdateAppRequest.java @@ -15,7 +15,10 @@ public class UpdateAppRequest { @JsonProperty("app") private App app; - /** The name of the app. */ + /** + * The name of the app. The name must contain only lowercase alphanumeric characters and hyphens. + * It must be unique within the workspace. + */ @JsonIgnore private String name; public UpdateAppRequest setApp(App app) { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/GetBudgetConfigurationRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/GetBudgetConfigurationRequest.java index 10c38568..6e34027d 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/GetBudgetConfigurationRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/billing/GetBudgetConfigurationRequest.java @@ -10,7 +10,7 @@ /** Get budget */ @Generated public class GetBudgetConfigurationRequest { - /** The Databricks budget configuration ID. */ + /** The budget configuration ID */ @JsonIgnore private String budgetId; public GetBudgetConfigurationRequest setBudgetId(String budgetId) { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AzureServicePrincipal.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AzureServicePrincipal.java index 4e146322..e7f1d07e 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AzureServicePrincipal.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/AzureServicePrincipal.java @@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Objects; +/** The Azure service principal configuration. */ @Generated public class AzureServicePrincipal { /** The application ID of the application registration within the referenced AAD tenant. */ diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CreateCredentialRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CreateCredentialRequest.java index b4a9bbe2..0fe91d00 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CreateCredentialRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CreateCredentialRequest.java @@ -17,10 +17,17 @@ public class CreateCredentialRequest { @JsonProperty("azure_managed_identity") private AzureManagedIdentity azureManagedIdentity; + /** The Azure service principal configuration. */ + @JsonProperty("azure_service_principal") + private AzureServicePrincipal azureServicePrincipal; + /** Comment associated with the credential. */ @JsonProperty("comment") private String comment; + @JsonProperty("gcp_service_account_key") + private GcpServiceAccountKey gcpServiceAccountKey; + /** * The credential name. The name must be unique among storage and service credentials within the * metastore. @@ -32,6 +39,13 @@ public class CreateCredentialRequest { @JsonProperty("purpose") private CredentialPurpose purpose; + /** + * Whether the credential is usable only for read operations. Only applicable when purpose is + * **STORAGE**. + */ + @JsonProperty("read_only") + private Boolean readOnly; + /** * Optional. Supplying true to this argument skips validation of the created set of credentials. */ @@ -57,6 +71,16 @@ public AzureManagedIdentity getAzureManagedIdentity() { return azureManagedIdentity; } + public CreateCredentialRequest setAzureServicePrincipal( + AzureServicePrincipal azureServicePrincipal) { + this.azureServicePrincipal = azureServicePrincipal; + return this; + } + + public AzureServicePrincipal getAzureServicePrincipal() { + return azureServicePrincipal; + } + public CreateCredentialRequest setComment(String comment) { this.comment = comment; return this; @@ -66,6 +90,16 @@ public String getComment() { return comment; } + public CreateCredentialRequest setGcpServiceAccountKey( + GcpServiceAccountKey gcpServiceAccountKey) { + this.gcpServiceAccountKey = gcpServiceAccountKey; + return this; + } + + public GcpServiceAccountKey getGcpServiceAccountKey() { + return gcpServiceAccountKey; + } + public CreateCredentialRequest setName(String name) { this.name = name; return this; @@ -84,6 +118,15 @@ public CredentialPurpose getPurpose() { return purpose; } + public CreateCredentialRequest setReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return this; + } + + public Boolean getReadOnly() { + return readOnly; + } + public CreateCredentialRequest setSkipValidation(Boolean skipValidation) { this.skipValidation = skipValidation; return this; @@ -100,15 +143,27 @@ public boolean equals(Object o) { CreateCredentialRequest that = (CreateCredentialRequest) o; return Objects.equals(awsIamRole, that.awsIamRole) && Objects.equals(azureManagedIdentity, that.azureManagedIdentity) + && Objects.equals(azureServicePrincipal, that.azureServicePrincipal) && Objects.equals(comment, that.comment) + && Objects.equals(gcpServiceAccountKey, that.gcpServiceAccountKey) && Objects.equals(name, that.name) && Objects.equals(purpose, that.purpose) + && Objects.equals(readOnly, that.readOnly) && Objects.equals(skipValidation, that.skipValidation); } @Override public int hashCode() { - return Objects.hash(awsIamRole, azureManagedIdentity, comment, name, purpose, skipValidation); + return Objects.hash( + awsIamRole, + azureManagedIdentity, + azureServicePrincipal, + comment, + gcpServiceAccountKey, + name, + purpose, + readOnly, + skipValidation); } @Override @@ -116,9 +171,12 @@ public String toString() { return new ToStringer(CreateCredentialRequest.class) .add("awsIamRole", awsIamRole) .add("azureManagedIdentity", azureManagedIdentity) + .add("azureServicePrincipal", azureServicePrincipal) .add("comment", comment) + .add("gcpServiceAccountKey", gcpServiceAccountKey) .add("name", name) .add("purpose", purpose) + .add("readOnly", readOnly) .add("skipValidation", skipValidation) .toString(); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CredentialInfo.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CredentialInfo.java index 8945b6c1..1e737acd 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CredentialInfo.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CredentialInfo.java @@ -17,6 +17,10 @@ public class CredentialInfo { @JsonProperty("azure_managed_identity") private AzureManagedIdentity azureManagedIdentity; + /** The Azure service principal configuration. */ + @JsonProperty("azure_service_principal") + private AzureServicePrincipal azureServicePrincipal; + /** Comment associated with the credential. */ @JsonProperty("comment") private String comment; @@ -63,6 +67,13 @@ public class CredentialInfo { @JsonProperty("purpose") private CredentialPurpose purpose; + /** + * Whether the credential is usable only for read operations. Only applicable when purpose is + * **STORAGE**. + */ + @JsonProperty("read_only") + private Boolean readOnly; + /** Time at which this credential was last modified, in epoch milliseconds. */ @JsonProperty("updated_at") private Long updatedAt; @@ -71,6 +82,13 @@ public class CredentialInfo { @JsonProperty("updated_by") private String updatedBy; + /** + * Whether this credential is the current metastore's root storage credential. Only applicable + * when purpose is **STORAGE**. + */ + @JsonProperty("used_for_managed_storage") + private Boolean usedForManagedStorage; + public CredentialInfo setAwsIamRole(AwsIamRole awsIamRole) { this.awsIamRole = awsIamRole; return this; @@ -89,6 +107,15 @@ public AzureManagedIdentity getAzureManagedIdentity() { return azureManagedIdentity; } + public CredentialInfo setAzureServicePrincipal(AzureServicePrincipal azureServicePrincipal) { + this.azureServicePrincipal = azureServicePrincipal; + return this; + } + + public AzureServicePrincipal getAzureServicePrincipal() { + return azureServicePrincipal; + } + public CredentialInfo setComment(String comment) { this.comment = comment; return this; @@ -179,6 +206,15 @@ public CredentialPurpose getPurpose() { return purpose; } + public CredentialInfo setReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return this; + } + + public Boolean getReadOnly() { + return readOnly; + } + public CredentialInfo setUpdatedAt(Long updatedAt) { this.updatedAt = updatedAt; return this; @@ -197,6 +233,15 @@ public String getUpdatedBy() { return updatedBy; } + public CredentialInfo setUsedForManagedStorage(Boolean usedForManagedStorage) { + this.usedForManagedStorage = usedForManagedStorage; + return this; + } + + public Boolean getUsedForManagedStorage() { + return usedForManagedStorage; + } + @Override public boolean equals(Object o) { if (this == o) return true; @@ -204,6 +249,7 @@ public boolean equals(Object o) { CredentialInfo that = (CredentialInfo) o; return Objects.equals(awsIamRole, that.awsIamRole) && Objects.equals(azureManagedIdentity, that.azureManagedIdentity) + && Objects.equals(azureServicePrincipal, that.azureServicePrincipal) && Objects.equals(comment, that.comment) && Objects.equals(createdAt, that.createdAt) && Objects.equals(createdBy, that.createdBy) @@ -214,8 +260,10 @@ public boolean equals(Object o) { && Objects.equals(name, that.name) && Objects.equals(owner, that.owner) && Objects.equals(purpose, that.purpose) + && Objects.equals(readOnly, that.readOnly) && Objects.equals(updatedAt, that.updatedAt) - && Objects.equals(updatedBy, that.updatedBy); + && Objects.equals(updatedBy, that.updatedBy) + && Objects.equals(usedForManagedStorage, that.usedForManagedStorage); } @Override @@ -223,6 +271,7 @@ public int hashCode() { return Objects.hash( awsIamRole, azureManagedIdentity, + azureServicePrincipal, comment, createdAt, createdBy, @@ -233,8 +282,10 @@ public int hashCode() { name, owner, purpose, + readOnly, updatedAt, - updatedBy); + updatedBy, + usedForManagedStorage); } @Override @@ -242,6 +293,7 @@ public String toString() { return new ToStringer(CredentialInfo.class) .add("awsIamRole", awsIamRole) .add("azureManagedIdentity", azureManagedIdentity) + .add("azureServicePrincipal", azureServicePrincipal) .add("comment", comment) .add("createdAt", createdAt) .add("createdBy", createdBy) @@ -252,8 +304,10 @@ public String toString() { .add("name", name) .add("owner", owner) .add("purpose", purpose) + .add("readOnly", readOnly) .add("updatedAt", updatedAt) .add("updatedBy", updatedBy) + .add("usedForManagedStorage", usedForManagedStorage) .toString(); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CredentialPurpose.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CredentialPurpose.java index ec09daad..088ed9af 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CredentialPurpose.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CredentialPurpose.java @@ -7,4 +7,5 @@ @Generated public enum CredentialPurpose { SERVICE, + STORAGE, } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CredentialsAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CredentialsAPI.java index 659f078a..132fd9c8 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CredentialsAPI.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CredentialsAPI.java @@ -32,10 +32,19 @@ public CredentialsAPI(CredentialsService mock) { impl = mock; } + public CredentialInfo createCredential(String name) { + return createCredential(new CreateCredentialRequest().setName(name)); + } + /** * Create a credential. * - *

Creates a new credential. + *

Creates a new credential. The type of credential to be created is determined by the + * **purpose** field, which should be either **SERVICE** or **STORAGE**. + * + *

The caller must be a metastore admin or have the metastore privilege + * **CREATE_STORAGE_CREDENTIAL** for storage credentials, or **CREATE_SERVICE_CREDENTIAL** for + * service credentials. */ public CredentialInfo createCredential(CreateCredentialRequest request) { return impl.createCredential(request); @@ -48,12 +57,18 @@ public void deleteCredential(String nameArg) { /** * Delete a credential. * - *

Deletes a credential from the metastore. The caller must be an owner of the credential. + *

Deletes a service or storage credential from the metastore. The caller must be an owner of + * the credential. */ public void deleteCredential(DeleteCredentialRequest request) { impl.deleteCredential(request); } + public TemporaryCredentials generateTemporaryServiceCredential(String credentialName) { + return generateTemporaryServiceCredential( + new GenerateTemporaryServiceCredentialRequest().setCredentialName(credentialName)); + } + /** * Generate a temporary service credential. * @@ -73,8 +88,8 @@ public CredentialInfo getCredential(String nameArg) { /** * Get a credential. * - *

Gets a credential from the metastore. The caller must be a metastore admin, the owner of the - * credential, or have any permission on the credential. + *

Gets a service or storage credential from the metastore. The caller must be a metastore + * admin, the owner of the credential, or have any permission on the credential. */ public CredentialInfo getCredential(GetCredentialRequest request) { return impl.getCredential(request); @@ -110,7 +125,7 @@ public CredentialInfo updateCredential(String nameArg) { /** * Update a credential. * - *

Updates a credential on the metastore. + *

Updates a service or storage credential on the metastore. * *

The caller must be the owner of the credential or a metastore admin or have the `MANAGE` * permission. If the caller is a metastore admin, only the __owner__ field can be changed. @@ -124,9 +139,18 @@ public CredentialInfo updateCredential(UpdateCredentialRequest request) { * *

Validates a credential. * - *

Either the __credential_name__ or the cloud-specific credential must be provided. + *

For service credentials (purpose is **SERVICE**), either the __credential_name__ or the + * cloud-specific credential must be provided. + * + *

For storage credentials (purpose is **STORAGE**), at least one of __external_location_name__ + * and __url__ need to be provided. If only one of them is provided, it will be used for + * validation. And if both are provided, the __url__ will be used for validation, and + * __external_location_name__ will be ignored when checking overlapping urls. Either the + * __credential_name__ or the cloud-specific credential must be provided. * - *

The caller must be a metastore admin or the credential owner. + *

The caller must be a metastore admin or the credential owner or have the required permission + * on the metastore and the credential (e.g., **CREATE_EXTERNAL_LOCATION** when purpose is + * **STORAGE**). */ public ValidateCredentialResponse validateCredential(ValidateCredentialRequest request) { return impl.validateCredential(request); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CredentialsService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CredentialsService.java index 2317a707..40c72204 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CredentialsService.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/CredentialsService.java @@ -21,14 +21,20 @@ public interface CredentialsService { /** * Create a credential. * - *

Creates a new credential. + *

Creates a new credential. The type of credential to be created is determined by the + * **purpose** field, which should be either **SERVICE** or **STORAGE**. + * + *

The caller must be a metastore admin or have the metastore privilege + * **CREATE_STORAGE_CREDENTIAL** for storage credentials, or **CREATE_SERVICE_CREDENTIAL** for + * service credentials. */ CredentialInfo createCredential(CreateCredentialRequest createCredentialRequest); /** * Delete a credential. * - *

Deletes a credential from the metastore. The caller must be an owner of the credential. + *

Deletes a service or storage credential from the metastore. The caller must be an owner of + * the credential. */ void deleteCredential(DeleteCredentialRequest deleteCredentialRequest); @@ -45,8 +51,8 @@ TemporaryCredentials generateTemporaryServiceCredential( /** * Get a credential. * - *

Gets a credential from the metastore. The caller must be a metastore admin, the owner of the - * credential, or have any permission on the credential. + *

Gets a service or storage credential from the metastore. The caller must be a metastore + * admin, the owner of the credential, or have any permission on the credential. */ CredentialInfo getCredential(GetCredentialRequest getCredentialRequest); @@ -64,7 +70,7 @@ TemporaryCredentials generateTemporaryServiceCredential( /** * Update a credential. * - *

Updates a credential on the metastore. + *

Updates a service or storage credential on the metastore. * *

The caller must be the owner of the credential or a metastore admin or have the `MANAGE` * permission. If the caller is a metastore admin, only the __owner__ field can be changed. @@ -76,9 +82,18 @@ TemporaryCredentials generateTemporaryServiceCredential( * *

Validates a credential. * - *

Either the __credential_name__ or the cloud-specific credential must be provided. + *

For service credentials (purpose is **SERVICE**), either the __credential_name__ or the + * cloud-specific credential must be provided. + * + *

For storage credentials (purpose is **STORAGE**), at least one of __external_location_name__ + * and __url__ need to be provided. If only one of them is provided, it will be used for + * validation. And if both are provided, the __url__ will be used for validation, and + * __external_location_name__ will be ignored when checking overlapping urls. Either the + * __credential_name__ or the cloud-specific credential must be provided. * - *

The caller must be a metastore admin or the credential owner. + *

The caller must be a metastore admin or the credential owner or have the required permission + * on the metastore and the credential (e.g., **CREATE_EXTERNAL_LOCATION** when purpose is + * **STORAGE**). */ ValidateCredentialResponse validateCredential( ValidateCredentialRequest validateCredentialRequest); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/DeleteCredentialRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/DeleteCredentialRequest.java index a3549cb5..2a771f6b 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/DeleteCredentialRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/DeleteCredentialRequest.java @@ -11,7 +11,10 @@ /** Delete a credential */ @Generated public class DeleteCredentialRequest { - /** Force deletion even if there are dependent services. */ + /** + * Force an update even if there are dependent services (when purpose is **SERVICE**) or dependent + * external locations and external tables (when purpose is **STORAGE**). + */ @JsonIgnore @QueryParam("force") private Boolean force; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/GcpServiceAccountKey.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/GcpServiceAccountKey.java new file mode 100755 index 00000000..85ebb49b --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/GcpServiceAccountKey.java @@ -0,0 +1,75 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.catalog; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** GCP long-lived credential. GCP Service Account. */ +@Generated +public class GcpServiceAccountKey { + /** The email of the service account. */ + @JsonProperty("email") + private String email; + + /** The service account's RSA private key. */ + @JsonProperty("private_key") + private String privateKey; + + /** The ID of the service account's private key. */ + @JsonProperty("private_key_id") + private String privateKeyId; + + public GcpServiceAccountKey setEmail(String email) { + this.email = email; + return this; + } + + public String getEmail() { + return email; + } + + public GcpServiceAccountKey setPrivateKey(String privateKey) { + this.privateKey = privateKey; + return this; + } + + public String getPrivateKey() { + return privateKey; + } + + public GcpServiceAccountKey setPrivateKeyId(String privateKeyId) { + this.privateKeyId = privateKeyId; + return this; + } + + public String getPrivateKeyId() { + return privateKeyId; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GcpServiceAccountKey that = (GcpServiceAccountKey) o; + return Objects.equals(email, that.email) + && Objects.equals(privateKey, that.privateKey) + && Objects.equals(privateKeyId, that.privateKeyId); + } + + @Override + public int hashCode() { + return Objects.hash(email, privateKey, privateKeyId); + } + + @Override + public String toString() { + return new ToStringer(GcpServiceAccountKey.class) + .add("email", email) + .add("privateKey", privateKey) + .add("privateKeyId", privateKeyId) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateCredentialRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateCredentialRequest.java index fdaf1643..b2aad099 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateCredentialRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/UpdateCredentialRequest.java @@ -18,11 +18,18 @@ public class UpdateCredentialRequest { @JsonProperty("azure_managed_identity") private AzureManagedIdentity azureManagedIdentity; + /** The Azure service principal configuration. */ + @JsonProperty("azure_service_principal") + private AzureServicePrincipal azureServicePrincipal; + /** Comment associated with the credential. */ @JsonProperty("comment") private String comment; - /** Force update even if there are dependent services. */ + /** + * Force an update even if there are dependent services (when purpose is **SERVICE**) or dependent + * external locations and external tables (when purpose is **STORAGE**). + */ @JsonProperty("force") private Boolean force; @@ -44,6 +51,13 @@ public class UpdateCredentialRequest { @JsonProperty("owner") private String owner; + /** + * Whether the credential is usable only for read operations. Only applicable when purpose is + * **STORAGE**. + */ + @JsonProperty("read_only") + private Boolean readOnly; + /** Supply true to this argument to skip validation of the updated credential. */ @JsonProperty("skip_validation") private Boolean skipValidation; @@ -67,6 +81,16 @@ public AzureManagedIdentity getAzureManagedIdentity() { return azureManagedIdentity; } + public UpdateCredentialRequest setAzureServicePrincipal( + AzureServicePrincipal azureServicePrincipal) { + this.azureServicePrincipal = azureServicePrincipal; + return this; + } + + public AzureServicePrincipal getAzureServicePrincipal() { + return azureServicePrincipal; + } + public UpdateCredentialRequest setComment(String comment) { this.comment = comment; return this; @@ -121,6 +145,15 @@ public String getOwner() { return owner; } + public UpdateCredentialRequest setReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return this; + } + + public Boolean getReadOnly() { + return readOnly; + } + public UpdateCredentialRequest setSkipValidation(Boolean skipValidation) { this.skipValidation = skipValidation; return this; @@ -137,12 +170,14 @@ public boolean equals(Object o) { UpdateCredentialRequest that = (UpdateCredentialRequest) o; return Objects.equals(awsIamRole, that.awsIamRole) && Objects.equals(azureManagedIdentity, that.azureManagedIdentity) + && Objects.equals(azureServicePrincipal, that.azureServicePrincipal) && Objects.equals(comment, that.comment) && Objects.equals(force, that.force) && Objects.equals(isolationMode, that.isolationMode) && Objects.equals(nameArg, that.nameArg) && Objects.equals(newName, that.newName) && Objects.equals(owner, that.owner) + && Objects.equals(readOnly, that.readOnly) && Objects.equals(skipValidation, that.skipValidation); } @@ -151,12 +186,14 @@ public int hashCode() { return Objects.hash( awsIamRole, azureManagedIdentity, + azureServicePrincipal, comment, force, isolationMode, nameArg, newName, owner, + readOnly, skipValidation); } @@ -165,12 +202,14 @@ public String toString() { return new ToStringer(UpdateCredentialRequest.class) .add("awsIamRole", awsIamRole) .add("azureManagedIdentity", azureManagedIdentity) + .add("azureServicePrincipal", azureServicePrincipal) .add("comment", comment) .add("force", force) .add("isolationMode", isolationMode) .add("nameArg", nameArg) .add("newName", newName) .add("owner", owner) + .add("readOnly", readOnly) .add("skipValidation", skipValidation) .toString(); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ValidateCredentialRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ValidateCredentialRequest.java index 8bb5ff66..00cb5fe0 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ValidateCredentialRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ValidateCredentialRequest.java @@ -21,10 +21,28 @@ public class ValidateCredentialRequest { @JsonProperty("credential_name") private String credentialName; + /** + * The name of an existing external location to validate. Only applicable for storage credentials + * (purpose is **STORAGE**.) + */ + @JsonProperty("external_location_name") + private String externalLocationName; + /** The purpose of the credential. This should only be used when the credential is specified. */ @JsonProperty("purpose") private CredentialPurpose purpose; + /** + * Whether the credential is only usable for read operations. Only applicable for storage + * credentials (purpose is **STORAGE**.) + */ + @JsonProperty("read_only") + private Boolean readOnly; + + /** The external location url to validate. Only applicable when purpose is **STORAGE**. */ + @JsonProperty("url") + private String url; + public ValidateCredentialRequest setAwsIamRole(AwsIamRole awsIamRole) { this.awsIamRole = awsIamRole; return this; @@ -53,6 +71,15 @@ public String getCredentialName() { return credentialName; } + public ValidateCredentialRequest setExternalLocationName(String externalLocationName) { + this.externalLocationName = externalLocationName; + return this; + } + + public String getExternalLocationName() { + return externalLocationName; + } + public ValidateCredentialRequest setPurpose(CredentialPurpose purpose) { this.purpose = purpose; return this; @@ -62,6 +89,24 @@ public CredentialPurpose getPurpose() { return purpose; } + public ValidateCredentialRequest setReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + return this; + } + + public Boolean getReadOnly() { + return readOnly; + } + + public ValidateCredentialRequest setUrl(String url) { + this.url = url; + return this; + } + + public String getUrl() { + return url; + } + @Override public boolean equals(Object o) { if (this == o) return true; @@ -70,12 +115,22 @@ public boolean equals(Object o) { return Objects.equals(awsIamRole, that.awsIamRole) && Objects.equals(azureManagedIdentity, that.azureManagedIdentity) && Objects.equals(credentialName, that.credentialName) - && Objects.equals(purpose, that.purpose); + && Objects.equals(externalLocationName, that.externalLocationName) + && Objects.equals(purpose, that.purpose) + && Objects.equals(readOnly, that.readOnly) + && Objects.equals(url, that.url); } @Override public int hashCode() { - return Objects.hash(awsIamRole, azureManagedIdentity, credentialName, purpose); + return Objects.hash( + awsIamRole, + azureManagedIdentity, + credentialName, + externalLocationName, + purpose, + readOnly, + url); } @Override @@ -84,7 +139,10 @@ public String toString() { .add("awsIamRole", awsIamRole) .add("azureManagedIdentity", azureManagedIdentity) .add("credentialName", credentialName) + .add("externalLocationName", externalLocationName) .add("purpose", purpose) + .add("readOnly", readOnly) + .add("url", url) .toString(); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ValidateCredentialResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ValidateCredentialResponse.java index ef23a12c..bded5204 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ValidateCredentialResponse.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/ValidateCredentialResponse.java @@ -10,10 +10,26 @@ @Generated public class ValidateCredentialResponse { + /** + * Whether the tested location is a directory in cloud storage. Only applicable for when purpose + * is **STORAGE**. + */ + @JsonProperty("isDir") + private Boolean isDir; + /** The results of the validation check. */ @JsonProperty("results") private Collection results; + public ValidateCredentialResponse setIsDir(Boolean isDir) { + this.isDir = isDir; + return this; + } + + public Boolean getIsDir() { + return isDir; + } + public ValidateCredentialResponse setResults(Collection results) { this.results = results; return this; @@ -28,16 +44,19 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ValidateCredentialResponse that = (ValidateCredentialResponse) o; - return Objects.equals(results, that.results); + return Objects.equals(isDir, that.isDir) && Objects.equals(results, that.results); } @Override public int hashCode() { - return Objects.hash(results); + return Objects.hash(isDir, results); } @Override public String toString() { - return new ToStringer(ValidateCredentialResponse.class).add("results", results).toString(); + return new ToStringer(ValidateCredentialResponse.class) + .add("isDir", isDir) + .add("results", results) + .toString(); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GetPublishedDashboardRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GetPublishedDashboardRequest.java index 10681dfe..d35848af 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GetPublishedDashboardRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/GetPublishedDashboardRequest.java @@ -10,7 +10,7 @@ /** Get published dashboard */ @Generated public class GetPublishedDashboardRequest { - /** UUID identifying the dashboard to be published. */ + /** UUID identifying the published dashboard. */ @JsonIgnore private String dashboardId; public GetPublishedDashboardRequest setDashboardId(String dashboardId) { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/ListSchedulesRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/ListSchedulesRequest.java index f5ce10e0..9ba29e91 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/ListSchedulesRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/ListSchedulesRequest.java @@ -11,7 +11,7 @@ /** List dashboard schedules */ @Generated public class ListSchedulesRequest { - /** UUID identifying the dashboard to which the schedule belongs. */ + /** UUID identifying the dashboard to which the schedules belongs. */ @JsonIgnore private String dashboardId; /** The number of schedules to return per page. */ diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/ListSubscriptionsRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/ListSubscriptionsRequest.java index 78f2ba69..275fa17d 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/ListSubscriptionsRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/ListSubscriptionsRequest.java @@ -11,7 +11,7 @@ /** List schedule subscriptions */ @Generated public class ListSubscriptionsRequest { - /** UUID identifying the dashboard to which the subscription belongs. */ + /** UUID identifying the dashboard which the subscriptions belongs. */ @JsonIgnore private String dashboardId; /** The number of subscriptions to return per page. */ @@ -27,7 +27,7 @@ public class ListSubscriptionsRequest { @QueryParam("page_token") private String pageToken; - /** UUID identifying the schedule to which the subscription belongs. */ + /** UUID identifying the schedule which the subscriptions belongs. */ @JsonIgnore private String scheduleId; public ListSubscriptionsRequest setDashboardId(String dashboardId) { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/UnpublishDashboardRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/UnpublishDashboardRequest.java index 36085eb0..cb8e8e7c 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/UnpublishDashboardRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/dashboards/UnpublishDashboardRequest.java @@ -10,7 +10,7 @@ /** Unpublish dashboard */ @Generated public class UnpublishDashboardRequest { - /** UUID identifying the dashboard to be published. */ + /** UUID identifying the published dashboard. */ @JsonIgnore private String dashboardId; public UnpublishDashboardRequest setDashboardId(String dashboardId) { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/UpdateWorkspaceAssignments.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/UpdateWorkspaceAssignments.java index 5d7ad6db..4ee2e430 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/UpdateWorkspaceAssignments.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iam/UpdateWorkspaceAssignments.java @@ -24,7 +24,7 @@ public class UpdateWorkspaceAssignments { /** The ID of the user, service principal, or group. */ @JsonIgnore private Long principalId; - /** The workspace ID for the account. */ + /** The workspace ID. */ @JsonIgnore private Long workspaceId; public UpdateWorkspaceAssignments setPermissions(Collection permissions) { 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 e69adebe..9a2bfc86 100755 --- 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 @@ -135,8 +135,8 @@ public class CreateJob { * Write-only setting. Specifies the user, service principal or group that the job/pipeline runs * as. If not specified, the job/pipeline runs as the user who created the job/pipeline. * - *

Exactly one of `user_name`, `service_principal_name`, `group_name` should be specified. If - * not, an error is thrown. + *

Either `user_name` or `service_principal_name` should be specified. If not, an error is + * thrown. */ @JsonProperty("run_as") private JobRunAs runAs; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobRunAs.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobRunAs.java index adab90dc..dbe49479 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobRunAs.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/JobRunAs.java @@ -11,8 +11,8 @@ * Write-only setting. Specifies the user, service principal or group that the job/pipeline runs as. * If not specified, the job/pipeline runs as the user who created the job/pipeline. * - *

Exactly one of `user_name`, `service_principal_name`, `group_name` should be specified. If - * not, an error is thrown. + *

Either `user_name` or `service_principal_name` should be specified. If not, an error is + * thrown. */ @Generated public class JobRunAs { 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 e8656657..a3826b3b 100755 --- 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 @@ -131,8 +131,8 @@ public class JobSettings { * Write-only setting. Specifies the user, service principal or group that the job/pipeline runs * as. If not specified, the job/pipeline runs as the user who created the job/pipeline. * - *

Exactly one of `user_name`, `service_principal_name`, `group_name` should be specified. If - * not, an error is thrown. + *

Either `user_name` or `service_principal_name` should be specified. If not, an error is + * thrown. */ @JsonProperty("run_as") private JobRunAs runAs; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/GetCustomAppIntegrationRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/GetCustomAppIntegrationRequest.java index 98a8c4b8..6b0c6115 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/GetCustomAppIntegrationRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/oauth2/GetCustomAppIntegrationRequest.java @@ -10,7 +10,7 @@ /** Get OAuth Custom App Integration */ @Generated public class GetCustomAppIntegrationRequest { - /** */ + /** The OAuth app integration ID. */ @JsonIgnore private String integrationId; public GetCustomAppIntegrationRequest setIntegrationId(String integrationId) { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/DeleteTokenManagementRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/DeleteTokenManagementRequest.java index bd065c40..98dcf2ab 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/DeleteTokenManagementRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/DeleteTokenManagementRequest.java @@ -10,7 +10,7 @@ /** Delete a token */ @Generated public class DeleteTokenManagementRequest { - /** The ID of the token to get. */ + /** The ID of the token to revoke. */ @JsonIgnore private String tokenId; public DeleteTokenManagementRequest setTokenId(String tokenId) { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/UpdateNotificationDestinationRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/UpdateNotificationDestinationRequest.java index 98e872aa..7554ec30 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/UpdateNotificationDestinationRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/UpdateNotificationDestinationRequest.java @@ -21,7 +21,7 @@ public class UpdateNotificationDestinationRequest { @JsonProperty("display_name") private String displayName; - /** */ + /** UUID identifying notification destination. */ @JsonIgnore private String id; public UpdateNotificationDestinationRequest setConfig(Config config) { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/SharedDataObjectDataObjectType.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/SharedDataObjectDataObjectType.java index 69d3ba9b..e6388116 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/SharedDataObjectDataObjectType.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sharing/SharedDataObjectDataObjectType.java @@ -7,6 +7,8 @@ /** The type of the data object. */ @Generated public enum SharedDataObjectDataObjectType { + FEATURE_SPEC, + FUNCTION, MATERIALIZED_VIEW, MODEL, NOTEBOOK_FILE, diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/DeleteRepoRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/DeleteRepoRequest.java index 72e27bbe..ceeaf005 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/DeleteRepoRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/DeleteRepoRequest.java @@ -10,7 +10,7 @@ /** Delete a repo */ @Generated public class DeleteRepoRequest { - /** ID of the Git folder (repo) object in the workspace. */ + /** The ID for the corresponding repo to delete. */ @JsonIgnore private Long repoId; public DeleteRepoRequest setRepoId(Long repoId) { diff --git a/examples/docs/pom.xml b/examples/docs/pom.xml index 89e86caf..35926f71 100644 --- a/examples/docs/pom.xml +++ b/examples/docs/pom.xml @@ -24,7 +24,7 @@ com.databricks databricks-sdk-java - 0.35.0 + 0.36.0 diff --git a/examples/spring-boot-oauth-u2m-demo/pom.xml b/examples/spring-boot-oauth-u2m-demo/pom.xml index b8a37bff..965bdb4a 100644 --- a/examples/spring-boot-oauth-u2m-demo/pom.xml +++ b/examples/spring-boot-oauth-u2m-demo/pom.xml @@ -37,7 +37,7 @@ com.databricks databricks-sdk-java - 0.35.0 + 0.36.0 com.fasterxml.jackson.datatype diff --git a/pom.xml b/pom.xml index 6b6116a7..dcef38df 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.databricks databricks-sdk-parent - 0.35.0 + 0.36.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 8c3d0966..c2d71324 100644 --- a/shaded/pom.xml +++ b/shaded/pom.xml @@ -4,7 +4,7 @@ 4.0.0 - 0.35.0 + 0.36.0 com.databricks