diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index a92ff0f06..444b180c2 100644 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -5c5ba67b19bb31f9cbfffa3ce267955c8141ed40 \ No newline at end of file +4648d66fa37e7683468dc92cc043c6aa7a34f301 \ No newline at end of file diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index ac7e55cb0..fdc54908e 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -13,3 +13,13 @@ ### Internal Changes ### API Changes +* Add `CreateMcpServiceUserMappedCredential`, `DeleteMcpServiceUserMappedCredential` and `GetMcpServiceUserMappedCredential` methods for [w.AiGateway](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#AiGatewayAPI) workspace-level service. +* Add `TelemetryExportDestinations` field for [apps.AppUpdate](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/apps#AppUpdate). +* Add `Options` field for [catalog.McpServiceConfigSourceConnection](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#McpServiceConfigSourceConnection). +* Add `HeaderAuth` field for [catalog.ModelProviderServiceConfigCustomProviderDirectConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ModelProviderServiceConfigCustomProviderDirectConfig). +* Add `TimezoneId` field for [ml.CronSchedule](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#CronSchedule). +* Add `AvroOptions` and `ProtobufOptions` fields for [pipelines.Transformer](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#Transformer). +* Add `TiktokAds` enum value for [catalog.ConnectionType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#ConnectionType). +* Add `AgentService` and `Skill` enum values for [catalog.SecurableType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/catalog#SecurableType). +* Add `TiktokAds` and `Smartsheet` enum values for [pipelines.IngestionSourceType](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#IngestionSourceType). +* Add `Avro` and `Protobuf` enum values for [pipelines.TransformerFormat](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#TransformerFormat). \ No newline at end of file diff --git a/account_client.go b/account_client.go old mode 100755 new mode 100644 index 6182a005b..9a04fa828 --- a/account_client.go +++ b/account_client.go @@ -144,7 +144,7 @@ type AccountClient struct { GroupsV2 iam.AccountGroupsV2Interface // These APIs are used to manage identities and the workspace access of - // these identities in . + // these identities in Databricks. IamV2 iamv2.AccountIamV2Interface // The Accounts IP Access List API enables account admins to configure IP diff --git a/experimental/mocks/service/catalog/mock_ai_gateway_interface.go b/experimental/mocks/service/catalog/mock_ai_gateway_interface.go index 06f3bac3e..db899ac7f 100644 --- a/experimental/mocks/service/catalog/mock_ai_gateway_interface.go +++ b/experimental/mocks/service/catalog/mock_ai_gateway_interface.go @@ -82,6 +82,65 @@ func (_c *MockAiGatewayInterface_CreateMcpService_Call) RunAndReturn(run func(co return _c } +// CreateMcpServiceUserMappedCredential provides a mock function with given fields: ctx, request +func (_m *MockAiGatewayInterface) CreateMcpServiceUserMappedCredential(ctx context.Context, request catalog.CreateMcpServiceUserMappedCredentialRequest) (*catalog.McpServiceUserMappedCredential, error) { + ret := _m.Called(ctx, request) + + if len(ret) == 0 { + panic("no return value specified for CreateMcpServiceUserMappedCredential") + } + + var r0 *catalog.McpServiceUserMappedCredential + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateMcpServiceUserMappedCredentialRequest) (*catalog.McpServiceUserMappedCredential, error)); ok { + return rf(ctx, request) + } + if rf, ok := ret.Get(0).(func(context.Context, catalog.CreateMcpServiceUserMappedCredentialRequest) *catalog.McpServiceUserMappedCredential); ok { + r0 = rf(ctx, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*catalog.McpServiceUserMappedCredential) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, catalog.CreateMcpServiceUserMappedCredentialRequest) error); ok { + r1 = rf(ctx, request) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockAiGatewayInterface_CreateMcpServiceUserMappedCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateMcpServiceUserMappedCredential' +type MockAiGatewayInterface_CreateMcpServiceUserMappedCredential_Call struct { + *mock.Call +} + +// CreateMcpServiceUserMappedCredential is a helper method to define mock.On call +// - ctx context.Context +// - request catalog.CreateMcpServiceUserMappedCredentialRequest +func (_e *MockAiGatewayInterface_Expecter) CreateMcpServiceUserMappedCredential(ctx interface{}, request interface{}) *MockAiGatewayInterface_CreateMcpServiceUserMappedCredential_Call { + return &MockAiGatewayInterface_CreateMcpServiceUserMappedCredential_Call{Call: _e.mock.On("CreateMcpServiceUserMappedCredential", ctx, request)} +} + +func (_c *MockAiGatewayInterface_CreateMcpServiceUserMappedCredential_Call) Run(run func(ctx context.Context, request catalog.CreateMcpServiceUserMappedCredentialRequest)) *MockAiGatewayInterface_CreateMcpServiceUserMappedCredential_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(catalog.CreateMcpServiceUserMappedCredentialRequest)) + }) + return _c +} + +func (_c *MockAiGatewayInterface_CreateMcpServiceUserMappedCredential_Call) Return(_a0 *catalog.McpServiceUserMappedCredential, _a1 error) *MockAiGatewayInterface_CreateMcpServiceUserMappedCredential_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAiGatewayInterface_CreateMcpServiceUserMappedCredential_Call) RunAndReturn(run func(context.Context, catalog.CreateMcpServiceUserMappedCredentialRequest) (*catalog.McpServiceUserMappedCredential, error)) *MockAiGatewayInterface_CreateMcpServiceUserMappedCredential_Call { + _c.Call.Return(run) + return _c +} + // CreateModelProviderService provides a mock function with given fields: ctx, request func (_m *MockAiGatewayInterface) CreateModelProviderService(ctx context.Context, request catalog.CreateModelProviderServiceRequest) (*catalog.ModelProviderService, error) { ret := _m.Called(ctx, request) @@ -247,6 +306,65 @@ func (_c *MockAiGatewayInterface_DeleteMcpService_Call) RunAndReturn(run func(co return _c } +// DeleteMcpServiceUserMappedCredential provides a mock function with given fields: ctx, request +func (_m *MockAiGatewayInterface) DeleteMcpServiceUserMappedCredential(ctx context.Context, request catalog.DeleteMcpServiceUserMappedCredentialRequest) (*catalog.DeleteMcpServiceUserMappedCredentialResponse, error) { + ret := _m.Called(ctx, request) + + if len(ret) == 0 { + panic("no return value specified for DeleteMcpServiceUserMappedCredential") + } + + var r0 *catalog.DeleteMcpServiceUserMappedCredentialResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, catalog.DeleteMcpServiceUserMappedCredentialRequest) (*catalog.DeleteMcpServiceUserMappedCredentialResponse, error)); ok { + return rf(ctx, request) + } + if rf, ok := ret.Get(0).(func(context.Context, catalog.DeleteMcpServiceUserMappedCredentialRequest) *catalog.DeleteMcpServiceUserMappedCredentialResponse); ok { + r0 = rf(ctx, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*catalog.DeleteMcpServiceUserMappedCredentialResponse) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, catalog.DeleteMcpServiceUserMappedCredentialRequest) error); ok { + r1 = rf(ctx, request) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockAiGatewayInterface_DeleteMcpServiceUserMappedCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteMcpServiceUserMappedCredential' +type MockAiGatewayInterface_DeleteMcpServiceUserMappedCredential_Call struct { + *mock.Call +} + +// DeleteMcpServiceUserMappedCredential is a helper method to define mock.On call +// - ctx context.Context +// - request catalog.DeleteMcpServiceUserMappedCredentialRequest +func (_e *MockAiGatewayInterface_Expecter) DeleteMcpServiceUserMappedCredential(ctx interface{}, request interface{}) *MockAiGatewayInterface_DeleteMcpServiceUserMappedCredential_Call { + return &MockAiGatewayInterface_DeleteMcpServiceUserMappedCredential_Call{Call: _e.mock.On("DeleteMcpServiceUserMappedCredential", ctx, request)} +} + +func (_c *MockAiGatewayInterface_DeleteMcpServiceUserMappedCredential_Call) Run(run func(ctx context.Context, request catalog.DeleteMcpServiceUserMappedCredentialRequest)) *MockAiGatewayInterface_DeleteMcpServiceUserMappedCredential_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(catalog.DeleteMcpServiceUserMappedCredentialRequest)) + }) + return _c +} + +func (_c *MockAiGatewayInterface_DeleteMcpServiceUserMappedCredential_Call) Return(_a0 *catalog.DeleteMcpServiceUserMappedCredentialResponse, _a1 error) *MockAiGatewayInterface_DeleteMcpServiceUserMappedCredential_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAiGatewayInterface_DeleteMcpServiceUserMappedCredential_Call) RunAndReturn(run func(context.Context, catalog.DeleteMcpServiceUserMappedCredentialRequest) (*catalog.DeleteMcpServiceUserMappedCredentialResponse, error)) *MockAiGatewayInterface_DeleteMcpServiceUserMappedCredential_Call { + _c.Call.Return(run) + return _c +} + // DeleteModelProviderService provides a mock function with given fields: ctx, request func (_m *MockAiGatewayInterface) DeleteModelProviderService(ctx context.Context, request catalog.DeleteModelProviderServiceRequest) error { ret := _m.Called(ctx, request) @@ -400,6 +518,65 @@ func (_c *MockAiGatewayInterface_GetMcpService_Call) RunAndReturn(run func(conte return _c } +// GetMcpServiceUserMappedCredential provides a mock function with given fields: ctx, request +func (_m *MockAiGatewayInterface) GetMcpServiceUserMappedCredential(ctx context.Context, request catalog.GetMcpServiceUserMappedCredentialRequest) (*catalog.McpServiceUserMappedCredential, error) { + ret := _m.Called(ctx, request) + + if len(ret) == 0 { + panic("no return value specified for GetMcpServiceUserMappedCredential") + } + + var r0 *catalog.McpServiceUserMappedCredential + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, catalog.GetMcpServiceUserMappedCredentialRequest) (*catalog.McpServiceUserMappedCredential, error)); ok { + return rf(ctx, request) + } + if rf, ok := ret.Get(0).(func(context.Context, catalog.GetMcpServiceUserMappedCredentialRequest) *catalog.McpServiceUserMappedCredential); ok { + r0 = rf(ctx, request) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*catalog.McpServiceUserMappedCredential) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, catalog.GetMcpServiceUserMappedCredentialRequest) error); ok { + r1 = rf(ctx, request) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockAiGatewayInterface_GetMcpServiceUserMappedCredential_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMcpServiceUserMappedCredential' +type MockAiGatewayInterface_GetMcpServiceUserMappedCredential_Call struct { + *mock.Call +} + +// GetMcpServiceUserMappedCredential is a helper method to define mock.On call +// - ctx context.Context +// - request catalog.GetMcpServiceUserMappedCredentialRequest +func (_e *MockAiGatewayInterface_Expecter) GetMcpServiceUserMappedCredential(ctx interface{}, request interface{}) *MockAiGatewayInterface_GetMcpServiceUserMappedCredential_Call { + return &MockAiGatewayInterface_GetMcpServiceUserMappedCredential_Call{Call: _e.mock.On("GetMcpServiceUserMappedCredential", ctx, request)} +} + +func (_c *MockAiGatewayInterface_GetMcpServiceUserMappedCredential_Call) Run(run func(ctx context.Context, request catalog.GetMcpServiceUserMappedCredentialRequest)) *MockAiGatewayInterface_GetMcpServiceUserMappedCredential_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(catalog.GetMcpServiceUserMappedCredentialRequest)) + }) + return _c +} + +func (_c *MockAiGatewayInterface_GetMcpServiceUserMappedCredential_Call) Return(_a0 *catalog.McpServiceUserMappedCredential, _a1 error) *MockAiGatewayInterface_GetMcpServiceUserMappedCredential_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockAiGatewayInterface_GetMcpServiceUserMappedCredential_Call) RunAndReturn(run func(context.Context, catalog.GetMcpServiceUserMappedCredentialRequest) (*catalog.McpServiceUserMappedCredential, error)) *MockAiGatewayInterface_GetMcpServiceUserMappedCredential_Call { + _c.Call.Return(run) + return _c +} + // GetModelProviderService provides a mock function with given fields: ctx, request func (_m *MockAiGatewayInterface) GetModelProviderService(ctx context.Context, request catalog.GetModelProviderServiceRequest) (*catalog.ModelProviderService, error) { ret := _m.Called(ctx, request) diff --git a/service/apps/model.go b/service/apps/model.go index 1e422a3f3..5b4f40b3f 100644 --- a/service/apps/model.go +++ b/service/apps/model.go @@ -1474,6 +1474,8 @@ type AppUpdate struct { Status *AppUpdateUpdateStatus `json:"status,omitempty"` + TelemetryExportDestinations []TelemetryExportDestination `json:"telemetry_export_destinations,omitempty"` + UsagePolicyId string `json:"usage_policy_id,omitempty"` UserApiScopes []string `json:"user_api_scopes,omitempty"` diff --git a/service/catalog/api.go b/service/catalog/api.go index 5d358886a..1ace4440a 100644 --- a/service/catalog/api.go +++ b/service/catalog/api.go @@ -262,6 +262,14 @@ type AiGatewayInterface interface { // references. CreateMcpService(ctx context.Context, request CreateMcpServiceRequest) (*McpService, error) + // Logs the caller in to an MCP service: creates their per-user OAuth + // credential, or re-authenticates it if one already exists. The request body + // carries the OAuth exchange fields. + // + // You must be the owner of the MCP service or have `EXECUTE` on it, plus + // `USE_CATALOG` on the parent catalog and `USE_SCHEMA` on the parent schema. + CreateMcpServiceUserMappedCredential(ctx context.Context, request CreateMcpServiceUserMappedCredentialRequest) (*McpServiceUserMappedCredential, error) + // Creates a model provider service in a Unity Catalog schema. A model provider // service stores authentication and request configuration for an external model // provider, such as OpenAI, Azure OpenAI, or Amazon Bedrock. Model services @@ -296,6 +304,13 @@ type AiGatewayInterface interface { // `USE_CATALOG` on the parent catalog and `USE_SCHEMA` on the parent schema. DeleteMcpService(ctx context.Context, request DeleteMcpServiceRequest) error + // Revokes (deletes) the caller's per-user OAuth credential for an MCP service + // (logout). + // + // You must be the owner of the MCP service or have `EXECUTE` on it, plus + // `USE_CATALOG` on the parent catalog and `USE_SCHEMA` on the parent schema. + DeleteMcpServiceUserMappedCredential(ctx context.Context, request DeleteMcpServiceUserMappedCredentialRequest) (*DeleteMcpServiceUserMappedCredentialResponse, error) + // Deletes the model provider service identified by its resource name. // Optionally supply an `etag` to make the delete conditional on the model // provider service not having changed since it was read. @@ -320,6 +335,17 @@ type AiGatewayInterface interface { // on the parent schema. GetMcpService(ctx context.Context, request GetMcpServiceRequest) (*McpService, error) + // Returns the caller's per-user OAuth login state for an MCP service. Read + // `provisioning_info.state`: `ACTIVE` means the caller is logged in and the + // credential is usable; any other state (for example a failed or + // still-provisioning login) means the login has not completed and the caller + // should log in again. If the caller has no credential yet, the RPC returns + // `NOT_FOUND`. + // + // You must be the owner of the MCP service or have `EXECUTE` on it, plus + // `USE_CATALOG` on the parent catalog and `USE_SCHEMA` on the parent schema. + GetMcpServiceUserMappedCredential(ctx context.Context, request GetMcpServiceUserMappedCredentialRequest) (*McpServiceUserMappedCredential, error) + // Returns the model provider service identified by its resource name. // // You must be the owner of the model provider service or have `EXECUTE`, diff --git a/service/catalog/impl.go b/service/catalog/impl.go index e7b5f6895..e065ef820 100644 --- a/service/catalog/impl.go +++ b/service/catalog/impl.go @@ -309,6 +309,21 @@ func (a *aiGatewayImpl) CreateMcpService(ctx context.Context, request CreateMcpS return &mcpService, err } +func (a *aiGatewayImpl) CreateMcpServiceUserMappedCredential(ctx context.Context, request CreateMcpServiceUserMappedCredentialRequest) (*McpServiceUserMappedCredential, error) { + var mcpServiceUserMappedCredential McpServiceUserMappedCredential + path := fmt.Sprintf("/api/2.1/unity-catalog/%v/user-credentials", request.Name) + queryParams := make(map[string]any) + headers := make(map[string]string) + headers["Accept"] = "application/json" + headers["Content-Type"] = "application/json" + cfg := a.client.Config + if cfg.WorkspaceID != "" { + headers["X-Databricks-Workspace-Id"] = cfg.WorkspaceID + } + err := a.client.Do(ctx, http.MethodPost, path, headers, queryParams, request.Login, &mcpServiceUserMappedCredential) + return &mcpServiceUserMappedCredential, err +} + func (a *aiGatewayImpl) CreateModelProviderService(ctx context.Context, request CreateModelProviderServiceRequest) (*ModelProviderService, error) { var modelProviderService ModelProviderService path := "/api/2.1/unity-catalog/model-provider-services" @@ -368,6 +383,20 @@ func (a *aiGatewayImpl) DeleteMcpService(ctx context.Context, request DeleteMcpS return err } +func (a *aiGatewayImpl) DeleteMcpServiceUserMappedCredential(ctx context.Context, request DeleteMcpServiceUserMappedCredentialRequest) (*DeleteMcpServiceUserMappedCredentialResponse, error) { + var deleteMcpServiceUserMappedCredentialResponse DeleteMcpServiceUserMappedCredentialResponse + path := fmt.Sprintf("/api/2.1/unity-catalog/%v/user-credentials", request.Name) + queryParams := make(map[string]any) + headers := make(map[string]string) + headers["Accept"] = "application/json" + cfg := a.client.Config + if cfg.WorkspaceID != "" { + headers["X-Databricks-Workspace-Id"] = cfg.WorkspaceID + } + err := a.client.Do(ctx, http.MethodDelete, path, headers, queryParams, request, &deleteMcpServiceUserMappedCredentialResponse) + return &deleteMcpServiceUserMappedCredentialResponse, err +} + func (a *aiGatewayImpl) DeleteModelProviderService(ctx context.Context, request DeleteModelProviderServiceRequest) error { path := fmt.Sprintf("/api/2.1/unity-catalog/%v", request.Name) queryParams := make(map[string]any) @@ -408,6 +437,20 @@ func (a *aiGatewayImpl) GetMcpService(ctx context.Context, request GetMcpService return &mcpService, err } +func (a *aiGatewayImpl) GetMcpServiceUserMappedCredential(ctx context.Context, request GetMcpServiceUserMappedCredentialRequest) (*McpServiceUserMappedCredential, error) { + var mcpServiceUserMappedCredential McpServiceUserMappedCredential + path := fmt.Sprintf("/api/2.1/unity-catalog/%v/user-credentials", request.Name) + queryParams := make(map[string]any) + headers := make(map[string]string) + headers["Accept"] = "application/json" + cfg := a.client.Config + if cfg.WorkspaceID != "" { + headers["X-Databricks-Workspace-Id"] = cfg.WorkspaceID + } + err := a.client.Do(ctx, http.MethodGet, path, headers, queryParams, request, &mcpServiceUserMappedCredential) + return &mcpServiceUserMappedCredential, err +} + func (a *aiGatewayImpl) GetModelProviderService(ctx context.Context, request GetModelProviderServiceRequest) (*ModelProviderService, error) { var modelProviderService ModelProviderService path := fmt.Sprintf("/api/2.1/unity-catalog/%v", request.Name) diff --git a/service/catalog/interface.go b/service/catalog/interface.go index 9d600ee03..e4abab27f 100644 --- a/service/catalog/interface.go +++ b/service/catalog/interface.go @@ -108,6 +108,15 @@ type AiGatewayService interface { // service references. CreateMcpService(ctx context.Context, request CreateMcpServiceRequest) (*McpService, error) + // Logs the caller in to an MCP service: creates their per-user OAuth + // credential, or re-authenticates it if one already exists. The request + // body carries the OAuth exchange fields. + // + // You must be the owner of the MCP service or have `EXECUTE` on it, plus + // `USE_CATALOG` on the parent catalog and `USE_SCHEMA` on the parent + // schema. + CreateMcpServiceUserMappedCredential(ctx context.Context, request CreateMcpServiceUserMappedCredentialRequest) (*McpServiceUserMappedCredential, error) + // Creates a model provider service in a Unity Catalog schema. A model // provider service stores authentication and request configuration for an // external model provider, such as OpenAI, Azure OpenAI, or Amazon Bedrock. @@ -143,6 +152,14 @@ type AiGatewayService interface { // schema. DeleteMcpService(ctx context.Context, request DeleteMcpServiceRequest) error + // Revokes (deletes) the caller's per-user OAuth credential for an MCP + // service (logout). + // + // You must be the owner of the MCP service or have `EXECUTE` on it, plus + // `USE_CATALOG` on the parent catalog and `USE_SCHEMA` on the parent + // schema. + DeleteMcpServiceUserMappedCredential(ctx context.Context, request DeleteMcpServiceUserMappedCredentialRequest) (*DeleteMcpServiceUserMappedCredentialResponse, error) + // Deletes the model provider service identified by its resource name. // Optionally supply an `etag` to make the delete conditional on the model // provider service not having changed since it was read. @@ -168,6 +185,18 @@ type AiGatewayService interface { // catalog and `USE_SCHEMA` on the parent schema. GetMcpService(ctx context.Context, request GetMcpServiceRequest) (*McpService, error) + // Returns the caller's per-user OAuth login state for an MCP service. Read + // `provisioning_info.state`: `ACTIVE` means the caller is logged in and the + // credential is usable; any other state (for example a failed or + // still-provisioning login) means the login has not completed and the + // caller should log in again. If the caller has no credential yet, the RPC + // returns `NOT_FOUND`. + // + // You must be the owner of the MCP service or have `EXECUTE` on it, plus + // `USE_CATALOG` on the parent catalog and `USE_SCHEMA` on the parent + // schema. + GetMcpServiceUserMappedCredential(ctx context.Context, request GetMcpServiceUserMappedCredentialRequest) (*McpServiceUserMappedCredential, error) + // Returns the model provider service identified by its resource name. // // You must be the owner of the model provider service or have `EXECUTE`, diff --git a/service/catalog/model.go b/service/catalog/model.go index 591cad347..049c5dcde 100644 --- a/service/catalog/model.go +++ b/service/catalog/model.go @@ -1143,6 +1143,8 @@ const ConnectionTypeSqlserver ConnectionType = `SQLSERVER` const ConnectionTypeTeradata ConnectionType = `TERADATA` +const ConnectionTypeTiktokAds ConnectionType = `TIKTOK_ADS` + const ConnectionTypeUnknownConnectionType ConnectionType = `UNKNOWN_CONNECTION_TYPE` const ConnectionTypeWorkdayRaas ConnectionType = `WORKDAY_RAAS` @@ -1157,11 +1159,11 @@ func (f *ConnectionType) String() string { // Set raw string value and validate it against allowed values func (f *ConnectionType) Set(v string) error { switch v { - case `AWS_SECRETS_MANAGER`, `AZURE_KEY_VAULT`, `BIGQUERY`, `CONFLUENCE`, `DATABRICKS`, `DYNAMICS365`, `GA4_RAW_DATA`, `GITHUB`, `GLUE`, `HIVE_METASTORE`, `HTTP`, `HUBSPOT`, `JDBC`, `META_MARKETING`, `MYSQL`, `NETSUITE`, `ORACLE`, `OUTLOOK`, `POSTGRESQL`, `POWER_BI`, `REDSHIFT`, `SALESFORCE`, `SALESFORCE_DATA_CLOUD`, `SERVICENOW`, `SMARTSHEET`, `SNOWFLAKE`, `SQLDW`, `SQLSERVER`, `TERADATA`, `UNKNOWN_CONNECTION_TYPE`, `WORKDAY_RAAS`, `ZENDESK`: + case `AWS_SECRETS_MANAGER`, `AZURE_KEY_VAULT`, `BIGQUERY`, `CONFLUENCE`, `DATABRICKS`, `DYNAMICS365`, `GA4_RAW_DATA`, `GITHUB`, `GLUE`, `HIVE_METASTORE`, `HTTP`, `HUBSPOT`, `JDBC`, `META_MARKETING`, `MYSQL`, `NETSUITE`, `ORACLE`, `OUTLOOK`, `POSTGRESQL`, `POWER_BI`, `REDSHIFT`, `SALESFORCE`, `SALESFORCE_DATA_CLOUD`, `SERVICENOW`, `SMARTSHEET`, `SNOWFLAKE`, `SQLDW`, `SQLSERVER`, `TERADATA`, `TIKTOK_ADS`, `UNKNOWN_CONNECTION_TYPE`, `WORKDAY_RAAS`, `ZENDESK`: *f = ConnectionType(v) return nil default: - return fmt.Errorf(`value "%s" is not one of "AWS_SECRETS_MANAGER", "AZURE_KEY_VAULT", "BIGQUERY", "CONFLUENCE", "DATABRICKS", "DYNAMICS365", "GA4_RAW_DATA", "GITHUB", "GLUE", "HIVE_METASTORE", "HTTP", "HUBSPOT", "JDBC", "META_MARKETING", "MYSQL", "NETSUITE", "ORACLE", "OUTLOOK", "POSTGRESQL", "POWER_BI", "REDSHIFT", "SALESFORCE", "SALESFORCE_DATA_CLOUD", "SERVICENOW", "SMARTSHEET", "SNOWFLAKE", "SQLDW", "SQLSERVER", "TERADATA", "UNKNOWN_CONNECTION_TYPE", "WORKDAY_RAAS", "ZENDESK"`, v) + return fmt.Errorf(`value "%s" is not one of "AWS_SECRETS_MANAGER", "AZURE_KEY_VAULT", "BIGQUERY", "CONFLUENCE", "DATABRICKS", "DYNAMICS365", "GA4_RAW_DATA", "GITHUB", "GLUE", "HIVE_METASTORE", "HTTP", "HUBSPOT", "JDBC", "META_MARKETING", "MYSQL", "NETSUITE", "ORACLE", "OUTLOOK", "POSTGRESQL", "POWER_BI", "REDSHIFT", "SALESFORCE", "SALESFORCE_DATA_CLOUD", "SERVICENOW", "SMARTSHEET", "SNOWFLAKE", "SQLDW", "SQLSERVER", "TERADATA", "TIKTOK_ADS", "UNKNOWN_CONNECTION_TYPE", "WORKDAY_RAAS", "ZENDESK"`, v) } } @@ -1199,6 +1201,7 @@ func (f *ConnectionType) Values() []ConnectionType { ConnectionTypeSqldw, ConnectionTypeSqlserver, ConnectionTypeTeradata, + ConnectionTypeTiktokAds, ConnectionTypeUnknownConnectionType, ConnectionTypeWorkdayRaas, ConnectionTypeZendesk, @@ -1730,6 +1733,17 @@ func (s *CreateMcpServiceRequest) UnmarshalJSON(b []byte) error { return marshal.Unmarshal(b, s) } +type CreateMcpServiceUserMappedCredentialRequest struct { + Login McpServiceUserMappedCredentialLogin `json:"login"` + // Resource name of the MCP service. Format: + // `mcp-services/{catalog}.{schema}.{mcp_service}`. + Name string `json:"-" url:"-"` +} + +func (s *CreateMcpServiceUserMappedCredentialRequest) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + type CreateMetastore struct { // Whether to allow non-DBR clients to directly access entities under the // metastore. @@ -2637,6 +2651,25 @@ func (s DeleteMcpServiceRequest) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +type DeleteMcpServiceUserMappedCredentialRequest struct { + // Resource name of the MCP service. Format: + // `mcp-services/{catalog}.{schema}.{mcp_service}`. + Name string `json:"-" url:"-"` +} + +func (s *DeleteMcpServiceUserMappedCredentialRequest) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +// Delete returns no resource; a dedicated (empty) response keeps the revoke +// RPC's shape owned here rather than google.protobuf.Empty. +type DeleteMcpServiceUserMappedCredentialResponse struct { +} + +func (s *DeleteMcpServiceUserMappedCredentialResponse) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + type DeleteMetastoreRequest struct { // Force deletion even if the metastore is not empty. Default is false. Force bool `json:"-" url:"force,omitempty"` @@ -4548,6 +4581,16 @@ func (s *GetMcpServiceRequest) UnmarshalJSON(b []byte) error { return marshal.Unmarshal(b, s) } +type GetMcpServiceUserMappedCredentialRequest struct { + // Resource name of the MCP service. Format: + // `mcp-services/{catalog}.{schema}.{mcp_service}`. + Name string `json:"-" url:"-"` +} + +func (s *GetMcpServiceUserMappedCredentialRequest) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + type GetMetastoreRequest struct { // Unique ID of the metastore. Id string `json:"-" url:"-"` @@ -6454,6 +6497,12 @@ type McpServiceConfigSourceConnection struct { // Resource name of the Unity Catalog connection used to access the MCP // server, in the form `connections/{catalog}.{schema}.{connection}`. Name string `json:"name"` + // Options needed to build the U2M authorize request, returned as a flat + // map. When set, it includes: `authorization_endpoint` (OAuth authorize + // URL), `token_endpoint` (token-exchange URL), `oauth_scope` + // (space-separated scopes to request), `client_id` (OAuth client id), and + // `oauth_provider` (the OAuth provider). + Options map[string]string `json:"options,omitempty"` ForceSendFields []string `json:"-" url:"-"` } @@ -6466,6 +6515,35 @@ func (s McpServiceConfigSourceConnection) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +// A caller's per-user OAuth credential for an MCP service. +type McpServiceUserMappedCredential struct { + // Token-expiry info for the credential, returned as a flat map: + // `access_token_expiration` (always set) and `refresh_token_expiration` + // (set when the credential has a refresh token). Both values are + // timestamps. + Options map[string]string `json:"options,omitempty"` + // Provisioning state of the credential. `ACTIVE` means the caller is logged + // in and the credential is usable; any other state means the login has not + // completed. + ProvisioningInfo *ProvisioningInfo `json:"provisioning_info,omitempty"` +} + +func (s *McpServiceUserMappedCredential) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +// Login input for an MCP service user credential. Carries the OAuth exchange +// fields as a flat map. +type McpServiceUserMappedCredentialLogin struct { + // OAuth exchange fields: `pkce_verifier`, `authorization_code`, and + // `oauth_redirect_uri`. + Options map[string]string `json:"options,omitempty"` +} + +func (s *McpServiceUserMappedCredentialLogin) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + type MetastoreAssignment struct { // The name of the default catalog in the metastore. This field is // deprecated. Please use "Default Namespace API" to configure the default @@ -6818,6 +6896,29 @@ func (s ModelProviderServiceConfigAzureOpenAiProviderDirectConfig) MarshalJSON() return marshal.Marshal(s) } +// Header-based API-key authentication for a custom provider: the secret is +// forwarded on outbound requests under a caller-chosen HTTP header, as +// `: `. +type ModelProviderServiceConfigCustomProviderApiKeyHeaderAuth struct { + // HTTP header name that carries the API key on outbound requests (e.g., + // `Ocp-Apim-Subscription-Key`). The value forwarded under this header is + // supplied via `api_key_value`. + ApiKeyName string `json:"api_key_name,omitempty"` + // Secret value forwarded under the `api_key_name` header on outbound + // requests. Supplied as inline plaintext via `ProviderSecret.plaintext`. + ApiKeyValue *ModelProviderServiceConfigProviderSecret `json:"api_key_value,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *ModelProviderServiceConfigCustomProviderApiKeyHeaderAuth) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s ModelProviderServiceConfigCustomProviderApiKeyHeaderAuth) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + // Custom OpenAI-compatible provider configuration with bearer-token // authentication. type ModelProviderServiceConfigCustomProviderConfig struct { @@ -6829,8 +6930,9 @@ func (s *ModelProviderServiceConfigCustomProviderConfig) UnmarshalJSON(b []byte) return marshal.Unmarshal(b, s) } -// Direct form of a custom provider configuration. Set `api_key` to the bearer -// token sent in the `Authorization` header. +// Direct form of a custom provider configuration. Set `api_key` to send the +// secret as an `Authorization` bearer token, or `header_auth` to forward it +// under a caller-chosen HTTP header. type ModelProviderServiceConfigCustomProviderDirectConfig struct { // Bearer token forwarded in the `Authorization` header. Supply the value in // `api_key.plaintext`. @@ -6838,6 +6940,10 @@ type ModelProviderServiceConfigCustomProviderDirectConfig struct { // Endpoint URL of the OpenAI-compatible service (e.g., // `https://api.example.com/v1`). Required on Create. BaseUrl string `json:"base_url,omitempty"` + // Header-based API-key auth: the secret is forwarded on outbound requests + // under a caller-chosen HTTP header rather than as an `Authorization` + // bearer token. Set this instead of `api_key` for header auth. + HeaderAuth *ModelProviderServiceConfigCustomProviderApiKeyHeaderAuth `json:"header_auth,omitempty"` ForceSendFields []string `json:"-" url:"-"` } @@ -9581,6 +9687,8 @@ func (s *SecurablePermissions) UnmarshalJSON(b []byte) error { // The type of Unity Catalog securable. type SecurableType string +const SecurableTypeAgentService SecurableType = `AGENT_SERVICE` + const SecurableTypeCatalog SecurableType = `CATALOG` const SecurableTypeCleanRoom SecurableType = `CLEAN_ROOM` @@ -9615,6 +9723,8 @@ const SecurableTypeSchema SecurableType = `SCHEMA` const SecurableTypeShare SecurableType = `SHARE` +const SecurableTypeSkill SecurableType = `SKILL` + const SecurableTypeStagingTable SecurableType = `STAGING_TABLE` const SecurableTypeStorageCredential SecurableType = `STORAGE_CREDENTIAL` @@ -9631,11 +9741,11 @@ func (f *SecurableType) String() string { // Set raw string value and validate it against allowed values func (f *SecurableType) Set(v string) error { switch v { - case `CATALOG`, `CLEAN_ROOM`, `CONNECTION`, `CREDENTIAL`, `EXTERNAL_LOCATION`, `EXTERNAL_METADATA`, `FUNCTION`, `MCP_SERVICE`, `METASTORE`, `MODEL`, `MODEL_PROVIDER_SERVICE`, `MODEL_SERVICE`, `PIPELINE`, `PROVIDER`, `RECIPIENT`, `SCHEMA`, `SHARE`, `STAGING_TABLE`, `STORAGE_CREDENTIAL`, `TABLE`, `VOLUME`: + case `AGENT_SERVICE`, `CATALOG`, `CLEAN_ROOM`, `CONNECTION`, `CREDENTIAL`, `EXTERNAL_LOCATION`, `EXTERNAL_METADATA`, `FUNCTION`, `MCP_SERVICE`, `METASTORE`, `MODEL`, `MODEL_PROVIDER_SERVICE`, `MODEL_SERVICE`, `PIPELINE`, `PROVIDER`, `RECIPIENT`, `SCHEMA`, `SHARE`, `SKILL`, `STAGING_TABLE`, `STORAGE_CREDENTIAL`, `TABLE`, `VOLUME`: *f = SecurableType(v) return nil default: - return fmt.Errorf(`value "%s" is not one of "CATALOG", "CLEAN_ROOM", "CONNECTION", "CREDENTIAL", "EXTERNAL_LOCATION", "EXTERNAL_METADATA", "FUNCTION", "MCP_SERVICE", "METASTORE", "MODEL", "MODEL_PROVIDER_SERVICE", "MODEL_SERVICE", "PIPELINE", "PROVIDER", "RECIPIENT", "SCHEMA", "SHARE", "STAGING_TABLE", "STORAGE_CREDENTIAL", "TABLE", "VOLUME"`, v) + return fmt.Errorf(`value "%s" is not one of "AGENT_SERVICE", "CATALOG", "CLEAN_ROOM", "CONNECTION", "CREDENTIAL", "EXTERNAL_LOCATION", "EXTERNAL_METADATA", "FUNCTION", "MCP_SERVICE", "METASTORE", "MODEL", "MODEL_PROVIDER_SERVICE", "MODEL_SERVICE", "PIPELINE", "PROVIDER", "RECIPIENT", "SCHEMA", "SHARE", "SKILL", "STAGING_TABLE", "STORAGE_CREDENTIAL", "TABLE", "VOLUME"`, v) } } @@ -9644,6 +9754,7 @@ func (f *SecurableType) Set(v string) error { // There is no guarantee on the order of the values in the slice. func (f *SecurableType) Values() []SecurableType { return []SecurableType{ + SecurableTypeAgentService, SecurableTypeCatalog, SecurableTypeCleanRoom, SecurableTypeConnection, @@ -9661,6 +9772,7 @@ func (f *SecurableType) Values() []SecurableType { SecurableTypeRecipient, SecurableTypeSchema, SecurableTypeShare, + SecurableTypeSkill, SecurableTypeStagingTable, SecurableTypeStorageCredential, SecurableTypeTable, diff --git a/service/dashboards/api.go b/service/dashboards/api.go index 5df061db5..ebe879c1c 100644 --- a/service/dashboards/api.go +++ b/service/dashboards/api.go @@ -515,35 +515,83 @@ type LakeviewInterface interface { // Create a draft dashboard. // - // Requires the Databricks SQL access entitlement. + // Requires the [Databricks SQL access] entitlement. Grant Databricks SQL access + // in addition to Workspace access. + // + // [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements Create(ctx context.Context, request CreateDashboardRequest) (*Dashboard, error) // Create dashboard schedule. + // + // Requires the [Databricks SQL access] entitlement. Grant Databricks SQL access + // in addition to Workspace access. + // + // [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements CreateSchedule(ctx context.Context, request CreateScheduleRequest) (*Schedule, error) // Create schedule subscription. + // + // The caller must be a workspace user with one of the following [entitlements]: + // Workspace access, Databricks SQL access, or Consumer access. + // + // Account-level users who are not members of the workspace cannot call this + // endpoint, even if the dashboard has been shared with them. + // + // [entitlements]: https://docs.databricks.com/security/auth/entitlements CreateSubscription(ctx context.Context, request CreateSubscriptionRequest) (*Subscription, error) // Delete dashboard schedule. + // + // Requires the [Databricks SQL access] entitlement. Grant Databricks SQL access + // in addition to Workspace access. + // + // [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements DeleteSchedule(ctx context.Context, request DeleteScheduleRequest) error // Delete dashboard schedule. + // + // Requires the [Databricks SQL access] entitlement. Grant Databricks SQL access + // in addition to Workspace access. + // + // [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements DeleteScheduleByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) error // Delete schedule subscription. + // + // The caller must be a workspace user with one of the following [entitlements]: + // Workspace access, Databricks SQL access, or Consumer access. + // + // Account-level users who are not members of the workspace cannot call this + // endpoint, even if the dashboard has been shared with them. + // + // [entitlements]: https://docs.databricks.com/security/auth/entitlements DeleteSubscription(ctx context.Context, request DeleteSubscriptionRequest) error // Delete schedule subscription. + // + // The caller must be a workspace user with one of the following [entitlements]: + // Workspace access, Databricks SQL access, or Consumer access. + // + // Account-level users who are not members of the workspace cannot call this + // endpoint, even if the dashboard has been shared with them. + // + // [entitlements]: https://docs.databricks.com/security/auth/entitlements DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId(ctx context.Context, dashboardId string, scheduleId string, subscriptionId string) error // Get a draft dashboard. // - // Requires the Databricks SQL access entitlement. + // Requires the [Databricks SQL access] entitlement. Grant Databricks SQL access + // in addition to Workspace access. + // + // [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements Get(ctx context.Context, request GetDashboardRequest) (*Dashboard, error) // Get a draft dashboard. // - // Requires the Databricks SQL access entitlement. + // Requires the [Databricks SQL access] entitlement. Grant Databricks SQL access + // in addition to Workspace access. + // + // [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements GetByDashboardId(ctx context.Context, dashboardId string) (*Dashboard, error) // Get the current published dashboard. @@ -565,55 +613,141 @@ type LakeviewInterface interface { GetPublishedByDashboardId(ctx context.Context, dashboardId string) (*PublishedDashboard, error) // Get dashboard schedule. + // + // The caller must be a workspace user with one of the following [entitlements]: + // Workspace access, Databricks SQL access, or Consumer access. + // + // Account-level users who are not members of the workspace cannot call this + // endpoint, even if the dashboard has been shared with them. + // + // [entitlements]: https://docs.databricks.com/security/auth/entitlements GetSchedule(ctx context.Context, request GetScheduleRequest) (*Schedule, error) // Get dashboard schedule. + // + // The caller must be a workspace user with one of the following [entitlements]: + // Workspace access, Databricks SQL access, or Consumer access. + // + // Account-level users who are not members of the workspace cannot call this + // endpoint, even if the dashboard has been shared with them. + // + // [entitlements]: https://docs.databricks.com/security/auth/entitlements GetScheduleByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) (*Schedule, error) // Get schedule subscription. + // + // The caller must be a workspace user with one of the following [entitlements]: + // Workspace access, Databricks SQL access, or Consumer access. + // + // Account-level users who are not members of the workspace cannot call this + // endpoint, even if the dashboard has been shared with them. + // + // [entitlements]: https://docs.databricks.com/security/auth/entitlements GetSubscription(ctx context.Context, request GetSubscriptionRequest) (*Subscription, error) // Get schedule subscription. + // + // The caller must be a workspace user with one of the following [entitlements]: + // Workspace access, Databricks SQL access, or Consumer access. + // + // Account-level users who are not members of the workspace cannot call this + // endpoint, even if the dashboard has been shared with them. + // + // [entitlements]: https://docs.databricks.com/security/auth/entitlements GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId(ctx context.Context, dashboardId string, scheduleId string, subscriptionId string) (*Subscription, error) // List dashboards. // - // Requires the Databricks SQL access entitlement. + // Requires the [Databricks SQL access] entitlement. Grant Databricks SQL access + // in addition to Workspace access. + // + // [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements // // This method is generated by Databricks SDK Code Generator. List(ctx context.Context, request ListDashboardsRequest) listing.Iterator[Dashboard] // List dashboards. // - // Requires the Databricks SQL access entitlement. + // Requires the [Databricks SQL access] entitlement. Grant Databricks SQL access + // in addition to Workspace access. + // + // [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements // // This method is generated by Databricks SDK Code Generator. ListAll(ctx context.Context, request ListDashboardsRequest) ([]Dashboard, error) // List dashboard schedules. // + // The caller must be a workspace user with one of the following [entitlements]: + // Workspace access, Databricks SQL access, or Consumer access. + // + // Account-level users who are not members of the workspace cannot call this + // endpoint, even if the dashboard has been shared with them. + // + // [entitlements]: https://docs.databricks.com/security/auth/entitlements + // // This method is generated by Databricks SDK Code Generator. ListSchedules(ctx context.Context, request ListSchedulesRequest) listing.Iterator[Schedule] // List dashboard schedules. // + // The caller must be a workspace user with one of the following [entitlements]: + // Workspace access, Databricks SQL access, or Consumer access. + // + // Account-level users who are not members of the workspace cannot call this + // endpoint, even if the dashboard has been shared with them. + // + // [entitlements]: https://docs.databricks.com/security/auth/entitlements + // // This method is generated by Databricks SDK Code Generator. ListSchedulesAll(ctx context.Context, request ListSchedulesRequest) ([]Schedule, error) // List dashboard schedules. + // + // The caller must be a workspace user with one of the following [entitlements]: + // Workspace access, Databricks SQL access, or Consumer access. + // + // Account-level users who are not members of the workspace cannot call this + // endpoint, even if the dashboard has been shared with them. + // + // [entitlements]: https://docs.databricks.com/security/auth/entitlements ListSchedulesByDashboardId(ctx context.Context, dashboardId string) (*ListSchedulesResponse, error) // List schedule subscriptions. // + // The caller must be a workspace user with one of the following [entitlements]: + // Workspace access, Databricks SQL access, or Consumer access. + // + // Account-level users who are not members of the workspace cannot call this + // endpoint, even if the dashboard has been shared with them. + // + // [entitlements]: https://docs.databricks.com/security/auth/entitlements + // // This method is generated by Databricks SDK Code Generator. ListSubscriptions(ctx context.Context, request ListSubscriptionsRequest) listing.Iterator[Subscription] // List schedule subscriptions. // + // The caller must be a workspace user with one of the following [entitlements]: + // Workspace access, Databricks SQL access, or Consumer access. + // + // Account-level users who are not members of the workspace cannot call this + // endpoint, even if the dashboard has been shared with them. + // + // [entitlements]: https://docs.databricks.com/security/auth/entitlements + // // This method is generated by Databricks SDK Code Generator. ListSubscriptionsAll(ctx context.Context, request ListSubscriptionsRequest) ([]Subscription, error) // List schedule subscriptions. + // + // The caller must be a workspace user with one of the following [entitlements]: + // Workspace access, Databricks SQL access, or Consumer access. + // + // Account-level users who are not members of the workspace cannot call this + // endpoint, even if the dashboard has been shared with them. + // + // [entitlements]: https://docs.databricks.com/security/auth/entitlements ListSubscriptionsByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) (*ListSubscriptionsResponse, error) // Deprecated: Legacy dashboard migration is no longer supported. Use Lakeview @@ -622,40 +756,66 @@ type LakeviewInterface interface { // Publish the current draft dashboard. // - // Requires the Databricks SQL access entitlement. + // Requires the [Databricks SQL access] entitlement. Grant Databricks SQL access + // in addition to Workspace access. + // + // [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements Publish(ctx context.Context, request PublishRequest) (*PublishedDashboard, error) // Revert a dashboard's definition in draft mode to the last published version. // - // Requires the Databricks SQL access entitlement. + // Requires the [Databricks SQL access] entitlement. Grant Databricks SQL access + // in addition to Workspace access. + // + // [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements Revert(ctx context.Context, request RevertDashboardRequest) (*RevertDashboardResponse, error) // Trash a dashboard. // - // Requires the Databricks SQL access entitlement. + // Requires the [Databricks SQL access] entitlement. Grant Databricks SQL access + // in addition to Workspace access. + // + // [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements Trash(ctx context.Context, request TrashDashboardRequest) error // Trash a dashboard. // - // Requires the Databricks SQL access entitlement. + // Requires the [Databricks SQL access] entitlement. Grant Databricks SQL access + // in addition to Workspace access. + // + // [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements TrashByDashboardId(ctx context.Context, dashboardId string) error // Unpublish the dashboard. // - // Requires the Databricks SQL access entitlement. + // Requires the [Databricks SQL access] entitlement. Grant Databricks SQL access + // in addition to Workspace access. + // + // [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements Unpublish(ctx context.Context, request UnpublishDashboardRequest) error // Unpublish the dashboard. // - // Requires the Databricks SQL access entitlement. + // Requires the [Databricks SQL access] entitlement. Grant Databricks SQL access + // in addition to Workspace access. + // + // [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements UnpublishByDashboardId(ctx context.Context, dashboardId string) error // Update a draft dashboard. // - // Requires the Databricks SQL access entitlement. + // Requires the [Databricks SQL access] entitlement. Grant Databricks SQL access + // in addition to Workspace access. + // + // [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements Update(ctx context.Context, request UpdateDashboardRequest) (*Dashboard, error) // Update dashboard schedule. + // + // Requires the [Databricks SQL access] entitlement. Grant Databricks SQL access + // in addition to Workspace access. + // + // [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements UpdateSchedule(ctx context.Context, request UpdateScheduleRequest) (*Schedule, error) } @@ -675,6 +835,11 @@ type LakeviewAPI struct { } // Delete dashboard schedule. +// +// Requires the [Databricks SQL access] entitlement. Grant Databricks SQL access +// in addition to Workspace access. +// +// [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements func (a *LakeviewAPI) DeleteScheduleByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) error { return a.lakeviewImpl.DeleteSchedule(ctx, DeleteScheduleRequest{ DashboardId: dashboardId, @@ -683,6 +848,14 @@ func (a *LakeviewAPI) DeleteScheduleByDashboardIdAndScheduleId(ctx context.Conte } // Delete schedule subscription. +// +// The caller must be a workspace user with one of the following [entitlements]: +// Workspace access, Databricks SQL access, or Consumer access. +// +// Account-level users who are not members of the workspace cannot call this +// endpoint, even if the dashboard has been shared with them. +// +// [entitlements]: https://docs.databricks.com/security/auth/entitlements func (a *LakeviewAPI) DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId(ctx context.Context, dashboardId string, scheduleId string, subscriptionId string) error { return a.lakeviewImpl.DeleteSubscription(ctx, DeleteSubscriptionRequest{ DashboardId: dashboardId, @@ -693,7 +866,10 @@ func (a *LakeviewAPI) DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptio // Get a draft dashboard. // -// Requires the Databricks SQL access entitlement. +// Requires the [Databricks SQL access] entitlement. Grant Databricks SQL access +// in addition to Workspace access. +// +// [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements func (a *LakeviewAPI) GetByDashboardId(ctx context.Context, dashboardId string) (*Dashboard, error) { return a.lakeviewImpl.Get(ctx, GetDashboardRequest{ DashboardId: dashboardId, @@ -714,6 +890,14 @@ func (a *LakeviewAPI) GetPublishedByDashboardId(ctx context.Context, dashboardId } // Get dashboard schedule. +// +// The caller must be a workspace user with one of the following [entitlements]: +// Workspace access, Databricks SQL access, or Consumer access. +// +// Account-level users who are not members of the workspace cannot call this +// endpoint, even if the dashboard has been shared with them. +// +// [entitlements]: https://docs.databricks.com/security/auth/entitlements func (a *LakeviewAPI) GetScheduleByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) (*Schedule, error) { return a.lakeviewImpl.GetSchedule(ctx, GetScheduleRequest{ DashboardId: dashboardId, @@ -722,6 +906,14 @@ func (a *LakeviewAPI) GetScheduleByDashboardIdAndScheduleId(ctx context.Context, } // Get schedule subscription. +// +// The caller must be a workspace user with one of the following [entitlements]: +// Workspace access, Databricks SQL access, or Consumer access. +// +// Account-level users who are not members of the workspace cannot call this +// endpoint, even if the dashboard has been shared with them. +// +// [entitlements]: https://docs.databricks.com/security/auth/entitlements func (a *LakeviewAPI) GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId(ctx context.Context, dashboardId string, scheduleId string, subscriptionId string) (*Subscription, error) { return a.lakeviewImpl.GetSubscription(ctx, GetSubscriptionRequest{ DashboardId: dashboardId, @@ -731,6 +923,14 @@ func (a *LakeviewAPI) GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId } // List dashboard schedules. +// +// The caller must be a workspace user with one of the following [entitlements]: +// Workspace access, Databricks SQL access, or Consumer access. +// +// Account-level users who are not members of the workspace cannot call this +// endpoint, even if the dashboard has been shared with them. +// +// [entitlements]: https://docs.databricks.com/security/auth/entitlements func (a *LakeviewAPI) ListSchedulesByDashboardId(ctx context.Context, dashboardId string) (*ListSchedulesResponse, error) { return a.lakeviewImpl.internalListSchedules(ctx, ListSchedulesRequest{ DashboardId: dashboardId, @@ -738,6 +938,14 @@ func (a *LakeviewAPI) ListSchedulesByDashboardId(ctx context.Context, dashboardI } // List schedule subscriptions. +// +// The caller must be a workspace user with one of the following [entitlements]: +// Workspace access, Databricks SQL access, or Consumer access. +// +// Account-level users who are not members of the workspace cannot call this +// endpoint, even if the dashboard has been shared with them. +// +// [entitlements]: https://docs.databricks.com/security/auth/entitlements func (a *LakeviewAPI) ListSubscriptionsByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) (*ListSubscriptionsResponse, error) { return a.lakeviewImpl.internalListSubscriptions(ctx, ListSubscriptionsRequest{ DashboardId: dashboardId, @@ -747,7 +955,10 @@ func (a *LakeviewAPI) ListSubscriptionsByDashboardIdAndScheduleId(ctx context.Co // Trash a dashboard. // -// Requires the Databricks SQL access entitlement. +// Requires the [Databricks SQL access] entitlement. Grant Databricks SQL access +// in addition to Workspace access. +// +// [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements func (a *LakeviewAPI) TrashByDashboardId(ctx context.Context, dashboardId string) error { return a.lakeviewImpl.Trash(ctx, TrashDashboardRequest{ DashboardId: dashboardId, @@ -756,7 +967,10 @@ func (a *LakeviewAPI) TrashByDashboardId(ctx context.Context, dashboardId string // Unpublish the dashboard. // -// Requires the Databricks SQL access entitlement. +// Requires the [Databricks SQL access] entitlement. Grant Databricks SQL access +// in addition to Workspace access. +// +// [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements func (a *LakeviewAPI) UnpublishByDashboardId(ctx context.Context, dashboardId string) error { return a.lakeviewImpl.Unpublish(ctx, UnpublishDashboardRequest{ DashboardId: dashboardId, diff --git a/service/dashboards/impl.go b/service/dashboards/impl.go index 75f27d493..5124e2b3e 100644 --- a/service/dashboards/impl.go +++ b/service/dashboards/impl.go @@ -587,7 +587,10 @@ func (a *lakeviewImpl) GetSubscription(ctx context.Context, request GetSubscript // List dashboards. // -// Requires the Databricks SQL access entitlement. +// Requires the [Databricks SQL access] entitlement. Grant Databricks SQL access +// in addition to Workspace access. +// +// [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements func (a *lakeviewImpl) List(ctx context.Context, request ListDashboardsRequest) listing.Iterator[Dashboard] { getNextPage := func(ctx context.Context, req ListDashboardsRequest) (*ListDashboardsResponse, error) { @@ -614,7 +617,10 @@ func (a *lakeviewImpl) List(ctx context.Context, request ListDashboardsRequest) // List dashboards. // -// Requires the Databricks SQL access entitlement. +// Requires the [Databricks SQL access] entitlement. Grant Databricks SQL access +// in addition to Workspace access. +// +// [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements func (a *lakeviewImpl) ListAll(ctx context.Context, request ListDashboardsRequest) ([]Dashboard, error) { iterator := a.List(ctx, request) return listing.ToSlice[Dashboard](ctx, iterator) @@ -635,6 +641,14 @@ func (a *lakeviewImpl) internalList(ctx context.Context, request ListDashboardsR } // List dashboard schedules. +// +// The caller must be a workspace user with one of the following [entitlements]: +// Workspace access, Databricks SQL access, or Consumer access. +// +// Account-level users who are not members of the workspace cannot call this +// endpoint, even if the dashboard has been shared with them. +// +// [entitlements]: https://docs.databricks.com/security/auth/entitlements func (a *lakeviewImpl) ListSchedules(ctx context.Context, request ListSchedulesRequest) listing.Iterator[Schedule] { getNextPage := func(ctx context.Context, req ListSchedulesRequest) (*ListSchedulesResponse, error) { @@ -660,6 +674,14 @@ func (a *lakeviewImpl) ListSchedules(ctx context.Context, request ListSchedulesR } // List dashboard schedules. +// +// The caller must be a workspace user with one of the following [entitlements]: +// Workspace access, Databricks SQL access, or Consumer access. +// +// Account-level users who are not members of the workspace cannot call this +// endpoint, even if the dashboard has been shared with them. +// +// [entitlements]: https://docs.databricks.com/security/auth/entitlements func (a *lakeviewImpl) ListSchedulesAll(ctx context.Context, request ListSchedulesRequest) ([]Schedule, error) { iterator := a.ListSchedules(ctx, request) return listing.ToSlice[Schedule](ctx, iterator) @@ -680,6 +702,14 @@ func (a *lakeviewImpl) internalListSchedules(ctx context.Context, request ListSc } // List schedule subscriptions. +// +// The caller must be a workspace user with one of the following [entitlements]: +// Workspace access, Databricks SQL access, or Consumer access. +// +// Account-level users who are not members of the workspace cannot call this +// endpoint, even if the dashboard has been shared with them. +// +// [entitlements]: https://docs.databricks.com/security/auth/entitlements func (a *lakeviewImpl) ListSubscriptions(ctx context.Context, request ListSubscriptionsRequest) listing.Iterator[Subscription] { getNextPage := func(ctx context.Context, req ListSubscriptionsRequest) (*ListSubscriptionsResponse, error) { @@ -705,6 +735,14 @@ func (a *lakeviewImpl) ListSubscriptions(ctx context.Context, request ListSubscr } // List schedule subscriptions. +// +// The caller must be a workspace user with one of the following [entitlements]: +// Workspace access, Databricks SQL access, or Consumer access. +// +// Account-level users who are not members of the workspace cannot call this +// endpoint, even if the dashboard has been shared with them. +// +// [entitlements]: https://docs.databricks.com/security/auth/entitlements func (a *lakeviewImpl) ListSubscriptionsAll(ctx context.Context, request ListSubscriptionsRequest) ([]Subscription, error) { iterator := a.ListSubscriptions(ctx, request) return listing.ToSlice[Subscription](ctx, iterator) diff --git a/service/dashboards/interface.go b/service/dashboards/interface.go index cad6c5868..75028a298 100644 --- a/service/dashboards/interface.go +++ b/service/dashboards/interface.go @@ -177,24 +177,58 @@ type LakeviewService interface { // Create a draft dashboard. // - // Requires the Databricks SQL access entitlement. + // Requires the [Databricks SQL access] entitlement. Grant Databricks SQL + // access in addition to Workspace access. + // + // [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements Create(ctx context.Context, request CreateDashboardRequest) (*Dashboard, error) // Create dashboard schedule. + // + // Requires the [Databricks SQL access] entitlement. Grant Databricks SQL + // access in addition to Workspace access. + // + // [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements CreateSchedule(ctx context.Context, request CreateScheduleRequest) (*Schedule, error) // Create schedule subscription. + // + // The caller must be a workspace user with one of the following + // [entitlements]: Workspace access, Databricks SQL access, or Consumer + // access. + // + // Account-level users who are not members of the workspace cannot call this + // endpoint, even if the dashboard has been shared with them. + // + // [entitlements]: https://docs.databricks.com/security/auth/entitlements CreateSubscription(ctx context.Context, request CreateSubscriptionRequest) (*Subscription, error) // Delete dashboard schedule. + // + // Requires the [Databricks SQL access] entitlement. Grant Databricks SQL + // access in addition to Workspace access. + // + // [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements DeleteSchedule(ctx context.Context, request DeleteScheduleRequest) error // Delete schedule subscription. + // + // The caller must be a workspace user with one of the following + // [entitlements]: Workspace access, Databricks SQL access, or Consumer + // access. + // + // Account-level users who are not members of the workspace cannot call this + // endpoint, even if the dashboard has been shared with them. + // + // [entitlements]: https://docs.databricks.com/security/auth/entitlements DeleteSubscription(ctx context.Context, request DeleteSubscriptionRequest) error // Get a draft dashboard. // - // Requires the Databricks SQL access entitlement. + // Requires the [Databricks SQL access] entitlement. Grant Databricks SQL + // access in addition to Workspace access. + // + // [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements Get(ctx context.Context, request GetDashboardRequest) (*Dashboard, error) // Get the current published dashboard. @@ -208,20 +242,59 @@ type LakeviewService interface { GetPublished(ctx context.Context, request GetPublishedDashboardRequest) (*PublishedDashboard, error) // Get dashboard schedule. + // + // The caller must be a workspace user with one of the following + // [entitlements]: Workspace access, Databricks SQL access, or Consumer + // access. + // + // Account-level users who are not members of the workspace cannot call this + // endpoint, even if the dashboard has been shared with them. + // + // [entitlements]: https://docs.databricks.com/security/auth/entitlements GetSchedule(ctx context.Context, request GetScheduleRequest) (*Schedule, error) // Get schedule subscription. + // + // The caller must be a workspace user with one of the following + // [entitlements]: Workspace access, Databricks SQL access, or Consumer + // access. + // + // Account-level users who are not members of the workspace cannot call this + // endpoint, even if the dashboard has been shared with them. + // + // [entitlements]: https://docs.databricks.com/security/auth/entitlements GetSubscription(ctx context.Context, request GetSubscriptionRequest) (*Subscription, error) // List dashboards. // - // Requires the Databricks SQL access entitlement. + // Requires the [Databricks SQL access] entitlement. Grant Databricks SQL + // access in addition to Workspace access. + // + // [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements List(ctx context.Context, request ListDashboardsRequest) (*ListDashboardsResponse, error) // List dashboard schedules. + // + // The caller must be a workspace user with one of the following + // [entitlements]: Workspace access, Databricks SQL access, or Consumer + // access. + // + // Account-level users who are not members of the workspace cannot call this + // endpoint, even if the dashboard has been shared with them. + // + // [entitlements]: https://docs.databricks.com/security/auth/entitlements ListSchedules(ctx context.Context, request ListSchedulesRequest) (*ListSchedulesResponse, error) // List schedule subscriptions. + // + // The caller must be a workspace user with one of the following + // [entitlements]: Workspace access, Databricks SQL access, or Consumer + // access. + // + // Account-level users who are not members of the workspace cannot call this + // endpoint, even if the dashboard has been shared with them. + // + // [entitlements]: https://docs.databricks.com/security/auth/entitlements ListSubscriptions(ctx context.Context, request ListSubscriptionsRequest) (*ListSubscriptionsResponse, error) // Deprecated: Legacy dashboard migration is no longer supported. Use @@ -230,31 +303,51 @@ type LakeviewService interface { // Publish the current draft dashboard. // - // Requires the Databricks SQL access entitlement. + // Requires the [Databricks SQL access] entitlement. Grant Databricks SQL + // access in addition to Workspace access. + // + // [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements Publish(ctx context.Context, request PublishRequest) (*PublishedDashboard, error) // Revert a dashboard's definition in draft mode to the last published // version. // - // Requires the Databricks SQL access entitlement. + // Requires the [Databricks SQL access] entitlement. Grant Databricks SQL + // access in addition to Workspace access. + // + // [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements Revert(ctx context.Context, request RevertDashboardRequest) (*RevertDashboardResponse, error) // Trash a dashboard. // - // Requires the Databricks SQL access entitlement. + // Requires the [Databricks SQL access] entitlement. Grant Databricks SQL + // access in addition to Workspace access. + // + // [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements Trash(ctx context.Context, request TrashDashboardRequest) error // Unpublish the dashboard. // - // Requires the Databricks SQL access entitlement. + // Requires the [Databricks SQL access] entitlement. Grant Databricks SQL + // access in addition to Workspace access. + // + // [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements Unpublish(ctx context.Context, request UnpublishDashboardRequest) error // Update a draft dashboard. // - // Requires the Databricks SQL access entitlement. + // Requires the [Databricks SQL access] entitlement. Grant Databricks SQL + // access in addition to Workspace access. + // + // [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements Update(ctx context.Context, request UpdateDashboardRequest) (*Dashboard, error) // Update dashboard schedule. + // + // Requires the [Databricks SQL access] entitlement. Grant Databricks SQL + // access in addition to Workspace access. + // + // [Databricks SQL access]: https://docs.databricks.com/security/auth/entitlements UpdateSchedule(ctx context.Context, request UpdateScheduleRequest) (*Schedule, error) } diff --git a/service/iamv2/api.go b/service/iamv2/api.go index 5dee3c450..333f80e48 100644 --- a/service/iamv2/api.go +++ b/service/iamv2/api.go @@ -274,7 +274,7 @@ func NewAccountIamV2(client *client.DatabricksClient) *AccountIamV2API { } // These APIs are used to manage identities and the workspace access of these -// identities in . +// identities in Databricks. type AccountIamV2API struct { accountIamV2Impl } @@ -566,7 +566,7 @@ func NewWorkspaceIamV2(client *client.DatabricksClient) *WorkspaceIamV2API { } // These APIs are used to manage identities and the workspace access of these -// identities in . +// identities in Databricks. type WorkspaceIamV2API struct { workspaceIamV2Impl } diff --git a/service/iamv2/interface.go b/service/iamv2/interface.go index 21651051f..ec512c2ba 100644 --- a/service/iamv2/interface.go +++ b/service/iamv2/interface.go @@ -7,7 +7,7 @@ import ( ) // These APIs are used to manage identities and the workspace access of these -// identities in . +// identities in Databricks. // // Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type AccountIamV2Service interface { @@ -220,7 +220,7 @@ type AccountIamV2Service interface { } // These APIs are used to manage identities and the workspace access of these -// identities in . +// identities in Databricks. // // Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type WorkspaceIamV2Service interface { diff --git a/service/iamv2/model.go b/service/iamv2/model.go index 26a474512..a3db98ac9 100644 --- a/service/iamv2/model.go +++ b/service/iamv2/model.go @@ -32,7 +32,7 @@ func (s *CreateDirectGroupMemberRequest) UnmarshalJSON(b []byte) error { } type CreateGroupProxyRequest struct { - // Required. Group to be created in + // Required. Group to be created in Databricks Group Group `json:"group"` } @@ -41,7 +41,7 @@ func (s *CreateGroupProxyRequest) UnmarshalJSON(b []byte) error { } type CreateGroupRequest struct { - // Required. Group to be created in + // Required. Group to be created in Databricks Group Group `json:"group"` } @@ -50,7 +50,7 @@ func (s *CreateGroupRequest) UnmarshalJSON(b []byte) error { } type CreateServicePrincipalProxyRequest struct { - // Required. Service principal to be created in + // Required. Service principal to be created in Databricks ServicePrincipal ServicePrincipal `json:"service_principal"` } @@ -59,7 +59,7 @@ func (s *CreateServicePrincipalProxyRequest) UnmarshalJSON(b []byte) error { } type CreateServicePrincipalRequest struct { - // Required. Service principal to be created in + // Required. Service principal to be created in Databricks ServicePrincipal ServicePrincipal `json:"service_principal"` } @@ -68,7 +68,7 @@ func (s *CreateServicePrincipalRequest) UnmarshalJSON(b []byte) error { } type CreateUserProxyRequest struct { - // Required. User to be created in + // Required. User to be created in Databricks User User `json:"user"` } @@ -77,7 +77,7 @@ func (s *CreateUserProxyRequest) UnmarshalJSON(b []byte) error { } type CreateUserRequest struct { - // Required. User to be created in + // Required. User to be created in Databricks User User `json:"user"` } @@ -86,7 +86,7 @@ func (s *CreateUserRequest) UnmarshalJSON(b []byte) error { } type CreateWorkspaceAssignmentDetailProxyRequest struct { - // Required. Workspace assignment detail to be created in . + // Required. Workspace assignment detail to be created in Databricks. WorkspaceAssignmentDetail WorkspaceAssignmentDetail `json:"workspace_assignment_detail"` } @@ -95,7 +95,7 @@ func (s *CreateWorkspaceAssignmentDetailProxyRequest) UnmarshalJSON(b []byte) er } type CreateWorkspaceAssignmentDetailRequest struct { - // Required. Workspace assignment detail to be created in . + // Required. Workspace assignment detail to be created in Databricks. WorkspaceAssignmentDetail WorkspaceAssignmentDetail `json:"workspace_assignment_detail"` // Required. The workspace ID for which the workspace assignment detail is // being created. @@ -107,7 +107,7 @@ func (s *CreateWorkspaceAssignmentDetailRequest) UnmarshalJSON(b []byte) error { } type CreateWorkspaceAssignmentProxyRequest struct { - // Required. Workspace assignment to be created in . + // Required. Workspace assignment to be created in Databricks. WorkspaceAssignment WorkspaceAssignment `json:"workspace_assignment"` } @@ -116,7 +116,7 @@ func (s *CreateWorkspaceAssignmentProxyRequest) UnmarshalJSON(b []byte) error { } type CreateWorkspaceAssignmentRequest struct { - // Required. Workspace assignment to be created in . + // Required. Workspace assignment to be created in Databricks. WorkspaceAssignment WorkspaceAssignment `json:"workspace_assignment"` // Required. The workspace ID for which the workspace assignment is being // created. @@ -1401,7 +1401,7 @@ func (s TransitiveParentGroup) MarshalJSON() ([]byte, error) { } type UpdateGroupProxyRequest struct { - // Required. Group to be updated in + // Required. Group to be updated in Databricks Group Group `json:"group"` // Required. Internal ID of the group in Databricks. GroupId string `json:"-" url:"-"` @@ -1414,7 +1414,7 @@ func (s *UpdateGroupProxyRequest) UnmarshalJSON(b []byte) error { } type UpdateGroupRequest struct { - // Required. Group to be updated in + // Required. Group to be updated in Databricks Group Group `json:"group"` // Required. Internal ID of the group in Databricks. GroupId string `json:"-" url:"-"` @@ -1427,7 +1427,7 @@ func (s *UpdateGroupRequest) UnmarshalJSON(b []byte) error { } type UpdateServicePrincipalProxyRequest struct { - // Required. Service principal to be updated in + // Required. Service principal to be updated in Databricks ServicePrincipal ServicePrincipal `json:"service_principal"` // Required. Internal ID of the service principal in Databricks. ServicePrincipalId string `json:"-" url:"-"` @@ -1440,7 +1440,7 @@ func (s *UpdateServicePrincipalProxyRequest) UnmarshalJSON(b []byte) error { } type UpdateServicePrincipalRequest struct { - // Required. Service Principal to be updated in + // Required. Service Principal to be updated in Databricks ServicePrincipal ServicePrincipal `json:"service_principal"` // Required. Internal ID of the service principal in Databricks. ServicePrincipalId string `json:"-" url:"-"` @@ -1455,7 +1455,7 @@ func (s *UpdateServicePrincipalRequest) UnmarshalJSON(b []byte) error { type UpdateUserProxyRequest struct { // Optional. The list of fields to update. UpdateMask string `json:"-" url:"update_mask"` - // Required. User to be updated in + // Required. User to be updated in Databricks User User `json:"user"` // Required. Internal ID of the user in Databricks. UserId string `json:"-" url:"-"` @@ -1468,7 +1468,7 @@ func (s *UpdateUserProxyRequest) UnmarshalJSON(b []byte) error { type UpdateUserRequest struct { // Optional. The list of fields to update. UpdateMask string `json:"-" url:"update_mask"` - // Required. User to be updated in + // Required. User to be updated in Databricks User User `json:"user"` // Required. Internal ID of the user in Databricks. UserId string `json:"-" url:"-"` @@ -1483,7 +1483,7 @@ type UpdateWorkspaceAssignmentDetailProxyRequest struct { PrincipalId int64 `json:"-" url:"-"` // Required. The list of fields to update. UpdateMask fieldmask.FieldMask `json:"-" url:"update_mask"` - // Required. Workspace assignment detail to be updated in . + // Required. Workspace assignment detail to be updated in Databricks. WorkspaceAssignmentDetail WorkspaceAssignmentDetail `json:"workspace_assignment_detail"` } @@ -1496,7 +1496,7 @@ type UpdateWorkspaceAssignmentDetailRequest struct { PrincipalId int64 `json:"-" url:"-"` // Required. The list of fields to update. UpdateMask fieldmask.FieldMask `json:"-" url:"update_mask"` - // Required. Workspace assignment detail to be updated in . + // Required. Workspace assignment detail to be updated in Databricks. WorkspaceAssignmentDetail WorkspaceAssignmentDetail `json:"workspace_assignment_detail"` // Required. The workspace ID for which the workspace assignment detail is // being updated. @@ -1512,7 +1512,7 @@ type UpdateWorkspaceAssignmentProxyRequest struct { PrincipalId int64 `json:"-" url:"-"` // Required. The list of fields to update. UpdateMask fieldmask.FieldMask `json:"-" url:"update_mask"` - // Required. Workspace assignment to be updated in . + // Required. Workspace assignment to be updated in Databricks. WorkspaceAssignment WorkspaceAssignment `json:"workspace_assignment"` } @@ -1525,7 +1525,7 @@ type UpdateWorkspaceAssignmentRequest struct { PrincipalId int64 `json:"-" url:"-"` // Required. The list of fields to update. UpdateMask fieldmask.FieldMask `json:"-" url:"update_mask"` - // Required. Workspace assignment to be updated in . + // Required. Workspace assignment to be updated in Databricks. WorkspaceAssignment WorkspaceAssignment `json:"workspace_assignment"` // Required. The workspace ID for which the workspace assignment is being // updated. @@ -1541,7 +1541,7 @@ type UpdateWorkspaceIdentityDetailRequest struct { PrincipalId int64 `json:"-" url:"-"` // Required. The list of fields to update. UpdateMask fieldmask.FieldMask `json:"-" url:"update_mask"` - // Required. Workspace identity detail to be updated in . + // Required. Workspace identity detail to be updated in Databricks. WorkspaceIdentityDetail WorkspaceIdentityDetail `json:"workspace_identity_detail"` } diff --git a/service/jobs/model.go b/service/jobs/model.go index 848327ae8..df61f3aa3 100644 --- a/service/jobs/model.go +++ b/service/jobs/model.go @@ -369,9 +369,11 @@ type BaseRun struct { // request depending on whether the performance mode is supported by the job // type. // - // * `STANDARD`: Enables cost-efficient execution of serverless workloads. * - // `PERFORMANCE_OPTIMIZED`: Prioritizes fast startup and execution times - // through rapid scaling and optimized cluster performance. + // * `PERFORMANCE_OPTIMIZED`: Prioritizes fast startup and execution times + // through rapid scaling and optimized cluster performance. * `STANDARD`: + // Enables cost-efficient execution of serverless workloads. * + // `COST_OPTIMIZED`: Enables lower job costs by optimizing compute for your + // selected target duration time. Must provide a duration target. EffectivePerformanceTarget PerformanceTarget `json:"effective_performance_target,omitempty"` // The id of the usage policy used by this run for cost attribution // purposes. @@ -1125,9 +1127,11 @@ type CreateJob struct { // of compute performance or cost-efficiency for the run. The performance // target does not apply to tasks that run on Serverless GPU compute. // - // * `STANDARD`: Enables cost-efficient execution of serverless workloads. * - // `PERFORMANCE_OPTIMIZED`: Prioritizes fast startup and execution times - // through rapid scaling and optimized cluster performance. + // * `PERFORMANCE_OPTIMIZED`: Prioritizes fast startup and execution times + // through rapid scaling and optimized cluster performance. * `STANDARD`: + // Enables cost-efficient execution of serverless workloads. * + // `COST_OPTIMIZED`: Enables lower job costs by optimizing compute for your + // selected target duration time. Must provide a duration target. PerformanceTarget PerformanceTarget `json:"performance_target,omitempty"` // The queue settings of the job. Queue *QueueSettings `json:"queue,omitempty"` @@ -2787,9 +2791,11 @@ type JobSettings struct { // of compute performance or cost-efficiency for the run. The performance // target does not apply to tasks that run on Serverless GPU compute. // - // * `STANDARD`: Enables cost-efficient execution of serverless workloads. * - // `PERFORMANCE_OPTIMIZED`: Prioritizes fast startup and execution times - // through rapid scaling and optimized cluster performance. + // * `PERFORMANCE_OPTIMIZED`: Prioritizes fast startup and execution times + // through rapid scaling and optimized cluster performance. * `STANDARD`: + // Enables cost-efficient execution of serverless workloads. * + // `COST_OPTIMIZED`: Enables lower job costs by optimizing compute for your + // selected target duration time. Must provide a duration target. PerformanceTarget PerformanceTarget `json:"performance_target,omitempty"` // The queue settings of the job. Queue *QueueSettings `json:"queue,omitempty"` @@ -3849,9 +3855,11 @@ type RepairHistoryItem struct { // request depending on whether the performance mode is supported by the job // type. // - // * `STANDARD`: Enables cost-efficient execution of serverless workloads. * - // `PERFORMANCE_OPTIMIZED`: Prioritizes fast startup and execution times - // through rapid scaling and optimized cluster performance. + // * `PERFORMANCE_OPTIMIZED`: Prioritizes fast startup and execution times + // through rapid scaling and optimized cluster performance. * `STANDARD`: + // Enables cost-efficient execution of serverless workloads. * + // `COST_OPTIMIZED`: Enables lower job costs by optimizing compute for your + // selected target duration time. Must provide a duration target. EffectivePerformanceTarget PerformanceTarget `json:"effective_performance_target,omitempty"` // The end time of the (repaired) run. EndTime int64 `json:"end_time,omitempty"` @@ -3976,9 +3984,11 @@ type RepairRun struct { // run. This field overrides the performance target defined on the job // level. // - // * `STANDARD`: Enables cost-efficient execution of serverless workloads. * - // `PERFORMANCE_OPTIMIZED`: Prioritizes fast startup and execution times - // through rapid scaling and optimized cluster performance. + // * `PERFORMANCE_OPTIMIZED`: Prioritizes fast startup and execution times + // through rapid scaling and optimized cluster performance. * `STANDARD`: + // Enables cost-efficient execution of serverless workloads. * + // `COST_OPTIMIZED`: Enables lower job costs by optimizing compute for your + // selected target duration time. Must provide a duration target. PerformanceTarget PerformanceTarget `json:"performance_target,omitempty"` // Controls whether the pipeline should perform a full refresh PipelineParams *PipelineParams `json:"pipeline_params,omitempty"` @@ -4242,9 +4252,11 @@ type Run struct { // request depending on whether the performance mode is supported by the job // type. // - // * `STANDARD`: Enables cost-efficient execution of serverless workloads. * - // `PERFORMANCE_OPTIMIZED`: Prioritizes fast startup and execution times - // through rapid scaling and optimized cluster performance. + // * `PERFORMANCE_OPTIMIZED`: Prioritizes fast startup and execution times + // through rapid scaling and optimized cluster performance. * `STANDARD`: + // Enables cost-efficient execution of serverless workloads. * + // `COST_OPTIMIZED`: Enables lower job costs by optimizing compute for your + // selected target duration time. Must provide a duration target. EffectivePerformanceTarget PerformanceTarget `json:"effective_performance_target,omitempty"` // The id of the usage policy used by this run for cost attribution // purposes. @@ -4823,9 +4835,11 @@ type RunNow struct { // run. This field overrides the performance target defined on the job // level. // - // * `STANDARD`: Enables cost-efficient execution of serverless workloads. * - // `PERFORMANCE_OPTIMIZED`: Prioritizes fast startup and execution times - // through rapid scaling and optimized cluster performance. + // * `PERFORMANCE_OPTIMIZED`: Prioritizes fast startup and execution times + // through rapid scaling and optimized cluster performance. * `STANDARD`: + // Enables cost-efficient execution of serverless workloads. * + // `COST_OPTIMIZED`: Enables lower job costs by optimizing compute for your + // selected target duration time. Must provide a duration target. PerformanceTarget PerformanceTarget `json:"performance_target,omitempty"` // Controls whether the pipeline should perform a full refresh PipelineParams *PipelineParams `json:"pipeline_params,omitempty"` @@ -5271,9 +5285,11 @@ type RunTask struct { // request depending on whether the performance mode is supported by the job // type. // - // * `STANDARD`: Enables cost-efficient execution of serverless workloads. * - // `PERFORMANCE_OPTIMIZED`: Prioritizes fast startup and execution times - // through rapid scaling and optimized cluster performance. + // * `PERFORMANCE_OPTIMIZED`: Prioritizes fast startup and execution times + // through rapid scaling and optimized cluster performance. * `STANDARD`: + // Enables cost-efficient execution of serverless workloads. * + // `COST_OPTIMIZED`: Enables lower job costs by optimizing compute for your + // selected target duration time. Must provide a duration target. EffectivePerformanceTarget PerformanceTarget `json:"effective_performance_target,omitempty"` // The id of the serverless compute this task ran on, either explicitly // configured on the task or the workspace default. Only set once the @@ -6160,9 +6176,11 @@ type SubmitRun struct { // performance target does not apply to tasks that run on Serverless GPU // compute. // - // * `STANDARD`: Enables cost-efficient execution of serverless workloads. * - // `PERFORMANCE_OPTIMIZED`: Prioritizes fast startup and execution times - // through rapid scaling and optimized cluster performance. + // * `PERFORMANCE_OPTIMIZED`: Prioritizes fast startup and execution times + // through rapid scaling and optimized cluster performance. * `STANDARD`: + // Enables cost-efficient execution of serverless workloads. * + // `COST_OPTIMIZED`: Enables lower job costs by optimizing compute for your + // selected target duration time. Must provide a duration target. PerformanceTarget PerformanceTarget `json:"performance_target,omitempty"` // The queue settings of the one-time run. Queue *QueueSettings `json:"queue,omitempty"` diff --git a/service/ml/model.go b/service/ml/model.go index 572b80492..f8c33cdd6 100644 --- a/service/ml/model.go +++ b/service/ml/model.go @@ -1122,13 +1122,17 @@ func (s *CreateWebhookResponse) UnmarshalJSON(b []byte) error { // A cron-based schedule trigger for the materialization pipeline. type CronSchedule struct { // The cron expression defining the schedule (e.g., "0 0 * * *" for daily at - // midnight). The schedule is interpreted in the UTC time zone. Required - // when mode is MANUAL (or unset). Left empty when mode is DERIVED, where - // the service computes it (aligned to UTC) from the features' window timing - // and fills it in on the response. + // midnight). The schedule is interpreted in timezone_id (defaults to UTC). + // Required when mode is MANUAL (or unset). Left empty when mode is DERIVED, + // where the service computes it (aligned to UTC) from the features' window + // timing and fills it in on the response. CronExpression string `json:"cron_expression,omitempty"` // How the schedule is determined. Defaults to MANUAL when unset. Mode CronScheduleMode `json:"mode,omitempty"` + // A Java timezone ID. The schedule is resolved with respect to this + // timezone. Defaults to UTC when omitted. Can only be configured for MANUAL + // schedules; DERIVED schedules are always aligned to UTC. + TimezoneId string `json:"timezone_id,omitempty"` ForceSendFields []string `json:"-" url:"-"` } diff --git a/service/pipelines/model.go b/service/pipelines/model.go index 58472c93e..74887e324 100644 --- a/service/pipelines/model.go +++ b/service/pipelines/model.go @@ -66,6 +66,29 @@ func (s AutoFullRefreshPolicy) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +type AvroTransformerOptions struct { + // (Optional) Parse mode for Avro data. Valid values: FAILFAST, PERMISSIVE. + // Defaults to FAILFAST. + ParseMode ParseMode `json:"parse_mode,omitempty"` + // Inline Avro JSON schema string. + Schema string `json:"schema,omitempty"` + // Path to a schema file (.avsc). + SchemaFilePath string `json:"schema_file_path,omitempty"` + // (Optional) Schema registry to resolve the Avro schema at runtime instead + // of providing it inline or via a file path. + SchemaRegistry *SchemaRegistryConfig `json:"schema_registry,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *AvroTransformerOptions) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s AvroTransformerOptions) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + // Enum to specify which mode of clone to execute type CloneMode string @@ -225,6 +248,21 @@ func (s *ConfluenceConnectorOptions) UnmarshalJSON(b []byte) error { return marshal.Unmarshal(b, s) } +type ConfluentSchemaRegistryOptions struct { + // Required: subject name to resolve in the registry. + Subject string `json:"subject,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *ConfluentSchemaRegistryOptions) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s ConfluentSchemaRegistryOptions) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + type ConnectionParameters struct { // Source catalog for initial connection. This is necessary for schema // exploration in some database systems like Oracle, and optional but @@ -1532,10 +1570,14 @@ const IngestionSourceTypeServicenow IngestionSourceType = `SERVICENOW` const IngestionSourceTypeSharepoint IngestionSourceType = `SHAREPOINT` +const IngestionSourceTypeSmartsheet IngestionSourceType = `SMARTSHEET` + const IngestionSourceTypeSqlserver IngestionSourceType = `SQLSERVER` const IngestionSourceTypeTeradata IngestionSourceType = `TERADATA` +const IngestionSourceTypeTiktokAds IngestionSourceType = `TIKTOK_ADS` + const IngestionSourceTypeWorkdayRaas IngestionSourceType = `WORKDAY_RAAS` const IngestionSourceTypeZendesk IngestionSourceType = `ZENDESK` @@ -1548,11 +1590,11 @@ func (f *IngestionSourceType) String() string { // Set raw string value and validate it against allowed values func (f *IngestionSourceType) Set(v string) error { switch v { - case `BIGQUERY`, `CONFLUENCE`, `DYNAMICS365`, `FOREIGN_CATALOG`, `GA4_RAW_DATA`, `GOOGLE_DRIVE`, `JIRA`, `MANAGED_POSTGRESQL`, `META_MARKETING`, `MYSQL`, `NETSUITE`, `ORACLE`, `POSTGRESQL`, `RABBITMQ`, `SALESFORCE`, `SERVICENOW`, `SHAREPOINT`, `SQLSERVER`, `TERADATA`, `WORKDAY_RAAS`, `ZENDESK`: + case `BIGQUERY`, `CONFLUENCE`, `DYNAMICS365`, `FOREIGN_CATALOG`, `GA4_RAW_DATA`, `GOOGLE_DRIVE`, `JIRA`, `MANAGED_POSTGRESQL`, `META_MARKETING`, `MYSQL`, `NETSUITE`, `ORACLE`, `POSTGRESQL`, `RABBITMQ`, `SALESFORCE`, `SERVICENOW`, `SHAREPOINT`, `SMARTSHEET`, `SQLSERVER`, `TERADATA`, `TIKTOK_ADS`, `WORKDAY_RAAS`, `ZENDESK`: *f = IngestionSourceType(v) return nil default: - return fmt.Errorf(`value "%s" is not one of "BIGQUERY", "CONFLUENCE", "DYNAMICS365", "FOREIGN_CATALOG", "GA4_RAW_DATA", "GOOGLE_DRIVE", "JIRA", "MANAGED_POSTGRESQL", "META_MARKETING", "MYSQL", "NETSUITE", "ORACLE", "POSTGRESQL", "RABBITMQ", "SALESFORCE", "SERVICENOW", "SHAREPOINT", "SQLSERVER", "TERADATA", "WORKDAY_RAAS", "ZENDESK"`, v) + return fmt.Errorf(`value "%s" is not one of "BIGQUERY", "CONFLUENCE", "DYNAMICS365", "FOREIGN_CATALOG", "GA4_RAW_DATA", "GOOGLE_DRIVE", "JIRA", "MANAGED_POSTGRESQL", "META_MARKETING", "MYSQL", "NETSUITE", "ORACLE", "POSTGRESQL", "RABBITMQ", "SALESFORCE", "SERVICENOW", "SHAREPOINT", "SMARTSHEET", "SQLSERVER", "TERADATA", "TIKTOK_ADS", "WORKDAY_RAAS", "ZENDESK"`, v) } } @@ -1578,8 +1620,10 @@ func (f *IngestionSourceType) Values() []IngestionSourceType { IngestionSourceTypeSalesforce, IngestionSourceTypeServicenow, IngestionSourceTypeSharepoint, + IngestionSourceTypeSmartsheet, IngestionSourceTypeSqlserver, IngestionSourceTypeTeradata, + IngestionSourceTypeTiktokAds, IngestionSourceTypeWorkdayRaas, IngestionSourceTypeZendesk, } @@ -2389,6 +2433,44 @@ func (s OutlookOptions) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +// Determines how errors encountered while deserializing records are handled. +type ParseMode string + +const ParseModeFailfast ParseMode = `FAILFAST` + +const ParseModePermissive ParseMode = `PERMISSIVE` + +// String representation for [fmt.Print] +func (f *ParseMode) String() string { + return string(*f) +} + +// Set raw string value and validate it against allowed values +func (f *ParseMode) Set(v string) error { + switch v { + case `FAILFAST`, `PERMISSIVE`: + *f = ParseMode(v) + return nil + default: + return fmt.Errorf(`value "%s" is not one of "FAILFAST", "PERMISSIVE"`, v) + } +} + +// Values returns all possible values for ParseMode. +// +// There is no guarantee on the order of the values in the slice. +func (f *ParseMode) Values() []ParseMode { + return []ParseMode{ + ParseModeFailfast, + ParseModePermissive, + } +} + +// Type always returns ParseMode to satisfy [pflag.Value] interface +func (f *ParseMode) Type() string { + return "ParseMode" +} + type PathPattern struct { // The source code to include for pipelines Include string `json:"include,omitempty"` @@ -3106,6 +3188,34 @@ func (s PostgresSlotConfig) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +type ProtobufTransformerOptions struct { + // Required: path to the .desc file (dbfs:/... or /Volumes/...). + DescFilePath string `json:"desc_file_path,omitempty"` + // Required: fully-qualified message type name. + MessageName string `json:"message_name,omitempty"` + // (Optional) Parse mode for Protobuf data. Valid values: FAILFAST, + // PERMISSIVE. Defaults to FAILFAST. + ParseMode ParseMode `json:"parse_mode,omitempty"` + // (Optional) Maximum expansion depth for recursive protobuf fields. Spark + // SQL does not natively support recursive types, so recursive fields are + // expanded up to this depth and truncated beyond it. Valid values: -1 + // (disallow recursive fields), 0 (drop), 1-10. + RecursiveFieldsMaxDepth int `json:"recursive_fields_max_depth,omitempty"` + // (Optional) Schema registry to resolve the Protobuf schema at runtime + // instead of providing it via desc_file_path. + SchemaRegistry *SchemaRegistryConfig `json:"schema_registry,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *ProtobufTransformerOptions) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s ProtobufTransformerOptions) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + // Enum representing the publishing mode of a pipeline. type PublishingMode string @@ -3344,6 +3454,29 @@ func (s RunAs) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +type SchemaRegistryConfig struct { + // Required: Confluent-compatible schema registry options. + ConfluentOptions *ConfluentSchemaRegistryOptions `json:"confluent_options,omitempty"` + // (Optional) UC connection for registry authentication. Specify if + // different from the top-level source connection. + ConnectionName string `json:"connection_name,omitempty"` + // (Optional, Protobuf only) Selects a specific message from a schema that + // defines multiple Protobuf messages. Simple ("Location") or + // fully-qualified ("com.example.protos.Location"). Defaults to the first + // message. + ProtobufMessageName string `json:"protobuf_message_name,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *SchemaRegistryConfig) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s SchemaRegistryConfig) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + type SchemaSpec struct { // (Optional) Source Specific Connector Options ConnectorOptions *ConnectorOptions `json:"connector_options,omitempty"` @@ -3998,6 +4131,7 @@ func (f *TikTokAdsOptionsTikTokReportType) Type() string { // Specifies how to transform binary data into structured data. type Transformer struct { + AvroOptions *AvroTransformerOptions `json:"avro_options,omitempty"` // Required: the wire format of the data. Format TransformerFormat `json:"format,omitempty"` // Optional input column to transform. When set, the transformer reads from @@ -4009,6 +4143,8 @@ type Transformer struct { // to this column instead of replacing the input column. OutputColumn string `json:"output_column,omitempty"` + ProtobufOptions *ProtobufTransformerOptions `json:"protobuf_options,omitempty"` + ForceSendFields []string `json:"-" url:"-"` } @@ -4022,8 +4158,12 @@ func (s Transformer) MarshalJSON() ([]byte, error) { type TransformerFormat string +const TransformerFormatAvro TransformerFormat = `AVRO` + const TransformerFormatJson TransformerFormat = `JSON` +const TransformerFormatProtobuf TransformerFormat = `PROTOBUF` + const TransformerFormatString TransformerFormat = `STRING` // String representation for [fmt.Print] @@ -4034,11 +4174,11 @@ func (f *TransformerFormat) String() string { // Set raw string value and validate it against allowed values func (f *TransformerFormat) Set(v string) error { switch v { - case `JSON`, `STRING`: + case `AVRO`, `JSON`, `PROTOBUF`, `STRING`: *f = TransformerFormat(v) return nil default: - return fmt.Errorf(`value "%s" is not one of "JSON", "STRING"`, v) + return fmt.Errorf(`value "%s" is not one of "AVRO", "JSON", "PROTOBUF", "STRING"`, v) } } @@ -4047,7 +4187,9 @@ func (f *TransformerFormat) Set(v string) error { // There is no guarantee on the order of the values in the slice. func (f *TransformerFormat) Values() []TransformerFormat { return []TransformerFormat{ + TransformerFormatAvro, TransformerFormatJson, + TransformerFormatProtobuf, TransformerFormatString, } } diff --git a/service/pkg.go b/service/pkg.go index a004ea6e2..0da9e56f1 100644 --- a/service/pkg.go +++ b/service/pkg.go @@ -168,7 +168,7 @@ // // - [iam.AccountGroupsV2API]: Groups simplify identity management, making it easier to assign access to Databricks account, data, and other securable objects. // -// - [iamv2.AccountIamV2API]: These APIs are used to manage identities and the workspace access of these identities in . +// - [iamv2.AccountIamV2API]: These APIs are used to manage identities and the workspace access of these identities in Databricks. // // - [compute.InstancePoolsAPI]: Instance Pools API are used to create, edit, delete and list instance pools by using ready-to-use cloud instances which reduces a cluster start and auto-scaling times. // @@ -376,7 +376,7 @@ // // - [tags.WorkspaceEntityTagAssignmentsAPI]: Manage tag assignments on workspace-scoped objects. // -// - [iamv2.WorkspaceIamV2API]: These APIs are used to manage identities and the workspace access of these identities in . +// - [iamv2.WorkspaceIamV2API]: These APIs are used to manage identities and the workspace access of these identities in Databricks. // // - [settings.WorkspaceNetworkConfigurationAPI]: These APIs allow configuration of network settings for Databricks workspaces by selecting which network policy to associate with the workspace. // diff --git a/workspace_client.go b/workspace_client.go index e2bfcd376..0de9f0ffc 100644 --- a/workspace_client.go +++ b/workspace_client.go @@ -1408,7 +1408,7 @@ type WorkspaceClient struct { WorkspaceEntityTagAssignments tags.WorkspaceEntityTagAssignmentsInterface // These APIs are used to manage identities and the workspace access of - // these identities in . + // these identities in Databricks. WorkspaceIamV2 iamv2.WorkspaceIamV2Interface // APIs to manage workspace level settings