dashboards

package
v0.43.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 7 Imported by: 9

Documentation

Overview

These APIs provide specific management operations for Lakeview dashboards.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateDashboardRequest added in v0.35.0

type CreateDashboardRequest struct {
	// The display name of the dashboard.
	DisplayName string `json:"display_name"`
	// The workspace path of the folder containing the dashboard. Includes
	// leading slash and no trailing slash.
	ParentPath string `json:"parent_path,omitempty"`
	// The contents of the dashboard in serialized string form.
	SerializedDashboard string `json:"serialized_dashboard,omitempty"`
	// The warehouse ID used to run the dashboard.
	WarehouseId string `json:"warehouse_id,omitempty"`

	ForceSendFields []string `json:"-"`
}

func (CreateDashboardRequest) MarshalJSON added in v0.35.0

func (s CreateDashboardRequest) MarshalJSON() ([]byte, error)

func (*CreateDashboardRequest) UnmarshalJSON added in v0.35.0

func (s *CreateDashboardRequest) UnmarshalJSON(b []byte) error

type CreateScheduleRequest added in v0.43.0

type CreateScheduleRequest struct {
	// The cron expression describing the frequency of the periodic refresh for
	// this schedule.
	CronSchedule CronSchedule `json:"cron_schedule"`
	// UUID identifying the dashboard to which the schedule belongs.
	DashboardId string `json:"-" url:"-"`
	// The display name for schedule.
	DisplayName string `json:"display_name,omitempty"`
	// The status indicates whether this schedule is paused or not.
	PauseStatus SchedulePauseStatus `json:"pause_status,omitempty"`

	ForceSendFields []string `json:"-"`
}

func (CreateScheduleRequest) MarshalJSON added in v0.43.0

func (s CreateScheduleRequest) MarshalJSON() ([]byte, error)

func (*CreateScheduleRequest) UnmarshalJSON added in v0.43.0

func (s *CreateScheduleRequest) UnmarshalJSON(b []byte) error

type CreateSubscriptionRequest added in v0.43.0

type CreateSubscriptionRequest struct {
	// UUID identifying the dashboard to which the subscription belongs.
	DashboardId string `json:"-" url:"-"`
	// UUID identifying the schedule to which the subscription belongs.
	ScheduleId string `json:"-" url:"-"`
	// Subscriber details for users and destinations to be added as subscribers
	// to the schedule.
	Subscriber Subscriber `json:"subscriber"`
}

type CronSchedule added in v0.43.0

type CronSchedule struct {
	// A cron expression using quartz syntax. EX: `0 0 8 * * ?` represents
	// everyday at 8am. See [Cron Trigger] for details.
	//
	// [Cron Trigger]: http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html
	QuartzCronExpression string `json:"quartz_cron_expression"`
	// A Java timezone id. The schedule will be resolved with respect to this
	// timezone. See [Java TimeZone] for details.
	//
	// [Java TimeZone]: https://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html
	TimezoneId string `json:"timezone_id"`
}

type Dashboard added in v0.35.0

type Dashboard struct {
	// The timestamp of when the dashboard was created.
	CreateTime string `json:"create_time,omitempty"`
	// UUID identifying the dashboard.
	DashboardId string `json:"dashboard_id,omitempty"`
	// The display name of the dashboard.
	DisplayName string `json:"display_name,omitempty"`
	// The etag for the dashboard. Can be optionally provided on updates to
	// ensure that the dashboard has not been modified since the last read.
	Etag string `json:"etag,omitempty"`
	// The state of the dashboard resource. Used for tracking trashed status.
	LifecycleState LifecycleState `json:"lifecycle_state,omitempty"`
	// The workspace path of the folder containing the dashboard. Includes
	// leading slash and no trailing slash.
	ParentPath string `json:"parent_path,omitempty"`
	// The workspace path of the dashboard asset, including the file name.
	Path string `json:"path,omitempty"`
	// The contents of the dashboard in serialized string form.
	SerializedDashboard string `json:"serialized_dashboard,omitempty"`
	// The timestamp of when the dashboard was last updated by the user.
	UpdateTime string `json:"update_time,omitempty"`
	// The warehouse ID used to run the dashboard.
	WarehouseId string `json:"warehouse_id,omitempty"`

	ForceSendFields []string `json:"-"`
}

func (Dashboard) MarshalJSON added in v0.35.0

func (s Dashboard) MarshalJSON() ([]byte, error)

func (*Dashboard) UnmarshalJSON added in v0.35.0

func (s *Dashboard) UnmarshalJSON(b []byte) error

type DashboardView added in v0.43.0

type DashboardView string
const DashboardViewDashboardViewBasic DashboardView = `DASHBOARD_VIEW_BASIC`
const DashboardViewDashboardViewFull DashboardView = `DASHBOARD_VIEW_FULL`

func (*DashboardView) Set added in v0.43.0

func (f *DashboardView) Set(v string) error

Set raw string value and validate it against allowed values

func (*DashboardView) String added in v0.43.0

