diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index a9ea4ce63..cbb2ed4ae 100644 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -dbf9b0a4e0432e846520442b14c34fc7f0ca0d8c \ No newline at end of file +8921a828d1741af0952eb5c4f0292c194c0d5f38 \ No newline at end of file diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index 5df3d9f8a..37be06c29 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -11,3 +11,17 @@ ### Internal Changes ### API Changes +* Add `ErrorMessage` field for [settings.CreatePrivateEndpointRule](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#CreatePrivateEndpointRule). +* Add `ErrorMessage` field for [settings.NccPrivateEndpointRule](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#NccPrivateEndpointRule). +* Add `ErrorMessage` field for [settings.UpdatePrivateEndpointRule](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#UpdatePrivateEndpointRule). +* Add `RateLimited` enum value for [compute.TerminationReasonCode](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/compute#TerminationReasonCode). +* Add `Creating` and `CreateFailed` enum values for [settings.NccPrivateEndpointRulePrivateLinkConnectionState](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#NccPrivateEndpointRulePrivateLinkConnectionState). +* Add `RateLimited` enum value for [sql.TerminationReasonCode](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/sql#TerminationReasonCode). +* [Breaking] Add long-running operation for [PostgresAPI.DeleteBranch](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/postgres#PostgresAPI.DeleteBranch). +* [Breaking] Add long-running operation for [PostgresAPI.DeleteEndpoint](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/postgres#PostgresAPI.DeleteEndpoint). +* [Breaking] Add long-running operation for [PostgresAPI.DeleteProject](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/postgres#PostgresAPI.DeleteProject). +* [Breaking] Change `DeleteBranch`, `DeleteEndpoint` and `DeleteProject` methods for [w.Postgres](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/postgres#PostgresAPI) workspace-level service to return [postgres.Operation](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/postgres#Operation). +* [Breaking] Remove `PgbouncerSettings` field for [postgres.EndpointSettings](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/postgres#EndpointSettings). +* [Breaking] Remove `PoolerMode` field for [postgres.EndpointSpec](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/postgres#EndpointSpec). +* [Breaking] Remove `PoolerMode` field for [postgres.EndpointStatus](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/postgres#EndpointStatus). +* [Breaking] Remove `PgbouncerSettings` field for [postgres.ProjectDefaultEndpointSettings](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/postgres#ProjectDefaultEndpointSettings). \ No newline at end of file diff --git a/experimental/mocks/service/postgres/mock_delete_branch_operation_interface.go b/experimental/mocks/service/postgres/mock_delete_branch_operation_interface.go new file mode 100644 index 000000000..2231f3116 --- /dev/null +++ b/experimental/mocks/service/postgres/mock_delete_branch_operation_interface.go @@ -0,0 +1,258 @@ +// Code generated by mockery v2.53.2. DO NOT EDIT. + +package postgres + +import ( + context "context" + + api "github.com/databricks/databricks-sdk-go/experimental/api" + + mock "github.com/stretchr/testify/mock" + + postgres "github.com/databricks/databricks-sdk-go/service/postgres" +) + +// MockDeleteBranchOperationInterface is an autogenerated mock type for the DeleteBranchOperationInterface type +type MockDeleteBranchOperationInterface struct { + mock.Mock +} + +type MockDeleteBranchOperationInterface_Expecter struct { + mock *mock.Mock +} + +func (_m *MockDeleteBranchOperationInterface) EXPECT() *MockDeleteBranchOperationInterface_Expecter { + return &MockDeleteBranchOperationInterface_Expecter{mock: &_m.Mock} +} + +// Done provides a mock function with no fields +func (_m *MockDeleteBranchOperationInterface) Done() (bool, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Done") + } + + var r0 bool + var r1 error + if rf, ok := ret.Get(0).(func() (bool, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockDeleteBranchOperationInterface_Done_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Done' +type MockDeleteBranchOperationInterface_Done_Call struct { + *mock.Call +} + +// Done is a helper method to define mock.On call +func (_e *MockDeleteBranchOperationInterface_Expecter) Done() *MockDeleteBranchOperationInterface_Done_Call { + return &MockDeleteBranchOperationInterface_Done_Call{Call: _e.mock.On("Done")} +} + +func (_c *MockDeleteBranchOperationInterface_Done_Call) Run(run func()) *MockDeleteBranchOperationInterface_Done_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockDeleteBranchOperationInterface_Done_Call) Return(_a0 bool, _a1 error) *MockDeleteBranchOperationInterface_Done_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockDeleteBranchOperationInterface_Done_Call) RunAndReturn(run func() (bool, error)) *MockDeleteBranchOperationInterface_Done_Call { + _c.Call.Return(run) + return _c +} + +// Metadata provides a mock function with no fields +func (_m *MockDeleteBranchOperationInterface) Metadata() (*postgres.BranchOperationMetadata, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Metadata") + } + + var r0 *postgres.BranchOperationMetadata + var r1 error + if rf, ok := ret.Get(0).(func() (*postgres.BranchOperationMetadata, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() *postgres.BranchOperationMetadata); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*postgres.BranchOperationMetadata) + } + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockDeleteBranchOperationInterface_Metadata_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Metadata' +type MockDeleteBranchOperationInterface_Metadata_Call struct { + *mock.Call +} + +// Metadata is a helper method to define mock.On call +func (_e *MockDeleteBranchOperationInterface_Expecter) Metadata() *MockDeleteBranchOperationInterface_Metadata_Call { + return &MockDeleteBranchOperationInterface_Metadata_Call{Call: _e.mock.On("Metadata")} +} + +func (_c *MockDeleteBranchOperationInterface_Metadata_Call) Run(run func()) *MockDeleteBranchOperationInterface_Metadata_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockDeleteBranchOperationInterface_Metadata_Call) Return(_a0 *postgres.BranchOperationMetadata, _a1 error) *MockDeleteBranchOperationInterface_Metadata_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockDeleteBranchOperationInterface_Metadata_Call) RunAndReturn(run func() (*postgres.BranchOperationMetadata, error)) *MockDeleteBranchOperationInterface_Metadata_Call { + _c.Call.Return(run) + return _c +} + +// Name provides a mock function with no fields +func (_m *MockDeleteBranchOperationInterface) Name() string { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Name") + } + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + +// MockDeleteBranchOperationInterface_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type MockDeleteBranchOperationInterface_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *MockDeleteBranchOperationInterface_Expecter) Name() *MockDeleteBranchOperationInterface_Name_Call { + return &MockDeleteBranchOperationInterface_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *MockDeleteBranchOperationInterface_Name_Call) Run(run func()) *MockDeleteBranchOperationInterface_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockDeleteBranchOperationInterface_Name_Call) Return(_a0 string) *MockDeleteBranchOperationInterface_Name_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockDeleteBranchOperationInterface_Name_Call) RunAndReturn(run func() string) *MockDeleteBranchOperationInterface_Name_Call { + _c.Call.Return(run) + return _c +} + +// Wait provides a mock function with given fields: ctx, opts +func (_m *MockDeleteBranchOperationInterface) Wait(ctx context.Context, opts ...api.Option) error { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for Wait") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, ...api.Option) error); ok { + r0 = rf(ctx, opts...) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockDeleteBranchOperationInterface_Wait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Wait' +type MockDeleteBranchOperationInterface_Wait_Call struct { + *mock.Call +} + +// Wait is a helper method to define mock.On call +// - ctx context.Context +// - opts ...api.Option +func (_e *MockDeleteBranchOperationInterface_Expecter) Wait(ctx interface{}, opts ...interface{}) *MockDeleteBranchOperationInterface_Wait_Call { + return &MockDeleteBranchOperationInterface_Wait_Call{Call: _e.mock.On("Wait", + append([]interface{}{ctx}, opts...)...)} +} + +func (_c *MockDeleteBranchOperationInterface_Wait_Call) Run(run func(ctx context.Context, opts ...api.Option)) *MockDeleteBranchOperationInterface_Wait_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]api.Option, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(api.Option) + } + } + run(args[0].(context.Context), variadicArgs...) + }) + return _c +} + +func (_c *MockDeleteBranchOperationInterface_Wait_Call) Return(_a0 error) *MockDeleteBranchOperationInterface_Wait_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockDeleteBranchOperationInterface_Wait_Call) RunAndReturn(run func(context.Context, ...api.Option) error) *MockDeleteBranchOperationInterface_Wait_Call { + _c.Call.Return(run) + return _c +} + +// NewMockDeleteBranchOperationInterface creates a new instance of MockDeleteBranchOperationInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockDeleteBranchOperationInterface(t interface { + mock.TestingT + Cleanup(func()) +}) *MockDeleteBranchOperationInterface { + mock := &MockDeleteBranchOperationInterface{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/experimental/mocks/service/postgres/mock_delete_endpoint_operation_interface.go b/experimental/mocks/service/postgres/mock_delete_endpoint_operation_interface.go new file mode 100644 index 000000000..32956e1c4 --- /dev/null +++ b/experimental/mocks/service/postgres/mock_delete_endpoint_operation_interface.go @@ -0,0 +1,258 @@ +// Code generated by mockery v2.53.2. DO NOT EDIT. + +package postgres + +import ( + context "context" + + api "github.com/databricks/databricks-sdk-go/experimental/api" + + mock "github.com/stretchr/testify/mock" + + postgres "github.com/databricks/databricks-sdk-go/service/postgres" +) + +// MockDeleteEndpointOperationInterface is an autogenerated mock type for the DeleteEndpointOperationInterface type +type MockDeleteEndpointOperationInterface struct { + mock.Mock +} + +type MockDeleteEndpointOperationInterface_Expecter struct { + mock *mock.Mock +} + +func (_m *MockDeleteEndpointOperationInterface) EXPECT() *MockDeleteEndpointOperationInterface_Expecter { + return &MockDeleteEndpointOperationInterface_Expecter{mock: &_m.Mock} +} + +// Done provides a mock function with no fields +func (_m *MockDeleteEndpointOperationInterface) Done() (bool, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Done") + } + + var r0 bool + var r1 error + if rf, ok := ret.Get(0).(func() (bool, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockDeleteEndpointOperationInterface_Done_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Done' +type MockDeleteEndpointOperationInterface_Done_Call struct { + *mock.Call +} + +// Done is a helper method to define mock.On call +func (_e *MockDeleteEndpointOperationInterface_Expecter) Done() *MockDeleteEndpointOperationInterface_Done_Call { + return &MockDeleteEndpointOperationInterface_Done_Call{Call: _e.mock.On("Done")} +} + +func (_c *MockDeleteEndpointOperationInterface_Done_Call) Run(run func()) *MockDeleteEndpointOperationInterface_Done_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockDeleteEndpointOperationInterface_Done_Call) Return(_a0 bool, _a1 error) *MockDeleteEndpointOperationInterface_Done_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockDeleteEndpointOperationInterface_Done_Call) RunAndReturn(run func() (bool, error)) *MockDeleteEndpointOperationInterface_Done_Call { + _c.Call.Return(run) + return _c +} + +// Metadata provides a mock function with no fields +func (_m *MockDeleteEndpointOperationInterface) Metadata() (*postgres.EndpointOperationMetadata, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Metadata") + } + + var r0 *postgres.EndpointOperationMetadata + var r1 error + if rf, ok := ret.Get(0).(func() (*postgres.EndpointOperationMetadata, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() *postgres.EndpointOperationMetadata); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*postgres.EndpointOperationMetadata) + } + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockDeleteEndpointOperationInterface_Metadata_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Metadata' +type MockDeleteEndpointOperationInterface_Metadata_Call struct { + *mock.Call +} + +// Metadata is a helper method to define mock.On call +func (_e *MockDeleteEndpointOperationInterface_Expecter) Metadata() *MockDeleteEndpointOperationInterface_Metadata_Call { + return &MockDeleteEndpointOperationInterface_Metadata_Call{Call: _e.mock.On("Metadata")} +} + +func (_c *MockDeleteEndpointOperationInterface_Metadata_Call) Run(run func()) *MockDeleteEndpointOperationInterface_Metadata_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockDeleteEndpointOperationInterface_Metadata_Call) Return(_a0 *postgres.EndpointOperationMetadata, _a1 error) *MockDeleteEndpointOperationInterface_Metadata_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockDeleteEndpointOperationInterface_Metadata_Call) RunAndReturn(run func() (*postgres.EndpointOperationMetadata, error)) *MockDeleteEndpointOperationInterface_Metadata_Call { + _c.Call.Return(run) + return _c +} + +// Name provides a mock function with no fields +func (_m *MockDeleteEndpointOperationInterface) Name() string { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Name") + } + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + +// MockDeleteEndpointOperationInterface_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type MockDeleteEndpointOperationInterface_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *MockDeleteEndpointOperationInterface_Expecter) Name() *MockDeleteEndpointOperationInterface_Name_Call { + return &MockDeleteEndpointOperationInterface_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *MockDeleteEndpointOperationInterface_Name_Call) Run(run func()) *MockDeleteEndpointOperationInterface_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockDeleteEndpointOperationInterface_Name_Call) Return(_a0 string) *MockDeleteEndpointOperationInterface_Name_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockDeleteEndpointOperationInterface_Name_Call) RunAndReturn(run func() string) *MockDeleteEndpointOperationInterface_Name_Call { + _c.Call.Return(run) + return _c +} + +// Wait provides a mock function with given fields: ctx, opts +func (_m *MockDeleteEndpointOperationInterface) Wait(ctx context.Context, opts ...api.Option) error { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for Wait") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, ...api.Option) error); ok { + r0 = rf(ctx, opts...) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockDeleteEndpointOperationInterface_Wait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Wait' +type MockDeleteEndpointOperationInterface_Wait_Call struct { + *mock.Call +} + +// Wait is a helper method to define mock.On call +// - ctx context.Context +// - opts ...api.Option +func (_e *MockDeleteEndpointOperationInterface_Expecter) Wait(ctx interface{}, opts ...interface{}) *MockDeleteEndpointOperationInterface_Wait_Call { + return &MockDeleteEndpointOperationInterface_Wait_Call{Call: _e.mock.On("Wait", + append([]interface{}{ctx}, opts...)...)} +} + +func (_c *MockDeleteEndpointOperationInterface_Wait_Call) Run(run func(ctx context.Context, opts ...api.Option)) *MockDeleteEndpointOperationInterface_Wait_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]api.Option, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(api.Option) + } + } + run(args[0].(context.Context), variadicArgs...) + }) + return _c +} + +func (_c *MockDeleteEndpointOperationInterface_Wait_Call) Return(_a0 error) *MockDeleteEndpointOperationInterface_Wait_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockDeleteEndpointOperationInterface_Wait_Call) RunAndReturn(run func(context.Context, ...api.Option) error) *MockDeleteEndpointOperationInterface_Wait_Call { + _c.Call.Return(run) + return _c +} + +// NewMockDeleteEndpointOperationInterface creates a new instance of MockDeleteEndpointOperationInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockDeleteEndpointOperationInterface(t interface { + mock.TestingT + Cleanup(func()) +}) *MockDeleteEndpointOperationInterface { + mock := &MockDeleteEndpointOperationInterface{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/experimental/mocks/service/postgres/mock_delete_project_operation_interface.go b/experimental/mocks/service/postgres/mock_delete_project_operation_interface.go new file mode 100644 index 000000000..57f08515a --- /dev/null +++ b/experimental/mocks/service/postgres/mock_delete_project_operation_interface.go @@ -0,0 +1,258 @@ +// Code generated by mockery v2.53.2. DO NOT EDIT. + +package postgres + +import ( + context "context" + + api "github.com/databricks/databricks-sdk-go/experimental/api" + + mock "github.com/stretchr/testify/mock" + + postgres "github.com/databricks/databricks-sdk-go/service/postgres" +) + +// MockDeleteProjectOperationInterface is an autogenerated mock type for the DeleteProjectOperationInterface type +type MockDeleteProjectOperationInterface struct { + mock.Mock +} + +type MockDeleteProjectOperationInterface_Expecter struct { + mock *mock.Mock +} + +func (_m *MockDeleteProjectOperationInterface) EXPECT() *MockDeleteProjectOperationInterface_Expecter { + return &MockDeleteProjectOperationInterface_Expecter{mock: &_m.Mock} +} + +// Done provides a mock function with no fields +func (_m *MockDeleteProjectOperationInterface) Done() (bool, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Done") + } + + var r0 bool + var r1 error + if rf, ok := ret.Get(0).(func() (bool, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockDeleteProjectOperationInterface_Done_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Done' +type MockDeleteProjectOperationInterface_Done_Call struct { + *mock.Call +} + +// Done is a helper method to define mock.On call +func (_e *MockDeleteProjectOperationInterface_Expecter) Done() *MockDeleteProjectOperationInterface_Done_Call { + return &MockDeleteProjectOperationInterface_Done_Call{Call: _e.mock.On("Done")} +} + +func (_c *MockDeleteProjectOperationInterface_Done_Call) Run(run func()) *MockDeleteProjectOperationInterface_Done_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockDeleteProjectOperationInterface_Done_Call) Return(_a0 bool, _a1 error) *MockDeleteProjectOperationInterface_Done_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockDeleteProjectOperationInterface_Done_Call) RunAndReturn(run func() (bool, error)) *MockDeleteProjectOperationInterface_Done_Call { + _c.Call.Return(run) + return _c +} + +// Metadata provides a mock function with no fields +func (_m *MockDeleteProjectOperationInterface) Metadata() (*postgres.ProjectOperationMetadata, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Metadata") + } + + var r0 *postgres.ProjectOperationMetadata + var r1 error + if rf, ok := ret.Get(0).(func() (*postgres.ProjectOperationMetadata, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() *postgres.ProjectOperationMetadata); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*postgres.ProjectOperationMetadata) + } + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockDeleteProjectOperationInterface_Metadata_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Metadata' +type MockDeleteProjectOperationInterface_Metadata_Call struct { + *mock.Call +} + +// Metadata is a helper method to define mock.On call +func (_e *MockDeleteProjectOperationInterface_Expecter) Metadata() *MockDeleteProjectOperationInterface_Metadata_Call { + return &MockDeleteProjectOperationInterface_Metadata_Call{Call: _e.mock.On("Metadata")} +} + +func (_c *MockDeleteProjectOperationInterface_Metadata_Call) Run(run func()) *MockDeleteProjectOperationInterface_Metadata_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockDeleteProjectOperationInterface_Metadata_Call) Return(_a0 *postgres.ProjectOperationMetadata, _a1 error) *MockDeleteProjectOperationInterface_Metadata_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockDeleteProjectOperationInterface_Metadata_Call) RunAndReturn(run func() (*postgres.ProjectOperationMetadata, error)) *MockDeleteProjectOperationInterface_Metadata_Call { + _c.Call.Return(run) + return _c +} + +// Name provides a mock function with no fields +func (_m *MockDeleteProjectOperationInterface) Name() string { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Name") + } + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + +// MockDeleteProjectOperationInterface_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name' +type MockDeleteProjectOperationInterface_Name_Call struct { + *mock.Call +} + +// Name is a helper method to define mock.On call +func (_e *MockDeleteProjectOperationInterface_Expecter) Name() *MockDeleteProjectOperationInterface_Name_Call { + return &MockDeleteProjectOperationInterface_Name_Call{Call: _e.mock.On("Name")} +} + +func (_c *MockDeleteProjectOperationInterface_Name_Call) Run(run func()) *MockDeleteProjectOperationInterface_Name_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockDeleteProjectOperationInterface_Name_Call) Return(_a0 string) *MockDeleteProjectOperationInterface_Name_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockDeleteProjectOperationInterface_Name_Call) RunAndReturn(run func() string) *MockDeleteProjectOperationInterface_Name_Call { + _c.Call.Return(run) + return _c +} + +// Wait provides a mock function with given fields: ctx, opts +func (_m *MockDeleteProjectOperationInterface) Wait(ctx context.Context, opts ...api.Option) error { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for Wait") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, ...api.Option) error); ok { + r0 = rf(ctx, opts...) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockDeleteProjectOperationInterface_Wait_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Wait' +type MockDeleteProjectOperationInterface_Wait_Call struct { + *mock.Call +} + +// Wait is a helper method to define mock.On call +// - ctx context.Context +// - opts ...api.Option +func (_e *MockDeleteProjectOperationInterface_Expecter) Wait(ctx interface{}, opts ...interface{}) *MockDeleteProjectOperationInterface_Wait_Call { + return &MockDeleteProjectOperationInterface_Wait_Call{Call: _e.mock.On("Wait", + append([]interface{}{ctx}, opts...)...)} +} + +func (_c *MockDeleteProjectOperationInterface_Wait_Call) Run(run func(ctx context.Context, opts ...api.Option)) *MockDeleteProjectOperationInterface_Wait_Call { + _c.Call.Run(func(args mock.Arguments) { + variadicArgs := make([]api.Option, len(args)-1) + for i, a := range args[1:] { + if a != nil { + variadicArgs[i] = a.(api.Option) + } + } + run(args[0].(context.Context), variadicArgs...) + }) + return _c +} + +func (_c *MockDeleteProjectOperationInterface_Wait_Call) Return(_a0 error) *MockDeleteProjectOperationInterface_Wait_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockDeleteProjectOperationInterface_Wait_Call) RunAndReturn(run func(context.Context, ...api.Option) error) *MockDeleteProjectOperationInterface_Wait_Call { + _c.Call.Return(run) + return _c +} + +// NewMockDeleteProjectOperationInterface creates a new instance of MockDeleteProjectOperationInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockDeleteProjectOperationInterface(t interface { + mock.TestingT + Cleanup(func()) +}) *MockDeleteProjectOperationInterface { + mock := &MockDeleteProjectOperationInterface{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/experimental/mocks/service/postgres/mock_postgres_interface.go b/experimental/mocks/service/postgres/mock_postgres_interface.go index 27f7e625e..c4a668df9 100644 --- a/experimental/mocks/service/postgres/mock_postgres_interface.go +++ b/experimental/mocks/service/postgres/mock_postgres_interface.go @@ -261,21 +261,33 @@ func (_c *MockPostgresInterface_CreateRole_Call) RunAndReturn(run func(context.C } // DeleteBranch provides a mock function with given fields: ctx, request -func (_m *MockPostgresInterface) DeleteBranch(ctx context.Context, request postgres.DeleteBranchRequest) error { +func (_m *MockPostgresInterface) DeleteBranch(ctx context.Context, request postgres.DeleteBranchRequest) (postgres.DeleteBranchOperationInterface, error) { ret := _m.Called(ctx, request) if len(ret) == 0 { panic("no return value specified for DeleteBranch") } - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, postgres.DeleteBranchRequest) error); ok { + var r0 postgres.DeleteBranchOperationInterface + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, postgres.DeleteBranchRequest) (postgres.DeleteBranchOperationInterface, error)); ok { + return rf(ctx, request) + } + if rf, ok := ret.Get(0).(func(context.Context, postgres.DeleteBranchRequest) postgres.DeleteBranchOperationInterface); ok { r0 = rf(ctx, request) } else { - r0 = ret.Error(0) + if ret.Get(0) != nil { + r0 = ret.Get(0).(postgres.DeleteBranchOperationInterface) + } } - return r0 + if rf, ok := ret.Get(1).(func(context.Context, postgres.DeleteBranchRequest) error); ok { + r1 = rf(ctx, request) + } else { + r1 = ret.Error(1) + } + + return r0, r1 } // MockPostgresInterface_DeleteBranch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteBranch' @@ -297,32 +309,44 @@ func (_c *MockPostgresInterface_DeleteBranch_Call) Run(run func(ctx context.Cont return _c } -func (_c *MockPostgresInterface_DeleteBranch_Call) Return(_a0 error) *MockPostgresInterface_DeleteBranch_Call { - _c.Call.Return(_a0) +func (_c *MockPostgresInterface_DeleteBranch_Call) Return(_a0 postgres.DeleteBranchOperationInterface, _a1 error) *MockPostgresInterface_DeleteBranch_Call { + _c.Call.Return(_a0, _a1) return _c } -func (_c *MockPostgresInterface_DeleteBranch_Call) RunAndReturn(run func(context.Context, postgres.DeleteBranchRequest) error) *MockPostgresInterface_DeleteBranch_Call { +func (_c *MockPostgresInterface_DeleteBranch_Call) RunAndReturn(run func(context.Context, postgres.DeleteBranchRequest) (postgres.DeleteBranchOperationInterface, error)) *MockPostgresInterface_DeleteBranch_Call { _c.Call.Return(run) return _c } // DeleteEndpoint provides a mock function with given fields: ctx, request -func (_m *MockPostgresInterface) DeleteEndpoint(ctx context.Context, request postgres.DeleteEndpointRequest) error { +func (_m *MockPostgresInterface) DeleteEndpoint(ctx context.Context, request postgres.DeleteEndpointRequest) (postgres.DeleteEndpointOperationInterface, error) { ret := _m.Called(ctx, request) if len(ret) == 0 { panic("no return value specified for DeleteEndpoint") } - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, postgres.DeleteEndpointRequest) error); ok { + var r0 postgres.DeleteEndpointOperationInterface + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, postgres.DeleteEndpointRequest) (postgres.DeleteEndpointOperationInterface, error)); ok { + return rf(ctx, request) + } + if rf, ok := ret.Get(0).(func(context.Context, postgres.DeleteEndpointRequest) postgres.DeleteEndpointOperationInterface); ok { r0 = rf(ctx, request) } else { - r0 = ret.Error(0) + if ret.Get(0) != nil { + r0 = ret.Get(0).(postgres.DeleteEndpointOperationInterface) + } } - return r0 + if rf, ok := ret.Get(1).(func(context.Context, postgres.DeleteEndpointRequest) error); ok { + r1 = rf(ctx, request) + } else { + r1 = ret.Error(1) + } + + return r0, r1 } // MockPostgresInterface_DeleteEndpoint_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteEndpoint' @@ -344,32 +368,44 @@ func (_c *MockPostgresInterface_DeleteEndpoint_Call) Run(run func(ctx context.Co return _c } -func (_c *MockPostgresInterface_DeleteEndpoint_Call) Return(_a0 error) *MockPostgresInterface_DeleteEndpoint_Call { - _c.Call.Return(_a0) +func (_c *MockPostgresInterface_DeleteEndpoint_Call) Return(_a0 postgres.DeleteEndpointOperationInterface, _a1 error) *MockPostgresInterface_DeleteEndpoint_Call { + _c.Call.Return(_a0, _a1) return _c } -func (_c *MockPostgresInterface_DeleteEndpoint_Call) RunAndReturn(run func(context.Context, postgres.DeleteEndpointRequest) error) *MockPostgresInterface_DeleteEndpoint_Call { +func (_c *MockPostgresInterface_DeleteEndpoint_Call) RunAndReturn(run func(context.Context, postgres.DeleteEndpointRequest) (postgres.DeleteEndpointOperationInterface, error)) *MockPostgresInterface_DeleteEndpoint_Call { _c.Call.Return(run) return _c } // DeleteProject provides a mock function with given fields: ctx, request -func (_m *MockPostgresInterface) DeleteProject(ctx context.Context, request postgres.DeleteProjectRequest) error { +func (_m *MockPostgresInterface) DeleteProject(ctx context.Context, request postgres.DeleteProjectRequest) (postgres.DeleteProjectOperationInterface, error) { ret := _m.Called(ctx, request) if len(ret) == 0 { panic("no return value specified for DeleteProject") } - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, postgres.DeleteProjectRequest) error); ok { + var r0 postgres.DeleteProjectOperationInterface + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, postgres.DeleteProjectRequest) (postgres.DeleteProjectOperationInterface, error)); ok { + return rf(ctx, request) + } + if rf, ok := ret.Get(0).(func(context.Context, postgres.DeleteProjectRequest) postgres.DeleteProjectOperationInterface); ok { r0 = rf(ctx, request) } else { - r0 = ret.Error(0) + if ret.Get(0) != nil { + r0 = ret.Get(0).(postgres.DeleteProjectOperationInterface) + } } - return r0 + if rf, ok := ret.Get(1).(func(context.Context, postgres.DeleteProjectRequest) error); ok { + r1 = rf(ctx, request) + } else { + r1 = ret.Error(1) + } + + return r0, r1 } // MockPostgresInterface_DeleteProject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteProject' @@ -391,12 +427,12 @@ func (_c *MockPostgresInterface_DeleteProject_Call) Run(run func(ctx context.Con return _c } -func (_c *MockPostgresInterface_DeleteProject_Call) Return(_a0 error) *MockPostgresInterface_DeleteProject_Call { - _c.Call.Return(_a0) +func (_c *MockPostgresInterface_DeleteProject_Call) Return(_a0 postgres.DeleteProjectOperationInterface, _a1 error) *MockPostgresInterface_DeleteProject_Call { + _c.Call.Return(_a0, _a1) return _c } -func (_c *MockPostgresInterface_DeleteProject_Call) RunAndReturn(run func(context.Context, postgres.DeleteProjectRequest) error) *MockPostgresInterface_DeleteProject_Call { +func (_c *MockPostgresInterface_DeleteProject_Call) RunAndReturn(run func(context.Context, postgres.DeleteProjectRequest) (postgres.DeleteProjectOperationInterface, error)) *MockPostgresInterface_DeleteProject_Call { _c.Call.Return(run) return _c } diff --git a/internal/testspecs/service/lrotesting/model.go b/internal/testspecs/service/lrotesting/model.go old mode 100755 new mode 100644 index 34ef4fb41..1bc90e269 --- a/internal/testspecs/service/lrotesting/model.go +++ b/internal/testspecs/service/lrotesting/model.go @@ -21,7 +21,6 @@ type CreateTestResourceRequest struct { // Databricks Error that is returned by all Databricks APIs. type DatabricksServiceExceptionWithDetailsProto struct { - // @pbjson-skip Details []json.RawMessage `json:"details,omitempty"` ErrorCode ErrorCode `json:"error_code,omitempty"` diff --git a/service/apps/api.go b/service/apps/api.go old mode 100755 new mode 100644 index 6b74b17be..6180c4a97 --- a/service/apps/api.go +++ b/service/apps/api.go @@ -170,7 +170,7 @@ func NewApps(client *client.DatabricksClient) *AppsAPI { } } -// Apps run directly on a customer’s Databricks instance, integrate with their +// Apps run directly on a customer's Databricks instance, integrate with their // data, use and extend Databricks services, and enable users to interact // through single sign-on. type AppsAPI struct { diff --git a/service/apps/interface.go b/service/apps/interface.go old mode 100755 new mode 100644 index c7353bba3..4985268b2 --- a/service/apps/interface.go +++ b/service/apps/interface.go @@ -6,7 +6,7 @@ import ( "context" ) -// Apps run directly on a customer’s Databricks instance, integrate with their +// Apps run directly on a customer's Databricks instance, integrate with their // data, use and extend Databricks services, and enable users to interact // through single sign-on. // diff --git a/service/catalog/model.go b/service/catalog/model.go index c40f17ada..dd143cdfe 100644 --- a/service/catalog/model.go +++ b/service/catalog/model.go @@ -6925,7 +6925,7 @@ func (s Securable) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } -// Latest kind: TABLE_DELTASHARING_OPEN_DIR_BASED = 290; Next id:291 +// Latest kind: CONNECTION_WORKDAY_HCM_USERNAME_PASSWORD = 292; Next id: 293 type SecurableKind string const SecurableKindTableDbStorage SecurableKind = `TABLE_DB_STORAGE` diff --git a/service/compute/model.go b/service/compute/model.go index b16626c17..90c3d4855 100644 --- a/service/compute/model.go +++ b/service/compute/model.go @@ -5721,6 +5721,8 @@ const TerminationReasonCodePodAssignmentFailure TerminationReasonCode = `POD_ASS const TerminationReasonCodePodSchedulingFailure TerminationReasonCode = `POD_SCHEDULING_FAILURE` +const TerminationReasonCodeRateLimited TerminationReasonCode = `RATE_LIMITED` + const TerminationReasonCodeRequestRejected TerminationReasonCode = `REQUEST_REJECTED` const TerminationReasonCodeRequestThrottled TerminationReasonCode = `REQUEST_THROTTLED` @@ -5805,11 +5807,11 @@ func (f *TerminationReasonCode) String() string { // Set raw string value and validate it against allowed values func (f *TerminationReasonCode) Set(v string) error { switch v { - case `ABUSE_DETECTED`, `ACCESS_TOKEN_FAILURE`, `ALLOCATION_TIMEOUT`, `ALLOCATION_TIMEOUT_NODE_DAEMON_NOT_READY`, `ALLOCATION_TIMEOUT_NO_HEALTHY_AND_WARMED_UP_CLUSTERS`, `ALLOCATION_TIMEOUT_NO_HEALTHY_CLUSTERS`, `ALLOCATION_TIMEOUT_NO_MATCHED_CLUSTERS`, `ALLOCATION_TIMEOUT_NO_READY_CLUSTERS`, `ALLOCATION_TIMEOUT_NO_UNALLOCATED_CLUSTERS`, `ALLOCATION_TIMEOUT_NO_WARMED_UP_CLUSTERS`, `ATTACH_PROJECT_FAILURE`, `AWS_AUTHORIZATION_FAILURE`, `AWS_INACCESSIBLE_KMS_KEY_FAILURE`, `AWS_INSTANCE_PROFILE_UPDATE_FAILURE`, `AWS_INSUFFICIENT_FREE_ADDRESSES_IN_SUBNET_FAILURE`, `AWS_INSUFFICIENT_INSTANCE_CAPACITY_FAILURE`, `AWS_INVALID_KEY_PAIR`, `AWS_INVALID_KMS_KEY_STATE`, `AWS_MAX_SPOT_INSTANCE_COUNT_EXCEEDED_FAILURE`, `AWS_REQUEST_LIMIT_EXCEEDED`, `AWS_RESOURCE_QUOTA_EXCEEDED`, `AWS_UNSUPPORTED_FAILURE`, `AZURE_BYOK_KEY_PERMISSION_FAILURE`, `AZURE_EPHEMERAL_DISK_FAILURE`, `AZURE_INVALID_DEPLOYMENT_TEMPLATE`, `AZURE_OPERATION_NOT_ALLOWED_EXCEPTION`, `AZURE_PACKED_DEPLOYMENT_PARTIAL_FAILURE`, `AZURE_QUOTA_EXCEEDED_EXCEPTION`, `AZURE_RESOURCE_MANAGER_THROTTLING`, `AZURE_RESOURCE_PROVIDER_THROTTLING`, `AZURE_UNEXPECTED_DEPLOYMENT_TEMPLATE_FAILURE`, `AZURE_VM_EXTENSION_FAILURE`, `AZURE_VNET_CONFIGURATION_FAILURE`, `BOOTSTRAP_TIMEOUT`, `BOOTSTRAP_TIMEOUT_CLOUD_PROVIDER_EXCEPTION`, `BOOTSTRAP_TIMEOUT_DUE_TO_MISCONFIG`, `BUDGET_POLICY_LIMIT_ENFORCEMENT_ACTIVATED`, `BUDGET_POLICY_RESOLUTION_FAILURE`, `CLOUD_ACCOUNT_POD_QUOTA_EXCEEDED`, `CLOUD_ACCOUNT_SETUP_FAILURE`, `CLOUD_OPERATION_CANCELLED`, `CLOUD_PROVIDER_DISK_SETUP_FAILURE`, `CLOUD_PROVIDER_INSTANCE_NOT_LAUNCHED`, `CLOUD_PROVIDER_LAUNCH_FAILURE`, `CLOUD_PROVIDER_LAUNCH_FAILURE_DUE_TO_MISCONFIG`, `CLOUD_PROVIDER_RESOURCE_STOCKOUT`, `CLOUD_PROVIDER_RESOURCE_STOCKOUT_DUE_TO_MISCONFIG`, `CLOUD_PROVIDER_SHUTDOWN`, `CLUSTER_OPERATION_THROTTLED`, `CLUSTER_OPERATION_TIMEOUT`, `COMMUNICATION_LOST`, `CONTAINER_LAUNCH_FAILURE`, `CONTROL_PLANE_CONNECTION_FAILURE`, `CONTROL_PLANE_CONNECTION_FAILURE_DUE_TO_MISCONFIG`, `CONTROL_PLANE_REQUEST_FAILURE`, `CONTROL_PLANE_REQUEST_FAILURE_DUE_TO_MISCONFIG`, `DATABASE_CONNECTION_FAILURE`, `DATA_ACCESS_CONFIG_CHANGED`, `DBFS_COMPONENT_UNHEALTHY`, `DBR_IMAGE_RESOLUTION_FAILURE`, `DISASTER_RECOVERY_REPLICATION`, `DNS_RESOLUTION_ERROR`, `DOCKER_CONTAINER_CREATION_EXCEPTION`, `DOCKER_IMAGE_PULL_FAILURE`, `DOCKER_IMAGE_TOO_LARGE_FOR_INSTANCE_EXCEPTION`, `DOCKER_INVALID_OS_EXCEPTION`, `DRIVER_EVICTION`, `DRIVER_LAUNCH_TIMEOUT`, `DRIVER_NODE_UNREACHABLE`, `DRIVER_OUT_OF_DISK`, `DRIVER_OUT_OF_MEMORY`, `DRIVER_POD_CREATION_FAILURE`, `DRIVER_UNEXPECTED_FAILURE`, `DRIVER_UNHEALTHY`, `DRIVER_UNREACHABLE`, `DRIVER_UNRESPONSIVE`, `DYNAMIC_SPARK_CONF_SIZE_EXCEEDED`, `EOS_SPARK_IMAGE`, `EXECUTION_COMPONENT_UNHEALTHY`, `EXECUTOR_POD_UNSCHEDULED`, `GCP_API_RATE_QUOTA_EXCEEDED`, `GCP_DENIED_BY_ORG_POLICY`, `GCP_FORBIDDEN`, `GCP_IAM_TIMEOUT`, `GCP_INACCESSIBLE_KMS_KEY_FAILURE`, `GCP_INSUFFICIENT_CAPACITY`, `GCP_IP_SPACE_EXHAUSTED`, `GCP_KMS_KEY_PERMISSION_DENIED`, `GCP_NOT_FOUND`, `GCP_QUOTA_EXCEEDED`, `GCP_RESOURCE_QUOTA_EXCEEDED`, `GCP_SERVICE_ACCOUNT_ACCESS_DENIED`, `GCP_SERVICE_ACCOUNT_DELETED`, `GCP_SERVICE_ACCOUNT_NOT_FOUND`, `GCP_SUBNET_NOT_READY`, `GCP_TRUSTED_IMAGE_PROJECTS_VIOLATED`, `GKE_BASED_CLUSTER_TERMINATION`, `GLOBAL_INIT_SCRIPT_FAILURE`, `HIVE_METASTORE_PROVISIONING_FAILURE`, `IMAGE_PULL_PERMISSION_DENIED`, `INACTIVITY`, `INIT_CONTAINER_NOT_FINISHED`, `INIT_SCRIPT_FAILURE`, `INSTANCE_POOL_CLUSTER_FAILURE`, `INSTANCE_POOL_MAX_CAPACITY_REACHED`, `INSTANCE_POOL_NOT_FOUND`, `INSTANCE_UNREACHABLE`, `INSTANCE_UNREACHABLE_DUE_TO_MISCONFIG`, `INTERNAL_CAPACITY_FAILURE`, `INTERNAL_ERROR`, `INVALID_ARGUMENT`, `INVALID_AWS_PARAMETER`, `INVALID_INSTANCE_PLACEMENT_PROTOCOL`, `INVALID_SPARK_IMAGE`, `INVALID_WORKER_IMAGE_FAILURE`, `IN_PENALTY_BOX`, `IP_EXHAUSTION_FAILURE`, `JOB_FINISHED`, `K8S_ACTIVE_POD_QUOTA_EXCEEDED`, `K8S_AUTOSCALING_FAILURE`, `K8S_DBR_CLUSTER_LAUNCH_TIMEOUT`, `LAZY_ALLOCATION_TIMEOUT`, `MAINTENANCE_MODE`, `METASTORE_COMPONENT_UNHEALTHY`, `NEPHOS_RESOURCE_MANAGEMENT`, `NETVISOR_SETUP_TIMEOUT`, `NETWORK_CHECK_CONTROL_PLANE_FAILURE`, `NETWORK_CHECK_CONTROL_PLANE_FAILURE_DUE_TO_MISCONFIG`, `NETWORK_CHECK_DNS_SERVER_FAILURE`, `NETWORK_CHECK_DNS_SERVER_FAILURE_DUE_TO_MISCONFIG`, `NETWORK_CHECK_METADATA_ENDPOINT_FAILURE`, `NETWORK_CHECK_METADATA_ENDPOINT_FAILURE_DUE_TO_MISCONFIG`, `NETWORK_CHECK_MULTIPLE_COMPONENTS_FAILURE`, `NETWORK_CHECK_MULTIPLE_COMPONENTS_FAILURE_DUE_TO_MISCONFIG`, `NETWORK_CHECK_NIC_FAILURE`, `NETWORK_CHECK_NIC_FAILURE_DUE_TO_MISCONFIG`, `NETWORK_CHECK_STORAGE_FAILURE`, `NETWORK_CHECK_STORAGE_FAILURE_DUE_TO_MISCONFIG`, `NETWORK_CONFIGURATION_FAILURE`, `NFS_MOUNT_FAILURE`, `NO_MATCHED_K8S`, `NO_MATCHED_K8S_TESTING_TAG`, `NPIP_TUNNEL_SETUP_FAILURE`, `NPIP_TUNNEL_TOKEN_FAILURE`, `POD_ASSIGNMENT_FAILURE`, `POD_SCHEDULING_FAILURE`, `REQUEST_REJECTED`, `REQUEST_THROTTLED`, `RESOURCE_USAGE_BLOCKED`, `SECRET_CREATION_FAILURE`, `SECRET_PERMISSION_DENIED`, `SECRET_RESOLUTION_ERROR`, `SECURITY_DAEMON_REGISTRATION_EXCEPTION`, `SELF_BOOTSTRAP_FAILURE`, `SERVERLESS_LONG_RUNNING_TERMINATED`, `SKIPPED_SLOW_NODES`, `SLOW_IMAGE_DOWNLOAD`, `SPARK_ERROR`, `SPARK_IMAGE_DOWNLOAD_FAILURE`, `SPARK_IMAGE_DOWNLOAD_THROTTLED`, `SPARK_IMAGE_NOT_FOUND`, `SPARK_STARTUP_FAILURE`, `SPOT_INSTANCE_TERMINATION`, `SSH_BOOTSTRAP_FAILURE`, `STORAGE_DOWNLOAD_FAILURE`, `STORAGE_DOWNLOAD_FAILURE_DUE_TO_MISCONFIG`, `STORAGE_DOWNLOAD_FAILURE_SLOW`, `STORAGE_DOWNLOAD_FAILURE_THROTTLED`, `STS_CLIENT_SETUP_FAILURE`, `SUBNET_EXHAUSTED_FAILURE`, `TEMPORARILY_UNAVAILABLE`, `TRIAL_EXPIRED`, `UNEXPECTED_LAUNCH_FAILURE`, `UNEXPECTED_POD_RECREATION`, `UNKNOWN`, `UNSUPPORTED_INSTANCE_TYPE`, `UPDATE_INSTANCE_PROFILE_FAILURE`, `USAGE_POLICY_ENTITLEMENT_DENIED`, `USER_INITIATED_VM_TERMINATION`, `USER_REQUEST`, `WORKER_SETUP_FAILURE`, `WORKSPACE_CANCELLED_ERROR`, `WORKSPACE_CONFIGURATION_ERROR`, `WORKSPACE_UPDATE`: + case `ABUSE_DETECTED`, `ACCESS_TOKEN_FAILURE`, `ALLOCATION_TIMEOUT`, `ALLOCATION_TIMEOUT_NODE_DAEMON_NOT_READY`, `ALLOCATION_TIMEOUT_NO_HEALTHY_AND_WARMED_UP_CLUSTERS`, `ALLOCATION_TIMEOUT_NO_HEALTHY_CLUSTERS`, `ALLOCATION_TIMEOUT_NO_MATCHED_CLUSTERS`, `ALLOCATION_TIMEOUT_NO_READY_CLUSTERS`, `ALLOCATION_TIMEOUT_NO_UNALLOCATED_CLUSTERS`, `ALLOCATION_TIMEOUT_NO_WARMED_UP_CLUSTERS`, `ATTACH_PROJECT_FAILURE`, `AWS_AUTHORIZATION_FAILURE`, `AWS_INACCESSIBLE_KMS_KEY_FAILURE`, `AWS_INSTANCE_PROFILE_UPDATE_FAILURE`, `AWS_INSUFFICIENT_FREE_ADDRESSES_IN_SUBNET_FAILURE`, `AWS_INSUFFICIENT_INSTANCE_CAPACITY_FAILURE`, `AWS_INVALID_KEY_PAIR`, `AWS_INVALID_KMS_KEY_STATE`, `AWS_MAX_SPOT_INSTANCE_COUNT_EXCEEDED_FAILURE`, `AWS_REQUEST_LIMIT_EXCEEDED`, `AWS_RESOURCE_QUOTA_EXCEEDED`, `AWS_UNSUPPORTED_FAILURE`, `AZURE_BYOK_KEY_PERMISSION_FAILURE`, `AZURE_EPHEMERAL_DISK_FAILURE`, `AZURE_INVALID_DEPLOYMENT_TEMPLATE`, `AZURE_OPERATION_NOT_ALLOWED_EXCEPTION`, `AZURE_PACKED_DEPLOYMENT_PARTIAL_FAILURE`, `AZURE_QUOTA_EXCEEDED_EXCEPTION`, `AZURE_RESOURCE_MANAGER_THROTTLING`, `AZURE_RESOURCE_PROVIDER_THROTTLING`, `AZURE_UNEXPECTED_DEPLOYMENT_TEMPLATE_FAILURE`, `AZURE_VM_EXTENSION_FAILURE`, `AZURE_VNET_CONFIGURATION_FAILURE`, `BOOTSTRAP_TIMEOUT`, `BOOTSTRAP_TIMEOUT_CLOUD_PROVIDER_EXCEPTION`, `BOOTSTRAP_TIMEOUT_DUE_TO_MISCONFIG`, `BUDGET_POLICY_LIMIT_ENFORCEMENT_ACTIVATED`, `BUDGET_POLICY_RESOLUTION_FAILURE`, `CLOUD_ACCOUNT_POD_QUOTA_EXCEEDED`, `CLOUD_ACCOUNT_SETUP_FAILURE`, `CLOUD_OPERATION_CANCELLED`, `CLOUD_PROVIDER_DISK_SETUP_FAILURE`, `CLOUD_PROVIDER_INSTANCE_NOT_LAUNCHED`, `CLOUD_PROVIDER_LAUNCH_FAILURE`, `CLOUD_PROVIDER_LAUNCH_FAILURE_DUE_TO_MISCONFIG`, `CLOUD_PROVIDER_RESOURCE_STOCKOUT`, `CLOUD_PROVIDER_RESOURCE_STOCKOUT_DUE_TO_MISCONFIG`, `CLOUD_PROVIDER_SHUTDOWN`, `CLUSTER_OPERATION_THROTTLED`, `CLUSTER_OPERATION_TIMEOUT`, `COMMUNICATION_LOST`, `CONTAINER_LAUNCH_FAILURE`, `CONTROL_PLANE_CONNECTION_FAILURE`, `CONTROL_PLANE_CONNECTION_FAILURE_DUE_TO_MISCONFIG`, `CONTROL_PLANE_REQUEST_FAILURE`, `CONTROL_PLANE_REQUEST_FAILURE_DUE_TO_MISCONFIG`, `DATABASE_CONNECTION_FAILURE`, `DATA_ACCESS_CONFIG_CHANGED`, `DBFS_COMPONENT_UNHEALTHY`, `DBR_IMAGE_RESOLUTION_FAILURE`, `DISASTER_RECOVERY_REPLICATION`, `DNS_RESOLUTION_ERROR`, `DOCKER_CONTAINER_CREATION_EXCEPTION`, `DOCKER_IMAGE_PULL_FAILURE`, `DOCKER_IMAGE_TOO_LARGE_FOR_INSTANCE_EXCEPTION`, `DOCKER_INVALID_OS_EXCEPTION`, `DRIVER_EVICTION`, `DRIVER_LAUNCH_TIMEOUT`, `DRIVER_NODE_UNREACHABLE`, `DRIVER_OUT_OF_DISK`, `DRIVER_OUT_OF_MEMORY`, `DRIVER_POD_CREATION_FAILURE`, `DRIVER_UNEXPECTED_FAILURE`, `DRIVER_UNHEALTHY`, `DRIVER_UNREACHABLE`, `DRIVER_UNRESPONSIVE`, `DYNAMIC_SPARK_CONF_SIZE_EXCEEDED`, `EOS_SPARK_IMAGE`, `EXECUTION_COMPONENT_UNHEALTHY`, `EXECUTOR_POD_UNSCHEDULED`, `GCP_API_RATE_QUOTA_EXCEEDED`, `GCP_DENIED_BY_ORG_POLICY`, `GCP_FORBIDDEN`, `GCP_IAM_TIMEOUT`, `GCP_INACCESSIBLE_KMS_KEY_FAILURE`, `GCP_INSUFFICIENT_CAPACITY`, `GCP_IP_SPACE_EXHAUSTED`, `GCP_KMS_KEY_PERMISSION_DENIED`, `GCP_NOT_FOUND`, `GCP_QUOTA_EXCEEDED`, `GCP_RESOURCE_QUOTA_EXCEEDED`, `GCP_SERVICE_ACCOUNT_ACCESS_DENIED`, `GCP_SERVICE_ACCOUNT_DELETED`, `GCP_SERVICE_ACCOUNT_NOT_FOUND`, `GCP_SUBNET_NOT_READY`, `GCP_TRUSTED_IMAGE_PROJECTS_VIOLATED`, `GKE_BASED_CLUSTER_TERMINATION`, `GLOBAL_INIT_SCRIPT_FAILURE`, `HIVE_METASTORE_PROVISIONING_FAILURE`, `IMAGE_PULL_PERMISSION_DENIED`, `INACTIVITY`, `INIT_CONTAINER_NOT_FINISHED`, `INIT_SCRIPT_FAILURE`, `INSTANCE_POOL_CLUSTER_FAILURE`, `INSTANCE_POOL_MAX_CAPACITY_REACHED`, `INSTANCE_POOL_NOT_FOUND`, `INSTANCE_UNREACHABLE`, `INSTANCE_UNREACHABLE_DUE_TO_MISCONFIG`, `INTERNAL_CAPACITY_FAILURE`, `INTERNAL_ERROR`, `INVALID_ARGUMENT`, `INVALID_AWS_PARAMETER`, `INVALID_INSTANCE_PLACEMENT_PROTOCOL`, `INVALID_SPARK_IMAGE`, `INVALID_WORKER_IMAGE_FAILURE`, `IN_PENALTY_BOX`, `IP_EXHAUSTION_FAILURE`, `JOB_FINISHED`, `K8S_ACTIVE_POD_QUOTA_EXCEEDED`, `K8S_AUTOSCALING_FAILURE`, `K8S_DBR_CLUSTER_LAUNCH_TIMEOUT`, `LAZY_ALLOCATION_TIMEOUT`, `MAINTENANCE_MODE`, `METASTORE_COMPONENT_UNHEALTHY`, `NEPHOS_RESOURCE_MANAGEMENT`, `NETVISOR_SETUP_TIMEOUT`, `NETWORK_CHECK_CONTROL_PLANE_FAILURE`, `NETWORK_CHECK_CONTROL_PLANE_FAILURE_DUE_TO_MISCONFIG`, `NETWORK_CHECK_DNS_SERVER_FAILURE`, `NETWORK_CHECK_DNS_SERVER_FAILURE_DUE_TO_MISCONFIG`, `NETWORK_CHECK_METADATA_ENDPOINT_FAILURE`, `NETWORK_CHECK_METADATA_ENDPOINT_FAILURE_DUE_TO_MISCONFIG`, `NETWORK_CHECK_MULTIPLE_COMPONENTS_FAILURE`, `NETWORK_CHECK_MULTIPLE_COMPONENTS_FAILURE_DUE_TO_MISCONFIG`, `NETWORK_CHECK_NIC_FAILURE`, `NETWORK_CHECK_NIC_FAILURE_DUE_TO_MISCONFIG`, `NETWORK_CHECK_STORAGE_FAILURE`, `NETWORK_CHECK_STORAGE_FAILURE_DUE_TO_MISCONFIG`, `NETWORK_CONFIGURATION_FAILURE`, `NFS_MOUNT_FAILURE`, `NO_MATCHED_K8S`, `NO_MATCHED_K8S_TESTING_TAG`, `NPIP_TUNNEL_SETUP_FAILURE`, `NPIP_TUNNEL_TOKEN_FAILURE`, `POD_ASSIGNMENT_FAILURE`, `POD_SCHEDULING_FAILURE`, `RATE_LIMITED`, `REQUEST_REJECTED`, `REQUEST_THROTTLED`, `RESOURCE_USAGE_BLOCKED`, `SECRET_CREATION_FAILURE`, `SECRET_PERMISSION_DENIED`, `SECRET_RESOLUTION_ERROR`, `SECURITY_DAEMON_REGISTRATION_EXCEPTION`, `SELF_BOOTSTRAP_FAILURE`, `SERVERLESS_LONG_RUNNING_TERMINATED`, `SKIPPED_SLOW_NODES`, `SLOW_IMAGE_DOWNLOAD`, `SPARK_ERROR`, `SPARK_IMAGE_DOWNLOAD_FAILURE`, `SPARK_IMAGE_DOWNLOAD_THROTTLED`, `SPARK_IMAGE_NOT_FOUND`, `SPARK_STARTUP_FAILURE`, `SPOT_INSTANCE_TERMINATION`, `SSH_BOOTSTRAP_FAILURE`, `STORAGE_DOWNLOAD_FAILURE`, `STORAGE_DOWNLOAD_FAILURE_DUE_TO_MISCONFIG`, `STORAGE_DOWNLOAD_FAILURE_SLOW`, `STORAGE_DOWNLOAD_FAILURE_THROTTLED`, `STS_CLIENT_SETUP_FAILURE`, `SUBNET_EXHAUSTED_FAILURE`, `TEMPORARILY_UNAVAILABLE`, `TRIAL_EXPIRED`, `UNEXPECTED_LAUNCH_FAILURE`, `UNEXPECTED_POD_RECREATION`, `UNKNOWN`, `UNSUPPORTED_INSTANCE_TYPE`, `UPDATE_INSTANCE_PROFILE_FAILURE`, `USAGE_POLICY_ENTITLEMENT_DENIED`, `USER_INITIATED_VM_TERMINATION`, `USER_REQUEST`, `WORKER_SETUP_FAILURE`, `WORKSPACE_CANCELLED_ERROR`, `WORKSPACE_CONFIGURATION_ERROR`, `WORKSPACE_UPDATE`: *f = TerminationReasonCode(v) return nil default: - return fmt.Errorf(`value "%s" is not one of "ABUSE_DETECTED", "ACCESS_TOKEN_FAILURE", "ALLOCATION_TIMEOUT", "ALLOCATION_TIMEOUT_NODE_DAEMON_NOT_READY", "ALLOCATION_TIMEOUT_NO_HEALTHY_AND_WARMED_UP_CLUSTERS", "ALLOCATION_TIMEOUT_NO_HEALTHY_CLUSTERS", "ALLOCATION_TIMEOUT_NO_MATCHED_CLUSTERS", "ALLOCATION_TIMEOUT_NO_READY_CLUSTERS", "ALLOCATION_TIMEOUT_NO_UNALLOCATED_CLUSTERS", "ALLOCATION_TIMEOUT_NO_WARMED_UP_CLUSTERS", "ATTACH_PROJECT_FAILURE", "AWS_AUTHORIZATION_FAILURE", "AWS_INACCESSIBLE_KMS_KEY_FAILURE", "AWS_INSTANCE_PROFILE_UPDATE_FAILURE", "AWS_INSUFFICIENT_FREE_ADDRESSES_IN_SUBNET_FAILURE", "AWS_INSUFFICIENT_INSTANCE_CAPACITY_FAILURE", "AWS_INVALID_KEY_PAIR", "AWS_INVALID_KMS_KEY_STATE", "AWS_MAX_SPOT_INSTANCE_COUNT_EXCEEDED_FAILURE", "AWS_REQUEST_LIMIT_EXCEEDED", "AWS_RESOURCE_QUOTA_EXCEEDED", "AWS_UNSUPPORTED_FAILURE", "AZURE_BYOK_KEY_PERMISSION_FAILURE", "AZURE_EPHEMERAL_DISK_FAILURE", "AZURE_INVALID_DEPLOYMENT_TEMPLATE", "AZURE_OPERATION_NOT_ALLOWED_EXCEPTION", "AZURE_PACKED_DEPLOYMENT_PARTIAL_FAILURE", "AZURE_QUOTA_EXCEEDED_EXCEPTION", "AZURE_RESOURCE_MANAGER_THROTTLING", "AZURE_RESOURCE_PROVIDER_THROTTLING", "AZURE_UNEXPECTED_DEPLOYMENT_TEMPLATE_FAILURE", "AZURE_VM_EXTENSION_FAILURE", "AZURE_VNET_CONFIGURATION_FAILURE", "BOOTSTRAP_TIMEOUT", "BOOTSTRAP_TIMEOUT_CLOUD_PROVIDER_EXCEPTION", "BOOTSTRAP_TIMEOUT_DUE_TO_MISCONFIG", "BUDGET_POLICY_LIMIT_ENFORCEMENT_ACTIVATED", "BUDGET_POLICY_RESOLUTION_FAILURE", "CLOUD_ACCOUNT_POD_QUOTA_EXCEEDED", "CLOUD_ACCOUNT_SETUP_FAILURE", "CLOUD_OPERATION_CANCELLED", "CLOUD_PROVIDER_DISK_SETUP_FAILURE", "CLOUD_PROVIDER_INSTANCE_NOT_LAUNCHED", "CLOUD_PROVIDER_LAUNCH_FAILURE", "CLOUD_PROVIDER_LAUNCH_FAILURE_DUE_TO_MISCONFIG", "CLOUD_PROVIDER_RESOURCE_STOCKOUT", "CLOUD_PROVIDER_RESOURCE_STOCKOUT_DUE_TO_MISCONFIG", "CLOUD_PROVIDER_SHUTDOWN", "CLUSTER_OPERATION_THROTTLED", "CLUSTER_OPERATION_TIMEOUT", "COMMUNICATION_LOST", "CONTAINER_LAUNCH_FAILURE", "CONTROL_PLANE_CONNECTION_FAILURE", "CONTROL_PLANE_CONNECTION_FAILURE_DUE_TO_MISCONFIG", "CONTROL_PLANE_REQUEST_FAILURE", "CONTROL_PLANE_REQUEST_FAILURE_DUE_TO_MISCONFIG", "DATABASE_CONNECTION_FAILURE", "DATA_ACCESS_CONFIG_CHANGED", "DBFS_COMPONENT_UNHEALTHY", "DBR_IMAGE_RESOLUTION_FAILURE", "DISASTER_RECOVERY_REPLICATION", "DNS_RESOLUTION_ERROR", "DOCKER_CONTAINER_CREATION_EXCEPTION", "DOCKER_IMAGE_PULL_FAILURE", "DOCKER_IMAGE_TOO_LARGE_FOR_INSTANCE_EXCEPTION", "DOCKER_INVALID_OS_EXCEPTION", "DRIVER_EVICTION", "DRIVER_LAUNCH_TIMEOUT", "DRIVER_NODE_UNREACHABLE", "DRIVER_OUT_OF_DISK", "DRIVER_OUT_OF_MEMORY", "DRIVER_POD_CREATION_FAILURE", "DRIVER_UNEXPECTED_FAILURE", "DRIVER_UNHEALTHY", "DRIVER_UNREACHABLE", "DRIVER_UNRESPONSIVE", "DYNAMIC_SPARK_CONF_SIZE_EXCEEDED", "EOS_SPARK_IMAGE", "EXECUTION_COMPONENT_UNHEALTHY", "EXECUTOR_POD_UNSCHEDULED", "GCP_API_RATE_QUOTA_EXCEEDED", "GCP_DENIED_BY_ORG_POLICY", "GCP_FORBIDDEN", "GCP_IAM_TIMEOUT", "GCP_INACCESSIBLE_KMS_KEY_FAILURE", "GCP_INSUFFICIENT_CAPACITY", "GCP_IP_SPACE_EXHAUSTED", "GCP_KMS_KEY_PERMISSION_DENIED", "GCP_NOT_FOUND", "GCP_QUOTA_EXCEEDED", "GCP_RESOURCE_QUOTA_EXCEEDED", "GCP_SERVICE_ACCOUNT_ACCESS_DENIED", "GCP_SERVICE_ACCOUNT_DELETED", "GCP_SERVICE_ACCOUNT_NOT_FOUND", "GCP_SUBNET_NOT_READY", "GCP_TRUSTED_IMAGE_PROJECTS_VIOLATED", "GKE_BASED_CLUSTER_TERMINATION", "GLOBAL_INIT_SCRIPT_FAILURE", "HIVE_METASTORE_PROVISIONING_FAILURE", "IMAGE_PULL_PERMISSION_DENIED", "INACTIVITY", "INIT_CONTAINER_NOT_FINISHED", "INIT_SCRIPT_FAILURE", "INSTANCE_POOL_CLUSTER_FAILURE", "INSTANCE_POOL_MAX_CAPACITY_REACHED", "INSTANCE_POOL_NOT_FOUND", "INSTANCE_UNREACHABLE", "INSTANCE_UNREACHABLE_DUE_TO_MISCONFIG", "INTERNAL_CAPACITY_FAILURE", "INTERNAL_ERROR", "INVALID_ARGUMENT", "INVALID_AWS_PARAMETER", "INVALID_INSTANCE_PLACEMENT_PROTOCOL", "INVALID_SPARK_IMAGE", "INVALID_WORKER_IMAGE_FAILURE", "IN_PENALTY_BOX", "IP_EXHAUSTION_FAILURE", "JOB_FINISHED", "K8S_ACTIVE_POD_QUOTA_EXCEEDED", "K8S_AUTOSCALING_FAILURE", "K8S_DBR_CLUSTER_LAUNCH_TIMEOUT", "LAZY_ALLOCATION_TIMEOUT", "MAINTENANCE_MODE", "METASTORE_COMPONENT_UNHEALTHY", "NEPHOS_RESOURCE_MANAGEMENT", "NETVISOR_SETUP_TIMEOUT", "NETWORK_CHECK_CONTROL_PLANE_FAILURE", "NETWORK_CHECK_CONTROL_PLANE_FAILURE_DUE_TO_MISCONFIG", "NETWORK_CHECK_DNS_SERVER_FAILURE", "NETWORK_CHECK_DNS_SERVER_FAILURE_DUE_TO_MISCONFIG", "NETWORK_CHECK_METADATA_ENDPOINT_FAILURE", "NETWORK_CHECK_METADATA_ENDPOINT_FAILURE_DUE_TO_MISCONFIG", "NETWORK_CHECK_MULTIPLE_COMPONENTS_FAILURE", "NETWORK_CHECK_MULTIPLE_COMPONENTS_FAILURE_DUE_TO_MISCONFIG", "NETWORK_CHECK_NIC_FAILURE", "NETWORK_CHECK_NIC_FAILURE_DUE_TO_MISCONFIG", "NETWORK_CHECK_STORAGE_FAILURE", "NETWORK_CHECK_STORAGE_FAILURE_DUE_TO_MISCONFIG", "NETWORK_CONFIGURATION_FAILURE", "NFS_MOUNT_FAILURE", "NO_MATCHED_K8S", "NO_MATCHED_K8S_TESTING_TAG", "NPIP_TUNNEL_SETUP_FAILURE", "NPIP_TUNNEL_TOKEN_FAILURE", "POD_ASSIGNMENT_FAILURE", "POD_SCHEDULING_FAILURE", "REQUEST_REJECTED", "REQUEST_THROTTLED", "RESOURCE_USAGE_BLOCKED", "SECRET_CREATION_FAILURE", "SECRET_PERMISSION_DENIED", "SECRET_RESOLUTION_ERROR", "SECURITY_DAEMON_REGISTRATION_EXCEPTION", "SELF_BOOTSTRAP_FAILURE", "SERVERLESS_LONG_RUNNING_TERMINATED", "SKIPPED_SLOW_NODES", "SLOW_IMAGE_DOWNLOAD", "SPARK_ERROR", "SPARK_IMAGE_DOWNLOAD_FAILURE", "SPARK_IMAGE_DOWNLOAD_THROTTLED", "SPARK_IMAGE_NOT_FOUND", "SPARK_STARTUP_FAILURE", "SPOT_INSTANCE_TERMINATION", "SSH_BOOTSTRAP_FAILURE", "STORAGE_DOWNLOAD_FAILURE", "STORAGE_DOWNLOAD_FAILURE_DUE_TO_MISCONFIG", "STORAGE_DOWNLOAD_FAILURE_SLOW", "STORAGE_DOWNLOAD_FAILURE_THROTTLED", "STS_CLIENT_SETUP_FAILURE", "SUBNET_EXHAUSTED_FAILURE", "TEMPORARILY_UNAVAILABLE", "TRIAL_EXPIRED", "UNEXPECTED_LAUNCH_FAILURE", "UNEXPECTED_POD_RECREATION", "UNKNOWN", "UNSUPPORTED_INSTANCE_TYPE", "UPDATE_INSTANCE_PROFILE_FAILURE", "USAGE_POLICY_ENTITLEMENT_DENIED", "USER_INITIATED_VM_TERMINATION", "USER_REQUEST", "WORKER_SETUP_FAILURE", "WORKSPACE_CANCELLED_ERROR", "WORKSPACE_CONFIGURATION_ERROR", "WORKSPACE_UPDATE"`, v) + return fmt.Errorf(`value "%s" is not one of "ABUSE_DETECTED", "ACCESS_TOKEN_FAILURE", "ALLOCATION_TIMEOUT", "ALLOCATION_TIMEOUT_NODE_DAEMON_NOT_READY", "ALLOCATION_TIMEOUT_NO_HEALTHY_AND_WARMED_UP_CLUSTERS", "ALLOCATION_TIMEOUT_NO_HEALTHY_CLUSTERS", "ALLOCATION_TIMEOUT_NO_MATCHED_CLUSTERS", "ALLOCATION_TIMEOUT_NO_READY_CLUSTERS", "ALLOCATION_TIMEOUT_NO_UNALLOCATED_CLUSTERS", "ALLOCATION_TIMEOUT_NO_WARMED_UP_CLUSTERS", "ATTACH_PROJECT_FAILURE", "AWS_AUTHORIZATION_FAILURE", "AWS_INACCESSIBLE_KMS_KEY_FAILURE", "AWS_INSTANCE_PROFILE_UPDATE_FAILURE", "AWS_INSUFFICIENT_FREE_ADDRESSES_IN_SUBNET_FAILURE", "AWS_INSUFFICIENT_INSTANCE_CAPACITY_FAILURE", "AWS_INVALID_KEY_PAIR", "AWS_INVALID_KMS_KEY_STATE", "AWS_MAX_SPOT_INSTANCE_COUNT_EXCEEDED_FAILURE", "AWS_REQUEST_LIMIT_EXCEEDED", "AWS_RESOURCE_QUOTA_EXCEEDED", "AWS_UNSUPPORTED_FAILURE", "AZURE_BYOK_KEY_PERMISSION_FAILURE", "AZURE_EPHEMERAL_DISK_FAILURE", "AZURE_INVALID_DEPLOYMENT_TEMPLATE", "AZURE_OPERATION_NOT_ALLOWED_EXCEPTION", "AZURE_PACKED_DEPLOYMENT_PARTIAL_FAILURE", "AZURE_QUOTA_EXCEEDED_EXCEPTION", "AZURE_RESOURCE_MANAGER_THROTTLING", "AZURE_RESOURCE_PROVIDER_THROTTLING", "AZURE_UNEXPECTED_DEPLOYMENT_TEMPLATE_FAILURE", "AZURE_VM_EXTENSION_FAILURE", "AZURE_VNET_CONFIGURATION_FAILURE", "BOOTSTRAP_TIMEOUT", "BOOTSTRAP_TIMEOUT_CLOUD_PROVIDER_EXCEPTION", "BOOTSTRAP_TIMEOUT_DUE_TO_MISCONFIG", "BUDGET_POLICY_LIMIT_ENFORCEMENT_ACTIVATED", "BUDGET_POLICY_RESOLUTION_FAILURE", "CLOUD_ACCOUNT_POD_QUOTA_EXCEEDED", "CLOUD_ACCOUNT_SETUP_FAILURE", "CLOUD_OPERATION_CANCELLED", "CLOUD_PROVIDER_DISK_SETUP_FAILURE", "CLOUD_PROVIDER_INSTANCE_NOT_LAUNCHED", "CLOUD_PROVIDER_LAUNCH_FAILURE", "CLOUD_PROVIDER_LAUNCH_FAILURE_DUE_TO_MISCONFIG", "CLOUD_PROVIDER_RESOURCE_STOCKOUT", "CLOUD_PROVIDER_RESOURCE_STOCKOUT_DUE_TO_MISCONFIG", "CLOUD_PROVIDER_SHUTDOWN", "CLUSTER_OPERATION_THROTTLED", "CLUSTER_OPERATION_TIMEOUT", "COMMUNICATION_LOST", "CONTAINER_LAUNCH_FAILURE", "CONTROL_PLANE_CONNECTION_FAILURE", "CONTROL_PLANE_CONNECTION_FAILURE_DUE_TO_MISCONFIG", "CONTROL_PLANE_REQUEST_FAILURE", "CONTROL_PLANE_REQUEST_FAILURE_DUE_TO_MISCONFIG", "DATABASE_CONNECTION_FAILURE", "DATA_ACCESS_CONFIG_CHANGED", "DBFS_COMPONENT_UNHEALTHY", "DBR_IMAGE_RESOLUTION_FAILURE", "DISASTER_RECOVERY_REPLICATION", "DNS_RESOLUTION_ERROR", "DOCKER_CONTAINER_CREATION_EXCEPTION", "DOCKER_IMAGE_PULL_FAILURE", "DOCKER_IMAGE_TOO_LARGE_FOR_INSTANCE_EXCEPTION", "DOCKER_INVALID_OS_EXCEPTION", "DRIVER_EVICTION", "DRIVER_LAUNCH_TIMEOUT", "DRIVER_NODE_UNREACHABLE", "DRIVER_OUT_OF_DISK", "DRIVER_OUT_OF_MEMORY", "DRIVER_POD_CREATION_FAILURE", "DRIVER_UNEXPECTED_FAILURE", "DRIVER_UNHEALTHY", "DRIVER_UNREACHABLE", "DRIVER_UNRESPONSIVE", "DYNAMIC_SPARK_CONF_SIZE_EXCEEDED", "EOS_SPARK_IMAGE", "EXECUTION_COMPONENT_UNHEALTHY", "EXECUTOR_POD_UNSCHEDULED", "GCP_API_RATE_QUOTA_EXCEEDED", "GCP_DENIED_BY_ORG_POLICY", "GCP_FORBIDDEN", "GCP_IAM_TIMEOUT", "GCP_INACCESSIBLE_KMS_KEY_FAILURE", "GCP_INSUFFICIENT_CAPACITY", "GCP_IP_SPACE_EXHAUSTED", "GCP_KMS_KEY_PERMISSION_DENIED", "GCP_NOT_FOUND", "GCP_QUOTA_EXCEEDED", "GCP_RESOURCE_QUOTA_EXCEEDED", "GCP_SERVICE_ACCOUNT_ACCESS_DENIED", "GCP_SERVICE_ACCOUNT_DELETED", "GCP_SERVICE_ACCOUNT_NOT_FOUND", "GCP_SUBNET_NOT_READY", "GCP_TRUSTED_IMAGE_PROJECTS_VIOLATED", "GKE_BASED_CLUSTER_TERMINATION", "GLOBAL_INIT_SCRIPT_FAILURE", "HIVE_METASTORE_PROVISIONING_FAILURE", "IMAGE_PULL_PERMISSION_DENIED", "INACTIVITY", "INIT_CONTAINER_NOT_FINISHED", "INIT_SCRIPT_FAILURE", "INSTANCE_POOL_CLUSTER_FAILURE", "INSTANCE_POOL_MAX_CAPACITY_REACHED", "INSTANCE_POOL_NOT_FOUND", "INSTANCE_UNREACHABLE", "INSTANCE_UNREACHABLE_DUE_TO_MISCONFIG", "INTERNAL_CAPACITY_FAILURE", "INTERNAL_ERROR", "INVALID_ARGUMENT", "INVALID_AWS_PARAMETER", "INVALID_INSTANCE_PLACEMENT_PROTOCOL", "INVALID_SPARK_IMAGE", "INVALID_WORKER_IMAGE_FAILURE", "IN_PENALTY_BOX", "IP_EXHAUSTION_FAILURE", "JOB_FINISHED", "K8S_ACTIVE_POD_QUOTA_EXCEEDED", "K8S_AUTOSCALING_FAILURE", "K8S_DBR_CLUSTER_LAUNCH_TIMEOUT", "LAZY_ALLOCATION_TIMEOUT", "MAINTENANCE_MODE", "METASTORE_COMPONENT_UNHEALTHY", "NEPHOS_RESOURCE_MANAGEMENT", "NETVISOR_SETUP_TIMEOUT", "NETWORK_CHECK_CONTROL_PLANE_FAILURE", "NETWORK_CHECK_CONTROL_PLANE_FAILURE_DUE_TO_MISCONFIG", "NETWORK_CHECK_DNS_SERVER_FAILURE", "NETWORK_CHECK_DNS_SERVER_FAILURE_DUE_TO_MISCONFIG", "NETWORK_CHECK_METADATA_ENDPOINT_FAILURE", "NETWORK_CHECK_METADATA_ENDPOINT_FAILURE_DUE_TO_MISCONFIG", "NETWORK_CHECK_MULTIPLE_COMPONENTS_FAILURE", "NETWORK_CHECK_MULTIPLE_COMPONENTS_FAILURE_DUE_TO_MISCONFIG", "NETWORK_CHECK_NIC_FAILURE", "NETWORK_CHECK_NIC_FAILURE_DUE_TO_MISCONFIG", "NETWORK_CHECK_STORAGE_FAILURE", "NETWORK_CHECK_STORAGE_FAILURE_DUE_TO_MISCONFIG", "NETWORK_CONFIGURATION_FAILURE", "NFS_MOUNT_FAILURE", "NO_MATCHED_K8S", "NO_MATCHED_K8S_TESTING_TAG", "NPIP_TUNNEL_SETUP_FAILURE", "NPIP_TUNNEL_TOKEN_FAILURE", "POD_ASSIGNMENT_FAILURE", "POD_SCHEDULING_FAILURE", "RATE_LIMITED", "REQUEST_REJECTED", "REQUEST_THROTTLED", "RESOURCE_USAGE_BLOCKED", "SECRET_CREATION_FAILURE", "SECRET_PERMISSION_DENIED", "SECRET_RESOLUTION_ERROR", "SECURITY_DAEMON_REGISTRATION_EXCEPTION", "SELF_BOOTSTRAP_FAILURE", "SERVERLESS_LONG_RUNNING_TERMINATED", "SKIPPED_SLOW_NODES", "SLOW_IMAGE_DOWNLOAD", "SPARK_ERROR", "SPARK_IMAGE_DOWNLOAD_FAILURE", "SPARK_IMAGE_DOWNLOAD_THROTTLED", "SPARK_IMAGE_NOT_FOUND", "SPARK_STARTUP_FAILURE", "SPOT_INSTANCE_TERMINATION", "SSH_BOOTSTRAP_FAILURE", "STORAGE_DOWNLOAD_FAILURE", "STORAGE_DOWNLOAD_FAILURE_DUE_TO_MISCONFIG", "STORAGE_DOWNLOAD_FAILURE_SLOW", "STORAGE_DOWNLOAD_FAILURE_THROTTLED", "STS_CLIENT_SETUP_FAILURE", "SUBNET_EXHAUSTED_FAILURE", "TEMPORARILY_UNAVAILABLE", "TRIAL_EXPIRED", "UNEXPECTED_LAUNCH_FAILURE", "UNEXPECTED_POD_RECREATION", "UNKNOWN", "UNSUPPORTED_INSTANCE_TYPE", "UPDATE_INSTANCE_PROFILE_FAILURE", "USAGE_POLICY_ENTITLEMENT_DENIED", "USER_INITIATED_VM_TERMINATION", "USER_REQUEST", "WORKER_SETUP_FAILURE", "WORKSPACE_CANCELLED_ERROR", "WORKSPACE_CONFIGURATION_ERROR", "WORKSPACE_UPDATE"`, v) } } @@ -5964,6 +5966,7 @@ func (f *TerminationReasonCode) Values() []TerminationReasonCode { TerminationReasonCodeNpipTunnelTokenFailure, TerminationReasonCodePodAssignmentFailure, TerminationReasonCodePodSchedulingFailure, + TerminationReasonCodeRateLimited, TerminationReasonCodeRequestRejected, TerminationReasonCodeRequestThrottled, TerminationReasonCodeResourceUsageBlocked, diff --git a/service/database/model.go b/service/database/model.go old mode 100755 new mode 100644 index 10d279bf3..8de75138a --- a/service/database/model.go +++ b/service/database/model.go @@ -114,24 +114,46 @@ type DatabaseInstance struct { // create and update responses. CustomTags []CustomTag `json:"custom_tags,omitempty"` // Deprecated. The sku of the instance; this field will always match the - // value of capacity. + // value of capacity. This is an output only field that contains the value + // computed from the input field combined with server side defaults. Use the + // field without the effective_ prefix to set the value. EffectiveCapacity string `json:"effective_capacity,omitempty"` - // The recorded custom tags associated with the instance. + // The recorded custom tags associated with the instance. This is an output + // only field that contains the value computed from the input field combined + // with server side defaults. Use the field without the effective_ prefix to + // set the value. EffectiveCustomTags []CustomTag `json:"effective_custom_tags,omitempty"` - // Whether the instance has PG native password login enabled. + // Whether the instance has PG native password login enabled. This is an + // output only field that contains the value computed from the input field + // combined with server side defaults. Use the field without the effective_ + // prefix to set the value. EffectiveEnablePgNativeLogin bool `json:"effective_enable_pg_native_login,omitempty"` // Whether secondaries serving read-only traffic are enabled. Defaults to - // false. + // false. This is an output only field that contains the value computed from + // the input field combined with server side defaults. Use the field without + // the effective_ prefix to set the value. EffectiveEnableReadableSecondaries bool `json:"effective_enable_readable_secondaries,omitempty"` // The number of nodes in the instance, composed of 1 primary and 0 or more - // secondaries. Defaults to 1 primary and 0 secondaries. + // secondaries. Defaults to 1 primary and 0 secondaries. This is an output + // only field that contains the value computed from the input field combined + // with server side defaults. Use the field without the effective_ prefix to + // set the value. EffectiveNodeCount int `json:"effective_node_count,omitempty"` // The retention window for the instance. This is the time window in days - // for which the historical data is retained. + // for which the historical data is retained. This is an output only field + // that contains the value computed from the input field combined with + // server side defaults. Use the field without the effective_ prefix to set + // the value. EffectiveRetentionWindowInDays int `json:"effective_retention_window_in_days,omitempty"` - // Whether the instance is stopped. + // Whether the instance is stopped. This is an output only field that + // contains the value computed from the input field combined with server + // side defaults. Use the field without the effective_ prefix to set the + // value. EffectiveStopped bool `json:"effective_stopped,omitempty"` - // The policy that is applied to the instance. + // The policy that is applied to the instance. This is an output only field + // that contains the value computed from the input field combined with + // server side defaults. Use the field without the effective_ prefix to set + // the value. EffectiveUsagePolicyId string `json:"effective_usage_policy_id,omitempty"` // Whether to enable PG native password login on the instance. Defaults to // false. @@ -199,7 +221,10 @@ type DatabaseInstanceRef struct { BranchTime string `json:"branch_time,omitempty"` // For a parent ref instance, this is the LSN on the parent instance from // which the instance was created. For a child ref instance, this is the LSN - // on the instance from which the child instance was created. + // on the instance from which the child instance was created. This is an + // output only field that contains the value computed from the input field + // combined with server side defaults. Use the field without the effective_ + // prefix to set the value. EffectiveLsn string `json:"effective_lsn,omitempty"` // User-specified WAL LSN of the ref database instance. // @@ -227,7 +252,10 @@ type DatabaseInstanceRole struct { // The desired API-exposed Postgres role attribute to associate with the // role. Optional. Attributes *DatabaseInstanceRoleAttributes `json:"attributes,omitempty"` - // The attributes that are applied to the role. + // The attributes that are applied to the role. This is an output only field + // that contains the value computed from the input field combined with + // server side defaults. Use the field without the effective_ prefix to set + // the value. EffectiveAttributes *DatabaseInstanceRoleAttributes `json:"effective_attributes,omitempty"` // The type of the role. IdentityType DatabaseInstanceRoleIdentityType `json:"identity_type,omitempty"` @@ -921,9 +949,15 @@ type SyncedDatabaseTable struct { DatabaseInstanceName string `json:"database_instance_name,omitempty"` // The name of the database instance that this table is registered to. This // field is always returned, and for tables inside database catalogs is - // inferred database instance associated with the catalog. + // inferred database instance associated with the catalog. This is an output + // only field that contains the value computed from the input field combined + // with server side defaults. Use the field without the effective_ prefix to + // set the value. EffectiveDatabaseInstanceName string `json:"effective_database_instance_name,omitempty"` - // The name of the logical database that this table is registered to. + // The name of the logical database that this table is registered to. This + // is an output only field that contains the value computed from the input + // field combined with server side defaults. Use the field without the + // effective_ prefix to set the value. EffectiveLogicalDatabaseName string `json:"effective_logical_database_name,omitempty"` // Target Postgres database object (logical database) name for this table. // diff --git a/service/jobs/api.go b/service/jobs/api.go old mode 100755 new mode 100644 index 77fd11392..3756edce9 --- a/service/jobs/api.go +++ b/service/jobs/api.go @@ -209,6 +209,14 @@ type JobsInterface interface { // without creating a job. Runs submitted using this endpoint don’t display in // the UI. Use the `jobs/runs/get` API to check the run state after the job is // submitted. + // + // **Important:** Jobs submitted using this endpoint are not saved as a job. + // They do not show up in the Jobs UI, and do not retry when they fail. Because + // they are not saved, Databricks cannot auto-optimize serverless compute in + // case of failure. If your job fails, you may want to use classic compute to + // specify the compute needs for the job. Alternatively, use the `POST + // /jobs/create` and `POST /jobs/run-now` endpoints to create and run a saved + // job. Submit(ctx context.Context, submitRun SubmitRun) (*WaitGetRunJobTerminatedOrSkipped[SubmitRunResponse], error) // Calls [JobsAPIInterface.Submit] and waits to reach TERMINATED or SKIPPED state @@ -582,6 +590,14 @@ func (a *JobsAPI) RunNowAndWait(ctx context.Context, runNow RunNow, options ...r // without creating a job. Runs submitted using this endpoint don’t display in // the UI. Use the `jobs/runs/get` API to check the run state after the job is // submitted. +// +// **Important:** Jobs submitted using this endpoint are not saved as a job. +// They do not show up in the Jobs UI, and do not retry when they fail. Because +// they are not saved, Databricks cannot auto-optimize serverless compute in +// case of failure. If your job fails, you may want to use classic compute to +// specify the compute needs for the job. Alternatively, use the `POST +// /jobs/create` and `POST /jobs/run-now` endpoints to create and run a saved +// job. func (a *JobsAPI) Submit(ctx context.Context, submitRun SubmitRun) (*WaitGetRunJobTerminatedOrSkipped[SubmitRunResponse], error) { submitRunResponse, err := a.jobsImpl.Submit(ctx, submitRun) if err != nil { diff --git a/service/jobs/interface.go b/service/jobs/interface.go old mode 100755 new mode 100644 index c1c757af2..3bf8fff7e --- a/service/jobs/interface.go +++ b/service/jobs/interface.go @@ -118,6 +118,14 @@ type JobsService interface { // directly without creating a job. Runs submitted using this endpoint // don’t display in the UI. Use the `jobs/runs/get` API to check the run // state after the job is submitted. + // + // **Important:** Jobs submitted using this endpoint are not saved as a job. + // They do not show up in the Jobs UI, and do not retry when they fail. + // Because they are not saved, Databricks cannot auto-optimize serverless + // compute in case of failure. If your job fails, you may want to use + // classic compute to specify the compute needs for the job. Alternatively, + // use the `POST /jobs/create` and `POST /jobs/run-now` endpoints to create + // and run a saved job. Submit(ctx context.Context, request SubmitRun) (*SubmitRunResponse, error) // Add, update, or remove specific settings of an existing job. Use the diff --git a/service/pkg.go b/service/pkg.go index b66c4bd34..4f2a103fb 100644 --- a/service/pkg.go +++ b/service/pkg.go @@ -18,7 +18,7 @@ // // - [sql.AlertsV2API]: New version of SQL Alerts. // -// - [apps.AppsAPI]: Apps run directly on a customer’s Databricks instance, integrate with their data, use and extend Databricks services, and enable users to interact through single sign-on. +// - [apps.AppsAPI]: Apps run directly on a customer's Databricks instance, integrate with their data, use and extend Databricks services, and enable users to interact through single sign-on. // // - [apps.AppsSettingsAPI]: Apps Settings manage the settings for the Apps service on a customer's Databricks instance. // @@ -238,7 +238,7 @@ // // - [oauth2.PublishedAppIntegrationAPI]: These APIs enable administrators to manage published OAuth app integrations, which is required for adding/using Published OAuth App Integration like Tableau Desktop for Databricks in AWS cloud. // -// - [qualitymonitorv2.QualityMonitorV2API]: Manage data quality of UC objects (currently support `schema`). +// - [qualitymonitorv2.QualityMonitorV2API]: [DEPRECATED] This API is deprecated. // // - [catalog.QualityMonitorsAPI]: A monitor computes and monitors data or model quality metrics for a table over time. // diff --git a/service/postgres/api.go b/service/postgres/api.go index 1385f5541..d3bc70a65 100644 --- a/service/postgres/api.go +++ b/service/postgres/api.go @@ -25,14 +25,11 @@ type PostgresInterface interface { CreateRole(ctx context.Context, request CreateRoleRequest) (CreateRoleOperationInterface, error) - // Delete a Branch. - DeleteBranch(ctx context.Context, request DeleteBranchRequest) error + DeleteBranch(ctx context.Context, request DeleteBranchRequest) (DeleteBranchOperationInterface, error) - // Delete an Endpoint. - DeleteEndpoint(ctx context.Context, request DeleteEndpointRequest) error + DeleteEndpoint(ctx context.Context, request DeleteEndpointRequest) (DeleteEndpointOperationInterface, error) - // Delete a Project. - DeleteProject(ctx context.Context, request DeleteProjectRequest) error + DeleteProject(ctx context.Context, request DeleteProjectRequest) (DeleteProjectOperationInterface, error) DeleteRole(ctx context.Context, request DeleteRoleRequest) (DeleteRoleOperationInterface, error) @@ -708,6 +705,420 @@ func (a *createRoleOperation) Done() (bool, error) { return operation.Done, nil } +func (a *PostgresAPI) DeleteBranch(ctx context.Context, request DeleteBranchRequest) (DeleteBranchOperationInterface, error) { + operation, err := a.postgresImpl.DeleteBranch(ctx, request) + if err != nil { + return nil, err + } + return &deleteBranchOperation{ + impl: &a.postgresImpl, + operation: operation, + }, nil +} + +type DeleteBranchOperationInterface interface { + + // Wait blocks until the long-running operation is completed. If no timeout is + // specified, this will poll indefinitely. If a timeout is provided and the operation + // didn't finish within the timeout, this function will return an error, otherwise + // returns successful response and any errors encountered. + Wait(ctx context.Context, opts ...api.Option) error + + // Name returns the name of the long-running operation. The name is assigned + // by the server and is unique within the service from which the operation is created. + Name() string + + // Metadata returns metadata associated with the long-running operation. + // If the metadata is not available, the returned metadata and error are both nil. + Metadata() (*BranchOperationMetadata, error) + + // Done reports whether the long-running operation has completed. + Done() (bool, error) +} + +type deleteBranchOperation struct { + impl *postgresImpl + operation *Operation +} + +// Wait blocks until the long-running operation is completed. If no timeout is +// specified, this will poll indefinitely. If a timeout is provided and the operation +// didn't finish within the timeout, this function will return an error, otherwise +// returns successful response and any errors encountered. +func (a *deleteBranchOperation) Wait(ctx context.Context, opts ...api.Option) error { + ctx = useragent.InContext(ctx, "sdk-feature", "long-running") + + errOperationInProgress := errors.New("operation still in progress") + + call := func(ctx context.Context) error { + operation, err := a.impl.GetOperation(ctx, GetOperationRequest{ + Name: a.operation.Name, + }) + if err != nil { + return err + } + + // Update local operation state + a.operation = operation + + if !operation.Done { + return errOperationInProgress + } + + if operation.Error != nil { + var errorMsg string + if operation.Error.Message != "" { + errorMsg = operation.Error.Message + } else { + errorMsg = "unknown error" + } + + if operation.Error.ErrorCode != "" { + errorMsg = fmt.Sprintf("[%s] %s", operation.Error.ErrorCode, errorMsg) + } + + return fmt.Errorf("operation failed: %s", errorMsg) + } + + // Operation completed successfully, unmarshal response + if operation.Response == nil { + return fmt.Errorf("operation completed but no response available") + } + + return nil + } + + // Create a retrier that retries on errOperationInProgress with exponential backoff. + retrier := api.RetryOn(api.BackoffPolicy{}, func(err error) bool { + return errors.Is(err, errOperationInProgress) + }) + + // Add default retrier. + defaultOpts := []api.Option{ + api.WithRetrier(func() api.Retrier { return retrier }), + } + allOpts := append(defaultOpts, opts...) + + err := api.Execute(ctx, call, allOpts...) + + return err + +} + +// Name returns the name of the long-running operation. The name is assigned +// by the server and is unique within the service from which the operation is created. +func (a *deleteBranchOperation) Name() string { + return a.operation.Name +} + +// Metadata returns metadata associated with the long-running operation. +// If the metadata is not available, the returned metadata and error are both nil. +func (a *deleteBranchOperation) Metadata() (*BranchOperationMetadata, error) { + if a.operation.Metadata == nil { + return nil, nil + } + + var metadata BranchOperationMetadata + err := json.Unmarshal(a.operation.Metadata, &metadata) + if err != nil { + return nil, fmt.Errorf("failed to unmarshal operation metadata: %w", err) + } + + return &metadata, nil +} + +// Done reports whether the long-running operation has completed. +func (a *deleteBranchOperation) Done() (bool, error) { + // Refresh the operation state first + operation, err := a.impl.GetOperation(context.Background(), GetOperationRequest{ + Name: a.operation.Name, + }) + if err != nil { + return false, err + } + + // Update local operation state + a.operation = operation + + return operation.Done, nil +} + +func (a *PostgresAPI) DeleteEndpoint(ctx context.Context, request DeleteEndpointRequest) (DeleteEndpointOperationInterface, error) { + operation, err := a.postgresImpl.DeleteEndpoint(ctx, request) + if err != nil { + return nil, err + } + return &deleteEndpointOperation{ + impl: &a.postgresImpl, + operation: operation, + }, nil +} + +type DeleteEndpointOperationInterface interface { + + // Wait blocks until the long-running operation is completed. If no timeout is + // specified, this will poll indefinitely. If a timeout is provided and the operation + // didn't finish within the timeout, this function will return an error, otherwise + // returns successful response and any errors encountered. + Wait(ctx context.Context, opts ...api.Option) error + + // Name returns the name of the long-running operation. The name is assigned + // by the server and is unique within the service from which the operation is created. + Name() string + + // Metadata returns metadata associated with the long-running operation. + // If the metadata is not available, the returned metadata and error are both nil. + Metadata() (*EndpointOperationMetadata, error) + + // Done reports whether the long-running operation has completed. + Done() (bool, error) +} + +type deleteEndpointOperation struct { + impl *postgresImpl + operation *Operation +} + +// Wait blocks until the long-running operation is completed. If no timeout is +// specified, this will poll indefinitely. If a timeout is provided and the operation +// didn't finish within the timeout, this function will return an error, otherwise +// returns successful response and any errors encountered. +func (a *deleteEndpointOperation) Wait(ctx context.Context, opts ...api.Option) error { + ctx = useragent.InContext(ctx, "sdk-feature", "long-running") + + errOperationInProgress := errors.New("operation still in progress") + + call := func(ctx context.Context) error { + operation, err := a.impl.GetOperation(ctx, GetOperationRequest{ + Name: a.operation.Name, + }) + if err != nil { + return err + } + + // Update local operation state + a.operation = operation + + if !operation.Done { + return errOperationInProgress + } + + if operation.Error != nil { + var errorMsg string + if operation.Error.Message != "" { + errorMsg = operation.Error.Message + } else { + errorMsg = "unknown error" + } + + if operation.Error.ErrorCode != "" { + errorMsg = fmt.Sprintf("[%s] %s", operation.Error.ErrorCode, errorMsg) + } + + return fmt.Errorf("operation failed: %s", errorMsg) + } + + // Operation completed successfully, unmarshal response + if operation.Response == nil { + return fmt.Errorf("operation completed but no response available") + } + + return nil + } + + // Create a retrier that retries on errOperationInProgress with exponential backoff. + retrier := api.RetryOn(api.BackoffPolicy{}, func(err error) bool { + return errors.Is(err, errOperationInProgress) + }) + + // Add default retrier. + defaultOpts := []api.Option{ + api.WithRetrier(func() api.Retrier { return retrier }), + } + allOpts := append(defaultOpts, opts...) + + err := api.Execute(ctx, call, allOpts...) + + return err + +} + +// Name returns the name of the long-running operation. The name is assigned +// by the server and is unique within the service from which the operation is created. +func (a *deleteEndpointOperation) Name() string { + return a.operation.Name +} + +// Metadata returns metadata associated with the long-running operation. +// If the metadata is not available, the returned metadata and error are both nil. +func (a *deleteEndpointOperation) Metadata() (*EndpointOperationMetadata, error) { + if a.operation.Metadata == nil { + return nil, nil + } + + var metadata EndpointOperationMetadata + err := json.Unmarshal(a.operation.Metadata, &metadata) + if err != nil { + return nil, fmt.Errorf("failed to unmarshal operation metadata: %w", err) + } + + return &metadata, nil +} + +// Done reports whether the long-running operation has completed. +func (a *deleteEndpointOperation) Done() (bool, error) { + // Refresh the operation state first + operation, err := a.impl.GetOperation(context.Background(), GetOperationRequest{ + Name: a.operation.Name, + }) + if err != nil { + return false, err + } + + // Update local operation state + a.operation = operation + + return operation.Done, nil +} + +func (a *PostgresAPI) DeleteProject(ctx context.Context, request DeleteProjectRequest) (DeleteProjectOperationInterface, error) { + operation, err := a.postgresImpl.DeleteProject(ctx, request) + if err != nil { + return nil, err + } + return &deleteProjectOperation{ + impl: &a.postgresImpl, + operation: operation, + }, nil +} + +type DeleteProjectOperationInterface interface { + + // Wait blocks until the long-running operation is completed. If no timeout is + // specified, this will poll indefinitely. If a timeout is provided and the operation + // didn't finish within the timeout, this function will return an error, otherwise + // returns successful response and any errors encountered. + Wait(ctx context.Context, opts ...api.Option) error + + // Name returns the name of the long-running operation. The name is assigned + // by the server and is unique within the service from which the operation is created. + Name() string + + // Metadata returns metadata associated with the long-running operation. + // If the metadata is not available, the returned metadata and error are both nil. + Metadata() (*ProjectOperationMetadata, error) + + // Done reports whether the long-running operation has completed. + Done() (bool, error) +} + +type deleteProjectOperation struct { + impl *postgresImpl + operation *Operation +} + +// Wait blocks until the long-running operation is completed. If no timeout is +// specified, this will poll indefinitely. If a timeout is provided and the operation +// didn't finish within the timeout, this function will return an error, otherwise +// returns successful response and any errors encountered. +func (a *deleteProjectOperation) Wait(ctx context.Context, opts ...api.Option) error { + ctx = useragent.InContext(ctx, "sdk-feature", "long-running") + + errOperationInProgress := errors.New("operation still in progress") + + call := func(ctx context.Context) error { + operation, err := a.impl.GetOperation(ctx, GetOperationRequest{ + Name: a.operation.Name, + }) + if err != nil { + return err + } + + // Update local operation state + a.operation = operation + + if !operation.Done { + return errOperationInProgress + } + + if operation.Error != nil { + var errorMsg string + if operation.Error.Message != "" { + errorMsg = operation.Error.Message + } else { + errorMsg = "unknown error" + } + + if operation.Error.ErrorCode != "" { + errorMsg = fmt.Sprintf("[%s] %s", operation.Error.ErrorCode, errorMsg) + } + + return fmt.Errorf("operation failed: %s", errorMsg) + } + + // Operation completed successfully, unmarshal response + if operation.Response == nil { + return fmt.Errorf("operation completed but no response available") + } + + return nil + } + + // Create a retrier that retries on errOperationInProgress with exponential backoff. + retrier := api.RetryOn(api.BackoffPolicy{}, func(err error) bool { + return errors.Is(err, errOperationInProgress) + }) + + // Add default retrier. + defaultOpts := []api.Option{ + api.WithRetrier(func() api.Retrier { return retrier }), + } + allOpts := append(defaultOpts, opts...) + + err := api.Execute(ctx, call, allOpts...) + + return err + +} + +// Name returns the name of the long-running operation. The name is assigned +// by the server and is unique within the service from which the operation is created. +func (a *deleteProjectOperation) Name() string { + return a.operation.Name +} + +// Metadata returns metadata associated with the long-running operation. +// If the metadata is not available, the returned metadata and error are both nil. +func (a *deleteProjectOperation) Metadata() (*ProjectOperationMetadata, error) { + if a.operation.Metadata == nil { + return nil, nil + } + + var metadata ProjectOperationMetadata + err := json.Unmarshal(a.operation.Metadata, &metadata) + if err != nil { + return nil, fmt.Errorf("failed to unmarshal operation metadata: %w", err) + } + + return &metadata, nil +} + +// Done reports whether the long-running operation has completed. +func (a *deleteProjectOperation) Done() (bool, error) { + // Refresh the operation state first + operation, err := a.impl.GetOperation(context.Background(), GetOperationRequest{ + Name: a.operation.Name, + }) + if err != nil { + return false, err + } + + // Update local operation state + a.operation = operation + + return operation.Done, nil +} + func (a *PostgresAPI) DeleteRole(ctx context.Context, request DeleteRoleRequest) (DeleteRoleOperationInterface, error) { operation, err := a.postgresImpl.DeleteRole(ctx, request) if err != nil { diff --git a/service/postgres/impl.go b/service/postgres/impl.go index f3bb7af46..cb078f387 100644 --- a/service/postgres/impl.go +++ b/service/postgres/impl.go @@ -80,31 +80,34 @@ func (a *postgresImpl) CreateRole(ctx context.Context, request CreateRoleRequest return &operation, err } -func (a *postgresImpl) DeleteBranch(ctx context.Context, request DeleteBranchRequest) error { +func (a *postgresImpl) DeleteBranch(ctx context.Context, request DeleteBranchRequest) (*Operation, error) { + var operation Operation path := fmt.Sprintf("/api/2.0/postgres/%v", request.Name) queryParams := make(map[string]any) headers := make(map[string]string) headers["Accept"] = "application/json" - err := a.client.Do(ctx, http.MethodDelete, path, headers, queryParams, request, nil) - return err + err := a.client.Do(ctx, http.MethodDelete, path, headers, queryParams, request, &operation) + return &operation, err } -func (a *postgresImpl) DeleteEndpoint(ctx context.Context, request DeleteEndpointRequest) error { +func (a *postgresImpl) DeleteEndpoint(ctx context.Context, request DeleteEndpointRequest) (*Operation, error) { + var operation Operation path := fmt.Sprintf("/api/2.0/postgres/%v", request.Name) queryParams := make(map[string]any) headers := make(map[string]string) headers["Accept"] = "application/json" - err := a.client.Do(ctx, http.MethodDelete, path, headers, queryParams, request, nil) - return err + err := a.client.Do(ctx, http.MethodDelete, path, headers, queryParams, request, &operation) + return &operation, err } -func (a *postgresImpl) DeleteProject(ctx context.Context, request DeleteProjectRequest) error { +func (a *postgresImpl) DeleteProject(ctx context.Context, request DeleteProjectRequest) (*Operation, error) { + var operation Operation path := fmt.Sprintf("/api/2.0/postgres/%v", request.Name) queryParams := make(map[string]any) headers := make(map[string]string) headers["Accept"] = "application/json" - err := a.client.Do(ctx, http.MethodDelete, path, headers, queryParams, request, nil) - return err + err := a.client.Do(ctx, http.MethodDelete, path, headers, queryParams, request, &operation) + return &operation, err } func (a *postgresImpl) DeleteRole(ctx context.Context, request DeleteRoleRequest) (*Operation, error) { diff --git a/service/postgres/interface.go b/service/postgres/interface.go index 2f3701e7d..e6d88ee1e 100644 --- a/service/postgres/interface.go +++ b/service/postgres/interface.go @@ -25,13 +25,13 @@ type PostgresService interface { CreateRole(ctx context.Context, request CreateRoleRequest) (*Operation, error) // Delete a Branch. - DeleteBranch(ctx context.Context, request DeleteBranchRequest) error + DeleteBranch(ctx context.Context, request DeleteBranchRequest) (*Operation, error) // Delete an Endpoint. - DeleteEndpoint(ctx context.Context, request DeleteEndpointRequest) error + DeleteEndpoint(ctx context.Context, request DeleteEndpointRequest) (*Operation, error) // Delete a Project. - DeleteProject(ctx context.Context, request DeleteProjectRequest) error + DeleteProject(ctx context.Context, request DeleteProjectRequest) (*Operation, error) // Delete a role in a branch. DeleteRole(ctx context.Context, request DeleteRoleRequest) (*Operation, error) diff --git a/service/postgres/model.go b/service/postgres/model.go index 86d3bb94b..06abadae1 100644 --- a/service/postgres/model.go +++ b/service/postgres/model.go @@ -236,7 +236,6 @@ type CreateRoleRequest struct { // Databricks Error that is returned by all Databricks APIs. type DatabricksServiceExceptionWithDetailsProto struct { - // @pbjson-skip Details []json.RawMessage `json:"details,omitempty"` ErrorCode ErrorCode `json:"error_code,omitempty"` @@ -330,48 +329,10 @@ func (s Endpoint) MarshalJSON() ([]byte, error) { type EndpointOperationMetadata struct { } -// The connection pooler mode. Lakebase supports PgBouncer in `transaction` mode -// only. -type EndpointPoolerMode string - -const EndpointPoolerModeTransaction EndpointPoolerMode = `TRANSACTION` - -// String representation for [fmt.Print] -func (f *EndpointPoolerMode) String() string { - return string(*f) -} - -// Set raw string value and validate it against allowed values -func (f *EndpointPoolerMode) Set(v string) error { - switch v { - case `TRANSACTION`: - *f = EndpointPoolerMode(v) - return nil - default: - return fmt.Errorf(`value "%s" is not one of "TRANSACTION"`, v) - } -} - -// Values returns all possible values for EndpointPoolerMode. -// -// There is no guarantee on the order of the values in the slice. -func (f *EndpointPoolerMode) Values() []EndpointPoolerMode { - return []EndpointPoolerMode{ - EndpointPoolerModeTransaction, - } -} - -// Type always returns EndpointPoolerMode to satisfy [pflag.Value] interface -func (f *EndpointPoolerMode) Type() string { - return "EndpointPoolerMode" -} - // A collection of settings for a compute endpoint. type EndpointSettings struct { // A raw representation of Postgres settings. PgSettings map[string]string `json:"pg_settings,omitempty"` - // A raw representation of PgBouncer settings. - PgbouncerSettings map[string]string `json:"pgbouncer_settings,omitempty"` } type EndpointSpec struct { @@ -386,8 +347,6 @@ type EndpointSpec struct { // The endpoint type. A branch can only have one READ_WRITE endpoint. EndpointType EndpointType `json:"endpoint_type"` - PoolerMode EndpointPoolerMode `json:"pooler_mode,omitempty"` - Settings *EndpointSettings `json:"settings,omitempty"` // Duration of inactivity after which the compute endpoint is automatically // suspended. @@ -425,8 +384,6 @@ type EndpointStatus struct { PendingState EndpointStatusState `json:"pending_state,omitempty"` - PoolerMode EndpointPoolerMode `json:"pooler_mode,omitempty"` - Settings *EndpointSettings `json:"settings,omitempty"` // A timestamp indicating when the compute endpoint was last started. StartTime *time.Time `json:"start_time,omitempty"` @@ -1045,8 +1002,6 @@ type ProjectDefaultEndpointSettings struct { AutoscalingLimitMinCu float64 `json:"autoscaling_limit_min_cu,omitempty"` // A raw representation of Postgres settings. PgSettings map[string]string `json:"pg_settings,omitempty"` - // A raw representation of PgBouncer settings. - PgbouncerSettings map[string]string `json:"pgbouncer_settings,omitempty"` // Duration of inactivity after which the compute endpoint is automatically // suspended. SuspendTimeoutDuration *duration.Duration `json:"suspend_timeout_duration,omitempty"` @@ -1258,7 +1213,11 @@ type RoleRoleSpec struct { // NOTE: this is ignored for the Databricks identity type GROUP, and // NO_LOGIN is implicitly assumed instead for the GROUP identity type. AuthMethod RoleAuthMethod `json:"auth_method,omitempty"` - // The type of the role. + // The type of the role. When specifying a managed-identity, the chosen + // role_id must be a valid: + // + // * application ID for SERVICE_PRINCIPAL * user email for USER * group name + // for GROUP IdentityType RoleIdentityType `json:"identity_type,omitempty"` } diff --git a/service/qualitymonitorv2/api.go b/service/qualitymonitorv2/api.go old mode 100755 new mode 100644 index e93b2a9a9..7b9905452 --- a/service/qualitymonitorv2/api.go +++ b/service/qualitymonitorv2/api.go @@ -1,6 +1,8 @@ // Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. -// Manage data quality of UC objects (currently support `schema`) +// [DEPRECATED] This API is deprecated. Please use the Data Quality Monitoring +// API instead (REST: /api/data-quality/v1/monitors). Manage data quality of UC +// objects (currently support `schema`). package qualitymonitorv2 import ( @@ -12,32 +14,40 @@ import ( type QualityMonitorV2Interface interface { - // Create a quality monitor on UC object + // [DEPRECATED] Create a quality monitor on UC object. Use Data Quality + // Monitoring API instead. CreateQualityMonitor(ctx context.Context, request CreateQualityMonitorRequest) (*QualityMonitor, error) - // Delete a quality monitor on UC object + // [DEPRECATED] Delete a quality monitor on UC object. Use Data Quality + // Monitoring API instead. DeleteQualityMonitor(ctx context.Context, request DeleteQualityMonitorRequest) error - // Delete a quality monitor on UC object + // [DEPRECATED] Delete a quality monitor on UC object. Use Data Quality + // Monitoring API instead. DeleteQualityMonitorByObjectTypeAndObjectId(ctx context.Context, objectType string, objectId string) error - // Read a quality monitor on UC object + // [DEPRECATED] Read a quality monitor on UC object. Use Data Quality Monitoring + // API instead. GetQualityMonitor(ctx context.Context, request GetQualityMonitorRequest) (*QualityMonitor, error) - // Read a quality monitor on UC object + // [DEPRECATED] Read a quality monitor on UC object. Use Data Quality Monitoring + // API instead. GetQualityMonitorByObjectTypeAndObjectId(ctx context.Context, objectType string, objectId string) (*QualityMonitor, error) - // (Unimplemented) List quality monitors + // [DEPRECATED] (Unimplemented) List quality monitors. Use Data Quality + // Monitoring API instead. // // This method is generated by Databricks SDK Code Generator. ListQualityMonitor(ctx context.Context, request ListQualityMonitorRequest) listing.Iterator[QualityMonitor] - // (Unimplemented) List quality monitors + // [DEPRECATED] (Unimplemented) List quality monitors. Use Data Quality + // Monitoring API instead. // // This method is generated by Databricks SDK Code Generator. ListQualityMonitorAll(ctx context.Context, request ListQualityMonitorRequest) ([]QualityMonitor, error) - // (Unimplemented) Update a quality monitor on UC object + // [DEPRECATED] (Unimplemented) Update a quality monitor on UC object. Use Data + // Quality Monitoring API instead. UpdateQualityMonitor(ctx context.Context, request UpdateQualityMonitorRequest) (*QualityMonitor, error) } @@ -49,12 +59,15 @@ func NewQualityMonitorV2(client *client.DatabricksClient) *QualityMonitorV2API { } } -// Manage data quality of UC objects (currently support `schema`) +// [DEPRECATED] This API is deprecated. Please use the Data Quality Monitoring +// API instead (REST: /api/data-quality/v1/monitors). Manage data quality of UC +// objects (currently support `schema`). type QualityMonitorV2API struct { qualityMonitorV2Impl } -// Delete a quality monitor on UC object +// [DEPRECATED] Delete a quality monitor on UC object. Use Data Quality +// Monitoring API instead. func (a *QualityMonitorV2API) DeleteQualityMonitorByObjectTypeAndObjectId(ctx context.Context, objectType string, objectId string) error { return a.qualityMonitorV2Impl.DeleteQualityMonitor(ctx, DeleteQualityMonitorRequest{ ObjectType: objectType, @@ -62,7 +75,8 @@ func (a *QualityMonitorV2API) DeleteQualityMonitorByObjectTypeAndObjectId(ctx co }) } -// Read a quality monitor on UC object +// [DEPRECATED] Read a quality monitor on UC object. Use Data Quality Monitoring +// API instead. func (a *QualityMonitorV2API) GetQualityMonitorByObjectTypeAndObjectId(ctx context.Context, objectType string, objectId string) (*QualityMonitor, error) { return a.qualityMonitorV2Impl.GetQualityMonitor(ctx, GetQualityMonitorRequest{ ObjectType: objectType, diff --git a/service/qualitymonitorv2/impl.go b/service/qualitymonitorv2/impl.go old mode 100755 new mode 100644 index d98977e5a..47ffe65fc --- a/service/qualitymonitorv2/impl.go +++ b/service/qualitymonitorv2/impl.go @@ -47,7 +47,8 @@ func (a *qualityMonitorV2Impl) GetQualityMonitor(ctx context.Context, request Ge return &qualityMonitor, err } -// (Unimplemented) List quality monitors +// [DEPRECATED] (Unimplemented) List quality monitors. Use Data Quality +// Monitoring API instead. func (a *qualityMonitorV2Impl) ListQualityMonitor(ctx context.Context, request ListQualityMonitorRequest) listing.Iterator[QualityMonitor] { getNextPage := func(ctx context.Context, req ListQualityMonitorRequest) (*ListQualityMonitorResponse, error) { @@ -72,7 +73,8 @@ func (a *qualityMonitorV2Impl) ListQualityMonitor(ctx context.Context, request L return iterator } -// (Unimplemented) List quality monitors +// [DEPRECATED] (Unimplemented) List quality monitors. Use Data Quality +// Monitoring API instead. func (a *qualityMonitorV2Impl) ListQualityMonitorAll(ctx context.Context, request ListQualityMonitorRequest) ([]QualityMonitor, error) { iterator := a.ListQualityMonitor(ctx, request) return listing.ToSlice[QualityMonitor](ctx, iterator) diff --git a/service/qualitymonitorv2/interface.go b/service/qualitymonitorv2/interface.go old mode 100755 new mode 100644 index 6597b8848..1c7e302ab --- a/service/qualitymonitorv2/interface.go +++ b/service/qualitymonitorv2/interface.go @@ -6,23 +6,30 @@ import ( "context" ) -// Manage data quality of UC objects (currently support `schema`) +// [DEPRECATED] This API is deprecated. Please use the Data Quality Monitoring +// API instead (REST: /api/data-quality/v1/monitors). Manage data quality of UC +// objects (currently support `schema`). // // Deprecated: Do not use this interface, it will be removed in a future version of the SDK. type QualityMonitorV2Service interface { - // Create a quality monitor on UC object + // [DEPRECATED] Create a quality monitor on UC object. Use Data Quality + // Monitoring API instead. CreateQualityMonitor(ctx context.Context, request CreateQualityMonitorRequest) (*QualityMonitor, error) - // Delete a quality monitor on UC object + // [DEPRECATED] Delete a quality monitor on UC object. Use Data Quality + // Monitoring API instead. DeleteQualityMonitor(ctx context.Context, request DeleteQualityMonitorRequest) error - // Read a quality monitor on UC object + // [DEPRECATED] Read a quality monitor on UC object. Use Data Quality + // Monitoring API instead. GetQualityMonitor(ctx context.Context, request GetQualityMonitorRequest) (*QualityMonitor, error) - // (Unimplemented) List quality monitors + // [DEPRECATED] (Unimplemented) List quality monitors. Use Data Quality + // Monitoring API instead. ListQualityMonitor(ctx context.Context, request ListQualityMonitorRequest) (*ListQualityMonitorResponse, error) - // (Unimplemented) Update a quality monitor on UC object + // [DEPRECATED] (Unimplemented) Update a quality monitor on UC object. Use + // Data Quality Monitoring API instead. UpdateQualityMonitor(ctx context.Context, request UpdateQualityMonitorRequest) (*QualityMonitor, error) } diff --git a/service/settings/model.go b/service/settings/model.go index 532196d7c..3216344c7 100644 --- a/service/settings/model.go +++ b/service/settings/model.go @@ -620,6 +620,8 @@ type CreatePrivateEndpointRule struct { // The full target AWS endpoint service name that connects to the // destination resources of the private endpoint. EndpointService string `json:"endpoint_service,omitempty"` + + ErrorMessage string `json:"error_message,omitempty"` // Not used by customer-managed private endpoint services. // // The sub-resource type (group ID) of the target resource. Note that to @@ -3437,7 +3439,10 @@ type NccPrivateEndpointRule struct { // DISCONNECTED: Connection was removed by the private link resource owner, // the private endpoint becomes informative and should be deleted for // clean-up. - EXPIRED: If the endpoint was created but not approved in 14 - // days, it will be EXPIRED. + // days, it will be EXPIRED. - CREATING: The endpoint creation is in + // progress. Once successfully created, the state will transition to + // PENDING. - CREATE_FAILED: The endpoint creation failed. You can check the + // error_message field for more details. ConnectionState NccPrivateEndpointRulePrivateLinkConnectionState `json:"connection_state,omitempty"` // Time in epoch milliseconds when this object was created. CreationTime int64 `json:"creation_time,omitempty"` @@ -3461,6 +3466,8 @@ type NccPrivateEndpointRule struct { // The full target AWS endpoint service name that connects to the // destination resources of the private endpoint. EndpointService string `json:"endpoint_service,omitempty"` + + ErrorMessage string `json:"error_message,omitempty"` // Not used by customer-managed private endpoint services. // // The sub-resource type (group ID) of the target resource. Note that to @@ -3500,6 +3507,10 @@ func (s NccPrivateEndpointRule) MarshalJSON() ([]byte, error) { type NccPrivateEndpointRulePrivateLinkConnectionState string +const NccPrivateEndpointRulePrivateLinkConnectionStateCreateFailed NccPrivateEndpointRulePrivateLinkConnectionState = `CREATE_FAILED` + +const NccPrivateEndpointRulePrivateLinkConnectionStateCreating NccPrivateEndpointRulePrivateLinkConnectionState = `CREATING` + const NccPrivateEndpointRulePrivateLinkConnectionStateDisconnected NccPrivateEndpointRulePrivateLinkConnectionState = `DISCONNECTED` const NccPrivateEndpointRulePrivateLinkConnectionStateEstablished NccPrivateEndpointRulePrivateLinkConnectionState = `ESTABLISHED` @@ -3518,11 +3529,11 @@ func (f *NccPrivateEndpointRulePrivateLinkConnectionState) String() string { // Set raw string value and validate it against allowed values func (f *NccPrivateEndpointRulePrivateLinkConnectionState) Set(v string) error { switch v { - case `DISCONNECTED`, `ESTABLISHED`, `EXPIRED`, `PENDING`, `REJECTED`: + case `CREATE_FAILED`, `CREATING`, `DISCONNECTED`, `ESTABLISHED`, `EXPIRED`, `PENDING`, `REJECTED`: *f = NccPrivateEndpointRulePrivateLinkConnectionState(v) return nil default: - return fmt.Errorf(`value "%s" is not one of "DISCONNECTED", "ESTABLISHED", "EXPIRED", "PENDING", "REJECTED"`, v) + return fmt.Errorf(`value "%s" is not one of "CREATE_FAILED", "CREATING", "DISCONNECTED", "ESTABLISHED", "EXPIRED", "PENDING", "REJECTED"`, v) } } @@ -3531,6 +3542,8 @@ func (f *NccPrivateEndpointRulePrivateLinkConnectionState) Set(v string) error { // There is no guarantee on the order of the values in the slice. func (f *NccPrivateEndpointRulePrivateLinkConnectionState) Values() []NccPrivateEndpointRulePrivateLinkConnectionState { return []NccPrivateEndpointRulePrivateLinkConnectionState{ + NccPrivateEndpointRulePrivateLinkConnectionStateCreateFailed, + NccPrivateEndpointRulePrivateLinkConnectionStateCreating, NccPrivateEndpointRulePrivateLinkConnectionStateDisconnected, NccPrivateEndpointRulePrivateLinkConnectionStateEstablished, NccPrivateEndpointRulePrivateLinkConnectionStateExpired, @@ -4642,6 +4655,8 @@ type UpdatePrivateEndpointRule struct { // Update this field to activate/deactivate this private endpoint to allow // egress access from serverless compute resources. Enabled bool `json:"enabled,omitempty"` + + ErrorMessage string `json:"error_message,omitempty"` // Only used by private endpoints towards AWS S3 service. // // The globally unique S3 bucket names that will be accessed via the VPC diff --git a/service/sharing/api.go b/service/sharing/api.go old mode 100755 new mode 100644 index 6f6bc2ea6..dcfce6351 --- a/service/sharing/api.go +++ b/service/sharing/api.go @@ -37,17 +37,21 @@ type ProvidersInterface interface { GetByName(ctx context.Context, name string) (*ProviderInfo, error) // Gets an array of available authentication providers. The caller must either - // be a metastore admin or the owner of the providers. Providers not owned by - // the caller are not included in the response. There is no guarantee of a - // specific ordering of the elements in the array. + // be a metastore admin, have the **USE_PROVIDER** privilege on the providers, + // or be the owner of the providers. Providers not owned by the caller and for + // which the caller does not have the **USE_PROVIDER** privilege are not + // included in the response. There is no guarantee of a specific ordering of the + // elements in the array. // // This method is generated by Databricks SDK Code Generator. List(ctx context.Context, request ListProvidersRequest) listing.Iterator[ProviderInfo] // Gets an array of available authentication providers. The caller must either - // be a metastore admin or the owner of the providers. Providers not owned by - // the caller are not included in the response. There is no guarantee of a - // specific ordering of the elements in the array. + // be a metastore admin, have the **USE_PROVIDER** privilege on the providers, + // or be the owner of the providers. Providers not owned by the caller and for + // which the caller does not have the **USE_PROVIDER** privilege are not + // included in the response. There is no guarantee of a specific ordering of the + // elements in the array. // // This method is generated by Databricks SDK Code Generator. ListAll(ctx context.Context, request ListProvidersRequest) ([]ProviderInfo, error) diff --git a/service/sharing/impl.go b/service/sharing/impl.go old mode 100755 new mode 100644 index d22875458..f6cfa9794 --- a/service/sharing/impl.go +++ b/service/sharing/impl.go @@ -47,9 +47,11 @@ func (a *providersImpl) Get(ctx context.Context, request GetProviderRequest) (*P } // Gets an array of available authentication providers. The caller must either -// be a metastore admin or the owner of the providers. Providers not owned by -// the caller are not included in the response. There is no guarantee of a -// specific ordering of the elements in the array. +// be a metastore admin, have the **USE_PROVIDER** privilege on the providers, +// or be the owner of the providers. Providers not owned by the caller and for +// which the caller does not have the **USE_PROVIDER** privilege are not +// included in the response. There is no guarantee of a specific ordering of the +// elements in the array. func (a *providersImpl) List(ctx context.Context, request ListProvidersRequest) listing.Iterator[ProviderInfo] { request.ForceSendFields = append(request.ForceSendFields, "MaxResults") @@ -77,9 +79,11 @@ func (a *providersImpl) List(ctx context.Context, request ListProvidersRequest) } // Gets an array of available authentication providers. The caller must either -// be a metastore admin or the owner of the providers. Providers not owned by -// the caller are not included in the response. There is no guarantee of a -// specific ordering of the elements in the array. +// be a metastore admin, have the **USE_PROVIDER** privilege on the providers, +// or be the owner of the providers. Providers not owned by the caller and for +// which the caller does not have the **USE_PROVIDER** privilege are not +// included in the response. There is no guarantee of a specific ordering of the +// elements in the array. func (a *providersImpl) ListAll(ctx context.Context, request ListProvidersRequest) ([]ProviderInfo, error) { iterator := a.List(ctx, request) return listing.ToSlice[ProviderInfo](ctx, iterator) diff --git a/service/sharing/interface.go b/service/sharing/interface.go old mode 100755 new mode 100644 index 29356370f..d9a6abe32 --- a/service/sharing/interface.go +++ b/service/sharing/interface.go @@ -27,9 +27,11 @@ type ProvidersService interface { Get(ctx context.Context, request GetProviderRequest) (*ProviderInfo, error) // Gets an array of available authentication providers. The caller must - // either be a metastore admin or the owner of the providers. Providers not - // owned by the caller are not included in the response. There is no - // guarantee of a specific ordering of the elements in the array. + // either be a metastore admin, have the **USE_PROVIDER** privilege on the + // providers, or be the owner of the providers. Providers not owned by the + // caller and for which the caller does not have the **USE_PROVIDER** + // privilege are not included in the response. There is no guarantee of a + // specific ordering of the elements in the array. List(ctx context.Context, request ListProvidersRequest) (*ListProvidersResponse, error) // Get arrays of assets associated with a specified provider's share. The diff --git a/service/sql/model.go b/service/sql/model.go index abfb1d5f0..4a3574a26 100644 --- a/service/sql/model.go +++ b/service/sql/model.go @@ -5407,6 +5407,8 @@ const TerminationReasonCodePodAssignmentFailure TerminationReasonCode = `POD_ASS const TerminationReasonCodePodSchedulingFailure TerminationReasonCode = `POD_SCHEDULING_FAILURE` +const TerminationReasonCodeRateLimited TerminationReasonCode = `RATE_LIMITED` + const TerminationReasonCodeRequestRejected TerminationReasonCode = `REQUEST_REJECTED` const TerminationReasonCodeRequestThrottled TerminationReasonCode = `REQUEST_THROTTLED` @@ -5491,11 +5493,11 @@ func (f *TerminationReasonCode) String() string { // Set raw string value and validate it against allowed values func (f *TerminationReasonCode) Set(v string) error { switch v { - case `ABUSE_DETECTED`, `ACCESS_TOKEN_FAILURE`, `ALLOCATION_TIMEOUT`, `ALLOCATION_TIMEOUT_NODE_DAEMON_NOT_READY`, `ALLOCATION_TIMEOUT_NO_HEALTHY_AND_WARMED_UP_CLUSTERS`, `ALLOCATION_TIMEOUT_NO_HEALTHY_CLUSTERS`, `ALLOCATION_TIMEOUT_NO_MATCHED_CLUSTERS`, `ALLOCATION_TIMEOUT_NO_READY_CLUSTERS`, `ALLOCATION_TIMEOUT_NO_UNALLOCATED_CLUSTERS`, `ALLOCATION_TIMEOUT_NO_WARMED_UP_CLUSTERS`, `ATTACH_PROJECT_FAILURE`, `AWS_AUTHORIZATION_FAILURE`, `AWS_INACCESSIBLE_KMS_KEY_FAILURE`, `AWS_INSTANCE_PROFILE_UPDATE_FAILURE`, `AWS_INSUFFICIENT_FREE_ADDRESSES_IN_SUBNET_FAILURE`, `AWS_INSUFFICIENT_INSTANCE_CAPACITY_FAILURE`, `AWS_INVALID_KEY_PAIR`, `AWS_INVALID_KMS_KEY_STATE`, `AWS_MAX_SPOT_INSTANCE_COUNT_EXCEEDED_FAILURE`, `AWS_REQUEST_LIMIT_EXCEEDED`, `AWS_RESOURCE_QUOTA_EXCEEDED`, `AWS_UNSUPPORTED_FAILURE`, `AZURE_BYOK_KEY_PERMISSION_FAILURE`, `AZURE_EPHEMERAL_DISK_FAILURE`, `AZURE_INVALID_DEPLOYMENT_TEMPLATE`, `AZURE_OPERATION_NOT_ALLOWED_EXCEPTION`, `AZURE_PACKED_DEPLOYMENT_PARTIAL_FAILURE`, `AZURE_QUOTA_EXCEEDED_EXCEPTION`, `AZURE_RESOURCE_MANAGER_THROTTLING`, `AZURE_RESOURCE_PROVIDER_THROTTLING`, `AZURE_UNEXPECTED_DEPLOYMENT_TEMPLATE_FAILURE`, `AZURE_VM_EXTENSION_FAILURE`, `AZURE_VNET_CONFIGURATION_FAILURE`, `BOOTSTRAP_TIMEOUT`, `BOOTSTRAP_TIMEOUT_CLOUD_PROVIDER_EXCEPTION`, `BOOTSTRAP_TIMEOUT_DUE_TO_MISCONFIG`, `BUDGET_POLICY_LIMIT_ENFORCEMENT_ACTIVATED`, `BUDGET_POLICY_RESOLUTION_FAILURE`, `CLOUD_ACCOUNT_POD_QUOTA_EXCEEDED`, `CLOUD_ACCOUNT_SETUP_FAILURE`, `CLOUD_OPERATION_CANCELLED`, `CLOUD_PROVIDER_DISK_SETUP_FAILURE`, `CLOUD_PROVIDER_INSTANCE_NOT_LAUNCHED`, `CLOUD_PROVIDER_LAUNCH_FAILURE`, `CLOUD_PROVIDER_LAUNCH_FAILURE_DUE_TO_MISCONFIG`, `CLOUD_PROVIDER_RESOURCE_STOCKOUT`, `CLOUD_PROVIDER_RESOURCE_STOCKOUT_DUE_TO_MISCONFIG`, `CLOUD_PROVIDER_SHUTDOWN`, `CLUSTER_OPERATION_THROTTLED`, `CLUSTER_OPERATION_TIMEOUT`, `COMMUNICATION_LOST`, `CONTAINER_LAUNCH_FAILURE`, `CONTROL_PLANE_CONNECTION_FAILURE`, `CONTROL_PLANE_CONNECTION_FAILURE_DUE_TO_MISCONFIG`, `CONTROL_PLANE_REQUEST_FAILURE`, `CONTROL_PLANE_REQUEST_FAILURE_DUE_TO_MISCONFIG`, `DATABASE_CONNECTION_FAILURE`, `DATA_ACCESS_CONFIG_CHANGED`, `DBFS_COMPONENT_UNHEALTHY`, `DBR_IMAGE_RESOLUTION_FAILURE`, `DISASTER_RECOVERY_REPLICATION`, `DNS_RESOLUTION_ERROR`, `DOCKER_CONTAINER_CREATION_EXCEPTION`, `DOCKER_IMAGE_PULL_FAILURE`, `DOCKER_IMAGE_TOO_LARGE_FOR_INSTANCE_EXCEPTION`, `DOCKER_INVALID_OS_EXCEPTION`, `DRIVER_EVICTION`, `DRIVER_LAUNCH_TIMEOUT`, `DRIVER_NODE_UNREACHABLE`, `DRIVER_OUT_OF_DISK`, `DRIVER_OUT_OF_MEMORY`, `DRIVER_POD_CREATION_FAILURE`, `DRIVER_UNEXPECTED_FAILURE`, `DRIVER_UNHEALTHY`, `DRIVER_UNREACHABLE`, `DRIVER_UNRESPONSIVE`, `DYNAMIC_SPARK_CONF_SIZE_EXCEEDED`, `EOS_SPARK_IMAGE`, `EXECUTION_COMPONENT_UNHEALTHY`, `EXECUTOR_POD_UNSCHEDULED`, `GCP_API_RATE_QUOTA_EXCEEDED`, `GCP_DENIED_BY_ORG_POLICY`, `GCP_FORBIDDEN`, `GCP_IAM_TIMEOUT`, `GCP_INACCESSIBLE_KMS_KEY_FAILURE`, `GCP_INSUFFICIENT_CAPACITY`, `GCP_IP_SPACE_EXHAUSTED`, `GCP_KMS_KEY_PERMISSION_DENIED`, `GCP_NOT_FOUND`, `GCP_QUOTA_EXCEEDED`, `GCP_RESOURCE_QUOTA_EXCEEDED`, `GCP_SERVICE_ACCOUNT_ACCESS_DENIED`, `GCP_SERVICE_ACCOUNT_DELETED`, `GCP_SERVICE_ACCOUNT_NOT_FOUND`, `GCP_SUBNET_NOT_READY`, `GCP_TRUSTED_IMAGE_PROJECTS_VIOLATED`, `GKE_BASED_CLUSTER_TERMINATION`, `GLOBAL_INIT_SCRIPT_FAILURE`, `HIVE_METASTORE_PROVISIONING_FAILURE`, `IMAGE_PULL_PERMISSION_DENIED`, `INACTIVITY`, `INIT_CONTAINER_NOT_FINISHED`, `INIT_SCRIPT_FAILURE`, `INSTANCE_POOL_CLUSTER_FAILURE`, `INSTANCE_POOL_MAX_CAPACITY_REACHED`, `INSTANCE_POOL_NOT_FOUND`, `INSTANCE_UNREACHABLE`, `INSTANCE_UNREACHABLE_DUE_TO_MISCONFIG`, `INTERNAL_CAPACITY_FAILURE`, `INTERNAL_ERROR`, `INVALID_ARGUMENT`, `INVALID_AWS_PARAMETER`, `INVALID_INSTANCE_PLACEMENT_PROTOCOL`, `INVALID_SPARK_IMAGE`, `INVALID_WORKER_IMAGE_FAILURE`, `IN_PENALTY_BOX`, `IP_EXHAUSTION_FAILURE`, `JOB_FINISHED`, `K8S_ACTIVE_POD_QUOTA_EXCEEDED`, `K8S_AUTOSCALING_FAILURE`, `K8S_DBR_CLUSTER_LAUNCH_TIMEOUT`, `LAZY_ALLOCATION_TIMEOUT`, `MAINTENANCE_MODE`, `METASTORE_COMPONENT_UNHEALTHY`, `NEPHOS_RESOURCE_MANAGEMENT`, `NETVISOR_SETUP_TIMEOUT`, `NETWORK_CHECK_CONTROL_PLANE_FAILURE`, `NETWORK_CHECK_CONTROL_PLANE_FAILURE_DUE_TO_MISCONFIG`, `NETWORK_CHECK_DNS_SERVER_FAILURE`, `NETWORK_CHECK_DNS_SERVER_FAILURE_DUE_TO_MISCONFIG`, `NETWORK_CHECK_METADATA_ENDPOINT_FAILURE`, `NETWORK_CHECK_METADATA_ENDPOINT_FAILURE_DUE_TO_MISCONFIG`, `NETWORK_CHECK_MULTIPLE_COMPONENTS_FAILURE`, `NETWORK_CHECK_MULTIPLE_COMPONENTS_FAILURE_DUE_TO_MISCONFIG`, `NETWORK_CHECK_NIC_FAILURE`, `NETWORK_CHECK_NIC_FAILURE_DUE_TO_MISCONFIG`, `NETWORK_CHECK_STORAGE_FAILURE`, `NETWORK_CHECK_STORAGE_FAILURE_DUE_TO_MISCONFIG`, `NETWORK_CONFIGURATION_FAILURE`, `NFS_MOUNT_FAILURE`, `NO_MATCHED_K8S`, `NO_MATCHED_K8S_TESTING_TAG`, `NPIP_TUNNEL_SETUP_FAILURE`, `NPIP_TUNNEL_TOKEN_FAILURE`, `POD_ASSIGNMENT_FAILURE`, `POD_SCHEDULING_FAILURE`, `REQUEST_REJECTED`, `REQUEST_THROTTLED`, `RESOURCE_USAGE_BLOCKED`, `SECRET_CREATION_FAILURE`, `SECRET_PERMISSION_DENIED`, `SECRET_RESOLUTION_ERROR`, `SECURITY_DAEMON_REGISTRATION_EXCEPTION`, `SELF_BOOTSTRAP_FAILURE`, `SERVERLESS_LONG_RUNNING_TERMINATED`, `SKIPPED_SLOW_NODES`, `SLOW_IMAGE_DOWNLOAD`, `SPARK_ERROR`, `SPARK_IMAGE_DOWNLOAD_FAILURE`, `SPARK_IMAGE_DOWNLOAD_THROTTLED`, `SPARK_IMAGE_NOT_FOUND`, `SPARK_STARTUP_FAILURE`, `SPOT_INSTANCE_TERMINATION`, `SSH_BOOTSTRAP_FAILURE`, `STORAGE_DOWNLOAD_FAILURE`, `STORAGE_DOWNLOAD_FAILURE_DUE_TO_MISCONFIG`, `STORAGE_DOWNLOAD_FAILURE_SLOW`, `STORAGE_DOWNLOAD_FAILURE_THROTTLED`, `STS_CLIENT_SETUP_FAILURE`, `SUBNET_EXHAUSTED_FAILURE`, `TEMPORARILY_UNAVAILABLE`, `TRIAL_EXPIRED`, `UNEXPECTED_LAUNCH_FAILURE`, `UNEXPECTED_POD_RECREATION`, `UNKNOWN`, `UNSUPPORTED_INSTANCE_TYPE`, `UPDATE_INSTANCE_PROFILE_FAILURE`, `USAGE_POLICY_ENTITLEMENT_DENIED`, `USER_INITIATED_VM_TERMINATION`, `USER_REQUEST`, `WORKER_SETUP_FAILURE`, `WORKSPACE_CANCELLED_ERROR`, `WORKSPACE_CONFIGURATION_ERROR`, `WORKSPACE_UPDATE`: + case `ABUSE_DETECTED`, `ACCESS_TOKEN_FAILURE`, `ALLOCATION_TIMEOUT`, `ALLOCATION_TIMEOUT_NODE_DAEMON_NOT_READY`, `ALLOCATION_TIMEOUT_NO_HEALTHY_AND_WARMED_UP_CLUSTERS`, `ALLOCATION_TIMEOUT_NO_HEALTHY_CLUSTERS`, `ALLOCATION_TIMEOUT_NO_MATCHED_CLUSTERS`, `ALLOCATION_TIMEOUT_NO_READY_CLUSTERS`, `ALLOCATION_TIMEOUT_NO_UNALLOCATED_CLUSTERS`, `ALLOCATION_TIMEOUT_NO_WARMED_UP_CLUSTERS`, `ATTACH_PROJECT_FAILURE`, `AWS_AUTHORIZATION_FAILURE`, `AWS_INACCESSIBLE_KMS_KEY_FAILURE`, `AWS_INSTANCE_PROFILE_UPDATE_FAILURE`, `AWS_INSUFFICIENT_FREE_ADDRESSES_IN_SUBNET_FAILURE`, `AWS_INSUFFICIENT_INSTANCE_CAPACITY_FAILURE`, `AWS_INVALID_KEY_PAIR`, `AWS_INVALID_KMS_KEY_STATE`, `AWS_MAX_SPOT_INSTANCE_COUNT_EXCEEDED_FAILURE`, `AWS_REQUEST_LIMIT_EXCEEDED`, `AWS_RESOURCE_QUOTA_EXCEEDED`, `AWS_UNSUPPORTED_FAILURE`, `AZURE_BYOK_KEY_PERMISSION_FAILURE`, `AZURE_EPHEMERAL_DISK_FAILURE`, `AZURE_INVALID_DEPLOYMENT_TEMPLATE`, `AZURE_OPERATION_NOT_ALLOWED_EXCEPTION`, `AZURE_PACKED_DEPLOYMENT_PARTIAL_FAILURE`, `AZURE_QUOTA_EXCEEDED_EXCEPTION`, `AZURE_RESOURCE_MANAGER_THROTTLING`, `AZURE_RESOURCE_PROVIDER_THROTTLING`, `AZURE_UNEXPECTED_DEPLOYMENT_TEMPLATE_FAILURE`, `AZURE_VM_EXTENSION_FAILURE`, `AZURE_VNET_CONFIGURATION_FAILURE`, `BOOTSTRAP_TIMEOUT`, `BOOTSTRAP_TIMEOUT_CLOUD_PROVIDER_EXCEPTION`, `BOOTSTRAP_TIMEOUT_DUE_TO_MISCONFIG`, `BUDGET_POLICY_LIMIT_ENFORCEMENT_ACTIVATED`, `BUDGET_POLICY_RESOLUTION_FAILURE`, `CLOUD_ACCOUNT_POD_QUOTA_EXCEEDED`, `CLOUD_ACCOUNT_SETUP_FAILURE`, `CLOUD_OPERATION_CANCELLED`, `CLOUD_PROVIDER_DISK_SETUP_FAILURE`, `CLOUD_PROVIDER_INSTANCE_NOT_LAUNCHED`, `CLOUD_PROVIDER_LAUNCH_FAILURE`, `CLOUD_PROVIDER_LAUNCH_FAILURE_DUE_TO_MISCONFIG`, `CLOUD_PROVIDER_RESOURCE_STOCKOUT`, `CLOUD_PROVIDER_RESOURCE_STOCKOUT_DUE_TO_MISCONFIG`, `CLOUD_PROVIDER_SHUTDOWN`, `CLUSTER_OPERATION_THROTTLED`, `CLUSTER_OPERATION_TIMEOUT`, `COMMUNICATION_LOST`, `CONTAINER_LAUNCH_FAILURE`, `CONTROL_PLANE_CONNECTION_FAILURE`, `CONTROL_PLANE_CONNECTION_FAILURE_DUE_TO_MISCONFIG`, `CONTROL_PLANE_REQUEST_FAILURE`, `CONTROL_PLANE_REQUEST_FAILURE_DUE_TO_MISCONFIG`, `DATABASE_CONNECTION_FAILURE`, `DATA_ACCESS_CONFIG_CHANGED`, `DBFS_COMPONENT_UNHEALTHY`, `DBR_IMAGE_RESOLUTION_FAILURE`, `DISASTER_RECOVERY_REPLICATION`, `DNS_RESOLUTION_ERROR`, `DOCKER_CONTAINER_CREATION_EXCEPTION`, `DOCKER_IMAGE_PULL_FAILURE`, `DOCKER_IMAGE_TOO_LARGE_FOR_INSTANCE_EXCEPTION`, `DOCKER_INVALID_OS_EXCEPTION`, `DRIVER_EVICTION`, `DRIVER_LAUNCH_TIMEOUT`, `DRIVER_NODE_UNREACHABLE`, `DRIVER_OUT_OF_DISK`, `DRIVER_OUT_OF_MEMORY`, `DRIVER_POD_CREATION_FAILURE`, `DRIVER_UNEXPECTED_FAILURE`, `DRIVER_UNHEALTHY`, `DRIVER_UNREACHABLE`, `DRIVER_UNRESPONSIVE`, `DYNAMIC_SPARK_CONF_SIZE_EXCEEDED`, `EOS_SPARK_IMAGE`, `EXECUTION_COMPONENT_UNHEALTHY`, `EXECUTOR_POD_UNSCHEDULED`, `GCP_API_RATE_QUOTA_EXCEEDED`, `GCP_DENIED_BY_ORG_POLICY`, `GCP_FORBIDDEN`, `GCP_IAM_TIMEOUT`, `GCP_INACCESSIBLE_KMS_KEY_FAILURE`, `GCP_INSUFFICIENT_CAPACITY`, `GCP_IP_SPACE_EXHAUSTED`, `GCP_KMS_KEY_PERMISSION_DENIED`, `GCP_NOT_FOUND`, `GCP_QUOTA_EXCEEDED`, `GCP_RESOURCE_QUOTA_EXCEEDED`, `GCP_SERVICE_ACCOUNT_ACCESS_DENIED`, `GCP_SERVICE_ACCOUNT_DELETED`, `GCP_SERVICE_ACCOUNT_NOT_FOUND`, `GCP_SUBNET_NOT_READY`, `GCP_TRUSTED_IMAGE_PROJECTS_VIOLATED`, `GKE_BASED_CLUSTER_TERMINATION`, `GLOBAL_INIT_SCRIPT_FAILURE`, `HIVE_METASTORE_PROVISIONING_FAILURE`, `IMAGE_PULL_PERMISSION_DENIED`, `INACTIVITY`, `INIT_CONTAINER_NOT_FINISHED`, `INIT_SCRIPT_FAILURE`, `INSTANCE_POOL_CLUSTER_FAILURE`, `INSTANCE_POOL_MAX_CAPACITY_REACHED`, `INSTANCE_POOL_NOT_FOUND`, `INSTANCE_UNREACHABLE`, `INSTANCE_UNREACHABLE_DUE_TO_MISCONFIG`, `INTERNAL_CAPACITY_FAILURE`, `INTERNAL_ERROR`, `INVALID_ARGUMENT`, `INVALID_AWS_PARAMETER`, `INVALID_INSTANCE_PLACEMENT_PROTOCOL`, `INVALID_SPARK_IMAGE`, `INVALID_WORKER_IMAGE_FAILURE`, `IN_PENALTY_BOX`, `IP_EXHAUSTION_FAILURE`, `JOB_FINISHED`, `K8S_ACTIVE_POD_QUOTA_EXCEEDED`, `K8S_AUTOSCALING_FAILURE`, `K8S_DBR_CLUSTER_LAUNCH_TIMEOUT`, `LAZY_ALLOCATION_TIMEOUT`, `MAINTENANCE_MODE`, `METASTORE_COMPONENT_UNHEALTHY`, `NEPHOS_RESOURCE_MANAGEMENT`, `NETVISOR_SETUP_TIMEOUT`, `NETWORK_CHECK_CONTROL_PLANE_FAILURE`, `NETWORK_CHECK_CONTROL_PLANE_FAILURE_DUE_TO_MISCONFIG`, `NETWORK_CHECK_DNS_SERVER_FAILURE`, `NETWORK_CHECK_DNS_SERVER_FAILURE_DUE_TO_MISCONFIG`, `NETWORK_CHECK_METADATA_ENDPOINT_FAILURE`, `NETWORK_CHECK_METADATA_ENDPOINT_FAILURE_DUE_TO_MISCONFIG`, `NETWORK_CHECK_MULTIPLE_COMPONENTS_FAILURE`, `NETWORK_CHECK_MULTIPLE_COMPONENTS_FAILURE_DUE_TO_MISCONFIG`, `NETWORK_CHECK_NIC_FAILURE`, `NETWORK_CHECK_NIC_FAILURE_DUE_TO_MISCONFIG`, `NETWORK_CHECK_STORAGE_FAILURE`, `NETWORK_CHECK_STORAGE_FAILURE_DUE_TO_MISCONFIG`, `NETWORK_CONFIGURATION_FAILURE`, `NFS_MOUNT_FAILURE`, `NO_MATCHED_K8S`, `NO_MATCHED_K8S_TESTING_TAG`, `NPIP_TUNNEL_SETUP_FAILURE`, `NPIP_TUNNEL_TOKEN_FAILURE`, `POD_ASSIGNMENT_FAILURE`, `POD_SCHEDULING_FAILURE`, `RATE_LIMITED`, `REQUEST_REJECTED`, `REQUEST_THROTTLED`, `RESOURCE_USAGE_BLOCKED`, `SECRET_CREATION_FAILURE`, `SECRET_PERMISSION_DENIED`, `SECRET_RESOLUTION_ERROR`, `SECURITY_DAEMON_REGISTRATION_EXCEPTION`, `SELF_BOOTSTRAP_FAILURE`, `SERVERLESS_LONG_RUNNING_TERMINATED`, `SKIPPED_SLOW_NODES`, `SLOW_IMAGE_DOWNLOAD`, `SPARK_ERROR`, `SPARK_IMAGE_DOWNLOAD_FAILURE`, `SPARK_IMAGE_DOWNLOAD_THROTTLED`, `SPARK_IMAGE_NOT_FOUND`, `SPARK_STARTUP_FAILURE`, `SPOT_INSTANCE_TERMINATION`, `SSH_BOOTSTRAP_FAILURE`, `STORAGE_DOWNLOAD_FAILURE`, `STORAGE_DOWNLOAD_FAILURE_DUE_TO_MISCONFIG`, `STORAGE_DOWNLOAD_FAILURE_SLOW`, `STORAGE_DOWNLOAD_FAILURE_THROTTLED`, `STS_CLIENT_SETUP_FAILURE`, `SUBNET_EXHAUSTED_FAILURE`, `TEMPORARILY_UNAVAILABLE`, `TRIAL_EXPIRED`, `UNEXPECTED_LAUNCH_FAILURE`, `UNEXPECTED_POD_RECREATION`, `UNKNOWN`, `UNSUPPORTED_INSTANCE_TYPE`, `UPDATE_INSTANCE_PROFILE_FAILURE`, `USAGE_POLICY_ENTITLEMENT_DENIED`, `USER_INITIATED_VM_TERMINATION`, `USER_REQUEST`, `WORKER_SETUP_FAILURE`, `WORKSPACE_CANCELLED_ERROR`, `WORKSPACE_CONFIGURATION_ERROR`, `WORKSPACE_UPDATE`: *f = TerminationReasonCode(v) return nil default: - return fmt.Errorf(`value "%s" is not one of "ABUSE_DETECTED", "ACCESS_TOKEN_FAILURE", "ALLOCATION_TIMEOUT", "ALLOCATION_TIMEOUT_NODE_DAEMON_NOT_READY", "ALLOCATION_TIMEOUT_NO_HEALTHY_AND_WARMED_UP_CLUSTERS", "ALLOCATION_TIMEOUT_NO_HEALTHY_CLUSTERS", "ALLOCATION_TIMEOUT_NO_MATCHED_CLUSTERS", "ALLOCATION_TIMEOUT_NO_READY_CLUSTERS", "ALLOCATION_TIMEOUT_NO_UNALLOCATED_CLUSTERS", "ALLOCATION_TIMEOUT_NO_WARMED_UP_CLUSTERS", "ATTACH_PROJECT_FAILURE", "AWS_AUTHORIZATION_FAILURE", "AWS_INACCESSIBLE_KMS_KEY_FAILURE", "AWS_INSTANCE_PROFILE_UPDATE_FAILURE", "AWS_INSUFFICIENT_FREE_ADDRESSES_IN_SUBNET_FAILURE", "AWS_INSUFFICIENT_INSTANCE_CAPACITY_FAILURE", "AWS_INVALID_KEY_PAIR", "AWS_INVALID_KMS_KEY_STATE", "AWS_MAX_SPOT_INSTANCE_COUNT_EXCEEDED_FAILURE", "AWS_REQUEST_LIMIT_EXCEEDED", "AWS_RESOURCE_QUOTA_EXCEEDED", "AWS_UNSUPPORTED_FAILURE", "AZURE_BYOK_KEY_PERMISSION_FAILURE", "AZURE_EPHEMERAL_DISK_FAILURE", "AZURE_INVALID_DEPLOYMENT_TEMPLATE", "AZURE_OPERATION_NOT_ALLOWED_EXCEPTION", "AZURE_PACKED_DEPLOYMENT_PARTIAL_FAILURE", "AZURE_QUOTA_EXCEEDED_EXCEPTION", "AZURE_RESOURCE_MANAGER_THROTTLING", "AZURE_RESOURCE_PROVIDER_THROTTLING", "AZURE_UNEXPECTED_DEPLOYMENT_TEMPLATE_FAILURE", "AZURE_VM_EXTENSION_FAILURE", "AZURE_VNET_CONFIGURATION_FAILURE", "BOOTSTRAP_TIMEOUT", "BOOTSTRAP_TIMEOUT_CLOUD_PROVIDER_EXCEPTION", "BOOTSTRAP_TIMEOUT_DUE_TO_MISCONFIG", "BUDGET_POLICY_LIMIT_ENFORCEMENT_ACTIVATED", "BUDGET_POLICY_RESOLUTION_FAILURE", "CLOUD_ACCOUNT_POD_QUOTA_EXCEEDED", "CLOUD_ACCOUNT_SETUP_FAILURE", "CLOUD_OPERATION_CANCELLED", "CLOUD_PROVIDER_DISK_SETUP_FAILURE", "CLOUD_PROVIDER_INSTANCE_NOT_LAUNCHED", "CLOUD_PROVIDER_LAUNCH_FAILURE", "CLOUD_PROVIDER_LAUNCH_FAILURE_DUE_TO_MISCONFIG", "CLOUD_PROVIDER_RESOURCE_STOCKOUT", "CLOUD_PROVIDER_RESOURCE_STOCKOUT_DUE_TO_MISCONFIG", "CLOUD_PROVIDER_SHUTDOWN", "CLUSTER_OPERATION_THROTTLED", "CLUSTER_OPERATION_TIMEOUT", "COMMUNICATION_LOST", "CONTAINER_LAUNCH_FAILURE", "CONTROL_PLANE_CONNECTION_FAILURE", "CONTROL_PLANE_CONNECTION_FAILURE_DUE_TO_MISCONFIG", "CONTROL_PLANE_REQUEST_FAILURE", "CONTROL_PLANE_REQUEST_FAILURE_DUE_TO_MISCONFIG", "DATABASE_CONNECTION_FAILURE", "DATA_ACCESS_CONFIG_CHANGED", "DBFS_COMPONENT_UNHEALTHY", "DBR_IMAGE_RESOLUTION_FAILURE", "DISASTER_RECOVERY_REPLICATION", "DNS_RESOLUTION_ERROR", "DOCKER_CONTAINER_CREATION_EXCEPTION", "DOCKER_IMAGE_PULL_FAILURE", "DOCKER_IMAGE_TOO_LARGE_FOR_INSTANCE_EXCEPTION", "DOCKER_INVALID_OS_EXCEPTION", "DRIVER_EVICTION", "DRIVER_LAUNCH_TIMEOUT", "DRIVER_NODE_UNREACHABLE", "DRIVER_OUT_OF_DISK", "DRIVER_OUT_OF_MEMORY", "DRIVER_POD_CREATION_FAILURE", "DRIVER_UNEXPECTED_FAILURE", "DRIVER_UNHEALTHY", "DRIVER_UNREACHABLE", "DRIVER_UNRESPONSIVE", "DYNAMIC_SPARK_CONF_SIZE_EXCEEDED", "EOS_SPARK_IMAGE", "EXECUTION_COMPONENT_UNHEALTHY", "EXECUTOR_POD_UNSCHEDULED", "GCP_API_RATE_QUOTA_EXCEEDED", "GCP_DENIED_BY_ORG_POLICY", "GCP_FORBIDDEN", "GCP_IAM_TIMEOUT", "GCP_INACCESSIBLE_KMS_KEY_FAILURE", "GCP_INSUFFICIENT_CAPACITY", "GCP_IP_SPACE_EXHAUSTED", "GCP_KMS_KEY_PERMISSION_DENIED", "GCP_NOT_FOUND", "GCP_QUOTA_EXCEEDED", "GCP_RESOURCE_QUOTA_EXCEEDED", "GCP_SERVICE_ACCOUNT_ACCESS_DENIED", "GCP_SERVICE_ACCOUNT_DELETED", "GCP_SERVICE_ACCOUNT_NOT_FOUND", "GCP_SUBNET_NOT_READY", "GCP_TRUSTED_IMAGE_PROJECTS_VIOLATED", "GKE_BASED_CLUSTER_TERMINATION", "GLOBAL_INIT_SCRIPT_FAILURE", "HIVE_METASTORE_PROVISIONING_FAILURE", "IMAGE_PULL_PERMISSION_DENIED", "INACTIVITY", "INIT_CONTAINER_NOT_FINISHED", "INIT_SCRIPT_FAILURE", "INSTANCE_POOL_CLUSTER_FAILURE", "INSTANCE_POOL_MAX_CAPACITY_REACHED", "INSTANCE_POOL_NOT_FOUND", "INSTANCE_UNREACHABLE", "INSTANCE_UNREACHABLE_DUE_TO_MISCONFIG", "INTERNAL_CAPACITY_FAILURE", "INTERNAL_ERROR", "INVALID_ARGUMENT", "INVALID_AWS_PARAMETER", "INVALID_INSTANCE_PLACEMENT_PROTOCOL", "INVALID_SPARK_IMAGE", "INVALID_WORKER_IMAGE_FAILURE", "IN_PENALTY_BOX", "IP_EXHAUSTION_FAILURE", "JOB_FINISHED", "K8S_ACTIVE_POD_QUOTA_EXCEEDED", "K8S_AUTOSCALING_FAILURE", "K8S_DBR_CLUSTER_LAUNCH_TIMEOUT", "LAZY_ALLOCATION_TIMEOUT", "MAINTENANCE_MODE", "METASTORE_COMPONENT_UNHEALTHY", "NEPHOS_RESOURCE_MANAGEMENT", "NETVISOR_SETUP_TIMEOUT", "NETWORK_CHECK_CONTROL_PLANE_FAILURE", "NETWORK_CHECK_CONTROL_PLANE_FAILURE_DUE_TO_MISCONFIG", "NETWORK_CHECK_DNS_SERVER_FAILURE", "NETWORK_CHECK_DNS_SERVER_FAILURE_DUE_TO_MISCONFIG", "NETWORK_CHECK_METADATA_ENDPOINT_FAILURE", "NETWORK_CHECK_METADATA_ENDPOINT_FAILURE_DUE_TO_MISCONFIG", "NETWORK_CHECK_MULTIPLE_COMPONENTS_FAILURE", "NETWORK_CHECK_MULTIPLE_COMPONENTS_FAILURE_DUE_TO_MISCONFIG", "NETWORK_CHECK_NIC_FAILURE", "NETWORK_CHECK_NIC_FAILURE_DUE_TO_MISCONFIG", "NETWORK_CHECK_STORAGE_FAILURE", "NETWORK_CHECK_STORAGE_FAILURE_DUE_TO_MISCONFIG", "NETWORK_CONFIGURATION_FAILURE", "NFS_MOUNT_FAILURE", "NO_MATCHED_K8S", "NO_MATCHED_K8S_TESTING_TAG", "NPIP_TUNNEL_SETUP_FAILURE", "NPIP_TUNNEL_TOKEN_FAILURE", "POD_ASSIGNMENT_FAILURE", "POD_SCHEDULING_FAILURE", "REQUEST_REJECTED", "REQUEST_THROTTLED", "RESOURCE_USAGE_BLOCKED", "SECRET_CREATION_FAILURE", "SECRET_PERMISSION_DENIED", "SECRET_RESOLUTION_ERROR", "SECURITY_DAEMON_REGISTRATION_EXCEPTION", "SELF_BOOTSTRAP_FAILURE", "SERVERLESS_LONG_RUNNING_TERMINATED", "SKIPPED_SLOW_NODES", "SLOW_IMAGE_DOWNLOAD", "SPARK_ERROR", "SPARK_IMAGE_DOWNLOAD_FAILURE", "SPARK_IMAGE_DOWNLOAD_THROTTLED", "SPARK_IMAGE_NOT_FOUND", "SPARK_STARTUP_FAILURE", "SPOT_INSTANCE_TERMINATION", "SSH_BOOTSTRAP_FAILURE", "STORAGE_DOWNLOAD_FAILURE", "STORAGE_DOWNLOAD_FAILURE_DUE_TO_MISCONFIG", "STORAGE_DOWNLOAD_FAILURE_SLOW", "STORAGE_DOWNLOAD_FAILURE_THROTTLED", "STS_CLIENT_SETUP_FAILURE", "SUBNET_EXHAUSTED_FAILURE", "TEMPORARILY_UNAVAILABLE", "TRIAL_EXPIRED", "UNEXPECTED_LAUNCH_FAILURE", "UNEXPECTED_POD_RECREATION", "UNKNOWN", "UNSUPPORTED_INSTANCE_TYPE", "UPDATE_INSTANCE_PROFILE_FAILURE", "USAGE_POLICY_ENTITLEMENT_DENIED", "USER_INITIATED_VM_TERMINATION", "USER_REQUEST", "WORKER_SETUP_FAILURE", "WORKSPACE_CANCELLED_ERROR", "WORKSPACE_CONFIGURATION_ERROR", "WORKSPACE_UPDATE"`, v) + return fmt.Errorf(`value "%s" is not one of "ABUSE_DETECTED", "ACCESS_TOKEN_FAILURE", "ALLOCATION_TIMEOUT", "ALLOCATION_TIMEOUT_NODE_DAEMON_NOT_READY", "ALLOCATION_TIMEOUT_NO_HEALTHY_AND_WARMED_UP_CLUSTERS", "ALLOCATION_TIMEOUT_NO_HEALTHY_CLUSTERS", "ALLOCATION_TIMEOUT_NO_MATCHED_CLUSTERS", "ALLOCATION_TIMEOUT_NO_READY_CLUSTERS", "ALLOCATION_TIMEOUT_NO_UNALLOCATED_CLUSTERS", "ALLOCATION_TIMEOUT_NO_WARMED_UP_CLUSTERS", "ATTACH_PROJECT_FAILURE", "AWS_AUTHORIZATION_FAILURE", "AWS_INACCESSIBLE_KMS_KEY_FAILURE", "AWS_INSTANCE_PROFILE_UPDATE_FAILURE", "AWS_INSUFFICIENT_FREE_ADDRESSES_IN_SUBNET_FAILURE", "AWS_INSUFFICIENT_INSTANCE_CAPACITY_FAILURE", "AWS_INVALID_KEY_PAIR", "AWS_INVALID_KMS_KEY_STATE", "AWS_MAX_SPOT_INSTANCE_COUNT_EXCEEDED_FAILURE", "AWS_REQUEST_LIMIT_EXCEEDED", "AWS_RESOURCE_QUOTA_EXCEEDED", "AWS_UNSUPPORTED_FAILURE", "AZURE_BYOK_KEY_PERMISSION_FAILURE", "AZURE_EPHEMERAL_DISK_FAILURE", "AZURE_INVALID_DEPLOYMENT_TEMPLATE", "AZURE_OPERATION_NOT_ALLOWED_EXCEPTION", "AZURE_PACKED_DEPLOYMENT_PARTIAL_FAILURE", "AZURE_QUOTA_EXCEEDED_EXCEPTION", "AZURE_RESOURCE_MANAGER_THROTTLING", "AZURE_RESOURCE_PROVIDER_THROTTLING", "AZURE_UNEXPECTED_DEPLOYMENT_TEMPLATE_FAILURE", "AZURE_VM_EXTENSION_FAILURE", "AZURE_VNET_CONFIGURATION_FAILURE", "BOOTSTRAP_TIMEOUT", "BOOTSTRAP_TIMEOUT_CLOUD_PROVIDER_EXCEPTION", "BOOTSTRAP_TIMEOUT_DUE_TO_MISCONFIG", "BUDGET_POLICY_LIMIT_ENFORCEMENT_ACTIVATED", "BUDGET_POLICY_RESOLUTION_FAILURE", "CLOUD_ACCOUNT_POD_QUOTA_EXCEEDED", "CLOUD_ACCOUNT_SETUP_FAILURE", "CLOUD_OPERATION_CANCELLED", "CLOUD_PROVIDER_DISK_SETUP_FAILURE", "CLOUD_PROVIDER_INSTANCE_NOT_LAUNCHED", "CLOUD_PROVIDER_LAUNCH_FAILURE", "CLOUD_PROVIDER_LAUNCH_FAILURE_DUE_TO_MISCONFIG", "CLOUD_PROVIDER_RESOURCE_STOCKOUT", "CLOUD_PROVIDER_RESOURCE_STOCKOUT_DUE_TO_MISCONFIG", "CLOUD_PROVIDER_SHUTDOWN", "CLUSTER_OPERATION_THROTTLED", "CLUSTER_OPERATION_TIMEOUT", "COMMUNICATION_LOST", "CONTAINER_LAUNCH_FAILURE", "CONTROL_PLANE_CONNECTION_FAILURE", "CONTROL_PLANE_CONNECTION_FAILURE_DUE_TO_MISCONFIG", "CONTROL_PLANE_REQUEST_FAILURE", "CONTROL_PLANE_REQUEST_FAILURE_DUE_TO_MISCONFIG", "DATABASE_CONNECTION_FAILURE", "DATA_ACCESS_CONFIG_CHANGED", "DBFS_COMPONENT_UNHEALTHY", "DBR_IMAGE_RESOLUTION_FAILURE", "DISASTER_RECOVERY_REPLICATION", "DNS_RESOLUTION_ERROR", "DOCKER_CONTAINER_CREATION_EXCEPTION", "DOCKER_IMAGE_PULL_FAILURE", "DOCKER_IMAGE_TOO_LARGE_FOR_INSTANCE_EXCEPTION", "DOCKER_INVALID_OS_EXCEPTION", "DRIVER_EVICTION", "DRIVER_LAUNCH_TIMEOUT", "DRIVER_NODE_UNREACHABLE", "DRIVER_OUT_OF_DISK", "DRIVER_OUT_OF_MEMORY", "DRIVER_POD_CREATION_FAILURE", "DRIVER_UNEXPECTED_FAILURE", "DRIVER_UNHEALTHY", "DRIVER_UNREACHABLE", "DRIVER_UNRESPONSIVE", "DYNAMIC_SPARK_CONF_SIZE_EXCEEDED", "EOS_SPARK_IMAGE", "EXECUTION_COMPONENT_UNHEALTHY", "EXECUTOR_POD_UNSCHEDULED", "GCP_API_RATE_QUOTA_EXCEEDED", "GCP_DENIED_BY_ORG_POLICY", "GCP_FORBIDDEN", "GCP_IAM_TIMEOUT", "GCP_INACCESSIBLE_KMS_KEY_FAILURE", "GCP_INSUFFICIENT_CAPACITY", "GCP_IP_SPACE_EXHAUSTED", "GCP_KMS_KEY_PERMISSION_DENIED", "GCP_NOT_FOUND", "GCP_QUOTA_EXCEEDED", "GCP_RESOURCE_QUOTA_EXCEEDED", "GCP_SERVICE_ACCOUNT_ACCESS_DENIED", "GCP_SERVICE_ACCOUNT_DELETED", "GCP_SERVICE_ACCOUNT_NOT_FOUND", "GCP_SUBNET_NOT_READY", "GCP_TRUSTED_IMAGE_PROJECTS_VIOLATED", "GKE_BASED_CLUSTER_TERMINATION", "GLOBAL_INIT_SCRIPT_FAILURE", "HIVE_METASTORE_PROVISIONING_FAILURE", "IMAGE_PULL_PERMISSION_DENIED", "INACTIVITY", "INIT_CONTAINER_NOT_FINISHED", "INIT_SCRIPT_FAILURE", "INSTANCE_POOL_CLUSTER_FAILURE", "INSTANCE_POOL_MAX_CAPACITY_REACHED", "INSTANCE_POOL_NOT_FOUND", "INSTANCE_UNREACHABLE", "INSTANCE_UNREACHABLE_DUE_TO_MISCONFIG", "INTERNAL_CAPACITY_FAILURE", "INTERNAL_ERROR", "INVALID_ARGUMENT", "INVALID_AWS_PARAMETER", "INVALID_INSTANCE_PLACEMENT_PROTOCOL", "INVALID_SPARK_IMAGE", "INVALID_WORKER_IMAGE_FAILURE", "IN_PENALTY_BOX", "IP_EXHAUSTION_FAILURE", "JOB_FINISHED", "K8S_ACTIVE_POD_QUOTA_EXCEEDED", "K8S_AUTOSCALING_FAILURE", "K8S_DBR_CLUSTER_LAUNCH_TIMEOUT", "LAZY_ALLOCATION_TIMEOUT", "MAINTENANCE_MODE", "METASTORE_COMPONENT_UNHEALTHY", "NEPHOS_RESOURCE_MANAGEMENT", "NETVISOR_SETUP_TIMEOUT", "NETWORK_CHECK_CONTROL_PLANE_FAILURE", "NETWORK_CHECK_CONTROL_PLANE_FAILURE_DUE_TO_MISCONFIG", "NETWORK_CHECK_DNS_SERVER_FAILURE", "NETWORK_CHECK_DNS_SERVER_FAILURE_DUE_TO_MISCONFIG", "NETWORK_CHECK_METADATA_ENDPOINT_FAILURE", "NETWORK_CHECK_METADATA_ENDPOINT_FAILURE_DUE_TO_MISCONFIG", "NETWORK_CHECK_MULTIPLE_COMPONENTS_FAILURE", "NETWORK_CHECK_MULTIPLE_COMPONENTS_FAILURE_DUE_TO_MISCONFIG", "NETWORK_CHECK_NIC_FAILURE", "NETWORK_CHECK_NIC_FAILURE_DUE_TO_MISCONFIG", "NETWORK_CHECK_STORAGE_FAILURE", "NETWORK_CHECK_STORAGE_FAILURE_DUE_TO_MISCONFIG", "NETWORK_CONFIGURATION_FAILURE", "NFS_MOUNT_FAILURE", "NO_MATCHED_K8S", "NO_MATCHED_K8S_TESTING_TAG", "NPIP_TUNNEL_SETUP_FAILURE", "NPIP_TUNNEL_TOKEN_FAILURE", "POD_ASSIGNMENT_FAILURE", "POD_SCHEDULING_FAILURE", "RATE_LIMITED", "REQUEST_REJECTED", "REQUEST_THROTTLED", "RESOURCE_USAGE_BLOCKED", "SECRET_CREATION_FAILURE", "SECRET_PERMISSION_DENIED", "SECRET_RESOLUTION_ERROR", "SECURITY_DAEMON_REGISTRATION_EXCEPTION", "SELF_BOOTSTRAP_FAILURE", "SERVERLESS_LONG_RUNNING_TERMINATED", "SKIPPED_SLOW_NODES", "SLOW_IMAGE_DOWNLOAD", "SPARK_ERROR", "SPARK_IMAGE_DOWNLOAD_FAILURE", "SPARK_IMAGE_DOWNLOAD_THROTTLED", "SPARK_IMAGE_NOT_FOUND", "SPARK_STARTUP_FAILURE", "SPOT_INSTANCE_TERMINATION", "SSH_BOOTSTRAP_FAILURE", "STORAGE_DOWNLOAD_FAILURE", "STORAGE_DOWNLOAD_FAILURE_DUE_TO_MISCONFIG", "STORAGE_DOWNLOAD_FAILURE_SLOW", "STORAGE_DOWNLOAD_FAILURE_THROTTLED", "STS_CLIENT_SETUP_FAILURE", "SUBNET_EXHAUSTED_FAILURE", "TEMPORARILY_UNAVAILABLE", "TRIAL_EXPIRED", "UNEXPECTED_LAUNCH_FAILURE", "UNEXPECTED_POD_RECREATION", "UNKNOWN", "UNSUPPORTED_INSTANCE_TYPE", "UPDATE_INSTANCE_PROFILE_FAILURE", "USAGE_POLICY_ENTITLEMENT_DENIED", "USER_INITIATED_VM_TERMINATION", "USER_REQUEST", "WORKER_SETUP_FAILURE", "WORKSPACE_CANCELLED_ERROR", "WORKSPACE_CONFIGURATION_ERROR", "WORKSPACE_UPDATE"`, v) } } @@ -5650,6 +5652,7 @@ func (f *TerminationReasonCode) Values() []TerminationReasonCode { TerminationReasonCodeNpipTunnelTokenFailure, TerminationReasonCodePodAssignmentFailure, TerminationReasonCodePodSchedulingFailure, + TerminationReasonCodeRateLimited, TerminationReasonCodeRequestRejected, TerminationReasonCodeRequestThrottled, TerminationReasonCodeResourceUsageBlocked, diff --git a/workspace_client.go b/workspace_client.go index c07b5444a..c4c6a0f90 100644 --- a/workspace_client.go +++ b/workspace_client.go @@ -78,7 +78,7 @@ type WorkspaceClient struct { // New version of SQL Alerts AlertsV2 sql.AlertsV2Interface - // Apps run directly on a customer’s Databricks instance, integrate with + // Apps run directly on a customer's Databricks instance, integrate with // their data, use and extend Databricks services, and enable users to // interact through single sign-on. Apps apps.AppsInterface @@ -739,7 +739,9 @@ type WorkspaceClient struct { // contain the shared data. Providers sharing.ProvidersInterface - // Manage data quality of UC objects (currently support `schema`) + // [DEPRECATED] This API is deprecated. Please use the Data Quality + // Monitoring API instead (REST: /api/data-quality/v1/monitors). Manage data + // quality of UC objects (currently support `schema`). QualityMonitorV2 qualitymonitorv2.QualityMonitorV2Interface // A monitor computes and monitors data or model quality metrics for a table