diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index f24617852..c85874c95 100755 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -993160f9786ab5532bba61a5b56c2c47c2e2b745 \ No newline at end of file +0503dcda908dd1bdf9626152bcf3576996138c58 \ No newline at end of file diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index 748059b17..0f765e27f 100755 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -25,4 +25,8 @@ ### API Changes * Add `Revert` method for [w.Lakeview](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#LakeviewAPI) workspace-level service. -* Add `ParentPath` field for [dashboards.GenieUpdateSpaceRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieUpdateSpaceRequest). \ No newline at end of file +* Add `ParentPath` field for [dashboards.GenieUpdateSpaceRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieUpdateSpaceRequest). +* Add `ComputeMaxInstances` and `ComputeMinInstances` fields for [apps.App](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/apps#App). +* Add `ComputeMaxInstances` and `ComputeMinInstances` fields for [apps.AppUpdate](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/apps#AppUpdate). +* Add `CronScheduleTrigger`, `StreamingMode` and `TableTrigger` fields for [ml.MaterializedFeature](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#MaterializedFeature). +* Add `SyncedTableId` field for [postgres.SyncedTableSyncedTableStatus](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/postgres#SyncedTableSyncedTableStatus). \ No newline at end of file diff --git a/service/apps/model.go b/service/apps/model.go index 09d67f454..52644d88a 100755 --- a/service/apps/model.go +++ b/service/apps/model.go @@ -19,6 +19,12 @@ type App struct { AppStatus *ApplicationStatus `json:"app_status,omitempty"` BudgetPolicyId string `json:"budget_policy_id,omitempty"` + // Maximum number of app instances. Must be set together with + // `compute_min_instances`. + ComputeMaxInstances int `json:"compute_max_instances,omitempty"` + // Minimum number of app instances. Must be set together with + // `compute_max_instances`. + ComputeMinInstances int `json:"compute_min_instances,omitempty"` ComputeSize ComputeSize `json:"compute_size,omitempty"` @@ -1378,6 +1384,12 @@ func (s AppThumbnail) MarshalJSON() ([]byte, error) { type AppUpdate struct { BudgetPolicyId string `json:"budget_policy_id,omitempty"` + // Maximum number of app instances. Must be set together with + // `compute_min_instances`. + ComputeMaxInstances int `json:"compute_max_instances,omitempty"` + // Minimum number of app instances. Must be set together with + // `compute_max_instances`. + ComputeMinInstances int `json:"compute_min_instances,omitempty"` ComputeSize ComputeSize `json:"compute_size,omitempty"` diff --git a/service/billing/model.go b/service/billing/model.go old mode 100644 new mode 100755 index e14bce25d..21550d267 --- a/service/billing/model.go +++ b/service/billing/model.go @@ -29,6 +29,7 @@ func (s ActionConfiguration) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +// Type of action that a budget alert executes when its threshold is crossed. type ActionConfigurationType string const ActionConfigurationTypeEmailNotification ActionConfigurationType = `EMAIL_NOTIFICATION` diff --git a/service/ml/model.go b/service/ml/model.go index 015f68c80..158f9e97f 100755 --- a/service/ml/model.go +++ b/service/ml/model.go @@ -898,6 +898,23 @@ type CreateWebhookResponse struct { Webhook *RegistryWebhook `json:"webhook,omitempty"` } +// 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). + CronExpression string `json:"cron_expression,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *CronSchedule) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s CronSchedule) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + // Specifies the data source backing a feature. Exactly one source type must be // set. type DataSource struct { @@ -2831,6 +2848,8 @@ type MaterializedFeature struct { // The quartz cron expression that defines the schedule of the // materialization pipeline. The schedule is evaluated in the UTC timezone. CronSchedule string `json:"cron_schedule,omitempty"` + // A cron-based schedule trigger for the materialization pipeline. + CronScheduleTrigger *CronSchedule `json:"cron_schedule_trigger,omitempty"` // The full name of the feature in Unity Catalog. FeatureName string `json:"feature_name"` // True if this is an online materialized feature. False if it is an offline @@ -2847,9 +2866,16 @@ type MaterializedFeature struct { OnlineStoreConfig *OnlineStoreConfig `json:"online_store_config,omitempty"` // The schedule state of the materialization pipeline. PipelineScheduleState MaterializedFeaturePipelineScheduleState `json:"pipeline_schedule_state,omitempty"` + // The Structured Streaming trigger mode used for materialization. Real-time + // mode (RTM) targets sub-second latency for operational workloads; + // micro-batch mode (MBM) favors cost efficiency for ETL and analytics + // workloads. + StreamingMode *StreamingMode `json:"streaming_mode,omitempty"` // The fully qualified Unity Catalog path to the table containing the // materialized feature (Delta table or Lakebase table). Output only. TableName string `json:"table_name,omitempty"` + // A trigger that fires when the upstream source table changes. + TableTrigger *TableTrigger `json:"table_trigger,omitempty"` ForceSendFields []string `json:"-" url:"-"` } @@ -4682,6 +4708,49 @@ type StddevSampFunction struct { Input string `json:"input"` } +// The streaming mode configuration for a streaming materialization pipeline. +type StreamingMode struct { + // The type of streaming mode used by the materialization pipeline. + Mode StreamingModeStreamingModeType `json:"mode,omitempty"` +} + +type StreamingModeStreamingModeType string + +const StreamingModeStreamingModeTypeStreamingModeTypeMbm StreamingModeStreamingModeType = `STREAMING_MODE_TYPE_MBM` + +const StreamingModeStreamingModeTypeStreamingModeTypeRtm StreamingModeStreamingModeType = `STREAMING_MODE_TYPE_RTM` + +// String representation for [fmt.Print] +func (f *StreamingModeStreamingModeType) String() string { + return string(*f) +} + +// Set raw string value and validate it against allowed values +func (f *StreamingModeStreamingModeType) Set(v string) error { + switch v { + case `STREAMING_MODE_TYPE_MBM`, `STREAMING_MODE_TYPE_RTM`: + *f = StreamingModeStreamingModeType(v) + return nil + default: + return fmt.Errorf(`value "%s" is not one of "STREAMING_MODE_TYPE_MBM", "STREAMING_MODE_TYPE_RTM"`, v) + } +} + +// Values returns all possible values for StreamingModeStreamingModeType. +// +// There is no guarantee on the order of the values in the slice. +func (f *StreamingModeStreamingModeType) Values() []StreamingModeStreamingModeType { + return []StreamingModeStreamingModeType{ + StreamingModeStreamingModeTypeStreamingModeTypeMbm, + StreamingModeStreamingModeTypeStreamingModeTypeRtm, + } +} + +// Type always returns StreamingModeStreamingModeType to satisfy [pflag.Value] interface +func (f *StreamingModeStreamingModeType) Type() string { + return "StreamingModeStreamingModeType" +} + // Deprecated: Use KafkaSubscriptionMode instead. type SubscriptionMode struct { // A JSON string that contains the specific topic-partitions to consume @@ -4716,6 +4785,10 @@ type SumFunction struct { Input string `json:"input"` } +// A trigger that fires when the upstream source table changes. +type TableTrigger struct { +} + // Details required to test a registry webhook. type TestRegistryWebhookRequest struct { // If `event` is specified, the test trigger uses the specified event. If diff --git a/service/postgres/model.go b/service/postgres/model.go index a292a04dd..00216c5cf 100755 --- a/service/postgres/model.go +++ b/service/postgres/model.go @@ -90,15 +90,7 @@ func (s BranchSpec) MarshalJSON() ([]byte, error) { } type BranchStatus struct { - // The short identifier of the branch, suitable for showing to the users. - // For a branch with name `projects/my-project/branches/my-branch`, the - // branch_id is `my-branch`. - // - // Use this field when building UI components that display branches to users - // (e.g., a drop-down selector). Prefer showing `branch_id` instead of the - // full resource name from `Branch.name`, which follows the - // `projects/{project_id}/branches/{branch_id}` format and is not - // user-friendly. + // Part of the resource name. BranchId string `json:"branch_id,omitempty"` // The branch's state, indicating if it is initializing, ready for use, or // archived. @@ -271,14 +263,7 @@ type CatalogCatalogStatus struct { // // Format: projects/{project_id}/branches/{branch_id}. Branch string `json:"branch,omitempty"` - // The short identifier of the catalog, suitable for showing to the users. - // For a catalog with name `catalogs/my-catalog`, the catalog_id is - // `my-catalog`. - // - // Use this field when building UI components that display catalogs to users - // (e.g., a drop-down selector). Prefer showing `catalog_id` instead of the - // full resource name from `Catalog.name`, which follows the - // `catalogs/{catalog_id}` format and is not user-friendly. + // Part of the resource name. CatalogId string `json:"catalog_id,omitempty"` // The name of the Postgres database associated with the catalog. PostgresDatabase string `json:"postgres_database,omitempty"` @@ -520,16 +505,7 @@ func (s DatabaseDatabaseSpec) MarshalJSON() ([]byte, error) { } type DatabaseDatabaseStatus struct { - // The short identifier of the database, suitable for showing to the users. - // For a database with name - // `projects/my-project/branches/my-branch/databases/my-db`, the database_id - // is `my-db`. - // - // Use this field when building UI components that display databases to - // users (e.g., a drop-down selector). Prefer showing `database_id` instead - // of the full resource name from `Database.name`, which follows the - // `projects/{project_id}/branches/{branch_id}/databases/{database_id}` - // format and is not user-friendly. + // Part of the resource name. DatabaseId string `json:"database_id,omitempty"` // The name of the Postgres database. PostgresDatabase string `json:"postgres_database,omitempty"` @@ -842,16 +818,7 @@ type EndpointStatus struct { // option schedules a suspend compute operation. A disabled compute endpoint // cannot be enabled by a connection or console action. Disabled bool `json:"disabled,omitempty"` - // The short identifier of the endpoint, suitable for showing to the users. - // For an endpoint with name - // `projects/my-project/branches/my-branch/endpoints/my-endpoint`, the - // endpoint_id is `my-endpoint`. - // - // Use this field when building UI components that display endpoints to - // users (e.g., a drop-down selector). Prefer showing `endpoint_id` instead - // of the full resource name from `Endpoint.name`, which follows the - // `projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id}` - // format and is not user-friendly. + // Part of the resource name. EndpointId string `json:"endpoint_id,omitempty"` // The endpoint type. A branch can only have one READ_WRITE endpoint. EndpointType EndpointType `json:"endpoint_type,omitempty"` @@ -1710,14 +1677,7 @@ type ProjectStatus struct { Owner string `json:"owner,omitempty"` // The effective major Postgres version number. PgVersion int `json:"pg_version,omitempty"` - // The short identifier of the project, suitable for showing to the users. - // For a project with name `projects/my-project`, the project_id is - // `my-project`. - // - // Use this field when building UI components that display projects to users - // (e.g., a drop-down selector). Prefer showing `project_id` instead of the - // full resource name from `Project.name`, which follows the - // `projects/{project_id}` format and is not user-friendly. + // Part of the resource name. ProjectId string `json:"project_id,omitempty"` // The current space occupied by the project in storage. SyntheticStorageSizeBytes int64 `json:"synthetic_storage_size_bytes,omitempty"` @@ -2122,15 +2082,7 @@ type RoleRoleStatus struct { MembershipRoles []RoleMembershipRole `json:"membership_roles,omitempty"` // The name of the Postgres role. PostgresRole string `json:"postgres_role,omitempty"` - // The short identifier of the role, suitable for showing to the users. For - // a role with name `projects/my-project/branches/my-branch/roles/my-role`, - // the role_id is `my-role`. - // - // Use this field when building UI components that display roles to users - // (e.g., a drop-down selector). Prefer showing `role_id` instead of the - // full resource name from `Role.name`, which follows the - // `projects/{project_id}/branches/{branch_id}/roles/{role_id}` format and - // is not user-friendly. + // Part of the resource name. RoleId string `json:"role_id,omitempty"` ForceSendFields []string `json:"-" url:"-"` @@ -2417,6 +2369,8 @@ type SyncedTableSyncedTableStatus struct { Project string `json:"project,omitempty"` // The current phase of the data synchronization pipeline. ProvisioningPhase ProvisioningPhase `json:"provisioning_phase,omitempty"` + // Part of the resource name. + SyncedTableId string `json:"synced_table_id,omitempty"` // The provisioning state of the synced table entity in Unity Catalog. UnityCatalogProvisioningState ProvisioningInfoState `json:"unity_catalog_provisioning_state,omitempty"`