func (f *DashboardView) String() string

String representation for fmt.Print

func (*DashboardView) Type added in v0.43.0

func (f *DashboardView) Type() string

Type always returns DashboardView to satisfy [pflag.Value] interface

type DeleteScheduleRequest added in v0.43.0

type DeleteScheduleRequest struct {
	// UUID identifying the dashboard to which the schedule belongs.
	DashboardId string `json:"-" url:"-"`
	// The etag for the schedule. Optionally, it can be provided to verify that
	// the schedule has not been modified from its last retrieval.
	Etag string `json:"-" url:"etag,omitempty"`
	// UUID identifying the schedule.
	ScheduleId string `json:"-" url:"-"`

	ForceSendFields []string `json:"-"`
}

Delete dashboard schedule

func (DeleteScheduleRequest) MarshalJSON added in v0.43.0

func (s DeleteScheduleRequest) MarshalJSON() ([]byte, error)

func (*DeleteScheduleRequest) UnmarshalJSON added in v0.43.0

func (s *DeleteScheduleRequest) UnmarshalJSON(b []byte) error

type DeleteScheduleResponse added in v0.43.0

type DeleteScheduleResponse struct {
}

type DeleteSubscriptionRequest added in v0.43.0

type DeleteSubscriptionRequest struct {
	// UUID identifying the dashboard which the subscription belongs.
	DashboardId string `json:"-" url:"-"`
	// The etag for the subscription. Can be optionally provided to ensure that
	// the subscription has not been modified since the last read.
	Etag string `json:"-" url:"etag,omitempty"`
	// UUID identifying the schedule which the subscription belongs.
	ScheduleId string `json:"-" url:"-"`
	// UUID identifying the subscription.
	SubscriptionId string `json:"-" url:"-"`

	ForceSendFields []string `json:"-"`
}

Delete schedule subscription

func (DeleteSubscriptionRequest) MarshalJSON added in v0.43.0

func (s DeleteSubscriptionRequest) MarshalJSON() ([]byte, error)

func (*DeleteSubscriptionRequest) UnmarshalJSON added in v0.43.0

func (s *DeleteSubscriptionRequest) UnmarshalJSON(b []byte) error

type DeleteSubscriptionResponse added in v0.43.0

type DeleteSubscriptionResponse struct {
}

type GetDashboardRequest added in v0.36.0

type GetDashboardRequest struct {
	// UUID identifying the dashboard.
	DashboardId string `json:"-" url:"-"`
}

Get dashboard

type GetPublishedDashboardRequest added in v0.36.0

type GetPublishedDashboardRequest struct {
	// UUID identifying the dashboard to be published.
	DashboardId string `json:"-" url:"-"`
}

Get published dashboard

type GetScheduleRequest added in v0.43.0

type GetScheduleRequest struct {
	// UUID identifying the dashboard to which the schedule belongs.
	DashboardId string `json:"-" url:"-"`
	// UUID identifying the schedule.
	ScheduleId string `json:"-" url:"-"`
}

Get dashboard schedule

type GetSubscriptionRequest added in v0.43.0

type GetSubscriptionRequest struct {
	// UUID identifying the dashboard which the subscription belongs.
	DashboardId string `json:"-" url:"-"`
	// UUID identifying the schedule which the subscription belongs.
	ScheduleId string `json:"-" url:"-"`
	// UUID identifying the subscription.
	SubscriptionId string `json:"-" url:"-"`
}

Get schedule subscription

type LakeviewAPI

type LakeviewAPI struct {
	// contains filtered or unexported fields
}

These APIs provide specific management operations for Lakeview dashboards. Generic resource management can be done with Workspace API (import, export, get-status, list, delete).

func NewLakeview

func NewLakeview(client *client.DatabricksClient) *LakeviewAPI

func (*LakeviewAPI) Create added in v0.35.0

func (a *LakeviewAPI) Create(ctx context.Context, request CreateDashboardRequest) (*Dashboard, error)

Create dashboard.

Create a draft dashboard.

func (*LakeviewAPI) CreateSchedule added in v0.43.0

func (a *LakeviewAPI) CreateSchedule(ctx context.Context, request CreateScheduleRequest) (*Schedule, error)

Create dashboard schedule.

func (*LakeviewAPI) CreateSubscription added in v0.43.0

func (a *LakeviewAPI) CreateSubscription(ctx context.Context, request CreateSubscriptionRequest) (*Subscription, error)

Create schedule subscription.

func (*LakeviewAPI) DeleteSchedule added in v0.43.0

func (a *LakeviewAPI) DeleteSchedule(ctx context.Context, request DeleteScheduleRequest) error

Delete dashboard schedule.

func (*LakeviewAPI) DeleteScheduleByDashboardIdAndScheduleId added in v0.43.0

func (a *LakeviewAPI) DeleteScheduleByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) error

Delete dashboard schedule.

func (*LakeviewAPI) DeleteSubscription added in v0.43.0

func (a *LakeviewAPI) DeleteSubscription(ctx context.Context, request DeleteSubscriptionRequest) error

