billing

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: Apache-2.0 Imports: 8 Imported by: 5

Documentation

Overview

These APIs allow you to manage Billable Usage, Budgets, Log Delivery, Usage Dashboards, etc.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionConfiguration added in v0.44.0

type ActionConfiguration struct {
	// Databricks action configuration ID.
	ActionConfigurationId string `json:"action_configuration_id,omitempty"`
	// The type of the action.
	ActionType ActionConfigurationType `json:"action_type,omitempty"`
	// Target for the action. For example, an email address.
	Target string `json:"target,omitempty"`

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

func (ActionConfiguration) MarshalJSON added in v0.44.0

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

func (*ActionConfiguration) UnmarshalJSON added in v0.44.0

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

type ActionConfigurationType added in v0.44.0

type ActionConfigurationType string
const ActionConfigurationTypeEmailNotification ActionConfigurationType = `EMAIL_NOTIFICATION`

func (*ActionConfigurationType) Set added in v0.44.0

Set raw string value and validate it against allowed values

func (*ActionConfigurationType) String added in v0.44.0

func (f *ActionConfigurationType) String() string

String representation for fmt.Print

func (*ActionConfigurationType) Type added in v0.44.0

func (f *ActionConfigurationType) Type() string

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

type AlertConfiguration added in v0.44.0

type AlertConfiguration struct {
	// Configured actions for this alert. These define what happens when an
	// alert enters a triggered state.
	ActionConfigurations []ActionConfiguration `json:"action_configurations,omitempty"`
	// Databricks alert configuration ID.
	AlertConfigurationId string `json:"alert_configuration_id,omitempty"`
	// The threshold for the budget alert to determine if it is in a triggered
	// state. The number is evaluated based on `quantity_type`.
	QuantityThreshold string `json:"quantity_threshold,omitempty"`
	// The way to calculate cost for this budget alert. This is what
	// `quantity_threshold` is measured in.
	QuantityType AlertConfigurationQuantityType `json:"quantity_type,omitempty"`
	// The time window of usage data for the budget.
	TimePeriod AlertConfigurationTimePeriod `json:"time_period,omitempty"`
	// The evaluation method to determine when this budget alert is in a
	// triggered state.
	TriggerType AlertConfigurationTriggerType `json:"trigger_type,omitempty"`

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

func (AlertConfiguration) MarshalJSON added in v0.44.0

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

func (*AlertConfiguration) UnmarshalJSON added in v0.44.0

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

type AlertConfigurationQuantityType added in v0.44.0

type AlertConfigurationQuantityType string
const AlertConfigurationQuantityTypeListPriceDollarsUsd AlertConfigurationQuantityType = `LIST_PRICE_DOLLARS_USD`

func (*AlertConfigurationQuantityType) Set added in v0.44.0

Set raw string value and validate it against allowed values

func (*AlertConfigurationQuantityType) String added in v0.44.0

String representation for fmt.Print

func (*AlertConfigurationQuantityType) Type added in v0.44.0

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

type AlertConfigurationTimePeriod added in v0.44.0

type AlertConfigurationTimePeriod string
const AlertConfigurationTimePeriodMonth AlertConfigurationTimePeriod = `MONTH`

func (*AlertConfigurationTimePeriod) Set added in v0.44.0

Set raw string value and validate it against allowed values

func (*AlertConfigurationTimePeriod) String added in v0.44.0

String representation for fmt.Print

func (*AlertConfigurationTimePeriod) Type added in v0.44.0

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

type AlertConfigurationTriggerType added in v0.44.0

type AlertConfigurationTriggerType string
const AlertConfigurationTriggerTypeCumulativeSpendingExceeded AlertConfigurationTriggerType = `CUMULATIVE_SPENDING_EXCEEDED`

func (*AlertConfigurationTriggerType) Set added in v0.44.0

Set raw string value and validate it against allowed values

func (*AlertConfigurationTriggerType) String added in v0.44.0

String representation for fmt.Print

func (*AlertConfigurationTriggerType) Type added in v0.44.0

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

type BillableUsageAPI

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

This API allows you to download billable usage logs for the specified account and date range. This feature works with all account types.

func NewBillableUsage

func NewBillableUsage(client *client.DatabricksClient) *BillableUsageAPI

func (*BillableUsageAPI) Download

func (a *BillableUsageAPI) Download(ctx context.Context, request DownloadRequest) (*DownloadResponse, error)
Example (UsageDownload)
ctx := context.Background()
a, err := databricks.NewAccountClient()
if err != nil {
	panic(err)
}

resp, err := a.BillableUsage.Download(ctx, billing.DownloadRequest{
	StartMonth: "2024-08",
	EndMonth:   "2024-09",
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", resp)
Output:

type BillableUsageInterface added in v0.29.0

type BillableUsageInterface interface {

	// Return billable usage logs.
	//
	// Returns billable usage logs in CSV format for the specified account and date
	// range. For the data schema, see [CSV file schema]. Note that this method
	// might take multiple minutes to complete.
	//
	// **Warning**: Depending on the queried date range, the number of workspaces in
	// the account, the size of the response and the internet speed of the caller,
	// this API may hit a timeout after a few minutes. If you experience this, try
	// to mitigate by calling the API with narrower date ranges.
	//
	// [CSV file schema]: https://docs.databricks.com/administration-guide/account-settings/usage-analysis.html#schema
	Download(ctx context.Context, request DownloadRequest) (*DownloadResponse, error)
}

type BillableUsageService

type BillableUsageService interface {

	// Return billable usage logs.
	//
	// Returns billable usage logs in CSV format for the specified account and
	// date range. For the data schema, see [CSV file schema]. Note that this
	// method might take multiple minutes to complete.
	//
	// **Warning**: Depending on the queried date range, the number of
	// workspaces in the account, the size of the response and the internet
	// speed of the caller, this API may hit a timeout after a few minutes. If
	// you experience this, try to mitigate by calling the API with narrower
	// date ranges.
	//
	// [CSV file schema]: https://docs.databricks.com/administration-guide/account-settings/usage-analysis.html#schema
	Download(ctx context.Context, request DownloadRequest) (*DownloadResponse, error)
}

This API allows you to download billable usage logs for the specified account and date range. This feature works with all account types.

type BudgetConfiguration added in v0.44.0

type BudgetConfiguration struct {
	// Databricks account ID.
	AccountId string `json:"account_id,omitempty"`
	// Alerts to configure when this budget is in a triggered state. Budgets
	// must have exactly one alert configuration.
	AlertConfigurations []AlertConfiguration `json:"alert_configurations,omitempty"`
	// Databricks budget configuration ID.
	BudgetConfigurationId string `json:"budget_configuration_id,omitempty"`
	// Creation time of this budget configuration.
	CreateTime int64 `json:"create_time,omitempty"`
	// Human-readable name of budget configuration. Max Length: 128
	DisplayName string `json:"display_name,omitempty"`
	// Configured filters for this budget. These are applied to your account's
	// usage to limit the scope of what is considered for this budget. Leave
	// empty to include all usage for this account. All provided filters must be
	// matched for usage to be included.
	Filter *BudgetConfigurationFilter `json:"filter,omitempty"`
	// Update time of this budget configuration.
	UpdateTime int64 `json:"update_time,omitempty"`

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

func (BudgetConfiguration) MarshalJSON added in v0.44.0

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

func (*BudgetConfiguration) UnmarshalJSON added in v0.44.0

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

type BudgetConfigurationFilter added in v0.44.0

type BudgetConfigurationFilter struct {
	// A list of tag keys and values that will limit the budget to usage that
	// includes those specific custom tags. Tags are case-sensitive and should
	// be entered exactly as they appear in your usage data.
	Tags []BudgetConfigurationFilterTagClause `json:"tags,omitempty"`
	// If provided, usage must match with the provided Databricks workspace IDs.
	WorkspaceId *BudgetConfigurationFilterWorkspaceIdClause `json:"workspace_id,omitempty"`
}

type BudgetConfigurationFilterClause added in v0.44.0

type BudgetConfigurationFilterClause struct {
	Operator BudgetConfigurationFilterOperator `json:"operator,omitempty"`

	Values []string `json:"values,omitempty"`
}

type BudgetConfigurationFilterOperator added in v0.44.0

type BudgetConfigurationFilterOperator string
const BudgetConfigurationFilterOperatorIn BudgetConfigurationFilterOperator = `IN`

func (*BudgetConfigurationFilterOperator) Set added in v0.44.0

Set raw string value and validate it against allowed values

func (*BudgetConfigurationFilterOperator) String added in v0.44.0

String representation for fmt.Print

func (*BudgetConfigurationFilterOperator) Type added in v0.44.0

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

type BudgetConfigurationFilterTagClause added in v0.44.0

type BudgetConfigurationFilterTagClause struct {
	Key string `json:"key,omitempty"`

	Value *BudgetConfigurationFilterClause `json:"value,omitempty"`

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

func (BudgetConfigurationFilterTagClause) MarshalJSON added in v0.44.0

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

func (*BudgetConfigurationFilterTagClause) UnmarshalJSON added in v0.44.0

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

type BudgetConfigurationFilterWorkspaceIdClause added in v0.44.0

type BudgetConfigurationFilterWorkspaceIdClause struct {
	Operator BudgetConfigurationFilterOperator `json:"operator,omitempty"`

	Values []int64 `json:"values,omitempty"`
}

type BudgetsAPI

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

These APIs manage budget configurations for this account. Budgets enable you to monitor usage across your account. You can set up budgets to either track account-wide spending, or apply filters to track the spending of specific teams, projects, or workspaces.

func NewBudgets

func NewBudgets(client *client.DatabricksClient) *BudgetsAPI

func (*BudgetsAPI) Create

Example (Budgets)
ctx := context.Background()
a, err := databricks.NewAccountClient()
if err != nil {
	panic(err)
}

created, err := a.Budgets.Create(ctx, billing.CreateBudgetConfigurationRequest{
	Budget: billing.CreateBudgetConfigurationBudget{
		DisplayName: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
		Filter: &billing.BudgetConfigurationFilter{
			Tags: []billing.BudgetConfigurationFilterTagClause{billing.BudgetConfigurationFilterTagClause{
				Key: "tagName",
				Value: &billing.BudgetConfigurationFilterClause{
					Operator: billing.BudgetConfigurationFilterOperatorIn,
					Values:   []string{"all"},
				},
			}},
		},
		AlertConfigurations: []billing.CreateBudgetConfigurationBudgetAlertConfigurations{billing.CreateBudgetConfigurationBudgetAlertConfigurations{
			TimePeriod:        billing.AlertConfigurationTimePeriodMonth,
			QuantityType:      billing.AlertConfigurationQuantityTypeListPriceDollarsUsd,
			TriggerType:       billing.AlertConfigurationTriggerTypeCumulativeSpendingExceeded,
			QuantityThreshold: "100",
			ActionConfigurations: []billing.CreateBudgetConfigurationBudgetActionConfigurations{billing.CreateBudgetConfigurationBudgetActionConfigurations{
				ActionType: billing.ActionConfigurationTypeEmailNotification,
				Target:     "admin@example.com",
			}},
		}},
	},
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", created)

// cleanup

err = a.Budgets.DeleteByBudgetId(ctx, created.Budget.BudgetConfigurationId)
if err != nil {
	panic(err)
}
Output:

func (*BudgetsAPI) Delete

func (a *BudgetsAPI) Delete(ctx context.Context, request DeleteBudgetConfigurationRequest) error

func (*BudgetsAPI) DeleteByBudgetId

func (a *BudgetsAPI) DeleteByBudgetId(ctx context.Context, budgetId string) error

Delete budget.

Deletes a budget configuration for an account. Both account and budget configuration are specified by ID. This cannot be undone.

func (*BudgetsAPI) Get

Example (Budgets)
ctx := context.Background()
a, err := databricks.NewAccountClient()
if err != nil {
	panic(err)
}

created, err := a.Budgets.Create(ctx, billing.CreateBudgetConfigurationRequest{
	Budget: billing.CreateBudgetConfigurationBudget{
		DisplayName: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
		Filter: &billing.BudgetConfigurationFilter{
			Tags: []billing.BudgetConfigurationFilterTagClause{billing.BudgetConfigurationFilterTagClause{
				Key: "tagName",
				Value: &billing.BudgetConfigurationFilterClause{
					Operator: billing.BudgetConfigurationFilterOperatorIn,
					Values:   []string{"all"},
				},
			}},
		},
		AlertConfigurations: []billing.CreateBudgetConfigurationBudgetAlertConfigurations{billing.CreateBudgetConfigurationBudgetAlertConfigurations{
			TimePeriod:        billing.AlertConfigurationTimePeriodMonth,
			QuantityType:      billing.AlertConfigurationQuantityTypeListPriceDollarsUsd,
			TriggerType:       billing.AlertConfigurationTriggerTypeCumulativeSpendingExceeded,
			QuantityThreshold: "100",
			ActionConfigurations: []billing.CreateBudgetConfigurationBudgetActionConfigurations{billing.CreateBudgetConfigurationBudgetActionConfigurations{
				ActionType: billing.ActionConfigurationTypeEmailNotification,
				Target:     "admin@example.com",
			}},
		}},
	},
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", created)

byId, err := a.Budgets.GetByBudgetId(ctx, created.Budget.BudgetConfigurationId)
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", byId)

// cleanup

err = a.Budgets.DeleteByBudgetId(ctx, created.Budget.BudgetConfigurationId)
if err != nil {
	panic(err)
}
Output:

func (*BudgetsAPI) GetByBudgetId

func (a *BudgetsAPI) GetByBudgetId(ctx context.Context, budgetId string) (*GetBudgetConfigurationResponse, error)

Get budget.

Gets a budget configuration for an account. Both account and budget configuration are specified by ID.

func (*BudgetsAPI) List added in v0.24.0

Get all budgets.

Gets all budgets associated with this account.

This method is generated by Databricks SDK Code Generator.

func (*BudgetsAPI) ListAll

Get all budgets.

Gets all budgets associated with this account.

This method is generated by Databricks SDK Code Generator.

Example (Budgets)
ctx := context.Background()
a, err := databricks.NewAccountClient()
if err != nil {
	panic(err)
}

all, err := a.Budgets.ListAll(ctx, billing.ListBudgetConfigurationsRequest{})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", all)
Output:

func (*BudgetsAPI) Update

Example (Budgets)
ctx := context.Background()
a, err := databricks.NewAccountClient()
if err != nil {
	panic(err)
}

created, err := a.Budgets.Create(ctx, billing.CreateBudgetConfigurationRequest{
	Budget: billing.CreateBudgetConfigurationBudget{
		DisplayName: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
		Filter: &billing.BudgetConfigurationFilter{
			Tags: []billing.BudgetConfigurationFilterTagClause{billing.BudgetConfigurationFilterTagClause{
				Key: "tagName",
				Value: &billing.BudgetConfigurationFilterClause{
					Operator: billing.BudgetConfigurationFilterOperatorIn,
					Values:   []string{"all"},
				},
			}},
		},
		AlertConfigurations: []billing.CreateBudgetConfigurationBudgetAlertConfigurations{billing.CreateBudgetConfigurationBudgetAlertConfigurations{
			TimePeriod:        billing.AlertConfigurationTimePeriodMonth,
			QuantityType:      billing.AlertConfigurationQuantityTypeListPriceDollarsUsd,
			TriggerType:       billing.AlertConfigurationTriggerTypeCumulativeSpendingExceeded,
			QuantityThreshold: "100",
			ActionConfigurations: []billing.CreateBudgetConfigurationBudgetActionConfigurations{billing.CreateBudgetConfigurationBudgetActionConfigurations{
				ActionType: billing.ActionConfigurationTypeEmailNotification,
				Target:     "admin@example.com",
			}},
		}},
	},
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", created)

_, err = a.Budgets.Update(ctx, billing.UpdateBudgetConfigurationRequest{
	BudgetId: created.Budget.BudgetConfigurationId,
	Budget: billing.UpdateBudgetConfigurationBudget{
		BudgetConfigurationId: created.Budget.BudgetConfigurationId,
		DisplayName:           fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
		Filter: &billing.BudgetConfigurationFilter{
			Tags: []billing.BudgetConfigurationFilterTagClause{billing.BudgetConfigurationFilterTagClause{
				Key: "tagName",
				Value: &billing.BudgetConfigurationFilterClause{
					Operator: billing.BudgetConfigurationFilterOperatorIn,
					Values:   []string{"all"},
				},
			}},
		},
		AlertConfigurations: []billing.AlertConfiguration{billing.AlertConfiguration{
			AlertConfigurationId: created.Budget.AlertConfigurations[0].AlertConfigurationId,
			TimePeriod:           billing.AlertConfigurationTimePeriodMonth,
			QuantityType:         billing.AlertConfigurationQuantityTypeListPriceDollarsUsd,
			TriggerType:          billing.AlertConfigurationTriggerTypeCumulativeSpendingExceeded,
			QuantityThreshold:    "50",
			ActionConfigurations: created.Budget.AlertConfigurations[0].ActionConfigurations,
		}},
	},
})
if err != nil {
	panic(err)
}

// cleanup

err = a.Budgets.DeleteByBudgetId(ctx, created.Budget.BudgetConfigurationId)
if err != nil {
	panic(err)
}
Output:

type BudgetsInterface added in v0.29.0

type BudgetsInterface interface {

	// Create new budget.
	//
	// Create a new budget configuration for an account. For full details, see
	// https://docs.databricks.com/en/admin/account-settings/budgets.html.
	Create(ctx context.Context, request CreateBudgetConfigurationRequest) (*CreateBudgetConfigurationResponse, error)

	// Delete budget.
	//
	// Deletes a budget configuration for an account. Both account and budget
	// configuration are specified by ID. This cannot be undone.
	Delete(ctx context.Context, request DeleteBudgetConfigurationRequest) error

	// Delete budget.
	//
	// Deletes a budget configuration for an account. Both account and budget
	// configuration are specified by ID. This cannot be undone.
	DeleteByBudgetId(ctx context.Context, budgetId string) error

	// Get budget.
	//
	// Gets a budget configuration for an account. Both account and budget
	// configuration are specified by ID.
	Get(ctx context.Context, request GetBudgetConfigurationRequest) (*GetBudgetConfigurationResponse, error)

	// Get budget.
	//
	// Gets a budget configuration for an account. Both account and budget
	// configuration are specified by ID.
	GetByBudgetId(ctx context.Context, budgetId string) (*GetBudgetConfigurationResponse, error)

	// Get all budgets.
	//
	// Gets all budgets associated with this account.
	//
	// This method is generated by Databricks SDK Code Generator.
	List(ctx context.Context, request ListBudgetConfigurationsRequest) listing.Iterator[BudgetConfiguration]

	// Get all budgets.
	//
	// Gets all budgets associated with this account.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListAll(ctx context.Context, request ListBudgetConfigurationsRequest) ([]BudgetConfiguration, error)

	// Modify budget.
	//
	// Updates a budget configuration for an account. Both account and budget
	// configuration are specified by ID.
	Update(ctx context.Context, request UpdateBudgetConfigurationRequest) (*UpdateBudgetConfigurationResponse, error)
}

type BudgetsService

type BudgetsService interface {

	// Create new budget.
	//
	// Create a new budget configuration for an account. For full details, see
	// https://docs.databricks.com/en/admin/account-settings/budgets.html.
	Create(ctx context.Context, request CreateBudgetConfigurationRequest) (*CreateBudgetConfigurationResponse, error)

	// Delete budget.
	//
	// Deletes a budget configuration for an account. Both account and budget
	// configuration are specified by ID. This cannot be undone.
	Delete(ctx context.Context, request DeleteBudgetConfigurationRequest) error

	// Get budget.
	//
	// Gets a budget configuration for an account. Both account and budget
	// configuration are specified by ID.
	Get(ctx context.Context, request GetBudgetConfigurationRequest) (*GetBudgetConfigurationResponse, error)

	// Get all budgets.
	//
	// Gets all budgets associated with this account.
	//
	// Use ListAll() to get all BudgetConfiguration instances, which will iterate over every result page.
	List(ctx context.Context, request ListBudgetConfigurationsRequest) (*ListBudgetConfigurationsResponse, error)

	// Modify budget.
	//
	// Updates a budget configuration for an account. Both account and budget
	// configuration are specified by ID.
	Update(ctx context.Context, request UpdateBudgetConfigurationRequest) (*UpdateBudgetConfigurationResponse, error)
}

These APIs manage budget configurations for this account. Budgets enable you to monitor usage across your account. You can set up budgets to either track account-wide spending, or apply filters to track the spending of specific teams, projects, or workspaces.

type CreateBillingUsageDashboardRequest added in v0.44.0

type CreateBillingUsageDashboardRequest struct {
	// Workspace level usage dashboard shows usage data for the specified
	// workspace ID. Global level usage dashboard shows usage data for all
	// workspaces in the account.
	DashboardType UsageDashboardType `json:"dashboard_type,omitempty"`
	// The workspace ID of the workspace in which the usage dashboard is
	// created.
	WorkspaceId int64 `json:"workspace_id,omitempty"`

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

func (CreateBillingUsageDashboardRequest) MarshalJSON added in v0.44.0

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

func (*CreateBillingUsageDashboardRequest) UnmarshalJSON added in v0.44.0

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

type CreateBillingUsageDashboardResponse added in v0.44.0

type CreateBillingUsageDashboardResponse struct {
	// The unique id of the usage dashboard.
	DashboardId string `json:"dashboard_id,omitempty"`

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

func (CreateBillingUsageDashboardResponse) MarshalJSON added in v0.44.0

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

func (*CreateBillingUsageDashboardResponse) UnmarshalJSON added in v0.44.0

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

type CreateBudgetConfigurationBudget added in v0.44.0

type CreateBudgetConfigurationBudget struct {
	// Databricks account ID.
	AccountId string `json:"account_id,omitempty"`
	// Alerts to configure when this budget is in a triggered state. Budgets
	// must have exactly one alert configuration.
	AlertConfigurations []CreateBudgetConfigurationBudgetAlertConfigurations `json:"alert_configurations,omitempty"`
	// Human-readable name of budget configuration. Max Length: 128
	DisplayName string `json:"display_name,omitempty"`
	// Configured filters for this budget. These are applied to your account's
	// usage to limit the scope of what is considered for this budget. Leave
	// empty to include all usage for this account. All provided filters must be
	// matched for usage to be included.
	Filter *BudgetConfigurationFilter `json:"filter,omitempty"`

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

func (CreateBudgetConfigurationBudget) MarshalJSON added in v0.44.0

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

func (*CreateBudgetConfigurationBudget) UnmarshalJSON added in v0.44.0

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

type CreateBudgetConfigurationBudgetActionConfigurations added in v0.44.0

type CreateBudgetConfigurationBudgetActionConfigurations struct {
	// The type of the action.
	ActionType ActionConfigurationType `json:"action_type,omitempty"`
	// Target for the action. For example, an email address.
	Target string `json:"target,omitempty"`

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

func (CreateBudgetConfigurationBudgetActionConfigurations) MarshalJSON added in v0.44.0

func (*CreateBudgetConfigurationBudgetActionConfigurations) UnmarshalJSON added in v0.44.0

type CreateBudgetConfigurationBudgetAlertConfigurations added in v0.44.0

type CreateBudgetConfigurationBudgetAlertConfigurations struct {
	// Configured actions for this alert. These define what happens when an
	// alert enters a triggered state.
	ActionConfigurations []CreateBudgetConfigurationBudgetActionConfigurations `json:"action_configurations,omitempty"`
	// The threshold for the budget alert to determine if it is in a triggered
	// state. The number is evaluated based on `quantity_type`.
	QuantityThreshold string `json:"quantity_threshold,omitempty"`
	// The way to calculate cost for this budget alert. This is what
	// `quantity_threshold` is measured in.
	QuantityType AlertConfigurationQuantityType `json:"quantity_type,omitempty"`
	// The time window of usage data for the budget.
	TimePeriod AlertConfigurationTimePeriod `json:"time_period,omitempty"`
	// The evaluation method to determine when this budget alert is in a
	// triggered state.
	TriggerType AlertConfigurationTriggerType `json:"trigger_type,omitempty"`

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

func (CreateBudgetConfigurationBudgetAlertConfigurations) MarshalJSON added in v0.44.0

func (*CreateBudgetConfigurationBudgetAlertConfigurations) UnmarshalJSON added in v0.44.0

type CreateBudgetConfigurationRequest added in v0.44.0

type CreateBudgetConfigurationRequest struct {
	// Properties of the new budget configuration.
	Budget CreateBudgetConfigurationBudget `json:"budget"`
}

type CreateBudgetConfigurationResponse added in v0.44.0

type CreateBudgetConfigurationResponse struct {
	// The created budget configuration.
	Budget *BudgetConfiguration `json:"budget,omitempty"`
}

type CreateLogDeliveryConfigurationParams

type CreateLogDeliveryConfigurationParams struct {
	// The optional human-readable name of the log delivery configuration.
	// Defaults to empty.
	ConfigName string `json:"config_name,omitempty"`
	// The ID for a method:credentials/create that represents the AWS IAM role
	// with policy and trust relationship as described in the main billable
	// usage documentation page. See [Configure billable usage delivery].
	//
	// [Configure billable usage delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html
	CredentialsId string `json:"credentials_id"`
	// The optional delivery path prefix within Amazon S3 storage. Defaults to
	// empty, which means that logs are delivered to the root of the bucket.
	// This must be a valid S3 object key. This must not start or end with a
	// slash character.
	DeliveryPathPrefix string `json:"delivery_path_prefix,omitempty"`
	// This field applies only if `log_type` is `BILLABLE_USAGE`. This is the
	// optional start month and year for delivery, specified in `YYYY-MM`
	// format. Defaults to current year and month. `BILLABLE_USAGE` logs are not
	// available for usage before March 2019 (`2019-03`).
	DeliveryStartTime string `json:"delivery_start_time,omitempty"`
	// Log delivery type. Supported values are:
	//
	// * `BILLABLE_USAGE` — Configure [billable usage log delivery]. For the
	// CSV schema, see the [View billable usage].
	//
	// * `AUDIT_LOGS` — Configure [audit log delivery]. For the JSON schema,
	// see [Configure audit logging]
	//
	// [Configure audit logging]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html
	// [View billable usage]: https://docs.databricks.com/administration-guide/account-settings/usage.html
	// [audit log delivery]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html
	// [billable usage log delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html
	LogType LogType `json:"log_type"`
	// The file type of log delivery.
	//
	// * If `log_type` is `BILLABLE_USAGE`, this value must be `CSV`. Only the
	// CSV (comma-separated values) format is supported. For the schema, see the
	// [View billable usage] * If `log_type` is `AUDIT_LOGS`, this value must be
	// `JSON`. Only the JSON (JavaScript Object Notation) format is supported.
	// For the schema, see the [Configuring audit logs].
	//
	// [Configuring audit logs]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html
	// [View billable usage]: https://docs.databricks.com/administration-guide/account-settings/usage.html
	OutputFormat OutputFormat `json:"output_format"`
	// Status of log delivery configuration. Set to `ENABLED` (enabled) or
	// `DISABLED` (disabled). Defaults to `ENABLED`. You can [enable or disable
	// the configuration](#operation/patch-log-delivery-config-status) later.
	// Deletion of a configuration is not supported, so disable a log delivery
	// configuration that is no longer needed.
	Status LogDeliveryConfigStatus `json:"status,omitempty"`
	// The ID for a method:storage/create that represents the S3 bucket with
	// bucket policy as described in the main billable usage documentation page.
	// See [Configure billable usage delivery].
	//
	// [Configure billable usage delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html
	StorageConfigurationId string `json:"storage_configuration_id"`
	// Optional filter that specifies workspace IDs to deliver logs for. By
	// default the workspace filter is empty and log delivery applies at the
	// account level, delivering workspace-level logs for all workspaces in your
	// account, plus account level logs. You can optionally set this field to an
	// array of workspace IDs (each one is an `int64`) to which log delivery
	// should apply, in which case only workspace-level logs relating to the
	// specified workspaces are delivered. If you plan to use different log
	// delivery configurations for different workspaces, set this field
	// explicitly. Be aware that delivery configurations mentioning specific
	// workspaces won't apply to new workspaces created in the future, and
	// delivery won't include account level logs. For some types of Databricks
	// deployments there is only one workspace per account ID, so this field is
	// unnecessary.
	WorkspaceIdsFilter []int64 `json:"workspace_ids_filter,omitempty"`

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

func (CreateLogDeliveryConfigurationParams) MarshalJSON added in v0.23.0

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

func (*CreateLogDeliveryConfigurationParams) UnmarshalJSON added in v0.23.0

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

type DeleteBudgetConfigurationRequest added in v0.44.0

type DeleteBudgetConfigurationRequest struct {
	// The Databricks budget configuration ID.
	BudgetId string `json:"-" url:"-"`
}

Delete budget

type DeleteBudgetConfigurationResponse added in v0.44.0

type DeleteBudgetConfigurationResponse struct {
}

type DeliveryStatus

type DeliveryStatus string

The status string for log delivery. Possible values are: * `CREATED`: There were no log delivery attempts since the config was created. * `SUCCEEDED`: The latest attempt of log delivery has succeeded completely. * `USER_FAILURE`: The latest attempt of log delivery failed because of misconfiguration of customer provided permissions on role or storage. * `SYSTEM_FAILURE`: The latest attempt of log delivery failed because of an Databricks internal error. Contact support if it doesn't go away soon. * `NOT_FOUND`: The log delivery status as the configuration has been disabled since the release of this feature or there are no workspaces in the account.

const DeliveryStatusCreated DeliveryStatus = `CREATED`

There were no log delivery attempts since the config was created.

const DeliveryStatusNotFound DeliveryStatus = `NOT_FOUND`

The log delivery status as the configuration has been disabled since the release of this feature or there are no workspaces in the account.

const DeliveryStatusSucceeded DeliveryStatus = `SUCCEEDED`

The latest attempt of log delivery has succeeded completely.

const DeliveryStatusSystemFailure DeliveryStatus = `SYSTEM_FAILURE`

The latest attempt of log delivery failed because of an <Databricks> internal error. Contact support if it doesn't go away soon.

const DeliveryStatusUserFailure DeliveryStatus = `USER_FAILURE`

The latest attempt of log delivery failed because of misconfiguration of customer provided permissions on role or storage.

func (*DeliveryStatus) Set added in v0.2.0

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

Set raw string value and validate it against allowed values

func (*DeliveryStatus) String added in v0.2.0

func (f *DeliveryStatus) String() string

String representation for fmt.Print

func (*DeliveryStatus) Type added in v0.2.0

func (f *DeliveryStatus) Type() string

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

type DownloadRequest

type DownloadRequest struct {
	// Format: `YYYY-MM`. Last month to return billable usage logs for. This
	// field is required.
	EndMonth string `json:"-" url:"end_month"`
	// Specify whether to include personally identifiable information in the
	// billable usage logs, for example the email addresses of cluster creators.
	// Handle this information with care. Defaults to false.
	PersonalData bool `json:"-" url:"personal_data,omitempty"`
	// Format: `YYYY-MM`. First month to return billable usage logs for. This
	// field is required.
	StartMonth string `json:"-" url:"start_month"`

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

Return billable usage logs

func (DownloadRequest) MarshalJSON added in v0.23.0

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

func (*DownloadRequest) UnmarshalJSON added in v0.23.0

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

type DownloadResponse added in v0.23.0

type DownloadResponse struct {
	Contents io.ReadCloser `json:"-"`
}

type GetBillingUsageDashboardRequest added in v0.44.0

type GetBillingUsageDashboardRequest struct {
	// Workspace level usage dashboard shows usage data for the specified
	// workspace ID. Global level usage dashboard shows usage data for all
	// workspaces in the account.
	DashboardType UsageDashboardType `json:"-" url:"dashboard_type,omitempty"`
	// The workspace ID of the workspace in which the usage dashboard is
	// created.
	WorkspaceId int64 `json:"-" url:"workspace_id,omitempty"`

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

Get usage dashboard

func (GetBillingUsageDashboardRequest) MarshalJSON added in v0.44.0

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

func (*GetBillingUsageDashboardRequest) UnmarshalJSON added in v0.44.0

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

type GetBillingUsageDashboardResponse added in v0.44.0

type GetBillingUsageDashboardResponse struct {
	// The unique id of the usage dashboard.
	DashboardId string `json:"dashboard_id,omitempty"`
	// The URL of the usage dashboard.
	DashboardUrl string `json:"dashboard_url,omitempty"`

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

func (GetBillingUsageDashboardResponse) MarshalJSON added in v0.44.0

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

func (*GetBillingUsageDashboardResponse) UnmarshalJSON added in v0.44.0

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

type GetBudgetConfigurationRequest added in v0.44.0

type GetBudgetConfigurationRequest struct {
	// The Databricks budget configuration ID.
	BudgetId string `json:"-" url:"-"`
}

Get budget

type GetBudgetConfigurationResponse added in v0.44.0

type GetBudgetConfigurationResponse struct {
	Budget *BudgetConfiguration `json:"budget,omitempty"`
}

type GetLogDeliveryRequest

type GetLogDeliveryRequest struct {
	// Databricks log delivery configuration ID
	LogDeliveryConfigurationId string `json:"-" url:"-"`
}

Get log delivery configuration

type ListBudgetConfigurationsRequest added in v0.44.0

type ListBudgetConfigurationsRequest struct {
	// A page token received from a previous get all budget configurations call.
	// This token can be used to retrieve the subsequent page. Requests first
	// page if absent.
	PageToken string `json:"-" url:"page_token,omitempty"`

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

Get all budgets

func (ListBudgetConfigurationsRequest) MarshalJSON added in v0.44.0

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

func (*ListBudgetConfigurationsRequest) UnmarshalJSON added in v0.44.0

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

type ListBudgetConfigurationsResponse added in v0.44.0

type ListBudgetConfigurationsResponse struct {
	Budgets []BudgetConfiguration `json:"budgets,omitempty"`
	// Token which can be sent as `page_token` to retrieve the next page of
	// results. If this field is omitted, there are no subsequent budgets.
	NextPageToken string `json:"next_page_token,omitempty"`

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

func (ListBudgetConfigurationsResponse) MarshalJSON added in v0.44.0

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

func (*ListBudgetConfigurationsResponse) UnmarshalJSON added in v0.44.0

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

type ListLogDeliveryRequest

type ListLogDeliveryRequest struct {
	// Filter by credential configuration ID.
	CredentialsId string `json:"-" url:"credentials_id,omitempty"`
	// Filter by status `ENABLED` or `DISABLED`.
	Status LogDeliveryConfigStatus `json:"-" url:"status,omitempty"`
	// Filter by storage configuration ID.
	StorageConfigurationId string `json:"-" url:"storage_configuration_id,omitempty"`

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

Get all log delivery configurations

func (ListLogDeliveryRequest) MarshalJSON added in v0.23.0

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

func (*ListLogDeliveryRequest) UnmarshalJSON added in v0.23.0

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

type LogDeliveryAPI

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

These APIs manage log delivery configurations for this account. The two supported log types for this API are _billable usage logs_ and _audit logs_. This feature is in Public Preview. This feature works with all account ID types.

Log delivery works with all account types. However, if your account is on the E2 version of the platform or on a select custom plan that allows multiple workspaces per account, you can optionally configure different storage destinations for each workspace. Log delivery status is also provided to know the latest status of log delivery attempts. The high-level flow of billable usage delivery:

1. **Create storage**: In AWS, create a new AWS S3 bucket with a specific bucket policy. Using Databricks APIs, call the Account API to create a [storage configuration object](:method:Storage/Create) that uses the bucket name. 2. **Create credentials**: In AWS, create the appropriate AWS IAM role. For full details, including the required IAM role policies and trust relationship, see Billable usage log delivery. Using Databricks APIs, call the Account API to create a [credential configuration object](:method:Credentials/Create) that uses the IAM role"s ARN. 3. **Create log delivery configuration**: Using Databricks APIs, call the Account API to [create a log delivery configuration](:method:LogDelivery/Create) that uses the credential and storage configuration objects from previous steps. You can specify if the logs should include all events of that log type in your account (_Account level_ delivery) or only events for a specific set of workspaces (_workspace level_ delivery). Account level log delivery applies to all current and future workspaces plus account level logs, while workspace level log delivery solely delivers logs related to the specified workspaces. You can create multiple types of delivery configurations per account.

For billable usage delivery: * For more information about billable usage logs, see Billable usage log delivery. For the CSV schema, see the Usage page. * The delivery location is `<bucket-name>/<prefix>/billable-usage/csv/`, where `<prefix>` is the name of the optional delivery path prefix you set up during log delivery configuration. Files are named `workspaceId=<workspace-id>-usageMonth=<month>.csv`. * All billable usage logs apply to specific workspaces (_workspace level_ logs). You can aggregate usage for your entire account by creating an _account level_ delivery configuration that delivers logs for all current and future workspaces in your account. * The files are delivered daily by overwriting the month's CSV file for each workspace.

For audit log delivery: * For more information about about audit log delivery, see Audit log delivery, which includes information about the used JSON schema. * The delivery location is `<bucket-name>/<delivery-path-prefix>/workspaceId=<workspaceId>/date=<yyyy-mm-dd>/auditlogs_<internal-id>.json`. Files may get overwritten with the same content multiple times to achieve exactly-once delivery. * If the audit log delivery configuration included specific workspace IDs, only _workspace-level_ audit logs for those workspaces are delivered. If the log delivery configuration applies to the entire account (_account level_ delivery configuration), the audit log delivery includes workspace-level audit logs for all workspaces in the account as well as account-level audit logs. See Audit log delivery for details. * Auditable events are typically available in logs within 15 minutes.

func NewLogDelivery

func NewLogDelivery(client *client.DatabricksClient) *LogDeliveryAPI

func (*LogDeliveryAPI) Create

Example (LogDelivery)
ctx := context.Background()
a, err := databricks.NewAccountClient()
if err != nil {
	panic(err)
}

bucket, err := a.Storage.Create(ctx, provisioning.CreateStorageConfigurationRequest{
	StorageConfigurationName: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
	RootBucketInfo: provisioning.RootBucketInfo{
		BucketName: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
	},
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", bucket)

creds, err := a.Credentials.Create(ctx, provisioning.CreateCredentialRequest{
	CredentialsName: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
	AwsCredentials: provisioning.CreateCredentialAwsCredentials{
		StsRole: &provisioning.CreateCredentialStsRole{
			RoleArn: os.Getenv("TEST_LOGDELIVERY_ARN"),
		},
	},
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", creds)

created, err := a.LogDelivery.Create(ctx, billing.WrappedCreateLogDeliveryConfiguration{
	LogDeliveryConfiguration: &billing.CreateLogDeliveryConfigurationParams{
		ConfigName:             fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
		CredentialsId:          creds.CredentialsId,
		StorageConfigurationId: bucket.StorageConfigurationId,
		LogType:                billing.LogTypeAuditLogs,
		OutputFormat:           billing.OutputFormatJson,
	},
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", created)

// cleanup

err = a.Storage.DeleteByStorageConfigurationId(ctx, bucket.StorageConfigurationId)
if err != nil {
	panic(err)
}
err = a.Credentials.DeleteByCredentialsId(ctx, creds.CredentialsId)
if err != nil {
	panic(err)
}
err = a.LogDelivery.PatchStatus(ctx, billing.UpdateLogDeliveryConfigurationStatusRequest{
	LogDeliveryConfigurationId: created.LogDeliveryConfiguration.ConfigId,
	Status:                     billing.LogDeliveryConfigStatusDisabled,
})
if err != nil {
	panic(err)
}
Output:

func (*LogDeliveryAPI) Get

func (a *LogDeliveryAPI) Get(ctx context.Context, request GetLogDeliveryRequest) (*WrappedLogDeliveryConfiguration, error)
Example (LogDelivery)
ctx := context.Background()
a, err := databricks.NewAccountClient()
if err != nil {
	panic(err)
}

bucket, err := a.Storage.Create(ctx, provisioning.CreateStorageConfigurationRequest{
	StorageConfigurationName: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
	RootBucketInfo: provisioning.RootBucketInfo{
		BucketName: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
	},
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", bucket)

creds, err := a.Credentials.Create(ctx, provisioning.CreateCredentialRequest{
	CredentialsName: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
	AwsCredentials: provisioning.CreateCredentialAwsCredentials{
		StsRole: &provisioning.CreateCredentialStsRole{
			RoleArn: os.Getenv("TEST_LOGDELIVERY_ARN"),
		},
	},
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", creds)

created, err := a.LogDelivery.Create(ctx, billing.WrappedCreateLogDeliveryConfiguration{
	LogDeliveryConfiguration: &billing.CreateLogDeliveryConfigurationParams{
		ConfigName:             fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
		CredentialsId:          creds.CredentialsId,
		StorageConfigurationId: bucket.StorageConfigurationId,
		LogType:                billing.LogTypeAuditLogs,
		OutputFormat:           billing.OutputFormatJson,
	},
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", created)

byId, err := a.LogDelivery.GetByLogDeliveryConfigurationId(ctx, created.LogDeliveryConfiguration.ConfigId)
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", byId)

// cleanup

err = a.Storage.DeleteByStorageConfigurationId(ctx, bucket.StorageConfigurationId)
if err != nil {
	panic(err)
}
err = a.Credentials.DeleteByCredentialsId(ctx, creds.CredentialsId)
if err != nil {
	panic(err)
}
err = a.LogDelivery.PatchStatus(ctx, billing.UpdateLogDeliveryConfigurationStatusRequest{
	LogDeliveryConfigurationId: created.LogDeliveryConfiguration.ConfigId,
	Status:                     billing.LogDeliveryConfigStatusDisabled,
})
if err != nil {
	panic(err)
}
Output:

func (*LogDeliveryAPI) GetByConfigName

func (a *LogDeliveryAPI) GetByConfigName(ctx context.Context, name string) (*LogDeliveryConfiguration, error)

GetByConfigName calls LogDeliveryAPI.LogDeliveryConfigurationConfigNameToConfigIdMap and returns a single LogDeliveryConfiguration.

Returns an error if there's more than one LogDeliveryConfiguration with the same .ConfigName.

Note: All LogDeliveryConfiguration instances are loaded into memory before returning matching by name.

This method is generated by Databricks SDK Code Generator.

func (*LogDeliveryAPI) GetByLogDeliveryConfigurationId

func (a *LogDeliveryAPI) GetByLogDeliveryConfigurationId(ctx context.Context, logDeliveryConfigurationId string) (*WrappedLogDeliveryConfiguration, error)

Get log delivery configuration.

Gets a Databricks log delivery configuration object for an account, both specified by ID.

func (*LogDeliveryAPI) List added in v0.24.0

Get all log delivery configurations.

Gets all Databricks log delivery configurations associated with an account specified by ID.

This method is generated by Databricks SDK Code Generator.

func (*LogDeliveryAPI) ListAll

Get all log delivery configurations.

Gets all Databricks log delivery configurations associated with an account specified by ID.

This method is generated by Databricks SDK Code Generator.

Example (LogDelivery)
ctx := context.Background()
a, err := databricks.NewAccountClient()
if err != nil {
	panic(err)
}

all, err := a.LogDelivery.ListAll(ctx, billing.ListLogDeliveryRequest{})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", all)
Output:

func (*LogDeliveryAPI) LogDeliveryConfigurationConfigNameToConfigIdMap

func (a *LogDeliveryAPI) LogDeliveryConfigurationConfigNameToConfigIdMap(ctx context.Context, request ListLogDeliveryRequest) (map[string]string, error)

LogDeliveryConfigurationConfigNameToConfigIdMap calls LogDeliveryAPI.ListAll and creates a map of results with LogDeliveryConfiguration.ConfigName as key and LogDeliveryConfiguration.ConfigId as value.

Returns an error if there's more than one LogDeliveryConfiguration with the same .ConfigName.

Note: All LogDeliveryConfiguration instances are loaded into memory before creating a map.

This method is generated by Databricks SDK Code Generator.

func (*LogDeliveryAPI) PatchStatus

func (a *LogDeliveryAPI) PatchStatus(ctx context.Context, request UpdateLogDeliveryConfigurationStatusRequest) error

type LogDeliveryConfigStatus

type LogDeliveryConfigStatus string

Status of log delivery configuration. Set to `ENABLED` (enabled) or `DISABLED` (disabled). Defaults to `ENABLED`. You can [enable or disable the configuration](#operation/patch-log-delivery-config-status) later. Deletion of a configuration is not supported, so disable a log delivery configuration that is no longer needed.

const LogDeliveryConfigStatusDisabled LogDeliveryConfigStatus = `DISABLED`
const LogDeliveryConfigStatusEnabled LogDeliveryConfigStatus = `ENABLED`

func (*LogDeliveryConfigStatus) Set added in v0.2.0

Set raw string value and validate it against allowed values

func (*LogDeliveryConfigStatus) String added in v0.2.0

func (f *LogDeliveryConfigStatus) String() string

String representation for fmt.Print

func (*LogDeliveryConfigStatus) Type added in v0.2.0

func (f *LogDeliveryConfigStatus) Type() string

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

type LogDeliveryConfiguration

type LogDeliveryConfiguration struct {
	// The Databricks account ID that hosts the log delivery configuration.
	AccountId string `json:"account_id,omitempty"`
	// Databricks log delivery configuration ID.
	ConfigId string `json:"config_id,omitempty"`
	// The optional human-readable name of the log delivery configuration.
	// Defaults to empty.
	ConfigName string `json:"config_name,omitempty"`
	// Time in epoch milliseconds when the log delivery configuration was
	// created.
	CreationTime int64 `json:"creation_time,omitempty"`
	// The ID for a method:credentials/create that represents the AWS IAM role
	// with policy and trust relationship as described in the main billable
	// usage documentation page. See [Configure billable usage delivery].
	//
	// [Configure billable usage delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html
	CredentialsId string `json:"credentials_id,omitempty"`
	// The optional delivery path prefix within Amazon S3 storage. Defaults to
	// empty, which means that logs are delivered to the root of the bucket.
	// This must be a valid S3 object key. This must not start or end with a
	// slash character.
	DeliveryPathPrefix string `json:"delivery_path_prefix,omitempty"`
	// This field applies only if `log_type` is `BILLABLE_USAGE`. This is the
	// optional start month and year for delivery, specified in `YYYY-MM`
	// format. Defaults to current year and month. `BILLABLE_USAGE` logs are not
	// available for usage before March 2019 (`2019-03`).
	DeliveryStartTime string `json:"delivery_start_time,omitempty"`
	// Databricks log delivery status.
	LogDeliveryStatus *LogDeliveryStatus `json:"log_delivery_status,omitempty"`
	// Log delivery type. Supported values are:
	//
	// * `BILLABLE_USAGE` — Configure [billable usage log delivery]. For the
	// CSV schema, see the [View billable usage].
	//
	// * `AUDIT_LOGS` — Configure [audit log delivery]. For the JSON schema,
	// see [Configure audit logging]
	//
	// [Configure audit logging]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html
	// [View billable usage]: https://docs.databricks.com/administration-guide/account-settings/usage.html
	// [audit log delivery]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html
	// [billable usage log delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html
	LogType LogType `json:"log_type,omitempty"`
	// The file type of log delivery.
	//
	// * If `log_type` is `BILLABLE_USAGE`, this value must be `CSV`. Only the
	// CSV (comma-separated values) format is supported. For the schema, see the
	// [View billable usage] * If `log_type` is `AUDIT_LOGS`, this value must be
	// `JSON`. Only the JSON (JavaScript Object Notation) format is supported.
	// For the schema, see the [Configuring audit logs].
	//
	// [Configuring audit logs]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html
	// [View billable usage]: https://docs.databricks.com/administration-guide/account-settings/usage.html
	OutputFormat OutputFormat `json:"output_format,omitempty"`
	// Status of log delivery configuration. Set to `ENABLED` (enabled) or
	// `DISABLED` (disabled). Defaults to `ENABLED`. You can [enable or disable
	// the configuration](#operation/patch-log-delivery-config-status) later.
	// Deletion of a configuration is not supported, so disable a log delivery
	// configuration that is no longer needed.
	Status LogDeliveryConfigStatus `json:"status,omitempty"`
	// The ID for a method:storage/create that represents the S3 bucket with
	// bucket policy as described in the main billable usage documentation page.
	// See [Configure billable usage delivery].
	//
	// [Configure billable usage delivery]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html
	StorageConfigurationId string `json:"storage_configuration_id,omitempty"`
	// Time in epoch milliseconds when the log delivery configuration was
	// updated.
	UpdateTime int64 `json:"update_time,omitempty"`
	// Optional filter that specifies workspace IDs to deliver logs for. By
	// default the workspace filter is empty and log delivery applies at the
	// account level, delivering workspace-level logs for all workspaces in your
	// account, plus account level logs. You can optionally set this field to an
	// array of workspace IDs (each one is an `int64`) to which log delivery
	// should apply, in which case only workspace-level logs relating to the
	// specified workspaces are delivered. If you plan to use different log
	// delivery configurations for different workspaces, set this field
	// explicitly. Be aware that delivery configurations mentioning specific
	// workspaces won't apply to new workspaces created in the future, and
	// delivery won't include account level logs. For some types of Databricks
	// deployments there is only one workspace per account ID, so this field is
	// unnecessary.
	WorkspaceIdsFilter []int64 `json:"workspace_ids_filter,omitempty"`

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

func (LogDeliveryConfiguration) MarshalJSON added in v0.23.0

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

func (*LogDeliveryConfiguration) UnmarshalJSON added in v0.23.0

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

type LogDeliveryInterface added in v0.29.0

type LogDeliveryInterface interface {

	// Create a new log delivery configuration.
	//
	// Creates a new Databricks log delivery configuration to enable delivery of the
	// specified type of logs to your storage location. This requires that you
	// already created a [credential object](:method:Credentials/Create) (which
	// encapsulates a cross-account service IAM role) and a [storage configuration
	// object](:method:Storage/Create) (which encapsulates an S3 bucket).
	//
	// For full details, including the required IAM role policies and bucket
	// policies, see [Deliver and access billable usage logs] or [Configure audit
	// logging].
	//
	// **Note**: There is a limit on the number of log delivery configurations
	// available per account (each limit applies separately to each log type
	// including billable usage and audit logs). You can create a maximum of two
	// enabled account-level delivery configurations (configurations without a
	// workspace filter) per type. Additionally, you can create two enabled
	// workspace-level delivery configurations per workspace for each log type,
	// which means that the same workspace ID can occur in the workspace filter for
	// no more than two delivery configurations per log type.
	//
	// You cannot delete a log delivery configuration, but you can disable it (see
	// [Enable or disable log delivery
	// configuration](:method:LogDelivery/PatchStatus)).
	//
	// [Configure audit logging]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html
	// [Deliver and access billable usage logs]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html
	Create(ctx context.Context, request WrappedCreateLogDeliveryConfiguration) (*WrappedLogDeliveryConfiguration, error)

	// Get log delivery configuration.
	//
	// Gets a Databricks log delivery configuration object for an account, both
	// specified by ID.
	Get(ctx context.Context, request GetLogDeliveryRequest) (*WrappedLogDeliveryConfiguration, error)

	// Get log delivery configuration.
	//
	// Gets a Databricks log delivery configuration object for an account, both
	// specified by ID.
	GetByLogDeliveryConfigurationId(ctx context.Context, logDeliveryConfigurationId string) (*WrappedLogDeliveryConfiguration, error)

	// Get all log delivery configurations.
	//
	// Gets all Databricks log delivery configurations associated with an account
	// specified by ID.
	//
	// This method is generated by Databricks SDK Code Generator.
	List(ctx context.Context, request ListLogDeliveryRequest) listing.Iterator[LogDeliveryConfiguration]

	// Get all log delivery configurations.
	//
	// Gets all Databricks log delivery configurations associated with an account
	// specified by ID.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListAll(ctx context.Context, request ListLogDeliveryRequest) ([]LogDeliveryConfiguration, error)

	// LogDeliveryConfigurationConfigNameToConfigIdMap calls [LogDeliveryAPI.ListAll] and creates a map of results with [LogDeliveryConfiguration].ConfigName as key and [LogDeliveryConfiguration].ConfigId as value.
	//
	// Returns an error if there's more than one [LogDeliveryConfiguration] with the same .ConfigName.
	//
	// Note: All [LogDeliveryConfiguration] instances are loaded into memory before creating a map.
	//
	// This method is generated by Databricks SDK Code Generator.
	LogDeliveryConfigurationConfigNameToConfigIdMap(ctx context.Context, request ListLogDeliveryRequest) (map[string]string, error)

	// GetByConfigName calls [LogDeliveryAPI.LogDeliveryConfigurationConfigNameToConfigIdMap] and returns a single [LogDeliveryConfiguration].
	//
	// Returns an error if there's more than one [LogDeliveryConfiguration] with the same .ConfigName.
	//
	// Note: All [LogDeliveryConfiguration] instances are loaded into memory before returning matching by name.
	//
	// This method is generated by Databricks SDK Code Generator.
	GetByConfigName(ctx context.Context, name string) (*LogDeliveryConfiguration, error)

	// Enable or disable log delivery configuration.
	//
	// Enables or disables a log delivery configuration. Deletion of delivery
	// configurations is not supported, so disable log delivery configurations that
	// are no longer needed. Note that you can't re-enable a delivery configuration
	// if this would violate the delivery configuration limits described under
	// [Create log delivery](:method:LogDelivery/Create).
	PatchStatus(ctx context.Context, request UpdateLogDeliveryConfigurationStatusRequest) error
}

type LogDeliveryService

type LogDeliveryService interface {

	// Create a new log delivery configuration.
	//
	// Creates a new Databricks log delivery configuration to enable delivery of
	// the specified type of logs to your storage location. This requires that
	// you already created a [credential object](:method:Credentials/Create)
	// (which encapsulates a cross-account service IAM role) and a [storage
	// configuration object](:method:Storage/Create) (which encapsulates an S3
	// bucket).
	//
	// For full details, including the required IAM role policies and bucket
	// policies, see [Deliver and access billable usage logs] or [Configure
	// audit logging].
	//
	// **Note**: There is a limit on the number of log delivery configurations
	// available per account (each limit applies separately to each log type
	// including billable usage and audit logs). You can create a maximum of two
	// enabled account-level delivery configurations (configurations without a
	// workspace filter) per type. Additionally, you can create two enabled
	// workspace-level delivery configurations per workspace for each log type,
	// which means that the same workspace ID can occur in the workspace filter
	// for no more than two delivery configurations per log type.
	//
	// You cannot delete a log delivery configuration, but you can disable it
	// (see [Enable or disable log delivery
	// configuration](:method:LogDelivery/PatchStatus)).
	//
	// [Configure audit logging]: https://docs.databricks.com/administration-guide/account-settings/audit-logs.html
	// [Deliver and access billable usage logs]: https://docs.databricks.com/administration-guide/account-settings/billable-usage-delivery.html
	Create(ctx context.Context, request WrappedCreateLogDeliveryConfiguration) (*WrappedLogDeliveryConfiguration, error)

	// Get log delivery configuration.
	//
	// Gets a Databricks log delivery configuration object for an account, both
	// specified by ID.
	Get(ctx context.Context, request GetLogDeliveryRequest) (*WrappedLogDeliveryConfiguration, error)

	// Get all log delivery configurations.
	//
	// Gets all Databricks log delivery configurations associated with an
	// account specified by ID.
	//
	// Use ListAll() to get all LogDeliveryConfiguration instances
	List(ctx context.Context, request ListLogDeliveryRequest) (*WrappedLogDeliveryConfigurations, error)

	// Enable or disable log delivery configuration.
	//
	// Enables or disables a log delivery configuration. Deletion of delivery
	// configurations is not supported, so disable log delivery configurations
	// that are no longer needed. Note that you can't re-enable a delivery
	// configuration if this would violate the delivery configuration limits
	// described under [Create log delivery](:method:LogDelivery/Create).
	PatchStatus(ctx context.Context, request UpdateLogDeliveryConfigurationStatusRequest) error
}

These APIs manage log delivery configurations for this account. The two supported log types for this API are _billable usage logs_ and _audit logs_. This feature is in Public Preview. This feature works with all account ID types.

Log delivery works with all account types. However, if your account is on the E2 version of the platform or on a select custom plan that allows multiple workspaces per account, you can optionally configure different storage destinations for each workspace. Log delivery status is also provided to know the latest status of log delivery attempts. The high-level flow of billable usage delivery:

1. **Create storage**: In AWS, create a new AWS S3 bucket with a specific bucket policy. Using Databricks APIs, call the Account API to create a [storage configuration object](:method:Storage/Create) that uses the bucket name. 2. **Create credentials**: In AWS, create the appropriate AWS IAM role. For full details, including the required IAM role policies and trust relationship, see Billable usage log delivery. Using Databricks APIs, call the Account API to create a [credential configuration object](:method:Credentials/Create) that uses the IAM role"s ARN. 3. **Create log delivery configuration**: Using Databricks APIs, call the Account API to [create a log delivery configuration](:method:LogDelivery/Create) that uses the credential and storage configuration objects from previous steps. You can specify if the logs should include all events of that log type in your account (_Account level_ delivery) or only events for a specific set of workspaces (_workspace level_ delivery). Account level log delivery applies to all current and future workspaces plus account level logs, while workspace level log delivery solely delivers logs related to the specified workspaces. You can create multiple types of delivery configurations per account.

For billable usage delivery: * For more information about billable usage logs, see Billable usage log delivery. For the CSV schema, see the Usage page. * The delivery location is `<bucket-name>/<prefix>/billable-usage/csv/`, where `<prefix>` is the name of the optional delivery path prefix you set up during log delivery configuration. Files are named `workspaceId=<workspace-id>-usageMonth=<month>.csv`. * All billable usage logs apply to specific workspaces (_workspace level_ logs). You can aggregate usage for your entire account by creating an _account level_ delivery configuration that delivers logs for all current and future workspaces in your account. * The files are delivered daily by overwriting the month's CSV file for each workspace.

For audit log delivery: * For more information about about audit log delivery, see Audit log delivery, which includes information about the used JSON schema. * The delivery location is `<bucket-name>/<delivery-path-prefix>/workspaceId=<workspaceId>/date=<yyyy-mm-dd>/auditlogs_<internal-id>.json`. Files may get overwritten with the same content multiple times to achieve exactly-once delivery. * If the audit log delivery configuration included specific workspace IDs, only _workspace-level_ audit logs for those workspaces are delivered. If the log delivery configuration applies to the entire account (_account level_ delivery configuration), the audit log delivery includes workspace-level audit logs for all workspaces in the account as well as account-level audit logs. See Audit log delivery for details. * Auditable events are typically available in logs within 15 minutes.

type LogDeliveryStatus

type LogDeliveryStatus struct {
	// The UTC time for the latest log delivery attempt.
	LastAttemptTime string `json:"last_attempt_time,omitempty"`
	// The UTC time for the latest successful log delivery.
	LastSuccessfulAttemptTime string `json:"last_successful_attempt_time,omitempty"`
	// Informative message about the latest log delivery attempt. If the log
	// delivery fails with USER_FAILURE, error details will be provided for
	// fixing misconfigurations in cloud permissions.
	Message string `json:"message,omitempty"`
	// The status string for log delivery. Possible values are: * `CREATED`:
	// There were no log delivery attempts since the config was created. *
	// `SUCCEEDED`: The latest attempt of log delivery has succeeded completely.
	// * `USER_FAILURE`: The latest attempt of log delivery failed because of
	// misconfiguration of customer provided permissions on role or storage. *
	// `SYSTEM_FAILURE`: The latest attempt of log delivery failed because of an
	// Databricks internal error. Contact support if it doesn't go away soon. *
	// `NOT_FOUND`: The log delivery status as the configuration has been
	// disabled since the release of this feature or there are no workspaces in
	// the account.
	Status DeliveryStatus `json:"status,omitempty"`

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

Databricks log delivery status.

func (LogDeliveryStatus) MarshalJSON added in v0.23.0

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

func (*LogDeliveryStatus) UnmarshalJSON added in v0.23.0

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

type LogType

type LogType string

Log delivery type. Supported values are:

* `BILLABLE_USAGE` — Configure billable usage log delivery. For the CSV schema, see the View billable usage.

* `AUDIT_LOGS` — Configure audit log delivery. For the JSON schema, see Configure audit logging

const LogTypeAuditLogs LogType = `AUDIT_LOGS`
const LogTypeBillableUsage LogType = `BILLABLE_USAGE`

func (*LogType) Set added in v0.2.0

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

Set raw string value and validate it against allowed values

func (*LogType) String added in v0.2.0

func (f *LogType) String() string

String representation for fmt.Print

func (*LogType) Type added in v0.2.0

func (f *LogType) Type() string

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

type OutputFormat

type OutputFormat string

The file type of log delivery.

* If `log_type` is `BILLABLE_USAGE`, this value must be `CSV`. Only the CSV (comma-separated values) format is supported. For the schema, see the View billable usage * If `log_type` is `AUDIT_LOGS`, this value must be `JSON`. Only the JSON (JavaScript Object Notation) format is supported. For the schema, see the Configuring audit logs.

const OutputFormatCsv OutputFormat = `CSV`
const OutputFormatJson OutputFormat = `JSON`

func (*OutputFormat) Set added in v0.2.0

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

Set raw string value and validate it against allowed values

func (*OutputFormat) String added in v0.2.0

func (f *OutputFormat) String() string

String representation for fmt.Print

func (*OutputFormat) Type added in v0.2.0

func (f *OutputFormat) Type() string

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

type PatchStatusResponse added in v0.34.0

type PatchStatusResponse struct {
}

type UpdateBudgetConfigurationBudget added in v0.44.0

type UpdateBudgetConfigurationBudget struct {
	// Databricks account ID.
	AccountId string `json:"account_id,omitempty"`
	// Alerts to configure when this budget is in a triggered state. Budgets
	// must have exactly one alert configuration.
	AlertConfigurations []AlertConfiguration `json:"alert_configurations,omitempty"`
	// Databricks budget configuration ID.
	BudgetConfigurationId string `json:"budget_configuration_id,omitempty"`
	// Human-readable name of budget configuration. Max Length: 128
	DisplayName string `json:"display_name,omitempty"`
	// Configured filters for this budget. These are applied to your account's
	// usage to limit the scope of what is considered for this budget. Leave
	// empty to include all usage for this account. All provided filters must be
	// matched for usage to be included.
	Filter *BudgetConfigurationFilter `json:"filter,omitempty"`

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

func (UpdateBudgetConfigurationBudget) MarshalJSON added in v0.44.0

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

func (*UpdateBudgetConfigurationBudget) UnmarshalJSON added in v0.44.0

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

type UpdateBudgetConfigurationRequest added in v0.44.0

type UpdateBudgetConfigurationRequest struct {
	// The updated budget. This will overwrite the budget specified by the
	// budget ID.
	Budget UpdateBudgetConfigurationBudget `json:"budget"`
	// The Databricks budget configuration ID.
	BudgetId string `json:"-" url:"-"`
}

type UpdateBudgetConfigurationResponse added in v0.44.0

type UpdateBudgetConfigurationResponse struct {
	// The updated budget.
	Budget *BudgetConfiguration `json:"budget,omitempty"`
}

type UpdateLogDeliveryConfigurationStatusRequest

type UpdateLogDeliveryConfigurationStatusRequest struct {
	// Databricks log delivery configuration ID
	LogDeliveryConfigurationId string `json:"-" url:"-"`
	// Status of log delivery configuration. Set to `ENABLED` (enabled) or
	// `DISABLED` (disabled). Defaults to `ENABLED`. You can [enable or disable
	// the configuration](#operation/patch-log-delivery-config-status) later.
	// Deletion of a configuration is not supported, so disable a log delivery
	// configuration that is no longer needed.
	Status LogDeliveryConfigStatus `json:"status"`
}

type UsageDashboardType added in v0.44.0

type UsageDashboardType string
const UsageDashboardTypeUsageDashboardTypeGlobal UsageDashboardType = `USAGE_DASHBOARD_TYPE_GLOBAL`
const UsageDashboardTypeUsageDashboardTypeWorkspace UsageDashboardType = `USAGE_DASHBOARD_TYPE_WORKSPACE`

func (*UsageDashboardType) Set added in v0.44.0

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

Set raw string value and validate it against allowed values

func (*UsageDashboardType) String added in v0.44.0

func (f *UsageDashboardType) String() string

String representation for fmt.Print

func (*UsageDashboardType) Type added in v0.44.0

func (f *UsageDashboardType) Type() string

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

type UsageDashboardsAPI added in v0.44.0

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

These APIs manage usage dashboards for this account. Usage dashboards enable you to gain insights into your usage with pre-built dashboards: visualize breakdowns, analyze tag attributions, and identify cost drivers.

func NewUsageDashboards added in v0.44.0

func NewUsageDashboards(client *client.DatabricksClient) *UsageDashboardsAPI

func (*UsageDashboardsAPI) Create added in v0.44.0

func (a *UsageDashboardsAPI) Create(ctx context.Context, request CreateBillingUsageDashboardRequest) (*CreateBillingUsageDashboardResponse, error)

func (*UsageDashboardsAPI) Get added in v0.44.0

func (a *UsageDashboardsAPI) Get(ctx context.Context, request GetBillingUsageDashboardRequest) (*GetBillingUsageDashboardResponse, error)

type UsageDashboardsInterface added in v0.44.0

type UsageDashboardsInterface interface {

	// Create new usage dashboard.
	//
	// Create a usage dashboard specified by workspaceId, accountId, and dashboard
	// type.
	Create(ctx context.Context, request CreateBillingUsageDashboardRequest) (*CreateBillingUsageDashboardResponse, error)

	// Get usage dashboard.
	//
	// Get a usage dashboard specified by workspaceId, accountId, and dashboard
	// type.
	Get(ctx context.Context, request GetBillingUsageDashboardRequest) (*GetBillingUsageDashboardResponse, error)
}

type UsageDashboardsService added in v0.44.0

type UsageDashboardsService interface {

	// Create new usage dashboard.
	//
	// Create a usage dashboard specified by workspaceId, accountId, and
	// dashboard type.
	Create(ctx context.Context, request CreateBillingUsageDashboardRequest) (*CreateBillingUsageDashboardResponse, error)

	// Get usage dashboard.
	//
	// Get a usage dashboard specified by workspaceId, accountId, and dashboard
	// type.
	Get(ctx context.Context, request GetBillingUsageDashboardRequest) (*GetBillingUsageDashboardResponse, error)
}

These APIs manage usage dashboards for this account. Usage dashboards enable you to gain insights into your usage with pre-built dashboards: visualize breakdowns, analyze tag attributions, and identify cost drivers.

type WrappedCreateLogDeliveryConfiguration

type WrappedCreateLogDeliveryConfiguration struct {
	LogDeliveryConfiguration *CreateLogDeliveryConfigurationParams `json:"log_delivery_configuration,omitempty"`
}

type WrappedLogDeliveryConfiguration

type WrappedLogDeliveryConfiguration struct {
	LogDeliveryConfiguration *LogDeliveryConfiguration `json:"log_delivery_configuration,omitempty"`
}

type WrappedLogDeliveryConfigurations

type WrappedLogDeliveryConfigurations struct {
	LogDeliveryConfigurations []LogDeliveryConfiguration `json:"log_delivery_configurations,omitempty"`
}

Jump to

Keyboard shortcuts

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