From 8fa2b934710e182e94086c50d66785e843445aa5 Mon Sep 17 00:00:00 2001 From: Renaud Hartert Date: Tue, 19 Nov 2024 16:06:08 +0100 Subject: [PATCH] [Release] Release v0.52.0 (#1090) ### Internal Changes * Update Jobs GetRun API to support paginated responses for jobs and ForEach tasks ([#1089](https://github.com/databricks/databricks-sdk-go/pull/1089)). ### API Changes: * Added `ServicePrincipalClientId` field for [apps.App](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/apps#App). * Added `AzureServicePrincipal`, `GcpServiceAccountKey` and `ReadOnly` fields for [catalog.CreateCredentialRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#CreateCredentialRequest). * Added `AzureServicePrincipal`, `ReadOnly` and `UsedForManagedStorage` fields for [catalog.CredentialInfo](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#CredentialInfo). * Added `AzureServicePrincipal` and `ReadOnly` fields for [catalog.UpdateCredentialRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#UpdateCredentialRequest). * Added `ExternalLocationName`, `ReadOnly` and `Url` fields for [catalog.ValidateCredentialRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ValidateCredentialRequest). * Added `IsDir` field for [catalog.ValidateCredentialResponse](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ValidateCredentialResponse). * Changed `CreateCredential` and `GenerateTemporaryServiceCredential` methods for [w.Credentials](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#CredentialsAPI) workspace-level service with new required argument order. * Changed `AccessConnectorId` field for [catalog.AzureManagedIdentity](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#AzureManagedIdentity) to be required. * Changed `AccessConnectorId` field for [catalog.AzureManagedIdentity](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#AzureManagedIdentity) to be required. * Changed `Name` field for [catalog.CreateCredentialRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#CreateCredentialRequest) to be required. * Changed `CredentialName` field for [catalog.GenerateTemporaryServiceCredentialRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#GenerateTemporaryServiceCredentialRequest) to be required. OpenAPI SHA: f2385add116e3716c8a90a0b68e204deb40f996c, Date: 2024-11-15 --- .codegen/_openapi_sha | 2 +- service/apps/model.go | 5 +- service/billing/model.go | 2 +- service/catalog/api.go | 51 +++++++++++++------- service/catalog/interface.go | 36 ++++++++++---- service/catalog/model.go | 93 +++++++++++++++++++++++++++++------- service/dashboards/model.go | 10 ++-- service/iam/model.go | 2 +- service/jobs/model.go | 12 ++--- service/oauth2/model.go | 1 + service/pkg.go | 6 +-- service/settings/model.go | 4 +- service/sharing/model.go | 8 +++- service/workspace/model.go | 2 +- version/version.go | 2 +- 15 files changed, 168 insertions(+), 68 deletions(-) diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index 5f4b50860..a2ba58aa5 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/service/apps/model.go b/service/apps/model.go index 385807883..7eaa5f90b 100755 --- a/service/apps/model.go +++ b/service/apps/model.go @@ -35,6 +35,8 @@ type App struct { // Resources for the app. Resources []AppResource `json:"resources,omitempty"` + ServicePrincipalClientId string `json:"service_principal_client_id,omitempty"` + ServicePrincipalId int64 `json:"service_principal_id,omitempty"` ServicePrincipalName string `json:"service_principal_name,omitempty"` @@ -728,6 +730,7 @@ type StopAppRequest struct { // Update an app type UpdateAppRequest struct { App *App `json:"app,omitempty"` - // 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. Name string `json:"-" url:"-"` } diff --git a/service/billing/model.go b/service/billing/model.go index 64ea3ed00..e1aec066d 100644 --- a/service/billing/model.go +++ b/service/billing/model.go @@ -573,7 +573,7 @@ func (s GetBillingUsageDashboardResponse) MarshalJSON() ([]byte, error) { // Get budget type GetBudgetConfigurationRequest struct { - // The Databricks budget configuration ID. + // The budget configuration ID BudgetId string `json:"-" url:"-"` } diff --git a/service/catalog/api.go b/service/catalog/api.go index 191788ac5..3e1e75eea 100755 --- a/service/catalog/api.go +++ b/service/catalog/api.go @@ -791,19 +791,24 @@ type CredentialsInterface interface { // 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. CreateCredential(ctx context.Context, request CreateCredentialRequest) (*CredentialInfo, error) // 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. DeleteCredential(ctx context.Context, request DeleteCredentialRequest) error // 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. DeleteCredentialByNameArg(ctx context.Context, nameArg string) error // Generate a temporary service credential. @@ -815,14 +820,16 @@ type CredentialsInterface interface { // 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. GetCredential(ctx context.Context, request GetCredentialRequest) (*CredentialInfo, error) // 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. GetCredentialByNameArg(ctx context.Context, nameArg string) (*CredentialInfo, error) // List credentials. @@ -851,7 +858,7 @@ type CredentialsInterface interface { // 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 @@ -862,10 +869,19 @@ type CredentialsInterface interface { // // 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**). ValidateCredential(ctx context.Context, request ValidateCredentialRequest) (*ValidateCredentialResponse, error) } @@ -891,8 +907,8 @@ type CredentialsAPI struct { // 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. func (a *CredentialsAPI) DeleteCredentialByNameArg(ctx context.Context, nameArg string) error { return a.credentialsImpl.DeleteCredential(ctx, DeleteCredentialRequest{ NameArg: nameArg, @@ -901,8 +917,9 @@ func (a *CredentialsAPI) DeleteCredentialByNameArg(ctx context.Context, 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. func (a *CredentialsAPI) GetCredentialByNameArg(ctx context.Context, nameArg string) (*CredentialInfo, error) { return a.credentialsImpl.GetCredential(ctx, GetCredentialRequest{ NameArg: nameArg, diff --git a/service/catalog/interface.go b/service/catalog/interface.go index 85d13f41d..1c1bbe3cc 100755 --- a/service/catalog/interface.go +++ b/service/catalog/interface.go @@ -246,13 +246,19 @@ type CredentialsService interface { // 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. CreateCredential(ctx context.Context, request CreateCredentialRequest) (*CredentialInfo, error) // 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. DeleteCredential(ctx context.Context, request DeleteCredentialRequest) error // Generate a temporary service credential. @@ -264,9 +270,9 @@ type CredentialsService interface { // 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. GetCredential(ctx context.Context, request GetCredentialRequest) (*CredentialInfo, error) // List credentials. @@ -283,7 +289,7 @@ type CredentialsService interface { // 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 @@ -294,10 +300,20 @@ type CredentialsService interface { // // 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**). ValidateCredential(ctx context.Context, request ValidateCredentialRequest) (*ValidateCredentialResponse, error) } diff --git a/service/catalog/model.go b/service/catalog/model.go index 055d53103..9d439492d 100755 --- a/service/catalog/model.go +++ b/service/catalog/model.go @@ -220,7 +220,7 @@ type AzureManagedIdentity struct { // The Azure resource ID of the Azure Databricks Access Connector. Use the // format // `/subscriptions/{guid}/resourceGroups/{rg-name}/providers/Microsoft.Databricks/accessConnectors/{connector-name}`. - AccessConnectorId string `json:"access_connector_id,omitempty"` + AccessConnectorId string `json:"access_connector_id"` // The Databricks internal ID that represents this managed identity. This // field is only used to persist the credential_id once it is fetched from // the credentials manager - as we only use the protobuf serializer to store @@ -295,6 +295,7 @@ func (s AzureManagedIdentityResponse) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +// The Azure service principal configuration. type AzureServicePrincipal struct { // The application ID of the application registration within the referenced // AAD tenant. @@ -880,13 +881,20 @@ type CreateCredentialRequest struct { AwsIamRole *AwsIamRole `json:"aws_iam_role,omitempty"` // The Azure managed identity configuration. AzureManagedIdentity *AzureManagedIdentity `json:"azure_managed_identity,omitempty"` + // The Azure service principal configuration. + AzureServicePrincipal *AzureServicePrincipal `json:"azure_service_principal,omitempty"` // Comment associated with the credential. Comment string `json:"comment,omitempty"` + + GcpServiceAccountKey *GcpServiceAccountKey `json:"gcp_service_account_key,omitempty"` // The credential name. The name must be unique among storage and service // credentials within the metastore. - Name string `json:"name,omitempty"` + Name string `json:"name"` // Indicates the purpose of the credential. Purpose CredentialPurpose `json:"purpose,omitempty"` + // Whether the credential is usable only for read operations. Only + // applicable when purpose is **STORAGE**. + ReadOnly bool `json:"read_only,omitempty"` // Optional. Supplying true to this argument skips validation of the created // set of credentials. SkipValidation bool `json:"skip_validation,omitempty"` @@ -1324,6 +1332,8 @@ type CredentialInfo struct { AwsIamRole *AwsIamRole `json:"aws_iam_role,omitempty"` // The Azure managed identity configuration. AzureManagedIdentity *AzureManagedIdentity `json:"azure_managed_identity,omitempty"` + // The Azure service principal configuration. + AzureServicePrincipal *AzureServicePrincipal `json:"azure_service_principal,omitempty"` // Comment associated with the credential. Comment string `json:"comment,omitempty"` // Time at which this credential was created, in epoch milliseconds. @@ -1346,10 +1356,16 @@ type CredentialInfo struct { Owner string `json:"owner,omitempty"` // Indicates the purpose of the credential. Purpose CredentialPurpose `json:"purpose,omitempty"` + // Whether the credential is usable only for read operations. Only + // applicable when purpose is **STORAGE**. + ReadOnly bool `json:"read_only,omitempty"` // Time at which this credential was last modified, in epoch milliseconds. UpdatedAt int64 `json:"updated_at,omitempty"` // Username of user who last modified the credential. UpdatedBy string `json:"updated_by,omitempty"` + // Whether this credential is the current metastore's root storage + // credential. Only applicable when purpose is **STORAGE**. + UsedForManagedStorage bool `json:"used_for_managed_storage,omitempty"` ForceSendFields []string `json:"-"` } @@ -1366,6 +1382,8 @@ type CredentialPurpose string const CredentialPurposeService CredentialPurpose = `SERVICE` +const CredentialPurposeStorage CredentialPurpose = `STORAGE` + // String representation for [fmt.Print] func (f *CredentialPurpose) String() string { return string(*f) @@ -1374,11 +1392,11 @@ func (f *CredentialPurpose) String() string { // Set raw string value and validate it against allowed values func (f *CredentialPurpose) Set(v string) error { switch v { - case `SERVICE`: + case `SERVICE`, `STORAGE`: *f = CredentialPurpose(v) return nil default: - return fmt.Errorf(`value "%s" is not one of "SERVICE"`, v) + return fmt.Errorf(`value "%s" is not one of "SERVICE", "STORAGE"`, v) } } @@ -1613,7 +1631,9 @@ type DeleteConnectionRequest struct { // Delete a credential type DeleteCredentialRequest struct { - // 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**). Force bool `json:"-" url:"force,omitempty"` // Name of the credential. NameArg string `json:"-" url:"-"` @@ -2363,6 +2383,26 @@ func (s GcpOauthToken) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +// GCP long-lived credential. GCP Service Account. +type GcpServiceAccountKey struct { + // The email of the service account. + Email string `json:"email,omitempty"` + // The service account's RSA private key. + PrivateKey string `json:"private_key,omitempty"` + // The ID of the service account's private key. + PrivateKeyId string `json:"private_key_id,omitempty"` + + ForceSendFields []string `json:"-"` +} + +func (s *GcpServiceAccountKey) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s GcpServiceAccountKey) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + // Options to customize the requested temporary credential type GenerateTemporaryServiceCredentialAzureOptions struct { // The resources to which the temporary Azure credential should apply. These @@ -2376,17 +2416,7 @@ type GenerateTemporaryServiceCredentialRequest struct { AzureOptions *GenerateTemporaryServiceCredentialAzureOptions `json:"azure_options,omitempty"` // The name of the service credential used to generate a temporary // credential - CredentialName string `json:"credential_name,omitempty"` - - ForceSendFields []string `json:"-"` -} - -func (s *GenerateTemporaryServiceCredentialRequest) UnmarshalJSON(b []byte) error { - return marshal.Unmarshal(b, s) -} - -func (s GenerateTemporaryServiceCredentialRequest) MarshalJSON() ([]byte, error) { - return marshal.Marshal(s) + CredentialName string `json:"credential_name"` } type GenerateTemporaryTableCredentialRequest struct { @@ -5451,9 +5481,13 @@ type UpdateCredentialRequest struct { AwsIamRole *AwsIamRole `json:"aws_iam_role,omitempty"` // The Azure managed identity configuration. AzureManagedIdentity *AzureManagedIdentity `json:"azure_managed_identity,omitempty"` + // The Azure service principal configuration. + AzureServicePrincipal *AzureServicePrincipal `json:"azure_service_principal,omitempty"` // Comment associated with the credential. Comment string `json:"comment,omitempty"` - // 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**). Force bool `json:"force,omitempty"` // Whether the current securable is accessible from all workspaces or a // specific set of workspaces. @@ -5464,6 +5498,9 @@ type UpdateCredentialRequest struct { NewName string `json:"new_name,omitempty"` // Username of current owner of credential. Owner string `json:"owner,omitempty"` + // Whether the credential is usable only for read operations. Only + // applicable when purpose is **STORAGE**. + ReadOnly bool `json:"read_only,omitempty"` // Supply true to this argument to skip validation of the updated // credential. SkipValidation bool `json:"skip_validation,omitempty"` @@ -5852,9 +5889,18 @@ type ValidateCredentialRequest struct { // Required. The name of an existing credential or long-lived cloud // credential to validate. CredentialName string `json:"credential_name,omitempty"` + // The name of an existing external location to validate. Only applicable + // for storage credentials (purpose is **STORAGE**.) + ExternalLocationName string `json:"external_location_name,omitempty"` // The purpose of the credential. This should only be used when the // credential is specified. Purpose CredentialPurpose `json:"purpose,omitempty"` + // Whether the credential is only usable for read operations. Only + // applicable for storage credentials (purpose is **STORAGE**.) + ReadOnly bool `json:"read_only,omitempty"` + // The external location url to validate. Only applicable when purpose is + // **STORAGE**. + Url string `json:"url,omitempty"` ForceSendFields []string `json:"-"` } @@ -5868,8 +5914,21 @@ func (s ValidateCredentialRequest) MarshalJSON() ([]byte, error) { } type ValidateCredentialResponse struct { + // Whether the tested location is a directory in cloud storage. Only + // applicable for when purpose is **STORAGE**. + IsDir bool `json:"isDir,omitempty"` // The results of the validation check. Results []CredentialValidationResult `json:"results,omitempty"` + + ForceSendFields []string `json:"-"` +} + +func (s *ValidateCredentialResponse) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s ValidateCredentialResponse) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) } // A enum represents the result of the file operation diff --git a/service/dashboards/model.go b/service/dashboards/model.go index bff2c3cbc..139b2f6c8 100755 --- a/service/dashboards/model.go +++ b/service/dashboards/model.go @@ -321,7 +321,7 @@ type GetDashboardRequest struct { // Get published dashboard type GetPublishedDashboardRequest struct { - // UUID identifying the dashboard to be published. + // UUID identifying the published dashboard. DashboardId string `json:"-" url:"-"` } @@ -413,7 +413,7 @@ func (s ListDashboardsResponse) MarshalJSON() ([]byte, error) { // List dashboard schedules type ListSchedulesRequest struct { - // UUID identifying the dashboard to which the schedule belongs. + // UUID identifying the dashboard to which the schedules belongs. DashboardId string `json:"-" url:"-"` // The number of schedules to return per page. PageSize int `json:"-" url:"page_size,omitempty"` @@ -453,14 +453,14 @@ func (s ListSchedulesResponse) MarshalJSON() ([]byte, error) { // List schedule subscriptions type ListSubscriptionsRequest struct { - // UUID identifying the dashboard to which the subscription belongs. + // UUID identifying the dashboard which the subscriptions belongs. DashboardId string `json:"-" url:"-"` // The number of subscriptions to return per page. PageSize int `json:"-" url:"page_size,omitempty"` // A page token, received from a previous `ListSubscriptions` call. Use this // to retrieve the subsequent page. PageToken string `json:"-" url:"page_token,omitempty"` - // UUID identifying the schedule to which the subscription belongs. + // UUID identifying the schedule which the subscriptions belongs. ScheduleId string `json:"-" url:"-"` ForceSendFields []string `json:"-"` @@ -939,7 +939,7 @@ type TrashDashboardResponse struct { // Unpublish dashboard type UnpublishDashboardRequest struct { - // UUID identifying the dashboard to be published. + // UUID identifying the published dashboard. DashboardId string `json:"-" url:"-"` } diff --git a/service/iam/model.go b/service/iam/model.go index acbf8b480..05357a329 100755 --- a/service/iam/model.go +++ b/service/iam/model.go @@ -1299,7 +1299,7 @@ type UpdateWorkspaceAssignments struct { Permissions []WorkspacePermission `json:"permissions,omitempty"` // The ID of the user, service principal, or group. PrincipalId int64 `json:"-" url:"-"` - // The workspace ID for the account. + // The workspace ID. WorkspaceId int64 `json:"-" url:"-"` } diff --git a/service/jobs/model.go b/service/jobs/model.go index 5d874f21c..ecbdfb4fc 100755 --- a/service/jobs/model.go +++ b/service/jobs/model.go @@ -445,8 +445,8 @@ type CreateJob struct { // 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. RunAs *JobRunAs `json:"run_as,omitempty"` // An optional periodic schedule for this job. The default behavior is that // the job only runs when triggered by clicking “Run Now” in the Jobs UI @@ -1388,8 +1388,8 @@ type JobPermissionsRequest struct { // 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. type JobRunAs struct { // Application ID of an active service principal. Setting this field // requires the `servicePrincipal/user` role. @@ -1487,8 +1487,8 @@ type JobSettings struct { // 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. RunAs *JobRunAs `json:"run_as,omitempty"` // An optional periodic schedule for this job. The default behavior is that // the job only runs when triggered by clicking “Run Now” in the Jobs UI diff --git a/service/oauth2/model.go b/service/oauth2/model.go index a15cd2f89..073a9cb9a 100755 --- a/service/oauth2/model.go +++ b/service/oauth2/model.go @@ -195,6 +195,7 @@ func (s GetCustomAppIntegrationOutput) MarshalJSON() ([]byte, error) { // Get OAuth Custom App Integration type GetCustomAppIntegrationRequest struct { + // The OAuth app integration ID. IntegrationId string `json:"-" url:"-"` } diff --git a/service/pkg.go b/service/pkg.go index 4a0921f29..fe080f3f7 100644 --- a/service/pkg.go +++ b/service/pkg.go @@ -42,10 +42,10 @@ // // - [marketplace.ConsumerProvidersAPI]: Providers are the entities that publish listings to the Marketplace. // -// - [provisioning.CredentialsAPI]: These APIs manage credential configurations for this workspace. -// // - [catalog.CredentialsAPI]: A credential represents an authentication and authorization mechanism for accessing services on your cloud tenant. // +// - [provisioning.CredentialsAPI]: These APIs manage credential configurations for this workspace. +// // - [settings.CredentialsManagerAPI]: Credentials manager interacts with with Identity Providers to to perform token exchanges using stored credentials and refresh tokens. // // - [settings.CspEnablementAccountAPI]: The compliance security profile settings at the account level control whether to enable it for new workspaces. @@ -309,8 +309,8 @@ var ( _ *marketplace.ConsumerListingsAPI = nil _ *marketplace.ConsumerPersonalizationRequestsAPI = nil _ *marketplace.ConsumerProvidersAPI = nil - _ *provisioning.CredentialsAPI = nil _ *catalog.CredentialsAPI = nil + _ *provisioning.CredentialsAPI = nil _ *settings.CredentialsManagerAPI = nil _ *settings.CspEnablementAccountAPI = nil _ *iam.CurrentUserAPI = nil diff --git a/service/settings/model.go b/service/settings/model.go index 01020544f..705491239 100755 --- a/service/settings/model.go +++ b/service/settings/model.go @@ -898,7 +898,7 @@ type DeleteRestrictWorkspaceAdminsSettingResponse struct { // Delete a token type DeleteTokenManagementRequest struct { - // The ID of the token to get. + // The ID of the token to revoke. TokenId string `json:"-" url:"-"` } @@ -2666,7 +2666,7 @@ type UpdateNotificationDestinationRequest struct { Config *Config `json:"config,omitempty"` // The display name for the notification destination. DisplayName string `json:"display_name,omitempty"` - + // UUID identifying notification destination. Id string `json:"-" url:"-"` ForceSendFields []string `json:"-"` diff --git a/service/sharing/model.go b/service/sharing/model.go index f3caba4e0..24e940abf 100755 --- a/service/sharing/model.go +++ b/service/sharing/model.go @@ -901,6 +901,10 @@ func (s SharedDataObject) MarshalJSON() ([]byte, error) { // The type of the data object. type SharedDataObjectDataObjectType string +const SharedDataObjectDataObjectTypeFeatureSpec SharedDataObjectDataObjectType = `FEATURE_SPEC` + +const SharedDataObjectDataObjectTypeFunction SharedDataObjectDataObjectType = `FUNCTION` + const SharedDataObjectDataObjectTypeMaterializedView SharedDataObjectDataObjectType = `MATERIALIZED_VIEW` const SharedDataObjectDataObjectTypeModel SharedDataObjectDataObjectType = `MODEL` @@ -923,11 +927,11 @@ func (f *SharedDataObjectDataObjectType) String() string { // Set raw string value and validate it against allowed values func (f *SharedDataObjectDataObjectType) Set(v string) error { switch v { - case `MATERIALIZED_VIEW`, `MODEL`, `NOTEBOOK_FILE`, `SCHEMA`, `STREAMING_TABLE`, `TABLE`, `VIEW`: + case `FEATURE_SPEC`, `FUNCTION`, `MATERIALIZED_VIEW`, `MODEL`, `NOTEBOOK_FILE`, `SCHEMA`, `STREAMING_TABLE`, `TABLE`, `VIEW`: *f = SharedDataObjectDataObjectType(v) return nil default: - return fmt.Errorf(`value "%s" is not one of "MATERIALIZED_VIEW", "MODEL", "NOTEBOOK_FILE", "SCHEMA", "STREAMING_TABLE", "TABLE", "VIEW"`, v) + return fmt.Errorf(`value "%s" is not one of "FEATURE_SPEC", "FUNCTION", "MATERIALIZED_VIEW", "MODEL", "NOTEBOOK_FILE", "SCHEMA", "STREAMING_TABLE", "TABLE", "VIEW"`, v) } } diff --git a/service/workspace/model.go b/service/workspace/model.go index 48b104422..dbc17017e 100755 --- a/service/workspace/model.go +++ b/service/workspace/model.go @@ -246,7 +246,7 @@ type DeleteCredentialsResponse struct { // Delete a repo type DeleteRepoRequest struct { - // ID of the Git folder (repo) object in the workspace. + // The ID for the corresponding repo to delete. RepoId int64 `json:"-" url:"-"` } diff --git a/version/version.go b/version/version.go index be8b9edcc..c9924ece7 100644 --- a/version/version.go +++ b/version/version.go @@ -1,4 +1,4 @@ package version // Version of the SDK, updated manually before every tag -const Version = "0.51.0" +const Version = "0.52.0"