Delete schedule subscription.

func (*LakeviewAPI) DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId added in v0.43.0

func (a *LakeviewAPI) DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId(ctx context.Context, dashboardId string, scheduleId string, subscriptionId string) error

Delete schedule subscription.

func (*LakeviewAPI) Get added in v0.35.0

func (a *LakeviewAPI) Get(ctx context.Context, request GetDashboardRequest) (*Dashboard, error)

Get dashboard.

Get a draft dashboard.

func (*LakeviewAPI) GetByDashboardId added in v0.35.0

func (a *LakeviewAPI) GetByDashboardId(ctx context.Context, dashboardId string) (*Dashboard, error)

Get dashboard.

Get a draft dashboard.

func (*LakeviewAPI) GetPublished added in v0.35.0

Get published dashboard.

Get the current published dashboard.

func (*LakeviewAPI) GetPublishedByDashboardId added in v0.35.0

func (a *LakeviewAPI) GetPublishedByDashboardId(ctx context.Context, dashboardId string) (*PublishedDashboard, error)

Get published dashboard.

Get the current published dashboard.

func (*LakeviewAPI) GetSchedule added in v0.43.0

func (a *LakeviewAPI) GetSchedule(ctx context.Context, request GetScheduleRequest) (*Schedule, error)

Get dashboard schedule.

func (*LakeviewAPI) GetScheduleByDashboardIdAndScheduleId added in v0.43.0

func (a *LakeviewAPI) GetScheduleByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) (*Schedule, error)

Get dashboard schedule.

func (*LakeviewAPI) GetSubscription added in v0.43.0

func (a *LakeviewAPI) GetSubscription(ctx context.Context, request GetSubscriptionRequest) (*Subscription, error)

Get schedule subscription.

func (*LakeviewAPI) GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId added in v0.43.0

func (a *LakeviewAPI) GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId(ctx context.Context, dashboardId string, scheduleId string, subscriptionId string) (*Subscription, error)

Get schedule subscription.

func (*LakeviewAPI) Impl

func (a *LakeviewAPI) Impl() LakeviewService

Impl returns low-level Lakeview API implementation Deprecated: use MockLakeviewInterface instead.

func (*LakeviewAPI) List added in v0.43.0

List dashboards.

This method is generated by Databricks SDK Code Generator.

func (*LakeviewAPI) ListAll added in v0.43.0

func (a *LakeviewAPI) ListAll(ctx context.Context, request ListDashboardsRequest) ([]Dashboard, error)

List dashboards.

This method is generated by Databricks SDK Code Generator.

func (*LakeviewAPI) ListSchedules added in v0.43.0

func (a *LakeviewAPI) ListSchedules(ctx context.Context, request ListSchedulesRequest) listing.Iterator[Schedule]

List dashboard schedules.

This method is generated by Databricks SDK Code Generator.

func (*LakeviewAPI) ListSchedulesAll added in v0.43.0

func (a *LakeviewAPI) ListSchedulesAll(ctx context.Context, request ListSchedulesRequest) ([]Schedule, error)

List dashboard schedules.

This method is generated by Databricks SDK Code Generator.

func (*LakeviewAPI) ListSchedulesByDashboardId added in v0.43.0

func (a *LakeviewAPI) ListSchedulesByDashboardId(ctx context.Context, dashboardId string) (*ListSchedulesResponse, error)

List dashboard schedules.

func (*LakeviewAPI) ListSubscriptions added in v0.43.0

func (a *LakeviewAPI) ListSubscriptions(ctx context.Context, request ListSubscriptionsRequest) listing.Iterator[Subscription]

List schedule subscriptions.

This method is generated by Databricks SDK Code Generator.

func (*LakeviewAPI) ListSubscriptionsAll added in v0.43.0

func (a *LakeviewAPI) ListSubscriptionsAll(ctx context.Context, request ListSubscriptionsRequest) ([]Subscription, error)

List schedule subscriptions.

This method is generated by Databricks SDK Code Generator.

func (*LakeviewAPI) ListSubscriptionsByDashboardIdAndScheduleId added in v0.43.0

func (a *LakeviewAPI) ListSubscriptionsByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) (*ListSubscriptionsResponse, error)

List schedule subscriptions.

func (*LakeviewAPI) Migrate added in v0.37.0

func (a *LakeviewAPI) Migrate(ctx context.Context, request MigrateDashboardRequest) (*Dashboard, error)

Migrate dashboard.

Migrates a classic SQL dashboard to Lakeview.

func (*LakeviewAPI) Publish

func (a *LakeviewAPI) Publish(ctx context.Context, request PublishRequest) (*PublishedDashboard, error)

Publish dashboard.

Publish the current draft dashboard.

func (*LakeviewAPI) Trash added in v0.35.0

func (a *LakeviewAPI) Trash(ctx context.Context, request TrashDashboardRequest) error

Trash dashboard.

Trash a dashboard.

func (*LakeviewAPI) TrashByDashboardId added in v0.35.0

