Documentation ¶
Overview ¶
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.
Index ¶
- type App
- type AppAccessControlRequest
- type AppAccessControlResponse
- type AppDeployment
- type AppDeploymentArtifacts
- type AppDeploymentMode
- type AppDeploymentState
- type AppDeploymentStatus
- type AppPermission
- type AppPermissionLevel
- type AppPermissions
- type AppPermissionsDescription
- type AppPermissionsRequest
- type AppState
- type AppStatus
- type AppsAPI
- func (a *AppsAPI) Create(ctx context.Context, createAppRequest CreateAppRequest) (*WaitGetAppIdle[App], error)
- func (a *AppsAPI) CreateAndWait(ctx context.Context, createAppRequest CreateAppRequest, ...) (*App, error)deprecated
- func (a *AppsAPI) Delete(ctx context.Context, request DeleteAppRequest) error
- func (a *AppsAPI) DeleteByName(ctx context.Context, name string) error
- func (a *AppsAPI) Deploy(ctx context.Context, createAppDeploymentRequest CreateAppDeploymentRequest) (*WaitGetDeploymentAppSucceeded[AppDeployment], error)
- func (a *AppsAPI) DeployAndWait(ctx context.Context, createAppDeploymentRequest CreateAppDeploymentRequest, ...) (*AppDeployment, error)deprecated
- func (a *AppsAPI) Get(ctx context.Context, request GetAppRequest) (*App, error)
- func (a *AppsAPI) GetByName(ctx context.Context, name string) (*App, error)
- func (a *AppsAPI) GetDeployment(ctx context.Context, request GetAppDeploymentRequest) (*AppDeployment, error)
- func (a *AppsAPI) GetDeploymentByAppNameAndDeploymentId(ctx context.Context, appName string, deploymentId string) (*AppDeployment, error)
- func (a *AppsAPI) GetPermissionLevels(ctx context.Context, request GetAppPermissionLevelsRequest) (*GetAppPermissionLevelsResponse, error)
- func (a *AppsAPI) GetPermissionLevelsByAppName(ctx context.Context, appName string) (*GetAppPermissionLevelsResponse, error)
- func (a *AppsAPI) GetPermissions(ctx context.Context, request GetAppPermissionsRequest) (*AppPermissions, error)
- func (a *AppsAPI) GetPermissionsByAppName(ctx context.Context, appName string) (*AppPermissions, error)
- func (a *AppsAPI) List(ctx context.Context, request ListAppsRequest) listing.Iterator[App]
- func (a *AppsAPI) ListAll(ctx context.Context, request ListAppsRequest) ([]App, error)
- func (a *AppsAPI) ListDeployments(ctx context.Context, request ListAppDeploymentsRequest) listing.Iterator[AppDeployment]
- func (a *AppsAPI) ListDeploymentsAll(ctx context.Context, request ListAppDeploymentsRequest) ([]AppDeployment, error)
- func (a *AppsAPI) ListDeploymentsByAppName(ctx context.Context, appName string) (*ListAppDeploymentsResponse, error)
- func (a *AppsAPI) SetPermissions(ctx context.Context, request AppPermissionsRequest) (*AppPermissions, error)
- func (a *AppsAPI) Start(ctx context.Context, startAppRequest StartAppRequest) (*WaitGetDeploymentAppSucceeded[AppDeployment], error)
- func (a *AppsAPI) StartAndWait(ctx context.Context, startAppRequest StartAppRequest, ...) (*AppDeployment, error)deprecated
- func (a *AppsAPI) Stop(ctx context.Context, request StopAppRequest) error
- func (a *AppsAPI) Update(ctx context.Context, request UpdateAppRequest) (*App, error)
- func (a *AppsAPI) UpdatePermissions(ctx context.Context, request AppPermissionsRequest) (*AppPermissions, error)
- func (a *AppsAPI) WaitGetAppIdle(ctx context.Context, name string, timeout time.Duration, callback func(*App)) (*App, error)
- func (a *AppsAPI) WaitGetDeploymentAppSucceeded(ctx context.Context, appName string, deploymentId string, ...) (*AppDeployment, error)
- type AppsInterface
- type AppsService
- type CreateAppDeploymentRequest
- type CreateAppRequest
- type DeleteAppRequest
- type DeleteResponse
- type GetAppDeploymentRequest
- type GetAppPermissionLevelsRequest
- type GetAppPermissionLevelsResponse
- type GetAppPermissionsRequest
- type GetAppRequest
- type ListAppDeploymentsRequest
- type ListAppDeploymentsResponse
- type ListAppsRequest
- type ListAppsResponse
- type StartAppRequest
- type StopAppRequest
- type StopAppResponse
- type UpdateAppRequest
- type WaitGetAppIdle
- type WaitGetDeploymentAppSucceeded
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { // The active deployment of the app. ActiveDeployment *AppDeployment `json:"active_deployment,omitempty"` // The creation time of the app. Formatted timestamp in ISO 6801. CreateTime string `json:"create_time,omitempty"` // The email of the user that created the app. Creator string `json:"creator,omitempty"` // The description of the app. Description string `json:"description,omitempty"` // The name of the app. The name must contain only lowercase alphanumeric // characters and hyphens. It must be unique within the workspace. Name string `json:"name"` // The pending deployment of the app. PendingDeployment *AppDeployment `json:"pending_deployment,omitempty"` ServicePrincipalId int64 `json:"service_principal_id,omitempty"` ServicePrincipalName string `json:"service_principal_name,omitempty"` Status *AppStatus `json:"status,omitempty"` // The update time of the app. Formatted timestamp in ISO 6801. UpdateTime string `json:"update_time,omitempty"` // The email of the user that last updated the app. Updater string `json:"updater,omitempty"` // The URL of the app once it is deployed. Url string `json:"url,omitempty"` ForceSendFields []string `json:"-"` }
func (App) MarshalJSON ¶
func (*App) UnmarshalJSON ¶
type AppAccessControlRequest ¶
type AppAccessControlRequest struct { // name of the group GroupName string `json:"group_name,omitempty"` // Permission level PermissionLevel AppPermissionLevel `json:"permission_level,omitempty"` // application ID of a service principal ServicePrincipalName string `json:"service_principal_name,omitempty"` // name of the user UserName string `json:"user_name,omitempty"` ForceSendFields []string `json:"-"` }
func (AppAccessControlRequest) MarshalJSON ¶
func (s AppAccessControlRequest) MarshalJSON() ([]byte, error)
func (*AppAccessControlRequest) UnmarshalJSON ¶
func (s *AppAccessControlRequest) UnmarshalJSON(b []byte) error
type AppAccessControlResponse ¶
type AppAccessControlResponse struct { // All permissions. AllPermissions []AppPermission `json:"all_permissions,omitempty"` // Display name of the user or service principal. DisplayName string `json:"display_name,omitempty"` // name of the group GroupName string `json:"group_name,omitempty"` // Name of the service principal. ServicePrincipalName string `json:"service_principal_name,omitempty"` // name of the user UserName string `json:"user_name,omitempty"` ForceSendFields []string `json:"-"` }
func (AppAccessControlResponse) MarshalJSON ¶
func (s AppAccessControlResponse) MarshalJSON() ([]byte, error)
func (*AppAccessControlResponse) UnmarshalJSON ¶
func (s *AppAccessControlResponse) UnmarshalJSON(b []byte) error
type AppDeployment ¶
type AppDeployment struct { // The creation time of the deployment. Formatted timestamp in ISO 6801. CreateTime string `json:"create_time,omitempty"` // The email of the user creates the deployment. Creator string `json:"creator,omitempty"` // The deployment artifacts for an app. DeploymentArtifacts *AppDeploymentArtifacts `json:"deployment_artifacts,omitempty"` // The unique id of the deployment. DeploymentId string `json:"deployment_id,omitempty"` // The mode of which the deployment will manage the source code. Mode AppDeploymentMode `json:"mode,omitempty"` // The workspace file system path of the source code used to create the app // deployment. This is different from // `deployment_artifacts.source_code_path`, which is the path used by the // deployed app. The former refers to the original source code location of // the app in the workspace during deployment creation, whereas the latter // provides a system generated stable snapshotted source code path used by // the deployment. SourceCodePath string `json:"source_code_path"` // Status and status message of the deployment Status *AppDeploymentStatus `json:"status,omitempty"` // The update time of the deployment. Formatted timestamp in ISO 6801. UpdateTime string `json:"update_time,omitempty"` ForceSendFields []string `json:"-"` }
func (AppDeployment) MarshalJSON ¶
func (s AppDeployment) MarshalJSON() ([]byte, error)
func (*AppDeployment) UnmarshalJSON ¶
func (s *AppDeployment) UnmarshalJSON(b []byte) error
type AppDeploymentArtifacts ¶
type AppDeploymentArtifacts struct { // The snapshotted workspace file system path of the source code loaded by // the deployed app. SourceCodePath string `json:"source_code_path,omitempty"` ForceSendFields []string `json:"-"` }
func (AppDeploymentArtifacts) MarshalJSON ¶
func (s AppDeploymentArtifacts) MarshalJSON() ([]byte, error)
func (*AppDeploymentArtifacts) UnmarshalJSON ¶
func (s *AppDeploymentArtifacts) UnmarshalJSON(b []byte) error
type AppDeploymentMode ¶
type AppDeploymentMode string
const AppDeploymentModeAutoSync AppDeploymentMode = `AUTO_SYNC`
const AppDeploymentModeSnapshot AppDeploymentMode = `SNAPSHOT`
func (*AppDeploymentMode) Set ¶
func (f *AppDeploymentMode) Set(v string) error
Set raw string value and validate it against allowed values
func (*AppDeploymentMode) String ¶
func (f *AppDeploymentMode) String() string
String representation for fmt.Print
func (*AppDeploymentMode) Type ¶
func (f *AppDeploymentMode) Type() string
Type always returns AppDeploymentMode to satisfy [pflag.Value] interface
type AppDeploymentState ¶
type AppDeploymentState string
const AppDeploymentStateFailed AppDeploymentState = `FAILED`
const AppDeploymentStateInProgress AppDeploymentState = `IN_PROGRESS`
const AppDeploymentStateStopped AppDeploymentState = `STOPPED`
const AppDeploymentStateSucceeded AppDeploymentState = `SUCCEEDED`
func (*AppDeploymentState) Set ¶
func (f *AppDeploymentState) Set(v string) error
Set raw string value and validate it against allowed values
func (*AppDeploymentState) String ¶
func (f *AppDeploymentState) String() string
String representation for fmt.Print
func (*AppDeploymentState) Type ¶
func (f *AppDeploymentState) Type() string
Type always returns AppDeploymentState to satisfy [pflag.Value] interface
type AppDeploymentStatus ¶
type AppDeploymentStatus struct { // Message corresponding with the deployment state. Message string `json:"message,omitempty"` // State of the deployment. State AppDeploymentState `json:"state,omitempty"` ForceSendFields []string `json:"-"` }
func (AppDeploymentStatus) MarshalJSON ¶
func (s AppDeploymentStatus) MarshalJSON() ([]byte, error)
func (*AppDeploymentStatus) UnmarshalJSON ¶
func (s *AppDeploymentStatus) UnmarshalJSON(b []byte) error
type AppPermission ¶
type AppPermission struct { Inherited bool `json:"inherited,omitempty"` InheritedFromObject []string `json:"inherited_from_object,omitempty"` // Permission level PermissionLevel AppPermissionLevel `json:"permission_level,omitempty"` ForceSendFields []string `json:"-"` }
func (AppPermission) MarshalJSON ¶
func (s AppPermission) MarshalJSON() ([]byte, error)
func (*AppPermission) UnmarshalJSON ¶
func (s *AppPermission) UnmarshalJSON(b []byte) error
type AppPermissionLevel ¶
type AppPermissionLevel string
Permission level
const AppPermissionLevelCanManage AppPermissionLevel = `CAN_MANAGE`
const AppPermissionLevelCanUse AppPermissionLevel = `CAN_USE`
func (*AppPermissionLevel) Set ¶
func (f *AppPermissionLevel) Set(v string) error
Set raw string value and validate it against allowed values
func (*AppPermissionLevel) String ¶
func (f *AppPermissionLevel) String() string
String representation for fmt.Print
func (*AppPermissionLevel) Type ¶
func (f *AppPermissionLevel) Type() string
Type always returns AppPermissionLevel to satisfy [pflag.Value] interface
type AppPermissions ¶
type AppPermissions struct { AccessControlList []AppAccessControlResponse `json:"access_control_list,omitempty"` ObjectId string `json:"object_id,omitempty"` ObjectType string `json:"object_type,omitempty"` ForceSendFields []string `json:"-"` }
func (AppPermissions) MarshalJSON ¶
func (s AppPermissions) MarshalJSON() ([]byte, error)
func (*AppPermissions) UnmarshalJSON ¶
func (s *AppPermissions) UnmarshalJSON(b []byte) error
type AppPermissionsDescription ¶
type AppPermissionsDescription struct { Description string `json:"description,omitempty"` // Permission level PermissionLevel AppPermissionLevel `json:"permission_level,omitempty"` ForceSendFields []string `json:"-"` }
func (AppPermissionsDescription) MarshalJSON ¶
func (s AppPermissionsDescription) MarshalJSON() ([]byte, error)
func (*AppPermissionsDescription) UnmarshalJSON ¶
func (s *AppPermissionsDescription) UnmarshalJSON(b []byte) error
type AppPermissionsRequest ¶
type AppPermissionsRequest struct { AccessControlList []AppAccessControlRequest `json:"access_control_list,omitempty"` // The app for which to get or manage permissions. AppName string `json:"-" url:"-"` }
type AppState ¶
type AppState string
const AppStateCreating AppState = `CREATING`
const AppStateDeleted AppState = `DELETED`
const AppStateDeleting AppState = `DELETING`
const AppStateError AppState = `ERROR`
const AppStateIdle AppState = `IDLE`
const AppStateRunning AppState = `RUNNING`
const AppStateStarting AppState = `STARTING`
type AppStatus ¶
type AppStatus struct { // Message corresponding with the app state. Message string `json:"message,omitempty"` // State of the app. State AppState `json:"state,omitempty"` ForceSendFields []string `json:"-"` }
func (AppStatus) MarshalJSON ¶
func (*AppStatus) UnmarshalJSON ¶
type AppsAPI ¶
type AppsAPI struct {
// contains filtered or unexported fields
}
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.
func NewApps ¶
func NewApps(client *client.DatabricksClient) *AppsAPI
func (*AppsAPI) Create ¶
func (a *AppsAPI) Create(ctx context.Context, createAppRequest CreateAppRequest) (*WaitGetAppIdle[App], error)
Create an app.
Creates a new app.
func (*AppsAPI) CreateAndWait
deprecated
func (a *AppsAPI) CreateAndWait(ctx context.Context, createAppRequest CreateAppRequest, options ...retries.Option[App]) (*App, error)
Calls AppsAPI.Create and waits to reach IDLE state
You can override the default timeout of 20 minutes by calling adding retries.Timeout[App](60*time.Minute) functional option.
Deprecated: use AppsAPI.Create.Get() or AppsAPI.WaitGetAppIdle
func (*AppsAPI) Delete ¶
func (a *AppsAPI) Delete(ctx context.Context, request DeleteAppRequest) error
func (*AppsAPI) Deploy ¶
func (a *AppsAPI) Deploy(ctx context.Context, createAppDeploymentRequest CreateAppDeploymentRequest) (*WaitGetDeploymentAppSucceeded[AppDeployment], error)
Create an app deployment.
Creates an app deployment for the app with the supplied name.
func (*AppsAPI) DeployAndWait
deprecated
func (a *AppsAPI) DeployAndWait(ctx context.Context, createAppDeploymentRequest CreateAppDeploymentRequest, options ...retries.Option[AppDeployment]) (*AppDeployment, error)
Calls AppsAPI.Deploy and waits to reach SUCCEEDED state
You can override the default timeout of 20 minutes by calling adding retries.Timeout[AppDeployment](60*time.Minute) functional option.
Deprecated: use AppsAPI.Deploy.Get() or AppsAPI.WaitGetDeploymentAppSucceeded
func (*AppsAPI) Get ¶
func (a *AppsAPI) Get(ctx context.Context, request GetAppRequest) (*App, error)
func (*AppsAPI) GetDeployment ¶
func (a *AppsAPI) GetDeployment(ctx context.Context, request GetAppDeploymentRequest) (*AppDeployment, error)
func (*AppsAPI) GetDeploymentByAppNameAndDeploymentId ¶
func (a *AppsAPI) GetDeploymentByAppNameAndDeploymentId(ctx context.Context, appName string, deploymentId string) (*AppDeployment, error)
Get an app deployment.
Retrieves information for the app deployment with the supplied name and deployment id.
func (*AppsAPI) GetPermissionLevels ¶
func (a *AppsAPI) GetPermissionLevels(ctx context.Context, request GetAppPermissionLevelsRequest) (*GetAppPermissionLevelsResponse, error)
func (*AppsAPI) GetPermissionLevelsByAppName ¶
func (a *AppsAPI) GetPermissionLevelsByAppName(ctx context.Context, appName string) (*GetAppPermissionLevelsResponse, error)
Get app permission levels.
Gets the permission levels that a user can have on an object.
func (*AppsAPI) GetPermissions ¶
func (a *AppsAPI) GetPermissions(ctx context.Context, request GetAppPermissionsRequest) (*AppPermissions, error)
func (*AppsAPI) GetPermissionsByAppName ¶
func (a *AppsAPI) GetPermissionsByAppName(ctx context.Context, appName string) (*AppPermissions, error)
Get app permissions.
Gets the permissions of an app. Apps can inherit permissions from their root object.
func (*AppsAPI) List ¶
List apps.
Lists all apps in the workspace.
This method is generated by Databricks SDK Code Generator.
func (*AppsAPI) ListAll ¶
List apps.
Lists all apps in the workspace.
This method is generated by Databricks SDK Code Generator.
func (*AppsAPI) ListDeployments ¶
func (a *AppsAPI) ListDeployments(ctx context.Context, request ListAppDeploymentsRequest) listing.Iterator[AppDeployment]
List app deployments.
Lists all app deployments for the app with the supplied name.
This method is generated by Databricks SDK Code Generator.
func (*AppsAPI) ListDeploymentsAll ¶
func (a *AppsAPI) ListDeploymentsAll(ctx context.Context, request ListAppDeploymentsRequest) ([]AppDeployment, error)
List app deployments.
Lists all app deployments for the app with the supplied name.
This method is generated by Databricks SDK Code Generator.
func (*AppsAPI) ListDeploymentsByAppName ¶
func (a *AppsAPI) ListDeploymentsByAppName(ctx context.Context, appName string) (*ListAppDeploymentsResponse, error)
List app deployments.
Lists all app deployments for the app with the supplied name.
func (*AppsAPI) SetPermissions ¶
func (a *AppsAPI) SetPermissions(ctx context.Context, request AppPermissionsRequest) (*AppPermissions, error)
func (*AppsAPI) Start ¶
func (a *AppsAPI) Start(ctx context.Context, startAppRequest StartAppRequest) (*WaitGetDeploymentAppSucceeded[AppDeployment], error)
Start an app.
Start the last active deployment of the app in the workspace.
func (*AppsAPI) StartAndWait
deprecated
func (a *AppsAPI) StartAndWait(ctx context.Context, startAppRequest StartAppRequest, options ...retries.Option[AppDeployment]) (*AppDeployment, error)
Calls AppsAPI.Start and waits to reach SUCCEEDED state
You can override the default timeout of 20 minutes by calling adding retries.Timeout[AppDeployment](60*time.Minute) functional option.
Deprecated: use AppsAPI.Start.Get() or AppsAPI.WaitGetDeploymentAppSucceeded
func (*AppsAPI) Update ¶
func (a *AppsAPI) Update(ctx context.Context, request UpdateAppRequest) (*App, error)
func (*AppsAPI) UpdatePermissions ¶
func (a *AppsAPI) UpdatePermissions(ctx context.Context, request AppPermissionsRequest) (*AppPermissions, error)
func (*AppsAPI) WaitGetAppIdle ¶
func (a *AppsAPI) WaitGetAppIdle(ctx context.Context, name string, timeout time.Duration, callback func(*App)) (*App, error)
WaitGetAppIdle repeatedly calls AppsAPI.Get and waits to reach IDLE state
func (*AppsAPI) WaitGetDeploymentAppSucceeded ¶
func (a *AppsAPI) WaitGetDeploymentAppSucceeded(ctx context.Context, appName string, deploymentId string, timeout time.Duration, callback func(*AppDeployment)) (*AppDeployment, error)
WaitGetDeploymentAppSucceeded repeatedly calls AppsAPI.GetDeployment and waits to reach SUCCEEDED state
type AppsInterface ¶
type AppsInterface interface { // WaitGetAppIdle repeatedly calls [AppsAPI.Get] and waits to reach IDLE state WaitGetAppIdle(ctx context.Context, name string, timeout time.Duration, callback func(*App)) (*App, error) // WaitGetDeploymentAppSucceeded repeatedly calls [AppsAPI.GetDeployment] and waits to reach SUCCEEDED state WaitGetDeploymentAppSucceeded(ctx context.Context, appName string, deploymentId string, timeout time.Duration, callback func(*AppDeployment)) (*AppDeployment, error) // Create an app. // // Creates a new app. Create(ctx context.Context, createAppRequest CreateAppRequest) (*WaitGetAppIdle[App], error) // Calls [AppsAPIInterface.Create] and waits to reach IDLE state // // You can override the default timeout of 20 minutes by calling adding // retries.Timeout[App](60*time.Minute) functional option. // // Deprecated: use [AppsAPIInterface.Create].Get() or [AppsAPIInterface.WaitGetAppIdle] CreateAndWait(ctx context.Context, createAppRequest CreateAppRequest, options ...retries.Option[App]) (*App, error) // Delete an app. // // Deletes an app. Delete(ctx context.Context, request DeleteAppRequest) error // Delete an app. // // Deletes an app. DeleteByName(ctx context.Context, name string) error // Create an app deployment. // // Creates an app deployment for the app with the supplied name. Deploy(ctx context.Context, createAppDeploymentRequest CreateAppDeploymentRequest) (*WaitGetDeploymentAppSucceeded[AppDeployment], error) // Calls [AppsAPIInterface.Deploy] and waits to reach SUCCEEDED state // // You can override the default timeout of 20 minutes by calling adding // retries.Timeout[AppDeployment](60*time.Minute) functional option. // // Deprecated: use [AppsAPIInterface.Deploy].Get() or [AppsAPIInterface.WaitGetDeploymentAppSucceeded] DeployAndWait(ctx context.Context, createAppDeploymentRequest CreateAppDeploymentRequest, options ...retries.Option[AppDeployment]) (*AppDeployment, error) // Get an app. // // Retrieves information for the app with the supplied name. Get(ctx context.Context, request GetAppRequest) (*App, error) // Get an app. // // Retrieves information for the app with the supplied name. GetByName(ctx context.Context, name string) (*App, error) // Get an app deployment. // // Retrieves information for the app deployment with the supplied name and // deployment id. GetDeployment(ctx context.Context, request GetAppDeploymentRequest) (*AppDeployment, error) // Get an app deployment. // // Retrieves information for the app deployment with the supplied name and // deployment id. GetDeploymentByAppNameAndDeploymentId(ctx context.Context, appName string, deploymentId string) (*AppDeployment, error) // Get app permission levels. // // Gets the permission levels that a user can have on an object. GetPermissionLevels(ctx context.Context, request GetAppPermissionLevelsRequest) (*GetAppPermissionLevelsResponse, error) // Get app permission levels. // // Gets the permission levels that a user can have on an object. GetPermissionLevelsByAppName(ctx context.Context, appName string) (*GetAppPermissionLevelsResponse, error) // Get app permissions. // // Gets the permissions of an app. Apps can inherit permissions from their root // object. GetPermissions(ctx context.Context, request GetAppPermissionsRequest) (*AppPermissions, error) // Get app permissions. // // Gets the permissions of an app. Apps can inherit permissions from their root // object. GetPermissionsByAppName(ctx context.Context, appName string) (*AppPermissions, error) // List apps. // // Lists all apps in the workspace. // // This method is generated by Databricks SDK Code Generator. List(ctx context.Context, request ListAppsRequest) listing.Iterator[App] // List apps. // // Lists all apps in the workspace. // // This method is generated by Databricks SDK Code Generator. ListAll(ctx context.Context, request ListAppsRequest) ([]App, error) // List app deployments. // // Lists all app deployments for the app with the supplied name. // // This method is generated by Databricks SDK Code Generator. ListDeployments(ctx context.Context, request ListAppDeploymentsRequest) listing.Iterator[AppDeployment] // List app deployments. // // Lists all app deployments for the app with the supplied name. // // This method is generated by Databricks SDK Code Generator. ListDeploymentsAll(ctx context.Context, request ListAppDeploymentsRequest) ([]AppDeployment, error) // List app deployments. // // Lists all app deployments for the app with the supplied name. ListDeploymentsByAppName(ctx context.Context, appName string) (*ListAppDeploymentsResponse, error) // Set app permissions. // // Sets permissions on an app. Apps can inherit permissions from their root // object. SetPermissions(ctx context.Context, request AppPermissionsRequest) (*AppPermissions, error) // Start an app. // // Start the last active deployment of the app in the workspace. Start(ctx context.Context, startAppRequest StartAppRequest) (*WaitGetDeploymentAppSucceeded[AppDeployment], error) // Calls [AppsAPIInterface.Start] and waits to reach SUCCEEDED state // // You can override the default timeout of 20 minutes by calling adding // retries.Timeout[AppDeployment](60*time.Minute) functional option. // // Deprecated: use [AppsAPIInterface.Start].Get() or [AppsAPIInterface.WaitGetDeploymentAppSucceeded] StartAndWait(ctx context.Context, startAppRequest StartAppRequest, options ...retries.Option[AppDeployment]) (*AppDeployment, error) // Stop an app. // // Stops the active deployment of the app in the workspace. Stop(ctx context.Context, request StopAppRequest) error // Update an app. // // Updates the app with the supplied name. Update(ctx context.Context, request UpdateAppRequest) (*App, error) // Update app permissions. // // Updates the permissions on an app. Apps can inherit permissions from their // root object. UpdatePermissions(ctx context.Context, request AppPermissionsRequest) (*AppPermissions, error) }
type AppsService ¶
type AppsService interface { // Create an app. // // Creates a new app. Create(ctx context.Context, request CreateAppRequest) (*App, error) // Delete an app. // // Deletes an app. Delete(ctx context.Context, request DeleteAppRequest) error // Create an app deployment. // // Creates an app deployment for the app with the supplied name. Deploy(ctx context.Context, request CreateAppDeploymentRequest) (*AppDeployment, error) // Get an app. // // Retrieves information for the app with the supplied name. Get(ctx context.Context, request GetAppRequest) (*App, error) // Get an app deployment. // // Retrieves information for the app deployment with the supplied name and // deployment id. GetDeployment(ctx context.Context, request GetAppDeploymentRequest) (*AppDeployment, error) // Get app permission levels. // // Gets the permission levels that a user can have on an object. GetPermissionLevels(ctx context.Context, request GetAppPermissionLevelsRequest) (*GetAppPermissionLevelsResponse, error) // Get app permissions. // // Gets the permissions of an app. Apps can inherit permissions from their // root object. GetPermissions(ctx context.Context, request GetAppPermissionsRequest) (*AppPermissions, error) // List apps. // // Lists all apps in the workspace. // // Use ListAll() to get all App instances, which will iterate over every result page. List(ctx context.Context, request ListAppsRequest) (*ListAppsResponse, error) // List app deployments. // // Lists all app deployments for the app with the supplied name. // // Use ListDeploymentsAll() to get all AppDeployment instances, which will iterate over every result page. ListDeployments(ctx context.Context, request ListAppDeploymentsRequest) (*ListAppDeploymentsResponse, error) // Set app permissions. // // Sets permissions on an app. Apps can inherit permissions from their root // object. SetPermissions(ctx context.Context, request AppPermissionsRequest) (*AppPermissions, error) // Start an app. // // Start the last active deployment of the app in the workspace. Start(ctx context.Context, request StartAppRequest) (*AppDeployment, error) // Stop an app. // // Stops the active deployment of the app in the workspace. Stop(ctx context.Context, request StopAppRequest) error // Update an app. // // Updates the app with the supplied name. Update(ctx context.Context, request UpdateAppRequest) (*App, error) // Update app permissions. // // Updates the permissions on an app. Apps can inherit permissions from // their root object. UpdatePermissions(ctx context.Context, request AppPermissionsRequest) (*AppPermissions, error) }
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 CreateAppDeploymentRequest ¶
type CreateAppDeploymentRequest struct { // The name of the app. AppName string `json:"-" url:"-"` // The mode of which the deployment will manage the source code. Mode AppDeploymentMode `json:"mode,omitempty"` // The workspace file system path of the source code used to create the app // deployment. This is different from // `deployment_artifacts.source_code_path`, which is the path used by the // deployed app. The former refers to the original source code location of // the app in the workspace during deployment creation, whereas the latter // provides a system generated stable snapshotted source code path used by // the deployment. SourceCodePath string `json:"source_code_path"` }
type CreateAppRequest ¶
type CreateAppRequest struct { // The description of the app. Description string `json:"description,omitempty"` // The name of the app. The name must contain only lowercase alphanumeric // characters and hyphens. It must be unique within the workspace. Name string `json:"name"` ForceSendFields []string `json:"-"` }
func (CreateAppRequest) MarshalJSON ¶
func (s CreateAppRequest) MarshalJSON() ([]byte, error)
func (*CreateAppRequest) UnmarshalJSON ¶
func (s *CreateAppRequest) UnmarshalJSON(b []byte) error
type DeleteAppRequest ¶
type DeleteAppRequest struct { // The name of the app. Name string `json:"-" url:"-"` }
Delete an app
type DeleteResponse ¶
type DeleteResponse struct { }
type GetAppDeploymentRequest ¶
type GetAppDeploymentRequest struct { // The name of the app. AppName string `json:"-" url:"-"` // The unique id of the deployment. DeploymentId string `json:"-" url:"-"` }
Get an app deployment
type GetAppPermissionLevelsRequest ¶
type GetAppPermissionLevelsRequest struct { // The app for which to get or manage permissions. AppName string `json:"-" url:"-"` }
Get app permission levels
type GetAppPermissionLevelsResponse ¶
type GetAppPermissionLevelsResponse struct { // Specific permission levels PermissionLevels []AppPermissionsDescription `json:"permission_levels,omitempty"` }
type GetAppPermissionsRequest ¶
type GetAppPermissionsRequest struct { // The app for which to get or manage permissions. AppName string `json:"-" url:"-"` }
Get app permissions
type GetAppRequest ¶
type GetAppRequest struct { // The name of the app. Name string `json:"-" url:"-"` }
Get an app
type ListAppDeploymentsRequest ¶
type ListAppDeploymentsRequest struct { // The name of the app. AppName string `json:"-" url:"-"` // Upper bound for items returned. PageSize int `json:"-" url:"page_size,omitempty"` // Pagination token to go to the next page of apps. Requests first page if // absent. PageToken string `json:"-" url:"page_token,omitempty"` ForceSendFields []string `json:"-"` }
List app deployments
func (ListAppDeploymentsRequest) MarshalJSON ¶
func (s ListAppDeploymentsRequest) MarshalJSON() ([]byte, error)
func (*ListAppDeploymentsRequest) UnmarshalJSON ¶
func (s *ListAppDeploymentsRequest) UnmarshalJSON(b []byte) error
type ListAppDeploymentsResponse ¶
type ListAppDeploymentsResponse struct { // Deployment history of the app. AppDeployments []AppDeployment `json:"app_deployments,omitempty"` // Pagination token to request the next page of apps. NextPageToken string `json:"next_page_token,omitempty"` ForceSendFields []string `json:"-"` }
func (ListAppDeploymentsResponse) MarshalJSON ¶
func (s ListAppDeploymentsResponse) MarshalJSON() ([]byte, error)
func (*ListAppDeploymentsResponse) UnmarshalJSON ¶
func (s *ListAppDeploymentsResponse) UnmarshalJSON(b []byte) error
type ListAppsRequest ¶
type ListAppsRequest struct { // Upper bound for items returned. PageSize int `json:"-" url:"page_size,omitempty"` // Pagination token to go to the next page of apps. Requests first page if // absent. PageToken string `json:"-" url:"page_token,omitempty"` ForceSendFields []string `json:"-"` }
List apps
func (ListAppsRequest) MarshalJSON ¶
func (s ListAppsRequest) MarshalJSON() ([]byte, error)
func (*ListAppsRequest) UnmarshalJSON ¶
func (s *ListAppsRequest) UnmarshalJSON(b []byte) error
type ListAppsResponse ¶
type ListAppsResponse struct { Apps []App `json:"apps,omitempty"` // Pagination token to request the next page of apps. NextPageToken string `json:"next_page_token,omitempty"` ForceSendFields []string `json:"-"` }
func (ListAppsResponse) MarshalJSON ¶
func (s ListAppsResponse) MarshalJSON() ([]byte, error)
func (*ListAppsResponse) UnmarshalJSON ¶
func (s *ListAppsResponse) UnmarshalJSON(b []byte) error
type StartAppRequest ¶
type StartAppRequest struct { // The name of the app. Name string `json:"-" url:"-"` }
type StopAppRequest ¶
type StopAppRequest struct { // The name of the app. Name string `json:"-" url:"-"` }
type StopAppResponse ¶
type StopAppResponse struct { }
type UpdateAppRequest ¶
type UpdateAppRequest struct { // The description of the app. Description string `json:"description,omitempty"` // The name of the app. The name must contain only lowercase alphanumeric // characters and hyphens. It must be unique within the workspace. Name string `json:"name" url:"-"` ForceSendFields []string `json:"-"` }
func (UpdateAppRequest) MarshalJSON ¶
func (s UpdateAppRequest) MarshalJSON() ([]byte, error)
func (*UpdateAppRequest) UnmarshalJSON ¶
func (s *UpdateAppRequest) UnmarshalJSON(b []byte) error
type WaitGetAppIdle ¶
type WaitGetAppIdle[R any] struct { Response *R Name string `json:"name"` Poll func(time.Duration, func(*App)) (*App, error) // contains filtered or unexported fields }
WaitGetAppIdle is a wrapper that calls AppsAPI.WaitGetAppIdle and waits to reach IDLE state.
func (*WaitGetAppIdle[R]) Get ¶
func (w *WaitGetAppIdle[R]) Get() (*App, error)
Get the App with the default timeout of 20 minutes.
func (*WaitGetAppIdle[R]) GetWithTimeout ¶
func (w *WaitGetAppIdle[R]) GetWithTimeout(timeout time.Duration) (*App, error)
Get the App with custom timeout.
func (*WaitGetAppIdle[R]) OnProgress ¶
func (w *WaitGetAppIdle[R]) OnProgress(callback func(*App)) *WaitGetAppIdle[R]
OnProgress invokes a callback every time it polls for the status update.
type WaitGetDeploymentAppSucceeded ¶
type WaitGetDeploymentAppSucceeded[R any] struct { Response *R AppName string `json:"app_name"` DeploymentId string `json:"deployment_id"` Poll func(time.Duration, func(*AppDeployment)) (*AppDeployment, error) // contains filtered or unexported fields }
WaitGetDeploymentAppSucceeded is a wrapper that calls AppsAPI.WaitGetDeploymentAppSucceeded and waits to reach SUCCEEDED state.
func (*WaitGetDeploymentAppSucceeded[R]) Get ¶
func (w *WaitGetDeploymentAppSucceeded[R]) Get() (*AppDeployment, error)
Get the AppDeployment with the default timeout of 20 minutes.
func (*WaitGetDeploymentAppSucceeded[R]) GetWithTimeout ¶
func (w *WaitGetDeploymentAppSucceeded[R]) GetWithTimeout(timeout time.Duration) (*AppDeployment, error)
Get the AppDeployment with custom timeout.
func (*WaitGetDeploymentAppSucceeded[R]) OnProgress ¶
func (w *WaitGetDeploymentAppSucceeded[R]) OnProgress(callback func(*AppDeployment)) *WaitGetDeploymentAppSucceeded[R]
OnProgress invokes a callback every time it polls for the status update.