func (a *LakeviewAPI) TrashByDashboardId(ctx context.Context, dashboardId string) error

Trash dashboard.

Trash a dashboard.

func (*LakeviewAPI) Unpublish added in v0.37.0

func (a *LakeviewAPI) Unpublish(ctx context.Context, request UnpublishDashboardRequest) error

Unpublish dashboard.

Unpublish the dashboard.

func (*LakeviewAPI) UnpublishByDashboardId added in v0.37.0

func (a *LakeviewAPI) UnpublishByDashboardId(ctx context.Context, dashboardId string) error

Unpublish dashboard.

Unpublish the dashboard.

func (*LakeviewAPI) Update added in v0.35.0

func (a *LakeviewAPI) Update(ctx context.Context, request UpdateDashboardRequest) (*Dashboard, error)

Update dashboard.

Update a draft dashboard.

func (*LakeviewAPI) UpdateSchedule added in v0.43.0

func (a *LakeviewAPI) UpdateSchedule(ctx context.Context, request UpdateScheduleRequest) (*Schedule, error)

Update dashboard schedule.

func (*LakeviewAPI) WithImpl

func (a *LakeviewAPI) WithImpl(impl LakeviewService) LakeviewInterface

WithImpl could be used to override low-level API implementations for unit testing purposes with github.com/golang/mock or other mocking frameworks. Deprecated: use MockLakeviewInterface instead.

type LakeviewInterface

type LakeviewInterface interface {
	// WithImpl could be used to override low-level API implementations for unit
	// testing purposes with [github.com/golang/mock] or other mocking frameworks.
	// Deprecated: use MockLakeviewInterface instead.
	WithImpl(impl LakeviewService) LakeviewInterface

	// Impl returns low-level Lakeview API implementation
	// Deprecated: use MockLakeviewInterface instead.
	Impl() LakeviewService

	// Create dashboard.
	//
	// Create a draft dashboard.
	Create(ctx context.Context, request CreateDashboardRequest) (*Dashboard, error)

	// Create dashboard schedule.
	CreateSchedule(ctx context.Context, request CreateScheduleRequest) (*Schedule, error)

	// Create schedule subscription.
	CreateSubscription(ctx context.Context, request CreateSubscriptionRequest) (*Subscription, error)

	// Delete dashboard schedule.
	DeleteSchedule(ctx context.Context, request DeleteScheduleRequest) error

	// Delete dashboard schedule.
	DeleteScheduleByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) error

	// Delete schedule subscription.
	DeleteSubscription(ctx context.Context, request DeleteSubscriptionRequest) error

	// Delete schedule subscription.
	DeleteSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId(ctx context.Context, dashboardId string, scheduleId string, subscriptionId string) error

	// Get dashboard.
	//
	// Get a draft dashboard.
	Get(ctx context.Context, request GetDashboardRequest) (*Dashboard, error)

	// Get dashboard.
	//
	// Get a draft dashboard.
	GetByDashboardId(ctx context.Context, dashboardId string) (*Dashboard, error)

	// Get published dashboard.
	//
	// Get the current published dashboard.
	GetPublished(ctx context.Context, request GetPublishedDashboardRequest) (*PublishedDashboard, error)

	// Get published dashboard.
	//
	// Get the current published dashboard.
	GetPublishedByDashboardId(ctx context.Context, dashboardId string) (*PublishedDashboard, error)

	// Get dashboard schedule.
	GetSchedule(ctx context.Context, request GetScheduleRequest) (*Schedule, error)

	// Get dashboard schedule.
	GetScheduleByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) (*Schedule, error)

	// Get schedule subscription.
	GetSubscription(ctx context.Context, request GetSubscriptionRequest) (*Subscription, error)

	// Get schedule subscription.
	GetSubscriptionByDashboardIdAndScheduleIdAndSubscriptionId(ctx context.Context, dashboardId string, scheduleId string, subscriptionId string) (*Subscription, error)

	// List dashboards.
	//
	// This method is generated by Databricks SDK Code Generator.
	List(ctx context.Context, request ListDashboardsRequest) listing.Iterator[Dashboard]

	// List dashboards.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListAll(ctx context.Context, request ListDashboardsRequest) ([]Dashboard, error)

	// List dashboard schedules.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListSchedules(ctx context.Context, request ListSchedulesRequest) listing.Iterator[Schedule]

	// List dashboard schedules.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListSchedulesAll(ctx context.Context, request ListSchedulesRequest) ([]Schedule, error)

	// List dashboard schedules.
	ListSchedulesByDashboardId(ctx context.Context, dashboardId string) (*ListSchedulesResponse, error)

	// List schedule subscriptions.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListSubscriptions(ctx context.Context, request ListSubscriptionsRequest) listing.Iterator[Subscription]

	// List schedule subscriptions.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListSubscriptionsAll(ctx context.Context, request ListSubscriptionsRequest) ([]Subscription, error)

	// List schedule subscriptions.
	ListSubscriptionsByDashboardIdAndScheduleId(ctx context.Context, dashboardId string, scheduleId string) (*ListSubscriptionsResponse, error)

	// Migrate dashboard.
	//
	// Migrates a classic SQL dashboard to Lakeview.
	Migrate(ctx context.Context, request MigrateDashboardRequest) (*Dashboard, error)

	// Publish dashboard.
	//
	// Publish the current draft dashboard.
	Publish(ctx context.Context, request PublishRequest) (*PublishedDashboard, error)

	// Trash dashboard.
	//
	// Trash a dashboard.
	Trash(ctx context.Context, request TrashDashboardRequest) error

	// Trash dashboard.
	//
	// Trash a dashboard.
	TrashByDashboardId(ctx context.Context, dashboardId string) error

	// Unpublish dashboard.
	//
	// Unpublish the dashboard.
	Unpublish(ctx context.Context, request UnpublishDashboardRequest) error

	// Unpublish dashboard.
	//
	// Unpublish the dashboard.
	UnpublishByDashboardId(ctx context.Context, dashboardId string) error

	// Update dashboard.
	//
	// Update a draft dashboard.
	Update(ctx context.Context, request UpdateDashboardRequest) (*Dashboard, error)

	// Update dashboard schedule.
	UpdateSchedule(ctx context.Context, request UpdateScheduleRequest) (*Schedule, error)
}

type LakeviewService

type LakeviewService interface {

	// Create dashboard.
	//
	// Create a draft dashboard.
	Create(ctx context.Context, request CreateDashboardRequest) (*Dashboard, error)

	// Create dashboard schedule.
	CreateSchedule(ctx context.Context, request CreateScheduleRequest) (*Schedule, error)

	// Create schedule subscription.
	CreateSubscription(ctx context.Context, request CreateSubscriptionRequest) (*Subscription, error)

	// Delete dashboard schedule.
	DeleteSchedule(ctx context.Context, request DeleteScheduleRequest) error

	// Delete schedule subscription.
	DeleteSubscription(ctx context.Context, request DeleteSubscriptionRequest) error

	// Get dashboard.
	//
	// Get a draft dashboard.
	Get(ctx context.Context, request GetDashboardRequest) (*Dashboard, error)

	// Get published dashboard.
	//
	// Get the current published dashboard.
	GetPublished(ctx context.Context, request GetPublishedDashboardRequest) (*PublishedDashboard, error)

	// Get dashboard schedule.
	GetSchedule(ctx context.Context, request GetScheduleRequest) (*Schedule, error)

	// Get schedule subscription.
	GetSubscription(ctx context.Context, request GetSubscriptionRequest) (*Subscription, error)

	// List dashboards.
	//
	// Use ListAll() to get all Dashboard instances, which will iterate over every result page.
	List(ctx context.Context, request ListDashboardsRequest) (*ListDashboardsResponse, error)

	// List dashboard schedules.
	//
	// Use ListSchedulesAll() to get all Schedule instances, which will iterate over every result page.
	ListSchedules(ctx context.Context, request ListSchedulesRequest) (*ListSchedulesResponse, error)

	// List schedule subscriptions.
	//
	// Use ListSubscriptionsAll() to get all Subscription instances, which will iterate over every result page.
	ListSubscriptions(ctx context.Context, request ListSubscriptionsRequest) (*ListSubscriptionsResponse, error)

	// Migrate dashboard.
	//
	// Migrates a classic SQL dashboard to Lakeview.
	Migrate(ctx context.Context, request MigrateDashboardRequest) (*Dashboard, error)

	// Publish dashboard.
	//
	// Publish the current draft dashboard.
	Publish(ctx context.Context, request PublishRequest) (*PublishedDashboard, error)

	// Trash dashboard.
	//
	// Trash a dashboard.
	Trash(ctx context.Context, request TrashDashboardRequest) error

	// Unpublish dashboard.
	//
	// Unpublish the dashboard.
	Unpublish(ctx context.Context, request UnpublishDashboardRequest) error

	// Update dashboard.
	//
	// Update a draft dashboard.
	Update(ctx context.Context, request UpdateDashboardRequest) (*Dashboard, error)

	// Update dashboard schedule.
	UpdateSchedule(ctx context.Context, request UpdateScheduleRequest) (*Schedule, error)
}

These APIs provide specific management operations for Lakeview dashboards. Generic resource management can be done with Workspace API (import, export, get-status, list, delete).

type LifecycleState added in v0.35.0

type LifecycleState string
const LifecycleStateActive LifecycleState = `ACTIVE`
const LifecycleStateTrashed LifecycleState = `TRASHED`

func (*LifecycleState) Set added in v0.35.0

func (f *LifecycleState) Set(v string) error

Set raw string value and validate it against allowed values

func (*LifecycleState) String added in v0.35.0

func (f *LifecycleState) String() string

String representation for fmt.Print

func (*LifecycleState) Type added in v0.35.0

func (f *LifecycleState) Type() string

Type always returns LifecycleState to satisfy [pflag.Value] interface

type ListDashboardsRequest added in v0.43.0

type ListDashboardsRequest struct {
	// The number of dashboards to return per page.
	PageSize int `json:"-" url:"page_size,omitempty"`
	// A page token, received from a previous `ListDashboards` call. This token
	// can be used to retrieve the subsequent page.
	PageToken string `json:"-" url:"page_token,omitempty"`
	// The flag to include dashboards located in the trash. If unspecified, only
	// active dashboards will be returned.
	ShowTrashed bool `json:"-" url:"show_trashed,omitempty"`
	// Indicates whether to include all metadata from the dashboard in the
	// response. If unset, the response defaults to `DASHBOARD_VIEW_BASIC` which
	// only includes summary metadata from the dashboard.
	View DashboardView `json:"-" url:"view,omitempty"`

	ForceSendFields []string `json:"-"`
}

List dashboards

func (ListDashboardsRequest) MarshalJSON added in v0.43.0

func (s ListDashboardsRequest) MarshalJSON() ([]byte, error)

func (*ListDashboardsRequest) UnmarshalJSON added in v0.43.0

func (s *ListDashboardsRequest) UnmarshalJSON(b []byte) error

type ListDashboardsResponse added in v0.43.0

type ListDashboardsResponse struct {
	Dashboards []Dashboard `json:"dashboards,omitempty"`
	// A token, which can be sent as `page_token` to retrieve the next page. If
	// this field is omitted, there are no subsequent dashboards.
	NextPageToken string `json:"next_page_token,omitempty"`

	ForceSendFields []string `json:"-"`
}

func (ListDashboardsResponse) MarshalJSON added in v0.43.0

func (s ListDashboardsResponse) MarshalJSON() ([]byte, error)

func (*ListDashboardsResponse) UnmarshalJSON added in v0.43.0

func (s *ListDashboardsResponse) UnmarshalJSON(b []byte) error

type ListSchedulesRequest added in v0.43.0

type ListSchedulesRequest struct {
	// UUID identifying the dashboard to which the schedule belongs.
	DashboardId string `json:"-" url:"-"`
	// The number of schedules to return per page.
	PageSize int `json:"-" url:"page_size,omitempty"`
	// A page token, received from a previous `ListSchedules` call. Use this to
	// retrieve the subsequent page.
	PageToken string `json:"-" url:"page_token,omitempty"`

	ForceSendFields []string `json:"-"`
}

List dashboard schedules

func (ListSchedulesRequest) MarshalJSON added in v0.43.0

func (s ListSchedulesRequest) MarshalJSON() ([]byte, error)

func (*ListSchedulesRequest) UnmarshalJSON added in v0.43.0

func (s *ListSchedulesRequest) UnmarshalJSON(b []byte) error

type ListSchedulesResponse added in v0.43.0

type ListSchedulesResponse struct {
	// A token that can be used as a `page_token` in subsequent requests to
	// retrieve the next page of results. If this field is omitted, there are no
	// subsequent schedules.
	NextPageToken string `json:"next_page_token,omitempty"`

	Schedules []Schedule `json:"schedules,omitempty"`

	ForceSendFields []string `json:"-"`
}

func (ListSchedulesResponse) MarshalJSON added in v0.43.0

func (s ListSchedulesResponse) MarshalJSON() ([]byte, error)

func (*ListSchedulesResponse) UnmarshalJSON added in v0.43.0

func (s *ListSchedulesResponse) UnmarshalJSON(b []byte) error

type ListSubscriptionsRequest added in v0.43.0

type ListSubscriptionsRequest struct {
	// UUID identifying the dashboard to which the subscription belongs.
	DashboardId string `json:"-" url:"-"`
	// The number of subscriptions to return per page.
	PageSize int `json:"-" url:"page_size,omitempty"`
	// A page token, received from a previous `ListSubscriptions` call. Use this
	// to retrieve the subsequent page.
	PageToken string `json:"-" url:"page_token,omitempty"`
	// UUID identifying the schedule to which the subscription belongs.
	ScheduleId string `json:"-" url:"-"`

	ForceSendFields []string `json:"-"`
}

List schedule subscriptions

func (ListSubscriptionsRequest) MarshalJSON added in v0.43.0

func (s ListSubscriptionsRequest) MarshalJSON() ([]byte, error)

func (*ListSubscriptionsRequest) UnmarshalJSON added in v0.43.0

func (s *ListSubscriptionsRequest) UnmarshalJSON(b []byte) error

type ListSubscriptionsResponse added in v0.43.0

type ListSubscriptionsResponse struct {
	// A token that can be used as a `page_token` in subsequent requests to
	// retrieve the next page of results. If this field is omitted, there are no
	// subsequent subscriptions.
	NextPageToken string `json:"next_page_token,omitempty"`

	Subscriptions []Subscription `json:"subscriptions,omitempty"`

	ForceSendFields []string `json:"-"`
}

func (ListSubscriptionsResponse) MarshalJSON added in v0.43.0

func (s ListSubscriptionsResponse) MarshalJSON() ([]byte, error)

func (*ListSubscriptionsResponse) UnmarshalJSON added in v0.43.0

func (s *ListSubscriptionsResponse) UnmarshalJSON(b []byte) error

type MigrateDashboardRequest added in v0.37.0

type MigrateDashboardRequest struct {
	// Display name for the new Lakeview dashboard.
	DisplayName string `json:"display_name,omitempty"`
	// The workspace path of the folder to contain the migrated Lakeview
	// dashboard.
	ParentPath string `json:"parent_path,omitempty"`
	// UUID of the dashboard to be migrated.
	SourceDashboardId string `json:"source_dashboard_id"`

	ForceSendFields []string `json:"-"`
}

func (MigrateDashboardRequest) MarshalJSON added in v0.37.0

func (s MigrateDashboardRequest) MarshalJSON() ([]byte, error)

func (*MigrateDashboardRequest) UnmarshalJSON added in v0.37.0

func (s *MigrateDashboardRequest) UnmarshalJSON(b []byte) error

type PublishRequest

type PublishRequest struct {
	// UUID identifying the dashboard to be published.
	DashboardId string `json:"-" url:"-"`
	// Flag to indicate if the publisher's credentials should be embedded in the
	// published dashboard. These embedded credentials will be used to execute
	// the published dashboard's queries.
	EmbedCredentials bool `json:"embed_credentials,omitempty"`
	// The ID of the warehouse that can be used to override the warehouse which
	// was set in the draft.
	WarehouseId string `json:"warehouse_id,omitempty"`

	ForceSendFields []string `json:"-"`
}

func (PublishRequest) MarshalJSON

func (s PublishRequest) MarshalJSON() ([]byte, error)

func (*PublishRequest) UnmarshalJSON

func (s *PublishRequest) UnmarshalJSON(b []byte) error

type PublishedDashboard added in v0.35.0

type PublishedDashboard struct {
	// The display name of the published dashboard.
	DisplayName string `json:"display_name,omitempty"`
	// Indicates whether credentials are embedded in the published dashboard.
	EmbedCredentials bool `json:"embed_credentials,omitempty"`
	// The timestamp of when the published dashboard was last revised.
	RevisionCreateTime string `json:"revision_create_time,omitempty"`
	// The warehouse ID used to run the published dashboard.
	WarehouseId string `json:"warehouse_id,omitempty"`

	ForceSendFields []string `json:"-"`
}

func (PublishedDashboard) MarshalJSON added in v0.35.0

func (s PublishedDashboard) MarshalJSON() ([]byte, error)

func (*PublishedDashboard) UnmarshalJSON added in v0.35.0

func (s *PublishedDashboard) UnmarshalJSON(b []byte) error

type Schedule added in v0.43.0

type Schedule struct {
	// A timestamp indicating when the schedule was created.
	CreateTime string `json:"create_time,omitempty"`
	// The cron expression describing the frequency of the periodic refresh for
	// this schedule.
	CronSchedule CronSchedule `json:"cron_schedule"`
	// UUID identifying the dashboard to which the schedule belongs.
	DashboardId string `json:"dashboard_id,omitempty"`
	// The display name for schedule.
	DisplayName string `json:"display_name,omitempty"`
	// The etag for the schedule. Must be left empty on create, must be provided
	// on updates to ensure that the schedule has not been modified since the
	// last read, and can be optionally provided on delete.
	Etag string `json:"etag,omitempty"`
	// The status indicates whether this schedule is paused or not.
	PauseStatus SchedulePauseStatus `json:"pause_status,omitempty"`
	// UUID identifying the schedule.
	ScheduleId string `json:"schedule_id,omitempty"`
	// A timestamp indicating when the schedule was last updated.
	UpdateTime string `json:"update_time,omitempty"`

	ForceSendFields []string `json:"-"`
}

func (Schedule) MarshalJSON added in v0.43.0

func (s Schedule) MarshalJSON() ([]byte, error)

func (*Schedule) UnmarshalJSON added in v0.43.0

func (s *Schedule) UnmarshalJSON(b []byte) error

type SchedulePauseStatus added in v0.43.0

type SchedulePauseStatus string
const SchedulePauseStatusPaused SchedulePauseStatus = `PAUSED`
const SchedulePauseStatusUnpaused SchedulePauseStatus = `UNPAUSED`

func (*SchedulePauseStatus) Set added in v0.43.0

func (f *SchedulePauseStatus) Set(v string) error

Set raw string value and validate it against allowed values

func (*SchedulePauseStatus) String added in v0.43.0

func (f *SchedulePauseStatus) String() string

String representation for fmt.Print

func (*SchedulePauseStatus) Type added in v0.43.0

func (f *SchedulePauseStatus) Type() string

Type always returns SchedulePauseStatus to satisfy [pflag.Value] interface

type Subscriber added in v0.43.0

type Subscriber struct {
	// The destination to receive the subscription email. This parameter is
	// mutually exclusive with `user_subscriber`.
	DestinationSubscriber *SubscriptionSubscriberDestination `json:"destination_subscriber,omitempty"`
	// The user to receive the subscription email. This parameter is mutually
	// exclusive with `destination_subscriber`.
	UserSubscriber *SubscriptionSubscriberUser `json:"user_subscriber,omitempty"`
}

type Subscription added in v0.43.0

type Subscription struct {
	// A timestamp indicating when the subscription was created.
	CreateTime string `json:"create_time,omitempty"`
	// UserId of the user who adds subscribers (users or notification
	// destinations) to the dashboard's schedule.
	CreatedByUserId int64 `json:"created_by_user_id,omitempty"`
	// UUID identifying the dashboard to which the subscription belongs.
	DashboardId string `json:"dashboard_id,omitempty"`
	// The etag for the subscription. Must be left empty on create, can be
	// optionally provided on delete to ensure that the subscription has not
	// been deleted since the last read.
	Etag string `json:"etag,omitempty"`
	// UUID identifying the schedule to which the subscription belongs.
	ScheduleId string `json:"schedule_id,omitempty"`
	// Subscriber details for users and destinations to be added as subscribers
	// to the schedule.
	Subscriber Subscriber `json:"subscriber"`
	// UUID identifying the subscription.
	SubscriptionId string `json:"subscription_id,omitempty"`
	// A timestamp indicating when the subscription was last updated.
	UpdateTime string `json:"update_time,omitempty"`

	ForceSendFields []string `json:"-"`
}

func (Subscription) MarshalJSON added in v0.43.0

func (s Subscription) MarshalJSON() ([]byte, error)

func (*Subscription) UnmarshalJSON added in v0.43.0

func (s *Subscription) UnmarshalJSON(b []byte) error

type SubscriptionSubscriberDestination added in v0.43.0

type SubscriptionSubscriberDestination struct {
	// The canonical identifier of the destination to receive email
	// notification.
	DestinationId string `json:"destination_id"`
}

type SubscriptionSubscriberUser added in v0.43.0

type SubscriptionSubscriberUser struct {
	// UserId of the subscriber.
	UserId int64 `json:"user_id"`
}

type TrashDashboardRequest added in v0.36.0

type TrashDashboardRequest struct {
	// UUID identifying the dashboard.
	DashboardId string `json:"-" url:"-"`
}

Trash dashboard

type TrashDashboardResponse added in v0.35.0

type TrashDashboardResponse struct {
}

type UnpublishDashboardRequest added in v0.37.0

type UnpublishDashboardRequest struct {
	// UUID identifying the dashboard to be published.
	DashboardId string `json:"-" url:"-"`
}

Unpublish dashboard

type UnpublishDashboardResponse added in v0.37.0

type UnpublishDashboardResponse struct {
}

type UpdateDashboardRequest added in v0.35.0

type UpdateDashboardRequest struct {
	// UUID identifying the dashboard.
	DashboardId string `json:"-" url:"-"`
	// The display name of the dashboard.
	DisplayName string `json:"display_name,omitempty"`
	// The etag for the dashboard. Can be optionally provided on updates to
	// ensure that the dashboard has not been modified since the last read.
	Etag string `json:"etag,omitempty"`
	// The contents of the dashboard in serialized string form.
	SerializedDashboard string `json:"serialized_dashboard,omitempty"`
	// The warehouse ID used to run the dashboard.
	WarehouseId string `json:"warehouse_id,omitempty"`

	ForceSendFields []string `json:"-"`
}

func (UpdateDashboardRequest) MarshalJSON added in v0.35.0

func (s UpdateDashboardRequest) MarshalJSON() ([]byte, error)

func (*UpdateDashboardRequest) UnmarshalJSON added in v0.35.0

func (s *UpdateDashboardRequest) UnmarshalJSON(b []byte) error

type UpdateScheduleRequest added in v0.43.0

type UpdateScheduleRequest struct {
	// The cron expression describing the frequency of the periodic refresh for
	// this schedule.
	CronSchedule CronSchedule `json:"cron_schedule"`
	// UUID identifying the dashboard to which the schedule belongs.
	DashboardId string `json:"-" url:"-"`
	// The display name for schedule.
	DisplayName string `json:"display_name,omitempty"`
	// The etag for the schedule. Must be left empty on create, must be provided
	// on updates to ensure that the schedule has not been modified since the
	// last read, and can be optionally provided on delete.
	Etag string `json:"etag,omitempty"`
	// The status indicates whether this schedule is paused or not.
	PauseStatus SchedulePauseStatus `json:"pause_status,omitempty"`
	// UUID identifying the schedule.
	ScheduleId string `json:"-" url:"-"`

	ForceSendFields []string `json:"-"`
}

func (UpdateScheduleRequest) MarshalJSON added in v0.43.0

func (s UpdateScheduleRequest) MarshalJSON() ([]byte, error)

func (*UpdateScheduleRequest) UnmarshalJSON added in v0.43.0

func (s *UpdateScheduleRequest) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL