settings

package
v0.52.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 29

Documentation

Overview

These APIs allow you to manage Account Ip Access Lists, Account Settings, Aibi Dashboard Embedding Access Policy, Aibi Dashboard Embedding Approved Domains, Automatic Cluster Update, Compliance Security Profile, Credentials Manager, Csp Enablement Account, Default Namespace, Disable Legacy Access, Disable Legacy Dbfs, Disable Legacy Features, Enhanced Security Monitoring, Esm Enablement Account, Ip Access Lists, Network Connectivity, Notification Destinations, Personal Compute, Restrict Workspace Admins, Settings, Token Management, Tokens, Workspace Conf, etc.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountIpAccessListsAPI

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

The Accounts IP Access List API enables account admins to configure IP access lists for access to the account console.

Account IP Access Lists affect web application access and REST API access to the account console and account APIs. If the feature is disabled for the account, all access is allowed for this account. There is support for allow lists (inclusion) and block lists (exclusion).

When a connection is attempted: 1. **First, all block lists are checked.** If the connection IP address matches any block list, the connection is rejected. 2. **If the connection was not rejected by block lists**, the IP address is compared with the allow lists.

If there is at least one allow list for the account, the connection is allowed only if the IP address matches an allow list. If there are no allow lists for the account, all IP addresses are allowed.

For all allow lists and block lists combined, the account supports a maximum of 1000 IP/CIDR values, where one CIDR counts as a single value.

After changes to the account-level IP access lists, it can take a few minutes for changes to take effect.

func NewAccountIpAccessLists

func NewAccountIpAccessLists(client *client.DatabricksClient) *AccountIpAccessListsAPI

func (*AccountIpAccessListsAPI) Create

func (a *AccountIpAccessListsAPI) Create(ctx context.Context, request CreateIpAccessList) (*CreateIpAccessListResponse, error)

func (*AccountIpAccessListsAPI) Delete

func (a *AccountIpAccessListsAPI) Delete(ctx context.Context, request DeleteAccountIpAccessListRequest) error

func (*AccountIpAccessListsAPI) DeleteByIpAccessListId

func (a *AccountIpAccessListsAPI) DeleteByIpAccessListId(ctx context.Context, ipAccessListId string) error

Delete access list.

Deletes an IP access list, specified by its list ID.

func (*AccountIpAccessListsAPI) Get

func (a *AccountIpAccessListsAPI) Get(ctx context.Context, request GetAccountIpAccessListRequest) (*GetIpAccessListResponse, error)

func (*AccountIpAccessListsAPI) GetByIpAccessListId

func (a *AccountIpAccessListsAPI) GetByIpAccessListId(ctx context.Context, ipAccessListId string) (*GetIpAccessListResponse, error)

Get IP access list.

Gets an IP access list, specified by its list ID.

func (*AccountIpAccessListsAPI) GetByLabel

func (a *AccountIpAccessListsAPI) GetByLabel(ctx context.Context, name string) (*IpAccessListInfo, error)

GetByLabel calls AccountIpAccessListsAPI.IpAccessListInfoLabelToListIdMap and returns a single IpAccessListInfo.

Returns an error if there's more than one IpAccessListInfo with the same .Label.

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

This method is generated by Databricks SDK Code Generator.

func (*AccountIpAccessListsAPI) IpAccessListInfoLabelToListIdMap

func (a *AccountIpAccessListsAPI) IpAccessListInfoLabelToListIdMap(ctx context.Context) (map[string]string, error)

IpAccessListInfoLabelToListIdMap calls AccountIpAccessListsAPI.ListAll and creates a map of results with IpAccessListInfo.Label as key and IpAccessListInfo.ListId as value.

Returns an error if there's more than one IpAccessListInfo with the same .Label.

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

This method is generated by Databricks SDK Code Generator.

func (*AccountIpAccessListsAPI) List added in v0.24.0

Get access lists.

Gets all IP access lists for the specified account.

This method is generated by Databricks SDK Code Generator.

func (*AccountIpAccessListsAPI) ListAll

Get access lists.

Gets all IP access lists for the specified account.

This method is generated by Databricks SDK Code Generator.

func (*AccountIpAccessListsAPI) Replace

func (a *AccountIpAccessListsAPI) Replace(ctx context.Context, request ReplaceIpAccessList) error

func (*AccountIpAccessListsAPI) Update

func (a *AccountIpAccessListsAPI) Update(ctx context.Context, request UpdateIpAccessList) error

type AccountIpAccessListsInterface added in v0.29.0

type AccountIpAccessListsInterface interface {

	// Create access list.
	//
	// Creates an IP access list for the account.
	//
	// A list can be an allow list or a block list. See the top of this file for a
	// description of how the server treats allow lists and block lists at runtime.
	//
	// When creating or updating an IP access list:
	//
	// * For all allow lists and block lists combined, the API supports a maximum of
	// 1000 IP/CIDR values, where one CIDR counts as a single value. Attempts to
	// exceed that number return error 400 with `error_code` value `QUOTA_EXCEEDED`.
	// * If the new list would block the calling user's current IP, error 400 is
	// returned with `error_code` value `INVALID_STATE`.
	//
	// It can take a few minutes for the changes to take effect.
	Create(ctx context.Context, request CreateIpAccessList) (*CreateIpAccessListResponse, error)

	// Delete access list.
	//
	// Deletes an IP access list, specified by its list ID.
	Delete(ctx context.Context, request DeleteAccountIpAccessListRequest) error

	// Delete access list.
	//
	// Deletes an IP access list, specified by its list ID.
	DeleteByIpAccessListId(ctx context.Context, ipAccessListId string) error

	// Get IP access list.
	//
	// Gets an IP access list, specified by its list ID.
	Get(ctx context.Context, request GetAccountIpAccessListRequest) (*GetIpAccessListResponse, error)

	// Get IP access list.
	//
	// Gets an IP access list, specified by its list ID.
	GetByIpAccessListId(ctx context.Context, ipAccessListId string) (*GetIpAccessListResponse, error)

	// Get access lists.
	//
	// Gets all IP access lists for the specified account.
	//
	// This method is generated by Databricks SDK Code Generator.
	List(ctx context.Context) listing.Iterator[IpAccessListInfo]

	// Get access lists.
	//
	// Gets all IP access lists for the specified account.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListAll(ctx context.Context) ([]IpAccessListInfo, error)

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

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

	// Replace access list.
	//
	// Replaces an IP access list, specified by its ID.
	//
	// A list can include allow lists and block lists. See the top of this file for
	// a description of how the server treats allow lists and block lists at run
	// time. When replacing an IP access list: * For all allow lists and block lists
	// combined, the API supports a maximum of 1000 IP/CIDR values, where one CIDR
	// counts as a single value. Attempts to exceed that number return error 400
	// with `error_code` value `QUOTA_EXCEEDED`. * If the resulting list would block
	// the calling user's current IP, error 400 is returned with `error_code` value
	// `INVALID_STATE`. It can take a few minutes for the changes to take effect.
	Replace(ctx context.Context, request ReplaceIpAccessList) error

	// Update access list.
	//
	// Updates an existing IP access list, specified by its ID.
	//
	// A list can include allow lists and block lists. See the top of this file for
	// a description of how the server treats allow lists and block lists at run
	// time.
	//
	// When updating an IP access list:
	//
	// * For all allow lists and block lists combined, the API supports a maximum of
	// 1000 IP/CIDR values, where one CIDR counts as a single value. Attempts to
	// exceed that number return error 400 with `error_code` value `QUOTA_EXCEEDED`.
	// * If the updated list would block the calling user's current IP, error 400 is
	// returned with `error_code` value `INVALID_STATE`.
	//
	// It can take a few minutes for the changes to take effect.
	Update(ctx context.Context, request UpdateIpAccessList) error
}

type AccountIpAccessListsService

type AccountIpAccessListsService interface {

	// Create access list.
	//
	// Creates an IP access list for the account.
	//
	// A list can be an allow list or a block list. See the top of this file for
	// a description of how the server treats allow lists and block lists at
	// runtime.
	//
	// When creating or updating an IP access list:
	//
	// * For all allow lists and block lists combined, the API supports a
	// maximum of 1000 IP/CIDR values, where one CIDR counts as a single value.
	// Attempts to exceed that number return error 400 with `error_code` value
	// `QUOTA_EXCEEDED`. * If the new list would block the calling user's
	// current IP, error 400 is returned with `error_code` value
	// `INVALID_STATE`.
	//
	// It can take a few minutes for the changes to take effect.
	Create(ctx context.Context, request CreateIpAccessList) (*CreateIpAccessListResponse, error)

	// Delete access list.
	//
	// Deletes an IP access list, specified by its list ID.
	Delete(ctx context.Context, request DeleteAccountIpAccessListRequest) error

	// Get IP access list.
	//
	// Gets an IP access list, specified by its list ID.
	Get(ctx context.Context, request GetAccountIpAccessListRequest) (*GetIpAccessListResponse, error)

	// Get access lists.
	//
	// Gets all IP access lists for the specified account.
	//
	// Use ListAll() to get all IpAccessListInfo instances
	List(ctx context.Context) (*GetIpAccessListsResponse, error)

	// Replace access list.
	//
	// Replaces an IP access list, specified by its ID.
	//
	// A list can include allow lists and block lists. See the top of this file
	// for a description of how the server treats allow lists and block lists at
	// run time. When replacing an IP access list: * For all allow lists and
	// block lists combined, the API supports a maximum of 1000 IP/CIDR values,
	// where one CIDR counts as a single value. Attempts to exceed that number
	// return error 400 with `error_code` value `QUOTA_EXCEEDED`. * If the
	// resulting list would block the calling user's current IP, error 400 is
	// returned with `error_code` value `INVALID_STATE`. It can take a few
	// minutes for the changes to take effect.
	Replace(ctx context.Context, request ReplaceIpAccessList) error

	// Update access list.
	//
	// Updates an existing IP access list, specified by its ID.
	//
	// A list can include allow lists and block lists. See the top of this file
	// for a description of how the server treats allow lists and block lists at
	// run time.
	//
	// When updating an IP access list:
	//
	// * For all allow lists and block lists combined, the API supports a
	// maximum of 1000 IP/CIDR values, where one CIDR counts as a single value.
	// Attempts to exceed that number return error 400 with `error_code` value
	// `QUOTA_EXCEEDED`. * If the updated list would block the calling user's
	// current IP, error 400 is returned with `error_code` value
	// `INVALID_STATE`.
	//
	// It can take a few minutes for the changes to take effect.
	Update(ctx context.Context, request UpdateIpAccessList) error
}

The Accounts IP Access List API enables account admins to configure IP access lists for access to the account console.

Account IP Access Lists affect web application access and REST API access to the account console and account APIs. If the feature is disabled for the account, all access is allowed for this account. There is support for allow lists (inclusion) and block lists (exclusion).

When a connection is attempted: 1. **First, all block lists are checked.** If the connection IP address matches any block list, the connection is rejected. 2. **If the connection was not rejected by block lists**, the IP address is compared with the allow lists.

If there is at least one allow list for the account, the connection is allowed only if the IP address matches an allow list. If there are no allow lists for the account, all IP addresses are allowed.

For all allow lists and block lists combined, the account supports a maximum of 1000 IP/CIDR values, where one CIDR counts as a single value.

After changes to the account-level IP access lists, it can take a few minutes for changes to take effect.

type AccountSettingsAPI added in v0.10.0

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

Accounts Settings API allows users to manage settings at the account level.

func NewAccountSettings added in v0.10.0

func NewAccountSettings(client *client.DatabricksClient) *AccountSettingsAPI

func (*AccountSettingsAPI) CspEnablementAccount added in v0.34.0

func (a *AccountSettingsAPI) CspEnablementAccount() CspEnablementAccountInterface

func (*AccountSettingsAPI) DisableLegacyFeatures added in v0.47.0

func (a *AccountSettingsAPI) DisableLegacyFeatures() DisableLegacyFeaturesInterface

func (*AccountSettingsAPI) EsmEnablementAccount added in v0.34.0

func (a *AccountSettingsAPI) EsmEnablementAccount() EsmEnablementAccountInterface

func (*AccountSettingsAPI) PersonalCompute added in v0.34.0

func (a *AccountSettingsAPI) PersonalCompute() PersonalComputeInterface

type AccountSettingsInterface added in v0.29.0

type AccountSettingsInterface interface {

	// The compliance security profile settings at the account level control
	// whether to enable it for new workspaces. By default, this account-level
	// setting is disabled for new workspaces. After workspace creation, account
	// admins can enable the compliance security profile individually for each
	// workspace.
	//
	// This settings can be disabled so that new workspaces do not have
	// compliance security profile enabled by default.
	CspEnablementAccount() CspEnablementAccountInterface

	// Disable legacy features for new Databricks workspaces.
	//
	// For newly created workspaces: 1. Disables the use of DBFS root and
	// mounts. 2. Hive Metastore will not be provisioned. 3. Disables the use of
	// ‘No-isolation clusters’. 4. Disables Databricks Runtime versions
	// prior to 13.3LTS.
	DisableLegacyFeatures() DisableLegacyFeaturesInterface

	// The enhanced security monitoring setting at the account level controls
	// whether to enable the feature on new workspaces. By default, this
	// account-level setting is disabled for new workspaces. After workspace
	// creation, account admins can enable enhanced security monitoring
	// individually for each workspace.
	EsmEnablementAccount() EsmEnablementAccountInterface

	// The Personal Compute enablement setting lets you control which users can
	// use the Personal Compute default policy to create compute resources. By
	// default all users in all workspaces have access (ON), but you can change
	// the setting to instead let individual workspaces configure access control
	// (DELEGATE).
	//
	// There is only one instance of this setting per account. Since this
	// setting has a default value, this setting is present on all accounts even
	// though it's never set on a given account. Deletion reverts the value of
	// the setting back to the default value.
	PersonalCompute() PersonalComputeInterface
}

type AccountSettingsService added in v0.10.0

type AccountSettingsService interface {
}

Accounts Settings API allows users to manage settings at the account level.

type AibiDashboardEmbeddingAccessPolicy added in v0.50.0

type AibiDashboardEmbeddingAccessPolicy struct {
	AccessPolicyType AibiDashboardEmbeddingAccessPolicyAccessPolicyType `json:"access_policy_type"`
}

type AibiDashboardEmbeddingAccessPolicyAPI added in v0.50.0

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

Controls whether AI/BI published dashboard embedding is enabled, conditionally enabled, or disabled at the workspace level. By default, this setting is conditionally enabled (ALLOW_APPROVED_DOMAINS).

func NewAibiDashboardEmbeddingAccessPolicy added in v0.50.0

func NewAibiDashboardEmbeddingAccessPolicy(client *client.DatabricksClient) *AibiDashboardEmbeddingAccessPolicyAPI

func (*AibiDashboardEmbeddingAccessPolicyAPI) Get added in v0.50.0

func (a *AibiDashboardEmbeddingAccessPolicyAPI) Get(ctx context.Context, request GetAibiDashboardEmbeddingAccessPolicySettingRequest) (*AibiDashboardEmbeddingAccessPolicySetting, error)

func (*AibiDashboardEmbeddingAccessPolicyAPI) Update added in v0.50.0

func (a *AibiDashboardEmbeddingAccessPolicyAPI) Update(ctx context.Context, request UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) (*AibiDashboardEmbeddingAccessPolicySetting, error)

type AibiDashboardEmbeddingAccessPolicyAccessPolicyType added in v0.50.0

type AibiDashboardEmbeddingAccessPolicyAccessPolicyType string
const AibiDashboardEmbeddingAccessPolicyAccessPolicyTypeAllowAllDomains AibiDashboardEmbeddingAccessPolicyAccessPolicyType = `ALLOW_ALL_DOMAINS`
const AibiDashboardEmbeddingAccessPolicyAccessPolicyTypeAllowApprovedDomains AibiDashboardEmbeddingAccessPolicyAccessPolicyType = `ALLOW_APPROVED_DOMAINS`
const AibiDashboardEmbeddingAccessPolicyAccessPolicyTypeDenyAllDomains AibiDashboardEmbeddingAccessPolicyAccessPolicyType = `DENY_ALL_DOMAINS`

func (*AibiDashboardEmbeddingAccessPolicyAccessPolicyType) Set added in v0.50.0

Set raw string value and validate it against allowed values

func (*AibiDashboardEmbeddingAccessPolicyAccessPolicyType) String added in v0.50.0

String representation for fmt.Print

func (*AibiDashboardEmbeddingAccessPolicyAccessPolicyType) Type added in v0.50.0

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

type AibiDashboardEmbeddingAccessPolicyInterface added in v0.50.0

type AibiDashboardEmbeddingAccessPolicyInterface interface {

	// Retrieve the AI/BI dashboard embedding access policy.
	//
	// Retrieves the AI/BI dashboard embedding access policy. The default setting is
	// ALLOW_APPROVED_DOMAINS, permitting AI/BI dashboards to be embedded on
	// approved domains.
	Get(ctx context.Context, request GetAibiDashboardEmbeddingAccessPolicySettingRequest) (*AibiDashboardEmbeddingAccessPolicySetting, error)

	// Update the AI/BI dashboard embedding access policy.
	//
	// Updates the AI/BI dashboard embedding access policy at the workspace level.
	Update(ctx context.Context, request UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) (*AibiDashboardEmbeddingAccessPolicySetting, error)
}

type AibiDashboardEmbeddingAccessPolicyService added in v0.50.0

type AibiDashboardEmbeddingAccessPolicyService interface {

	// Retrieve the AI/BI dashboard embedding access policy.
	//
	// Retrieves the AI/BI dashboard embedding access policy. The default
	// setting is ALLOW_APPROVED_DOMAINS, permitting AI/BI dashboards to be
	// embedded on approved domains.
	Get(ctx context.Context, request GetAibiDashboardEmbeddingAccessPolicySettingRequest) (*AibiDashboardEmbeddingAccessPolicySetting, error)

	// Update the AI/BI dashboard embedding access policy.
	//
	// Updates the AI/BI dashboard embedding access policy at the workspace
	// level.
	Update(ctx context.Context, request UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) (*AibiDashboardEmbeddingAccessPolicySetting, error)
}

Controls whether AI/BI published dashboard embedding is enabled, conditionally enabled, or disabled at the workspace level. By default, this setting is conditionally enabled (ALLOW_APPROVED_DOMAINS).

type AibiDashboardEmbeddingAccessPolicySetting added in v0.50.0

type AibiDashboardEmbeddingAccessPolicySetting struct {
	AibiDashboardEmbeddingAccessPolicy AibiDashboardEmbeddingAccessPolicy `json:"aibi_dashboard_embedding_access_policy"`
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// update pattern to perform setting updates in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// PATCH request to identify the setting version you are updating.
	Etag string `json:"etag,omitempty"`
	// Name of the corresponding setting. This field is populated in the
	// response, but it will not be respected even if it's set in the request
	// body. The setting name in the path parameter will be respected instead.
	// Setting name is required to be 'default' if the setting only has one
	// instance per workspace.
	SettingName string `json:"setting_name,omitempty"`

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

func (AibiDashboardEmbeddingAccessPolicySetting) MarshalJSON added in v0.50.0

func (*AibiDashboardEmbeddingAccessPolicySetting) UnmarshalJSON added in v0.50.0

type AibiDashboardEmbeddingApprovedDomains added in v0.50.0

type AibiDashboardEmbeddingApprovedDomains struct {
	ApprovedDomains []string `json:"approved_domains,omitempty"`
}

type AibiDashboardEmbeddingApprovedDomainsAPI added in v0.50.0

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

Controls the list of domains approved to host the embedded AI/BI dashboards. The approved domains list can't be mutated when the current access policy is not set to ALLOW_APPROVED_DOMAINS.

func NewAibiDashboardEmbeddingApprovedDomains added in v0.50.0

func NewAibiDashboardEmbeddingApprovedDomains(client *client.DatabricksClient) *AibiDashboardEmbeddingApprovedDomainsAPI

func (*AibiDashboardEmbeddingApprovedDomainsAPI) Get added in v0.50.0

func (a *AibiDashboardEmbeddingApprovedDomainsAPI) Get(ctx context.Context, request GetAibiDashboardEmbeddingApprovedDomainsSettingRequest) (*AibiDashboardEmbeddingApprovedDomainsSetting, error)

func (*AibiDashboardEmbeddingApprovedDomainsAPI) Update added in v0.50.0

func (a *AibiDashboardEmbeddingApprovedDomainsAPI) Update(ctx context.Context, request UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) (*AibiDashboardEmbeddingApprovedDomainsSetting, error)

type AibiDashboardEmbeddingApprovedDomainsInterface added in v0.50.0

type AibiDashboardEmbeddingApprovedDomainsInterface interface {

	// Retrieve the list of domains approved to host embedded AI/BI dashboards.
	//
	// Retrieves the list of domains approved to host embedded AI/BI dashboards.
	Get(ctx context.Context, request GetAibiDashboardEmbeddingApprovedDomainsSettingRequest) (*AibiDashboardEmbeddingApprovedDomainsSetting, error)

	// Update the list of domains approved to host embedded AI/BI dashboards.
	//
	// Updates the list of domains approved to host embedded AI/BI dashboards. This
	// update will fail if the current workspace access policy is not
	// ALLOW_APPROVED_DOMAINS.
	Update(ctx context.Context, request UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) (*AibiDashboardEmbeddingApprovedDomainsSetting, error)
}

type AibiDashboardEmbeddingApprovedDomainsService added in v0.50.0

type AibiDashboardEmbeddingApprovedDomainsService interface {

	// Retrieve the list of domains approved to host embedded AI/BI dashboards.
	//
	// Retrieves the list of domains approved to host embedded AI/BI dashboards.
	Get(ctx context.Context, request GetAibiDashboardEmbeddingApprovedDomainsSettingRequest) (*AibiDashboardEmbeddingApprovedDomainsSetting, error)

	// Update the list of domains approved to host embedded AI/BI dashboards.
	//
	// Updates the list of domains approved to host embedded AI/BI dashboards.
	// This update will fail if the current workspace access policy is not
	// ALLOW_APPROVED_DOMAINS.
	Update(ctx context.Context, request UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) (*AibiDashboardEmbeddingApprovedDomainsSetting, error)
}

Controls the list of domains approved to host the embedded AI/BI dashboards. The approved domains list can't be mutated when the current access policy is not set to ALLOW_APPROVED_DOMAINS.

type AibiDashboardEmbeddingApprovedDomainsSetting added in v0.50.0

type AibiDashboardEmbeddingApprovedDomainsSetting struct {
	AibiDashboardEmbeddingApprovedDomains AibiDashboardEmbeddingApprovedDomains `json:"aibi_dashboard_embedding_approved_domains"`
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// update pattern to perform setting updates in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// PATCH request to identify the setting version you are updating.
	Etag string `json:"etag,omitempty"`
	// Name of the corresponding setting. This field is populated in the
	// response, but it will not be respected even if it's set in the request
	// body. The setting name in the path parameter will be respected instead.
	// Setting name is required to be 'default' if the setting only has one
	// instance per workspace.
	SettingName string `json:"setting_name,omitempty"`

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

func (AibiDashboardEmbeddingApprovedDomainsSetting) MarshalJSON added in v0.50.0

func (*AibiDashboardEmbeddingApprovedDomainsSetting) UnmarshalJSON added in v0.50.0

type AutomaticClusterUpdateAPI added in v0.34.0

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

Controls whether automatic cluster update is enabled for the current workspace. By default, it is turned off.

func NewAutomaticClusterUpdate added in v0.34.0

func NewAutomaticClusterUpdate(client *client.DatabricksClient) *AutomaticClusterUpdateAPI

func (*AutomaticClusterUpdateAPI) Get added in v0.34.0

func (a *AutomaticClusterUpdateAPI) Get(ctx context.Context, request GetAutomaticClusterUpdateSettingRequest) (*AutomaticClusterUpdateSetting, error)

func (*AutomaticClusterUpdateAPI) Update added in v0.34.0

func (a *AutomaticClusterUpdateAPI) Update(ctx context.Context, request UpdateAutomaticClusterUpdateSettingRequest) (*AutomaticClusterUpdateSetting, error)

type AutomaticClusterUpdateInterface added in v0.34.0

type AutomaticClusterUpdateInterface interface {

	// Get the automatic cluster update setting.
	//
	// Gets the automatic cluster update setting.
	Get(ctx context.Context, request GetAutomaticClusterUpdateSettingRequest) (*AutomaticClusterUpdateSetting, error)

	// Update the automatic cluster update setting.
	//
	// Updates the automatic cluster update setting for the workspace. A fresh etag
	// needs to be provided in `PATCH` requests (as part of the setting field). The
	// etag can be retrieved by making a `GET` request before the `PATCH` request.
	// If the setting is updated concurrently, `PATCH` fails with 409 and the
	// request must be retried by using the fresh etag in the 409 response.
	Update(ctx context.Context, request UpdateAutomaticClusterUpdateSettingRequest) (*AutomaticClusterUpdateSetting, error)
}

type AutomaticClusterUpdateService added in v0.34.0

type AutomaticClusterUpdateService interface {

	// Get the automatic cluster update setting.
	//
	// Gets the automatic cluster update setting.
	Get(ctx context.Context, request GetAutomaticClusterUpdateSettingRequest) (*AutomaticClusterUpdateSetting, error)

	// Update the automatic cluster update setting.
	//
	// Updates the automatic cluster update setting for the workspace. A fresh
	// etag needs to be provided in `PATCH` requests (as part of the setting
	// field). The etag can be retrieved by making a `GET` request before the
	// `PATCH` request. If the setting is updated concurrently, `PATCH` fails
	// with 409 and the request must be retried by using the fresh etag in the
	// 409 response.
	Update(ctx context.Context, request UpdateAutomaticClusterUpdateSettingRequest) (*AutomaticClusterUpdateSetting, error)
}

Controls whether automatic cluster update is enabled for the current workspace. By default, it is turned off.

type AutomaticClusterUpdateSetting added in v0.34.0

type AutomaticClusterUpdateSetting struct {
	AutomaticClusterUpdateWorkspace ClusterAutoRestartMessage `json:"automatic_cluster_update_workspace"`
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// update pattern to perform setting updates in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// PATCH request to identify the setting version you are updating.
	Etag string `json:"etag,omitempty"`
	// Name of the corresponding setting. This field is populated in the
	// response, but it will not be respected even if it's set in the request
	// body. The setting name in the path parameter will be respected instead.
	// Setting name is required to be 'default' if the setting only has one
	// instance per workspace.
	SettingName string `json:"setting_name,omitempty"`

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

func (AutomaticClusterUpdateSetting) MarshalJSON added in v0.34.0

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

func (*AutomaticClusterUpdateSetting) UnmarshalJSON added in v0.34.0

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

type BooleanMessage added in v0.47.0

type BooleanMessage struct {
	Value bool `json:"value,omitempty"`

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

func (BooleanMessage) MarshalJSON added in v0.47.0

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

func (*BooleanMessage) UnmarshalJSON added in v0.47.0

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

type ClusterAutoRestartMessage added in v0.34.0

type ClusterAutoRestartMessage struct {
	CanToggle bool `json:"can_toggle,omitempty"`

	Enabled bool `json:"enabled,omitempty"`
	// Contains an information about the enablement status judging (e.g. whether
	// the enterprise tier is enabled) This is only additional information that
	// MUST NOT be used to decide whether the setting is enabled or not. This is
	// intended to use only for purposes like showing an error message to the
	// customer with the additional details. For example, using these details we
	// can check why exactly the feature is disabled for this customer.
	EnablementDetails *ClusterAutoRestartMessageEnablementDetails `json:"enablement_details,omitempty"`

	MaintenanceWindow *ClusterAutoRestartMessageMaintenanceWindow `json:"maintenance_window,omitempty"`

	RestartEvenIfNoUpdatesAvailable bool `json:"restart_even_if_no_updates_available,omitempty"`

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

func (ClusterAutoRestartMessage) MarshalJSON added in v0.34.0

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

func (*ClusterAutoRestartMessage) UnmarshalJSON added in v0.34.0

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

type ClusterAutoRestartMessageEnablementDetails added in v0.34.0

type ClusterAutoRestartMessageEnablementDetails struct {
	// The feature is force enabled if compliance mode is active
	ForcedForComplianceMode bool `json:"forced_for_compliance_mode,omitempty"`
	// The feature is unavailable if the corresponding entitlement disabled (see
	// getShieldEntitlementEnable)
	UnavailableForDisabledEntitlement bool `json:"unavailable_for_disabled_entitlement,omitempty"`
	// The feature is unavailable if the customer doesn't have enterprise tier
	UnavailableForNonEnterpriseTier bool `json:"unavailable_for_non_enterprise_tier,omitempty"`

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

Contains an information about the enablement status judging (e.g. whether the enterprise tier is enabled) This is only additional information that MUST NOT be used to decide whether the setting is enabled or not. This is intended to use only for purposes like showing an error message to the customer with the additional details. For example, using these details we can check why exactly the feature is disabled for this customer.

func (ClusterAutoRestartMessageEnablementDetails) MarshalJSON added in v0.34.0

func (*ClusterAutoRestartMessageEnablementDetails) UnmarshalJSON added in v0.34.0

type ClusterAutoRestartMessageMaintenanceWindow added in v0.34.0

type ClusterAutoRestartMessageMaintenanceWindow struct {
	WeekDayBasedSchedule *ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule `json:"week_day_based_schedule,omitempty"`
}

type ClusterAutoRestartMessageMaintenanceWindowDayOfWeek added in v0.34.0

type ClusterAutoRestartMessageMaintenanceWindowDayOfWeek string
const ClusterAutoRestartMessageMaintenanceWindowDayOfWeekFriday ClusterAutoRestartMessageMaintenanceWindowDayOfWeek = `FRIDAY`
const ClusterAutoRestartMessageMaintenanceWindowDayOfWeekMonday ClusterAutoRestartMessageMaintenanceWindowDayOfWeek = `MONDAY`
const ClusterAutoRestartMessageMaintenanceWindowDayOfWeekSaturday ClusterAutoRestartMessageMaintenanceWindowDayOfWeek = `SATURDAY`
const ClusterAutoRestartMessageMaintenanceWindowDayOfWeekSunday ClusterAutoRestartMessageMaintenanceWindowDayOfWeek = `SUNDAY`
const ClusterAutoRestartMessageMaintenanceWindowDayOfWeekThursday ClusterAutoRestartMessageMaintenanceWindowDayOfWeek = `THURSDAY`
const ClusterAutoRestartMessageMaintenanceWindowDayOfWeekTuesday ClusterAutoRestartMessageMaintenanceWindowDayOfWeek = `TUESDAY`
const ClusterAutoRestartMessageMaintenanceWindowDayOfWeekWednesday ClusterAutoRestartMessageMaintenanceWindowDayOfWeek = `WEDNESDAY`

func (*ClusterAutoRestartMessageMaintenanceWindowDayOfWeek) Set added in v0.34.0

Set raw string value and validate it against allowed values

func (*ClusterAutoRestartMessageMaintenanceWindowDayOfWeek) String added in v0.34.0

String representation for fmt.Print

func (*ClusterAutoRestartMessageMaintenanceWindowDayOfWeek) Type added in v0.34.0

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

type ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule added in v0.34.0

type ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule struct {
	DayOfWeek ClusterAutoRestartMessageMaintenanceWindowDayOfWeek `json:"day_of_week,omitempty"`

	Frequency ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequency `json:"frequency,omitempty"`

	WindowStartTime *ClusterAutoRestartMessageMaintenanceWindowWindowStartTime `json:"window_start_time,omitempty"`
}

type ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequency added in v0.34.0

type ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequency string
const ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequencyEveryWeek ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequency = `EVERY_WEEK`
const ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequencyFirstAndThirdOfMonth ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequency = `FIRST_AND_THIRD_OF_MONTH`
const ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequencyFirstOfMonth ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequency = `FIRST_OF_MONTH`
const ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequencyFourthOfMonth ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequency = `FOURTH_OF_MONTH`
const ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequencySecondAndFourthOfMonth ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequency = `SECOND_AND_FOURTH_OF_MONTH`
const ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequencySecondOfMonth ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequency = `SECOND_OF_MONTH`
const ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequencyThirdOfMonth ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequency = `THIRD_OF_MONTH`

func (*ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequency) Set added in v0.34.0

Set raw string value and validate it against allowed values

func (*ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequency) String added in v0.34.0

String representation for fmt.Print

func (*ClusterAutoRestartMessageMaintenanceWindowWeekDayFrequency) Type added in v0.34.0

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

type ClusterAutoRestartMessageMaintenanceWindowWindowStartTime added in v0.34.0

type ClusterAutoRestartMessageMaintenanceWindowWindowStartTime struct {
	Hours int `json:"hours,omitempty"`

	Minutes int `json:"minutes,omitempty"`

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

func (ClusterAutoRestartMessageMaintenanceWindowWindowStartTime) MarshalJSON added in v0.34.0

func (*ClusterAutoRestartMessageMaintenanceWindowWindowStartTime) UnmarshalJSON added in v0.34.0

type ComplianceSecurityProfile added in v0.40.0

type ComplianceSecurityProfile struct {
	// Set by customers when they request Compliance Security Profile (CSP)
	ComplianceStandards []ComplianceStandard `json:"compliance_standards,omitempty"`

	IsEnabled bool `json:"is_enabled,omitempty"`

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

SHIELD feature: CSP

func (ComplianceSecurityProfile) MarshalJSON added in v0.40.0

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

func (*ComplianceSecurityProfile) UnmarshalJSON added in v0.40.0

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

type ComplianceSecurityProfileAPI added in v0.40.0

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

Controls whether to enable the compliance security profile for the current workspace. Enabling it on a workspace is permanent. By default, it is turned off.

This settings can NOT be disabled once it is enabled.

func NewComplianceSecurityProfile added in v0.40.0

func NewComplianceSecurityProfile(client *client.DatabricksClient) *ComplianceSecurityProfileAPI

func (*ComplianceSecurityProfileAPI) Get added in v0.40.0

func (a *ComplianceSecurityProfileAPI) Get(ctx context.Context, request GetComplianceSecurityProfileSettingRequest) (*ComplianceSecurityProfileSetting, error)

func (*ComplianceSecurityProfileAPI) Update added in v0.40.0

func (a *ComplianceSecurityProfileAPI) Update(ctx context.Context, request UpdateComplianceSecurityProfileSettingRequest) (*ComplianceSecurityProfileSetting, error)

type ComplianceSecurityProfileInterface added in v0.40.0

type ComplianceSecurityProfileInterface interface {

	// Get the compliance security profile setting.
	//
	// Gets the compliance security profile setting.
	Get(ctx context.Context, request GetComplianceSecurityProfileSettingRequest) (*ComplianceSecurityProfileSetting, error)

	// Update the compliance security profile setting.
	//
	// Updates the compliance security profile setting for the workspace. A fresh
	// etag needs to be provided in `PATCH` requests (as part of the setting field).
	// The etag can be retrieved by making a `GET` request before the `PATCH`
	// request. If the setting is updated concurrently, `PATCH` fails with 409 and
	// the request must be retried by using the fresh etag in the 409 response.
	Update(ctx context.Context, request UpdateComplianceSecurityProfileSettingRequest) (*ComplianceSecurityProfileSetting, error)
}

type ComplianceSecurityProfileService added in v0.40.0

type ComplianceSecurityProfileService interface {

	// Get the compliance security profile setting.
	//
	// Gets the compliance security profile setting.
	Get(ctx context.Context, request GetComplianceSecurityProfileSettingRequest) (*ComplianceSecurityProfileSetting, error)

	// Update the compliance security profile setting.
	//
	// Updates the compliance security profile setting for the workspace. A
	// fresh etag needs to be provided in `PATCH` requests (as part of the
	// setting field). The etag can be retrieved by making a `GET` request
	// before the `PATCH` request. If the setting is updated concurrently,
	// `PATCH` fails with 409 and the request must be retried by using the fresh
	// etag in the 409 response.
	Update(ctx context.Context, request UpdateComplianceSecurityProfileSettingRequest) (*ComplianceSecurityProfileSetting, error)
}

Controls whether to enable the compliance security profile for the current workspace. Enabling it on a workspace is permanent. By default, it is turned off.

This settings can NOT be disabled once it is enabled.

type ComplianceSecurityProfileSetting added in v0.40.0

type ComplianceSecurityProfileSetting struct {
	// SHIELD feature: CSP
	ComplianceSecurityProfileWorkspace ComplianceSecurityProfile `json:"compliance_security_profile_workspace"`
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// update pattern to perform setting updates in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// PATCH request to identify the setting version you are updating.
	Etag string `json:"etag,omitempty"`
	// Name of the corresponding setting. This field is populated in the
	// response, but it will not be respected even if it's set in the request
	// body. The setting name in the path parameter will be respected instead.
	// Setting name is required to be 'default' if the setting only has one
	// instance per workspace.
	SettingName string `json:"setting_name,omitempty"`

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

func (ComplianceSecurityProfileSetting) MarshalJSON added in v0.40.0

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

func (*ComplianceSecurityProfileSetting) UnmarshalJSON added in v0.40.0

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

type ComplianceStandard added in v0.34.0

type ComplianceStandard string

Compliance stardard for SHIELD customers

const ComplianceStandardCanadaProtectedB ComplianceStandard = `CANADA_PROTECTED_B`
const ComplianceStandardCyberEssentialPlus ComplianceStandard = `CYBER_ESSENTIAL_PLUS`
const ComplianceStandardFedrampHigh ComplianceStandard = `FEDRAMP_HIGH`
const ComplianceStandardFedrampIl5 ComplianceStandard = `FEDRAMP_IL5`
const ComplianceStandardFedrampModerate ComplianceStandard = `FEDRAMP_MODERATE`
const ComplianceStandardHipaa ComplianceStandard = `HIPAA`
const ComplianceStandardIrapProtected ComplianceStandard = `IRAP_PROTECTED`
const ComplianceStandardItarEar ComplianceStandard = `ITAR_EAR`
const ComplianceStandardNone ComplianceStandard = `NONE`
const ComplianceStandardPciDss ComplianceStandard = `PCI_DSS`

func (*ComplianceStandard) Set added in v0.34.0

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

Set raw string value and validate it against allowed values

func (*ComplianceStandard) String added in v0.34.0

func (f *ComplianceStandard) String() string

String representation for fmt.Print

func (*ComplianceStandard) Type added in v0.34.0

func (f *ComplianceStandard) Type() string

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

type Config added in v0.44.0

type Config struct {
	Email *EmailConfig `json:"email,omitempty"`

	GenericWebhook *GenericWebhookConfig `json:"generic_webhook,omitempty"`

	MicrosoftTeams *MicrosoftTeamsConfig `json:"microsoft_teams,omitempty"`

	Pagerduty *PagerdutyConfig `json:"pagerduty,omitempty"`

	Slack *SlackConfig `json:"slack,omitempty"`
}

type CreateIpAccessList

type CreateIpAccessList struct {
	IpAddresses []string `json:"ip_addresses,omitempty"`
	// Label for the IP access list. This **cannot** be empty.
	Label string `json:"label"`
	// Type of IP access list. Valid values are as follows and are
	// case-sensitive:
	//
	// * `ALLOW`: An allow list. Include this IP or range. * `BLOCK`: A block
	// list. Exclude this IP or range. IP addresses in the block list are
	// excluded even if they are included in an allow list.
	ListType ListType `json:"list_type"`
}

Details required to configure a block list or allow list.

type CreateIpAccessListResponse

type CreateIpAccessListResponse struct {
	// Definition of an IP Access list
	IpAccessList *IpAccessListInfo `json:"ip_access_list,omitempty"`
}

An IP access list was successfully created.

type CreateNetworkConnectivityConfigRequest added in v0.25.0

type CreateNetworkConnectivityConfigRequest struct {
	// The name of the network connectivity configuration. The name can contain
	// alphanumeric characters, hyphens, and underscores. The length must be
	// between 3 and 30 characters. The name must match the regular expression
	// `^[0-9a-zA-Z-_]{3,30}$`.
	Name string `json:"name"`
	// The region for the network connectivity configuration. Only workspaces in
	// the same region can be attached to the network connectivity
	// configuration.
	Region string `json:"region"`
}

type CreateNotificationDestinationRequest added in v0.44.0

type CreateNotificationDestinationRequest struct {
	// The configuration for the notification destination. Must wrap EXACTLY one
	// of the nested configs.
	Config *Config `json:"config,omitempty"`
	// The display name for the notification destination.
	DisplayName string `json:"display_name,omitempty"`

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

func (CreateNotificationDestinationRequest) MarshalJSON added in v0.44.0

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

func (*CreateNotificationDestinationRequest) UnmarshalJSON added in v0.44.0

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

type CreateOboTokenRequest

type CreateOboTokenRequest struct {
	// Application ID of the service principal.
	ApplicationId string `json:"application_id"`
	// Comment that describes the purpose of the token.
	Comment string `json:"comment,omitempty"`
	// The number of seconds before the token expires.
	LifetimeSeconds int64 `json:"lifetime_seconds,omitempty"`

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

Configuration details for creating on-behalf tokens.

func (CreateOboTokenRequest) MarshalJSON added in v0.23.0

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

func (*CreateOboTokenRequest) UnmarshalJSON added in v0.23.0

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

type CreateOboTokenResponse

type CreateOboTokenResponse struct {
	TokenInfo *TokenInfo `json:"token_info,omitempty"`
	// Value of the token.
	TokenValue string `json:"token_value,omitempty"`

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

An on-behalf token was successfully created for the service principal.

func (CreateOboTokenResponse) MarshalJSON added in v0.23.0

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

func (*CreateOboTokenResponse) UnmarshalJSON added in v0.23.0

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

type CreatePrivateEndpointRuleRequest added in v0.25.0

type CreatePrivateEndpointRuleRequest struct {
	// The sub-resource type (group ID) of the target resource. Note that to
	// connect to workspace root storage (root DBFS), you need two endpoints,
	// one for `blob` and one for `dfs`.
	GroupId CreatePrivateEndpointRuleRequestGroupId `json:"group_id"`
	// Your Network Connectvity Configuration ID.
	NetworkConnectivityConfigId string `json:"-" url:"-"`
	// The Azure resource ID of the target resource.
	ResourceId string `json:"resource_id"`
}

type CreatePrivateEndpointRuleRequestGroupId added in v0.25.0

type CreatePrivateEndpointRuleRequestGroupId string

The sub-resource type (group ID) of the target resource. Note that to connect to workspace root storage (root DBFS), you need two endpoints, one for `blob` and one for `dfs`.

const CreatePrivateEndpointRuleRequestGroupIdBlob CreatePrivateEndpointRuleRequestGroupId = `blob`
const CreatePrivateEndpointRuleRequestGroupIdDfs CreatePrivateEndpointRuleRequestGroupId = `dfs`
const CreatePrivateEndpointRuleRequestGroupIdMysqlServer CreatePrivateEndpointRuleRequestGroupId = `mysqlServer`
const CreatePrivateEndpointRuleRequestGroupIdSqlServer CreatePrivateEndpointRuleRequestGroupId = `sqlServer`

func (*CreatePrivateEndpointRuleRequestGroupId) Set added in v0.25.0

Set raw string value and validate it against allowed values

func (*CreatePrivateEndpointRuleRequestGroupId) String added in v0.25.0

String representation for fmt.Print

func (*CreatePrivateEndpointRuleRequestGroupId) Type added in v0.25.0

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

type CreateTokenRequest

type CreateTokenRequest struct {
	// Optional description to attach to the token.
	Comment string `json:"comment,omitempty"`
	// The lifetime of the token, in seconds.
	//
	// If the lifetime is not specified, this token remains valid indefinitely.
	LifetimeSeconds int64 `json:"lifetime_seconds,omitempty"`

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

func (CreateTokenRequest) MarshalJSON added in v0.23.0

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

func (*CreateTokenRequest) UnmarshalJSON added in v0.23.0

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

type CreateTokenResponse

type CreateTokenResponse struct {
	// The information for the new token.
	TokenInfo *PublicTokenInfo `json:"token_info,omitempty"`
	// The value of the new token.
	TokenValue string `json:"token_value,omitempty"`

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

func (CreateTokenResponse) MarshalJSON added in v0.23.0

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

func (*CreateTokenResponse) UnmarshalJSON added in v0.23.0

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

type CredentialsManagerAPI added in v0.20.0

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

Credentials manager interacts with with Identity Providers to to perform token exchanges using stored credentials and refresh tokens.

func NewCredentialsManager added in v0.20.0

func NewCredentialsManager(client *client.DatabricksClient) *CredentialsManagerAPI

func (*CredentialsManagerAPI) ExchangeToken added in v0.20.0

func (a *CredentialsManagerAPI) ExchangeToken(ctx context.Context, request ExchangeTokenRequest) (*ExchangeTokenResponse, error)

type CredentialsManagerInterface added in v0.29.0

type CredentialsManagerInterface interface {

	// Exchange token.
	//
	// Exchange tokens with an Identity Provider to get a new access token. It
	// allows specifying scopes to determine token permissions.
	ExchangeToken(ctx context.Context, request ExchangeTokenRequest) (*ExchangeTokenResponse, error)
}

type CredentialsManagerService added in v0.20.0

type CredentialsManagerService interface {

	// Exchange token.
	//
	// Exchange tokens with an Identity Provider to get a new access token. It
	// allows specifying scopes to determine token permissions.
	ExchangeToken(ctx context.Context, request ExchangeTokenRequest) (*ExchangeTokenResponse, error)
}

Credentials manager interacts with with Identity Providers to to perform token exchanges using stored credentials and refresh tokens.

type CspEnablementAccount added in v0.34.0

type CspEnablementAccount struct {
	// Set by customers when they request Compliance Security Profile (CSP)
	// Invariants are enforced in Settings policy.
	ComplianceStandards []ComplianceStandard `json:"compliance_standards,omitempty"`
	// Enforced = it cannot be overriden at workspace level.
	IsEnforced bool `json:"is_enforced,omitempty"`

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

Account level policy for CSP

func (CspEnablementAccount) MarshalJSON added in v0.34.0

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

func (*CspEnablementAccount) UnmarshalJSON added in v0.34.0

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

type CspEnablementAccountAPI added in v0.34.0

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

The compliance security profile settings at the account level control whether to enable it for new workspaces. By default, this account-level setting is disabled for new workspaces. After workspace creation, account admins can enable the compliance security profile individually for each workspace.

This settings can be disabled so that new workspaces do not have compliance security profile enabled by default.

func NewCspEnablementAccount added in v0.34.0

func NewCspEnablementAccount(client *client.DatabricksClient) *CspEnablementAccountAPI

func (*CspEnablementAccountAPI) Get added in v0.34.0

func (a *CspEnablementAccountAPI) Get(ctx context.Context, request GetCspEnablementAccountSettingRequest) (*CspEnablementAccountSetting, error)

func (*CspEnablementAccountAPI) Update added in v0.34.0

func (a *CspEnablementAccountAPI) Update(ctx context.Context, request UpdateCspEnablementAccountSettingRequest) (*CspEnablementAccountSetting, error)

type CspEnablementAccountInterface added in v0.34.0

type CspEnablementAccountInterface interface {

	// Get the compliance security profile setting for new workspaces.
	//
	// Gets the compliance security profile setting for new workspaces.
	Get(ctx context.Context, request GetCspEnablementAccountSettingRequest) (*CspEnablementAccountSetting, error)

	// Update the compliance security profile setting for new workspaces.
	//
	// Updates the value of the compliance security profile setting for new
	// workspaces.
	Update(ctx context.Context, request UpdateCspEnablementAccountSettingRequest) (*CspEnablementAccountSetting, error)
}

type CspEnablementAccountService added in v0.34.0

type CspEnablementAccountService interface {

	// Get the compliance security profile setting for new workspaces.
	//
	// Gets the compliance security profile setting for new workspaces.
	Get(ctx context.Context, request GetCspEnablementAccountSettingRequest) (*CspEnablementAccountSetting, error)

	// Update the compliance security profile setting for new workspaces.
	//
	// Updates the value of the compliance security profile setting for new
	// workspaces.
	Update(ctx context.Context, request UpdateCspEnablementAccountSettingRequest) (*CspEnablementAccountSetting, error)
}

The compliance security profile settings at the account level control whether to enable it for new workspaces. By default, this account-level setting is disabled for new workspaces. After workspace creation, account admins can enable the compliance security profile individually for each workspace.

This settings can be disabled so that new workspaces do not have compliance security profile enabled by default.

type CspEnablementAccountSetting added in v0.34.0

type CspEnablementAccountSetting struct {
	// Account level policy for CSP
	CspEnablementAccount CspEnablementAccount `json:"csp_enablement_account"`
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// update pattern to perform setting updates in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// PATCH request to identify the setting version you are updating.
	Etag string `json:"etag,omitempty"`
	// Name of the corresponding setting. This field is populated in the
	// response, but it will not be respected even if it's set in the request
	// body. The setting name in the path parameter will be respected instead.
	// Setting name is required to be 'default' if the setting only has one
	// instance per workspace.
	SettingName string `json:"setting_name,omitempty"`

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

func (CspEnablementAccountSetting) MarshalJSON added in v0.34.0

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

func (*CspEnablementAccountSetting) UnmarshalJSON added in v0.34.0

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

type DefaultNamespaceAPI added in v0.34.0

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

The default namespace setting API allows users to configure the default namespace for a Databricks workspace.

Through this API, users can retrieve, set, or modify the default namespace used when queries do not reference a fully qualified three-level name. For example, if you use the API to set 'retail_prod' as the default catalog, then a query 'SELECT * FROM myTable' would reference the object 'retail_prod.default.myTable' (the schema 'default' is always assumed).

This setting requires a restart of clusters and SQL warehouses to take effect. Additionally, the default namespace only applies when using Unity Catalog-enabled compute.

func NewDefaultNamespace added in v0.34.0

func NewDefaultNamespace(client *client.DatabricksClient) *DefaultNamespaceAPI

func (*DefaultNamespaceAPI) Delete added in v0.34.0

func (*DefaultNamespaceAPI) Get added in v0.34.0

func (a *DefaultNamespaceAPI) Get(ctx context.Context, request GetDefaultNamespaceSettingRequest) (*DefaultNamespaceSetting, error)

func (*DefaultNamespaceAPI) Update added in v0.34.0

func (a *DefaultNamespaceAPI) Update(ctx context.Context, request UpdateDefaultNamespaceSettingRequest) (*DefaultNamespaceSetting, error)

type DefaultNamespaceInterface added in v0.34.0

type DefaultNamespaceInterface interface {

	// Delete the default namespace setting.
	//
	// Deletes the default namespace setting for the workspace. A fresh etag needs
	// to be provided in `DELETE` requests (as a query parameter). The etag can be
	// retrieved by making a `GET` request before the `DELETE` request. If the
	// setting is updated/deleted concurrently, `DELETE` fails with 409 and the
	// request must be retried by using the fresh etag in the 409 response.
	Delete(ctx context.Context, request DeleteDefaultNamespaceSettingRequest) (*DeleteDefaultNamespaceSettingResponse, error)

	// Get the default namespace setting.
	//
	// Gets the default namespace setting.
	Get(ctx context.Context, request GetDefaultNamespaceSettingRequest) (*DefaultNamespaceSetting, error)

	// Update the default namespace setting.
	//
	// Updates the default namespace setting for the workspace. A fresh etag needs
	// to be provided in `PATCH` requests (as part of the setting field). The etag
	// can be retrieved by making a `GET` request before the `PATCH` request. Note
	// that if the setting does not exist, `GET` returns a NOT_FOUND error and the
	// etag is present in the error response, which should be set in the `PATCH`
	// request. If the setting is updated concurrently, `PATCH` fails with 409 and
	// the request must be retried by using the fresh etag in the 409 response.
	Update(ctx context.Context, request UpdateDefaultNamespaceSettingRequest) (*DefaultNamespaceSetting, error)
}

type DefaultNamespaceService added in v0.34.0

type DefaultNamespaceService interface {

	// Delete the default namespace setting.
	//
	// Deletes the default namespace setting for the workspace. A fresh etag
	// needs to be provided in `DELETE` requests (as a query parameter). The
	// etag can be retrieved by making a `GET` request before the `DELETE`
	// request. If the setting is updated/deleted concurrently, `DELETE` fails
	// with 409 and the request must be retried by using the fresh etag in the
	// 409 response.
	Delete(ctx context.Context, request DeleteDefaultNamespaceSettingRequest) (*DeleteDefaultNamespaceSettingResponse, error)

	// Get the default namespace setting.
	//
	// Gets the default namespace setting.
	Get(ctx context.Context, request GetDefaultNamespaceSettingRequest) (*DefaultNamespaceSetting, error)

	// Update the default namespace setting.
	//
	// Updates the default namespace setting for the workspace. A fresh etag
	// needs to be provided in `PATCH` requests (as part of the setting field).
	// The etag can be retrieved by making a `GET` request before the `PATCH`
	// request. Note that if the setting does not exist, `GET` returns a
	// NOT_FOUND error and the etag is present in the error response, which
	// should be set in the `PATCH` request. If the setting is updated
	// concurrently, `PATCH` fails with 409 and the request must be retried by
	// using the fresh etag in the 409 response.
	Update(ctx context.Context, request UpdateDefaultNamespaceSettingRequest) (*DefaultNamespaceSetting, error)
}

The default namespace setting API allows users to configure the default namespace for a Databricks workspace.

Through this API, users can retrieve, set, or modify the default namespace used when queries do not reference a fully qualified three-level name. For example, if you use the API to set 'retail_prod' as the default catalog, then a query 'SELECT * FROM myTable' would reference the object 'retail_prod.default.myTable' (the schema 'default' is always assumed).

This setting requires a restart of clusters and SQL warehouses to take effect. Additionally, the default namespace only applies when using Unity Catalog-enabled compute.

type DefaultNamespaceSetting added in v0.21.0

type DefaultNamespaceSetting struct {
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// update pattern to perform setting updates in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// PATCH request to identify the setting version you are updating.
	Etag string `json:"etag,omitempty"`

	Namespace StringMessage `json:"namespace"`
	// Name of the corresponding setting. This field is populated in the
	// response, but it will not be respected even if it's set in the request
	// body. The setting name in the path parameter will be respected instead.
	// Setting name is required to be 'default' if the setting only has one
	// instance per workspace.
	SettingName string `json:"setting_name,omitempty"`

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

This represents the setting configuration for the default namespace in the Databricks workspace. Setting the default catalog for the workspace determines the catalog that is used when queries do not reference a fully qualified 3 level name. For example, if the default catalog is set to 'retail_prod' then a query 'SELECT * FROM myTable' would reference the object 'retail_prod.default.myTable' (the schema 'default' is always assumed). This setting requires a restart of clusters and SQL warehouses to take effect. Additionally, the default namespace only applies when using Unity Catalog-enabled compute.

func (DefaultNamespaceSetting) MarshalJSON added in v0.23.0

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

func (*DefaultNamespaceSetting) UnmarshalJSON added in v0.23.0

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

type DeleteAccountIpAccessListRequest

type DeleteAccountIpAccessListRequest struct {
	// The ID for the corresponding IP access list
	IpAccessListId string `json:"-" url:"-"`
}

Delete access list

type DeleteDefaultNamespaceSettingRequest added in v0.31.0

type DeleteDefaultNamespaceSettingRequest struct {
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// delete pattern to perform setting deletions in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// DELETE request to identify the rule set version you are deleting.
	Etag string `json:"-" url:"etag,omitempty"`

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

Delete the default namespace setting

func (DeleteDefaultNamespaceSettingRequest) MarshalJSON added in v0.31.0

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

func (*DeleteDefaultNamespaceSettingRequest) UnmarshalJSON added in v0.31.0

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

type DeleteDefaultNamespaceSettingResponse added in v0.31.0

type DeleteDefaultNamespaceSettingResponse struct {
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// delete pattern to perform setting deletions in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// DELETE request to identify the rule set version you are deleting.
	Etag string `json:"etag"`
}

The etag is returned.

type DeleteDisableLegacyAccessRequest added in v0.47.0

type DeleteDisableLegacyAccessRequest struct {
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// delete pattern to perform setting deletions in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// DELETE request to identify the rule set version you are deleting.
	Etag string `json:"-" url:"etag,omitempty"`

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

Delete Legacy Access Disablement Status

func (DeleteDisableLegacyAccessRequest) MarshalJSON added in v0.47.0

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

func (*DeleteDisableLegacyAccessRequest) UnmarshalJSON added in v0.47.0

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

type DeleteDisableLegacyAccessResponse added in v0.47.0

type DeleteDisableLegacyAccessResponse struct {
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// delete pattern to perform setting deletions in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// DELETE request to identify the rule set version you are deleting.
	Etag string `json:"etag"`
}

The etag is returned.

type DeleteDisableLegacyDbfsRequest added in v0.49.0

type DeleteDisableLegacyDbfsRequest struct {
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// delete pattern to perform setting deletions in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// DELETE request to identify the rule set version you are deleting.
	Etag string `json:"-" url:"etag,omitempty"`

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

Delete the disable legacy DBFS setting

func (DeleteDisableLegacyDbfsRequest) MarshalJSON added in v0.49.0

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

func (*DeleteDisableLegacyDbfsRequest) UnmarshalJSON added in v0.49.0

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

type DeleteDisableLegacyDbfsResponse added in v0.49.0

type DeleteDisableLegacyDbfsResponse struct {
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// delete pattern to perform setting deletions in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// DELETE request to identify the rule set version you are deleting.
	Etag string `json:"etag"`
}

The etag is returned.

type DeleteDisableLegacyFeaturesRequest added in v0.47.0

type DeleteDisableLegacyFeaturesRequest struct {
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// delete pattern to perform setting deletions in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// DELETE request to identify the rule set version you are deleting.
	Etag string `json:"-" url:"etag,omitempty"`

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

Delete the disable legacy features setting

func (DeleteDisableLegacyFeaturesRequest) MarshalJSON added in v0.47.0

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

func (*DeleteDisableLegacyFeaturesRequest) UnmarshalJSON added in v0.47.0

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

type DeleteDisableLegacyFeaturesResponse added in v0.47.0

type DeleteDisableLegacyFeaturesResponse struct {
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// delete pattern to perform setting deletions in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// DELETE request to identify the rule set version you are deleting.
	Etag string `json:"etag"`
}

The etag is returned.

type DeleteIpAccessListRequest

type DeleteIpAccessListRequest struct {
	// The ID for the corresponding IP access list
	IpAccessListId string `json:"-" url:"-"`
}

Delete access list

type DeleteNetworkConnectivityConfigurationRequest added in v0.25.0

type DeleteNetworkConnectivityConfigurationRequest struct {
	// Your Network Connectvity Configuration ID.
	NetworkConnectivityConfigId string `json:"-" url:"-"`
}

Delete a network connectivity configuration

type DeleteNetworkConnectivityConfigurationResponse added in v0.34.0

type DeleteNetworkConnectivityConfigurationResponse struct {
}

type DeleteNotificationDestinationRequest added in v0.44.0

type DeleteNotificationDestinationRequest struct {
	Id string `json:"-" url:"-"`
}

Delete a notification destination

type DeletePersonalComputeSettingRequest added in v0.11.0

type DeletePersonalComputeSettingRequest struct {
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// delete pattern to perform setting deletions in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// DELETE request to identify the rule set version you are deleting.
	Etag string `json:"-" url:"etag,omitempty"`

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

Delete Personal Compute setting

func (DeletePersonalComputeSettingRequest) MarshalJSON added in v0.31.0

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

func (*DeletePersonalComputeSettingRequest) UnmarshalJSON added in v0.31.0

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

type DeletePersonalComputeSettingResponse added in v0.11.0

type DeletePersonalComputeSettingResponse struct {
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// delete pattern to perform setting deletions in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// DELETE request to identify the rule set version you are deleting.
	Etag string `json:"etag"`
}

The etag is returned.

type DeletePrivateEndpointRuleRequest added in v0.25.0

type DeletePrivateEndpointRuleRequest struct {
	// Your Network Connectvity Configuration ID.
	NetworkConnectivityConfigId string `json:"-" url:"-"`
	// Your private endpoint rule ID.
	PrivateEndpointRuleId string `json:"-" url:"-"`
}

Delete a private endpoint rule

type DeleteResponse added in v0.34.0

type DeleteResponse struct {
}

type DeleteRestrictWorkspaceAdminsSettingRequest added in v0.31.0

type DeleteRestrictWorkspaceAdminsSettingRequest struct {
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// delete pattern to perform setting deletions in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// DELETE request to identify the rule set version you are deleting.
	Etag string `json:"-" url:"etag,omitempty"`

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

Delete the restrict workspace admins setting

func (DeleteRestrictWorkspaceAdminsSettingRequest) MarshalJSON added in v0.31.0

func (*DeleteRestrictWorkspaceAdminsSettingRequest) UnmarshalJSON added in v0.31.0

type DeleteRestrictWorkspaceAdminsSettingResponse added in v0.31.0

type DeleteRestrictWorkspaceAdminsSettingResponse struct {
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// delete pattern to perform setting deletions in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// DELETE request to identify the rule set version you are deleting.
	Etag string `json:"etag"`
}

The etag is returned.

type DeleteTokenManagementRequest

type DeleteTokenManagementRequest struct {
	// The ID of the token to revoke.
	TokenId string `json:"-" url:"-"`
}

Delete a token

type DestinationType added in v0.44.0

type DestinationType string
const DestinationTypeEmail DestinationType = `EMAIL`
const DestinationTypeMicrosoftTeams DestinationType = `MICROSOFT_TEAMS`
const DestinationTypePagerduty DestinationType = `PAGERDUTY`
const DestinationTypeSlack DestinationType = `SLACK`
const DestinationTypeWebhook DestinationType = `WEBHOOK`

func (*DestinationType) Set added in v0.44.0

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

Set raw string value and validate it against allowed values

func (*DestinationType) String added in v0.44.0

func (f *DestinationType) String() string

String representation for fmt.Print

func (*DestinationType) Type added in v0.44.0

func (f *DestinationType) Type() string

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

type DisableLegacyAccess added in v0.47.0

type DisableLegacyAccess struct {
	DisableLegacyAccess BooleanMessage `json:"disable_legacy_access"`
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// update pattern to perform setting updates in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// PATCH request to identify the setting version you are updating.
	Etag string `json:"etag,omitempty"`
	// Name of the corresponding setting. This field is populated in the
	// response, but it will not be respected even if it's set in the request
	// body. The setting name in the path parameter will be respected instead.
	// Setting name is required to be 'default' if the setting only has one
	// instance per workspace.
	SettingName string `json:"setting_name,omitempty"`

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

func (DisableLegacyAccess) MarshalJSON added in v0.47.0

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

func (*DisableLegacyAccess) UnmarshalJSON added in v0.47.0

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

type DisableLegacyAccessAPI added in v0.47.0

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

'Disabling legacy access' has the following impacts:

1. Disables direct access to the Hive Metastore. However, you can still access Hive Metastore through HMS Federation. 2. Disables Fallback Mode (docs link) on any External Location access from the workspace. 3. Alters DBFS path access to use External Location permissions in place of legacy credentials. 4. Enforces Unity Catalog access on all path based access.

func NewDisableLegacyAccess added in v0.47.0

func NewDisableLegacyAccess(client *client.DatabricksClient) *DisableLegacyAccessAPI

func (*DisableLegacyAccessAPI) Delete added in v0.47.0

func (a *DisableLegacyAccessAPI) Delete(ctx context.Context, request DeleteDisableLegacyAccessRequest) (*DeleteDisableLegacyAccessResponse, error)

func (*DisableLegacyAccessAPI) Get added in v0.47.0

func (a *DisableLegacyAccessAPI) Get(ctx context.Context, request GetDisableLegacyAccessRequest) (*DisableLegacyAccess, error)

func (*DisableLegacyAccessAPI) Update added in v0.47.0

func (a *DisableLegacyAccessAPI) Update(ctx context.Context, request UpdateDisableLegacyAccessRequest) (*DisableLegacyAccess, error)

type DisableLegacyAccessInterface added in v0.47.0

type DisableLegacyAccessInterface interface {

	// Delete Legacy Access Disablement Status.
	//
	// Deletes legacy access disablement status.
	Delete(ctx context.Context, request DeleteDisableLegacyAccessRequest) (*DeleteDisableLegacyAccessResponse, error)

	// Retrieve Legacy Access Disablement Status.
	//
	// Retrieves legacy access disablement Status.
	Get(ctx context.Context, request GetDisableLegacyAccessRequest) (*DisableLegacyAccess, error)

	// Update Legacy Access Disablement Status.
	//
	// Updates legacy access disablement status.
	Update(ctx context.Context, request UpdateDisableLegacyAccessRequest) (*DisableLegacyAccess, error)
}

type DisableLegacyAccessService added in v0.47.0

type DisableLegacyAccessService interface {

	// Delete Legacy Access Disablement Status.
	//
	// Deletes legacy access disablement status.
	Delete(ctx context.Context, request DeleteDisableLegacyAccessRequest) (*DeleteDisableLegacyAccessResponse, error)

	// Retrieve Legacy Access Disablement Status.
	//
	// Retrieves legacy access disablement Status.
	Get(ctx context.Context, request GetDisableLegacyAccessRequest) (*DisableLegacyAccess, error)

	// Update Legacy Access Disablement Status.
	//
	// Updates legacy access disablement status.
	Update(ctx context.Context, request UpdateDisableLegacyAccessRequest) (*DisableLegacyAccess, error)
}

'Disabling legacy access' has the following impacts:

1. Disables direct access to the Hive Metastore. However, you can still access Hive Metastore through HMS Federation. 2. Disables Fallback Mode (docs link) on any External Location access from the workspace. 3. Alters DBFS path access to use External Location permissions in place of legacy credentials. 4. Enforces Unity Catalog access on all path based access.

type DisableLegacyDbfs added in v0.49.0

type DisableLegacyDbfs struct {
	DisableLegacyDbfs BooleanMessage `json:"disable_legacy_dbfs"`
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// update pattern to perform setting updates in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// PATCH request to identify the setting version you are updating.
	Etag string `json:"etag,omitempty"`
	// Name of the corresponding setting. This field is populated in the
	// response, but it will not be respected even if it's set in the request
	// body. The setting name in the path parameter will be respected instead.
	// Setting name is required to be 'default' if the setting only has one
	// instance per workspace.
	SettingName string `json:"setting_name,omitempty"`

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

func (DisableLegacyDbfs) MarshalJSON added in v0.49.0

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

func (*DisableLegacyDbfs) UnmarshalJSON added in v0.49.0

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

type DisableLegacyDbfsAPI added in v0.49.0

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

When this setting is on, access to DBFS root and DBFS mounts is disallowed (as well as creation of new mounts). When the setting is off, all DBFS functionality is enabled

func NewDisableLegacyDbfs added in v0.49.0

func NewDisableLegacyDbfs(client *client.DatabricksClient) *DisableLegacyDbfsAPI

func (*DisableLegacyDbfsAPI) Delete added in v0.49.0

func (a *DisableLegacyDbfsAPI) Delete(ctx context.Context, request DeleteDisableLegacyDbfsRequest) (*DeleteDisableLegacyDbfsResponse, error)

func (*DisableLegacyDbfsAPI) Get added in v0.49.0

func (a *DisableLegacyDbfsAPI) Get(ctx context.Context, request GetDisableLegacyDbfsRequest) (*DisableLegacyDbfs, error)

func (*DisableLegacyDbfsAPI) Update added in v0.49.0

func (a *DisableLegacyDbfsAPI) Update(ctx context.Context, request UpdateDisableLegacyDbfsRequest) (*DisableLegacyDbfs, error)

type DisableLegacyDbfsInterface added in v0.49.0

type DisableLegacyDbfsInterface interface {

	// Delete the disable legacy DBFS setting.
	//
	// Deletes the disable legacy DBFS setting for a workspace, reverting back to
	// the default.
	Delete(ctx context.Context, request DeleteDisableLegacyDbfsRequest) (*DeleteDisableLegacyDbfsResponse, error)

	// Get the disable legacy DBFS setting.
	//
	// Gets the disable legacy DBFS setting.
	Get(ctx context.Context, request GetDisableLegacyDbfsRequest) (*DisableLegacyDbfs, error)

	// Update the disable legacy DBFS setting.
	//
	// Updates the disable legacy DBFS setting for the workspace.
	Update(ctx context.Context, request UpdateDisableLegacyDbfsRequest) (*DisableLegacyDbfs, error)
}

type DisableLegacyDbfsService added in v0.49.0

type DisableLegacyDbfsService interface {

	// Delete the disable legacy DBFS setting.
	//
	// Deletes the disable legacy DBFS setting for a workspace, reverting back
	// to the default.
	Delete(ctx context.Context, request DeleteDisableLegacyDbfsRequest) (*DeleteDisableLegacyDbfsResponse, error)

	// Get the disable legacy DBFS setting.
	//
	// Gets the disable legacy DBFS setting.
	Get(ctx context.Context, request GetDisableLegacyDbfsRequest) (*DisableLegacyDbfs, error)

	// Update the disable legacy DBFS setting.
	//
	// Updates the disable legacy DBFS setting for the workspace.
	Update(ctx context.Context, request UpdateDisableLegacyDbfsRequest) (*DisableLegacyDbfs, error)
}

When this setting is on, access to DBFS root and DBFS mounts is disallowed (as well as creation of new mounts). When the setting is off, all DBFS functionality is enabled

type DisableLegacyFeatures added in v0.47.0

type DisableLegacyFeatures struct {
	DisableLegacyFeatures BooleanMessage `json:"disable_legacy_features"`
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// update pattern to perform setting updates in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// PATCH request to identify the setting version you are updating.
	Etag string `json:"etag,omitempty"`
	// Name of the corresponding setting. This field is populated in the
	// response, but it will not be respected even if it's set in the request
	// body. The setting name in the path parameter will be respected instead.
	// Setting name is required to be 'default' if the setting only has one
	// instance per workspace.
	SettingName string `json:"setting_name,omitempty"`

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

func (DisableLegacyFeatures) MarshalJSON added in v0.47.0

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

func (*DisableLegacyFeatures) UnmarshalJSON added in v0.47.0

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

type DisableLegacyFeaturesAPI added in v0.47.0

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

Disable legacy features for new Databricks workspaces.

For newly created workspaces: 1. Disables the use of DBFS root and mounts. 2. Hive Metastore will not be provisioned. 3. Disables the use of ‘No-isolation clusters’. 4. Disables Databricks Runtime versions prior to 13.3LTS.

func NewDisableLegacyFeatures added in v0.47.0

func NewDisableLegacyFeatures(client *client.DatabricksClient) *DisableLegacyFeaturesAPI

func (*DisableLegacyFeaturesAPI) Delete added in v0.47.0

func (a *DisableLegacyFeaturesAPI) Delete(ctx context.Context, request DeleteDisableLegacyFeaturesRequest) (*DeleteDisableLegacyFeaturesResponse, error)

func (*DisableLegacyFeaturesAPI) Get added in v0.47.0

func (a *DisableLegacyFeaturesAPI) Get(ctx context.Context, request GetDisableLegacyFeaturesRequest) (*DisableLegacyFeatures, error)

func (*DisableLegacyFeaturesAPI) Update added in v0.47.0

func (a *DisableLegacyFeaturesAPI) Update(ctx context.Context, request UpdateDisableLegacyFeaturesRequest) (*DisableLegacyFeatures, error)

type DisableLegacyFeaturesInterface added in v0.47.0

type DisableLegacyFeaturesInterface interface {

	// Delete the disable legacy features setting.
	//
	// Deletes the disable legacy features setting.
	Delete(ctx context.Context, request DeleteDisableLegacyFeaturesRequest) (*DeleteDisableLegacyFeaturesResponse, error)

	// Get the disable legacy features setting.
	//
	// Gets the value of the disable legacy features setting.
	Get(ctx context.Context, request GetDisableLegacyFeaturesRequest) (*DisableLegacyFeatures, error)

	// Update the disable legacy features setting.
	//
	// Updates the value of the disable legacy features setting.
	Update(ctx context.Context, request UpdateDisableLegacyFeaturesRequest) (*DisableLegacyFeatures, error)
}

type DisableLegacyFeaturesService added in v0.47.0

type DisableLegacyFeaturesService interface {

	// Delete the disable legacy features setting.
	//
	// Deletes the disable legacy features setting.
	Delete(ctx context.Context, request DeleteDisableLegacyFeaturesRequest) (*DeleteDisableLegacyFeaturesResponse, error)

	// Get the disable legacy features setting.
	//
	// Gets the value of the disable legacy features setting.
	Get(ctx context.Context, request GetDisableLegacyFeaturesRequest) (*DisableLegacyFeatures, error)

	// Update the disable legacy features setting.
	//
	// Updates the value of the disable legacy features setting.
	Update(ctx context.Context, request UpdateDisableLegacyFeaturesRequest) (*DisableLegacyFeatures, error)
}

Disable legacy features for new Databricks workspaces.

For newly created workspaces: 1. Disables the use of DBFS root and mounts. 2. Hive Metastore will not be provisioned. 3. Disables the use of ‘No-isolation clusters’. 4. Disables Databricks Runtime versions prior to 13.3LTS.

type EmailConfig added in v0.44.0

type EmailConfig struct {
	// Email addresses to notify.
	Addresses []string `json:"addresses,omitempty"`
}

type Empty added in v0.44.0

type Empty struct {
}

type EnhancedSecurityMonitoring added in v0.40.0

type EnhancedSecurityMonitoring struct {
	IsEnabled bool `json:"is_enabled,omitempty"`

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

SHIELD feature: ESM

func (EnhancedSecurityMonitoring) MarshalJSON added in v0.40.0

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

func (*EnhancedSecurityMonitoring) UnmarshalJSON added in v0.40.0

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

type EnhancedSecurityMonitoringAPI added in v0.40.0

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

Controls whether enhanced security monitoring is enabled for the current workspace. If the compliance security profile is enabled, this is automatically enabled. By default, it is disabled. However, if the compliance security profile is enabled, this is automatically enabled.

If the compliance security profile is disabled, you can enable or disable this setting and it is not permanent.

func NewEnhancedSecurityMonitoring added in v0.40.0

func NewEnhancedSecurityMonitoring(client *client.DatabricksClient) *EnhancedSecurityMonitoringAPI

func (*EnhancedSecurityMonitoringAPI) Get added in v0.40.0

func (a *EnhancedSecurityMonitoringAPI) Get(ctx context.Context, request GetEnhancedSecurityMonitoringSettingRequest) (*EnhancedSecurityMonitoringSetting, error)

func (*EnhancedSecurityMonitoringAPI) Update added in v0.40.0

func (a *EnhancedSecurityMonitoringAPI) Update(ctx context.Context, request UpdateEnhancedSecurityMonitoringSettingRequest) (*EnhancedSecurityMonitoringSetting, error)

type EnhancedSecurityMonitoringInterface added in v0.40.0

type EnhancedSecurityMonitoringInterface interface {

	// Get the enhanced security monitoring setting.
	//
	// Gets the enhanced security monitoring setting.
	Get(ctx context.Context, request GetEnhancedSecurityMonitoringSettingRequest) (*EnhancedSecurityMonitoringSetting, error)

	// Update the enhanced security monitoring setting.
	//
	// Updates the enhanced security monitoring setting for the workspace. A fresh
	// etag needs to be provided in `PATCH` requests (as part of the setting field).
	// The etag can be retrieved by making a `GET` request before the `PATCH`
	// request. If the setting is updated concurrently, `PATCH` fails with 409 and
	// the request must be retried by using the fresh etag in the 409 response.
	Update(ctx context.Context, request UpdateEnhancedSecurityMonitoringSettingRequest) (*EnhancedSecurityMonitoringSetting, error)
}

type EnhancedSecurityMonitoringService added in v0.40.0

type EnhancedSecurityMonitoringService interface {

	// Get the enhanced security monitoring setting.
	//
	// Gets the enhanced security monitoring setting.
	Get(ctx context.Context, request GetEnhancedSecurityMonitoringSettingRequest) (*EnhancedSecurityMonitoringSetting, error)

	// Update the enhanced security monitoring setting.
	//
	// Updates the enhanced security monitoring setting for the workspace. A
	// fresh etag needs to be provided in `PATCH` requests (as part of the
	// setting field). The etag can be retrieved by making a `GET` request
	// before the `PATCH` request. If the setting is updated concurrently,
	// `PATCH` fails with 409 and the request must be retried by using the fresh
	// etag in the 409 response.
	Update(ctx context.Context, request UpdateEnhancedSecurityMonitoringSettingRequest) (*EnhancedSecurityMonitoringSetting, error)
}

Controls whether enhanced security monitoring is enabled for the current workspace. If the compliance security profile is enabled, this is automatically enabled. By default, it is disabled. However, if the compliance security profile is enabled, this is automatically enabled.

If the compliance security profile is disabled, you can enable or disable this setting and it is not permanent.

type EnhancedSecurityMonitoringSetting added in v0.40.0

type EnhancedSecurityMonitoringSetting struct {
	// SHIELD feature: ESM
	EnhancedSecurityMonitoringWorkspace EnhancedSecurityMonitoring `json:"enhanced_security_monitoring_workspace"`
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// update pattern to perform setting updates in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// PATCH request to identify the setting version you are updating.
	Etag string `json:"etag,omitempty"`
	// Name of the corresponding setting. This field is populated in the
	// response, but it will not be respected even if it's set in the request
	// body. The setting name in the path parameter will be respected instead.
	// Setting name is required to be 'default' if the setting only has one
	// instance per workspace.
	SettingName string `json:"setting_name,omitempty"`

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

func (EnhancedSecurityMonitoringSetting) MarshalJSON added in v0.40.0

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

func (*EnhancedSecurityMonitoringSetting) UnmarshalJSON added in v0.40.0

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

type EsmEnablementAccount added in v0.34.0

type EsmEnablementAccount struct {
	IsEnforced bool `json:"is_enforced,omitempty"`

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

Account level policy for ESM

func (EsmEnablementAccount) MarshalJSON added in v0.34.0

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

func (*EsmEnablementAccount) UnmarshalJSON added in v0.34.0

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

type EsmEnablementAccountAPI added in v0.34.0

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

The enhanced security monitoring setting at the account level controls whether to enable the feature on new workspaces. By default, this account-level setting is disabled for new workspaces. After workspace creation, account admins can enable enhanced security monitoring individually for each workspace.

func NewEsmEnablementAccount added in v0.34.0

func NewEsmEnablementAccount(client *client.DatabricksClient) *EsmEnablementAccountAPI

func (*EsmEnablementAccountAPI) Get added in v0.34.0

func (a *EsmEnablementAccountAPI) Get(ctx context.Context, request GetEsmEnablementAccountSettingRequest) (*EsmEnablementAccountSetting, error)

func (*EsmEnablementAccountAPI) Update added in v0.34.0

func (a *EsmEnablementAccountAPI) Update(ctx context.Context, request UpdateEsmEnablementAccountSettingRequest) (*EsmEnablementAccountSetting, error)

type EsmEnablementAccountInterface added in v0.34.0

type EsmEnablementAccountInterface interface {

	// Get the enhanced security monitoring setting for new workspaces.
	//
	// Gets the enhanced security monitoring setting for new workspaces.
	Get(ctx context.Context, request GetEsmEnablementAccountSettingRequest) (*EsmEnablementAccountSetting, error)

	// Update the enhanced security monitoring setting for new workspaces.
	//
	// Updates the value of the enhanced security monitoring setting for new
	// workspaces.
	Update(ctx context.Context, request UpdateEsmEnablementAccountSettingRequest) (*EsmEnablementAccountSetting, error)
}

type EsmEnablementAccountService added in v0.34.0

type EsmEnablementAccountService interface {

	// Get the enhanced security monitoring setting for new workspaces.
	//
	// Gets the enhanced security monitoring setting for new workspaces.
	Get(ctx context.Context, request GetEsmEnablementAccountSettingRequest) (*EsmEnablementAccountSetting, error)

	// Update the enhanced security monitoring setting for new workspaces.
	//
	// Updates the value of the enhanced security monitoring setting for new
	// workspaces.
	Update(ctx context.Context, request UpdateEsmEnablementAccountSettingRequest) (*EsmEnablementAccountSetting, error)
}

The enhanced security monitoring setting at the account level controls whether to enable the feature on new workspaces. By default, this account-level setting is disabled for new workspaces. After workspace creation, account admins can enable enhanced security monitoring individually for each workspace.

type EsmEnablementAccountSetting added in v0.34.0

type EsmEnablementAccountSetting struct {
	// Account level policy for ESM
	EsmEnablementAccount EsmEnablementAccount `json:"esm_enablement_account"`
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// update pattern to perform setting updates in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// PATCH request to identify the setting version you are updating.
	Etag string `json:"etag,omitempty"`
	// Name of the corresponding setting. This field is populated in the
	// response, but it will not be respected even if it's set in the request
	// body. The setting name in the path parameter will be respected instead.
	// Setting name is required to be 'default' if the setting only has one
	// instance per workspace.
	SettingName string `json:"setting_name,omitempty"`

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

func (EsmEnablementAccountSetting) MarshalJSON added in v0.34.0

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

func (*EsmEnablementAccountSetting) UnmarshalJSON added in v0.34.0

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

type ExchangeToken added in v0.20.0

type ExchangeToken struct {
	// The requested token.
	Credential string `json:"credential,omitempty"`
	// The end-of-life timestamp of the token. The value is in milliseconds
	// since the Unix epoch.
	CredentialEolTime int64 `json:"credentialEolTime,omitempty"`
	// User ID of the user that owns this token.
	OwnerId int64 `json:"ownerId,omitempty"`
	// The scopes of access granted in the token.
	Scopes []string `json:"scopes,omitempty"`
	// The type of this exchange token
	TokenType TokenType `json:"tokenType,omitempty"`

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

The exchange token is the result of the token exchange with the IdP

func (ExchangeToken) MarshalJSON added in v0.23.0

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

func (*ExchangeToken) UnmarshalJSON added in v0.23.0

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

type ExchangeTokenRequest added in v0.20.0

type ExchangeTokenRequest struct {
	// The partition of Credentials store
	PartitionId PartitionId `json:"partitionId"`
	// Array of scopes for the token request.
	Scopes []string `json:"scopes"`
	// A list of token types being requested
	TokenType []TokenType `json:"tokenType"`
}

Exchange a token with the IdP

type ExchangeTokenResponse added in v0.20.0

type ExchangeTokenResponse struct {
	Values []ExchangeToken `json:"values,omitempty"`
}

Exhanged tokens were successfully returned.

type FetchIpAccessListResponse

type FetchIpAccessListResponse struct {
	// Definition of an IP Access list
	IpAccessList *IpAccessListInfo `json:"ip_access_list,omitempty"`
}

An IP access list was successfully returned.

type GenericWebhookConfig added in v0.44.0

type GenericWebhookConfig struct {
	// [Input-Only][Optional] Password for webhook.
	Password string `json:"password,omitempty"`
	// [Output-Only] Whether password is set.
	PasswordSet bool `json:"password_set,omitempty"`
	// [Input-Only] URL for webhook.
	Url string `json:"url,omitempty"`
	// [Output-Only] Whether URL is set.
	UrlSet bool `json:"url_set,omitempty"`
	// [Input-Only][Optional] Username for webhook.
	Username string `json:"username,omitempty"`
	// [Output-Only] Whether username is set.
	UsernameSet bool `json:"username_set,omitempty"`

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

func (GenericWebhookConfig) MarshalJSON added in v0.44.0

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

func (*GenericWebhookConfig) UnmarshalJSON added in v0.44.0

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

type GetAccountIpAccessListRequest

type GetAccountIpAccessListRequest struct {
	// The ID for the corresponding IP access list
	IpAccessListId string `json:"-" url:"-"`
}

Get IP access list

type GetAibiDashboardEmbeddingAccessPolicySettingRequest added in v0.50.0

type GetAibiDashboardEmbeddingAccessPolicySettingRequest struct {
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// delete pattern to perform setting deletions in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// DELETE request to identify the rule set version you are deleting.
	Etag string `json:"-" url:"etag,omitempty"`

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

Retrieve the AI/BI dashboard embedding access policy

func (GetAibiDashboardEmbeddingAccessPolicySettingRequest) MarshalJSON added in v0.50.0

func (*GetAibiDashboardEmbeddingAccessPolicySettingRequest) UnmarshalJSON added in v0.50.0

type GetAibiDashboardEmbeddingApprovedDomainsSettingRequest added in v0.50.0

type GetAibiDashboardEmbeddingApprovedDomainsSettingRequest struct {
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// delete pattern to perform setting deletions in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// DELETE request to identify the rule set version you are deleting.
	Etag string `json:"-" url:"etag,omitempty"`

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

Retrieve the list of domains approved to host embedded AI/BI dashboards

func (GetAibiDashboardEmbeddingApprovedDomainsSettingRequest) MarshalJSON added in v0.50.0

func (*GetAibiDashboardEmbeddingApprovedDomainsSettingRequest) UnmarshalJSON added in v0.50.0

type GetAutomaticClusterUpdateSettingRequest added in v0.36.0

type GetAutomaticClusterUpdateSettingRequest struct {
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// delete pattern to perform setting deletions in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// DELETE request to identify the rule set version you are deleting.
	Etag string `json:"-" url:"etag,omitempty"`

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

Get the automatic cluster update setting

func (GetAutomaticClusterUpdateSettingRequest) MarshalJSON added in v0.36.0

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

func (*GetAutomaticClusterUpdateSettingRequest) UnmarshalJSON added in v0.36.0

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

type GetComplianceSecurityProfileSettingRequest added in v0.40.0

type GetComplianceSecurityProfileSettingRequest struct {
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// delete pattern to perform setting deletions in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// DELETE request to identify the rule set version you are deleting.
	Etag string `json:"-" url:"etag,omitempty"`

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

Get the compliance security profile setting

func (GetComplianceSecurityProfileSettingRequest) MarshalJSON added in v0.40.0

func (*GetComplianceSecurityProfileSettingRequest) UnmarshalJSON added in v0.40.0

type GetCspEnablementAccountSettingRequest added in v0.36.0

type GetCspEnablementAccountSettingRequest struct {
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// delete pattern to perform setting deletions in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// DELETE request to identify the rule set version you are deleting.
	Etag string `json:"-" url:"etag,omitempty"`

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

Get the compliance security profile setting for new workspaces

func (GetCspEnablementAccountSettingRequest) MarshalJSON added in v0.36.0

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

func (*GetCspEnablementAccountSettingRequest) UnmarshalJSON added in v0.36.0

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

type GetDefaultNamespaceSettingRequest added in v0.31.0

type GetDefaultNamespaceSettingRequest struct {
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// delete pattern to perform setting deletions in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// DELETE request to identify the rule set version you are deleting.
	Etag string `json:"-" url:"etag,omitempty"`

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

Get the default namespace setting

func (GetDefaultNamespaceSettingRequest) MarshalJSON added in v0.31.0

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

func (*GetDefaultNamespaceSettingRequest) UnmarshalJSON added in v0.31.0

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

type GetDisableLegacyAccessRequest added in v0.47.0

type GetDisableLegacyAccessRequest struct {
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// delete pattern to perform setting deletions in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// DELETE request to identify the rule set version you are deleting.
	Etag string `json:"-" url:"etag,omitempty"`

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

Retrieve Legacy Access Disablement Status

func (GetDisableLegacyAccessRequest) MarshalJSON added in v0.47.0

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

func (*GetDisableLegacyAccessRequest) UnmarshalJSON added in v0.47.0

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

type GetDisableLegacyDbfsRequest added in v0.49.0

type GetDisableLegacyDbfsRequest struct {
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// delete pattern to perform setting deletions in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// DELETE request to identify the rule set version you are deleting.
	Etag string `json:"-" url:"etag,omitempty"`

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

Get the disable legacy DBFS setting

func (GetDisableLegacyDbfsRequest) MarshalJSON added in v0.49.0

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

func (*GetDisableLegacyDbfsRequest) UnmarshalJSON added in v0.49.0

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

type GetDisableLegacyFeaturesRequest added in v0.47.0

type GetDisableLegacyFeaturesRequest struct {
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// delete pattern to perform setting deletions in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// DELETE request to identify the rule set version you are deleting.
	Etag string `json:"-" url:"etag,omitempty"`

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

Get the disable legacy features setting

func (GetDisableLegacyFeaturesRequest) MarshalJSON added in v0.47.0

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

func (*GetDisableLegacyFeaturesRequest) UnmarshalJSON added in v0.47.0

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

type GetEnhancedSecurityMonitoringSettingRequest added in v0.40.0

type GetEnhancedSecurityMonitoringSettingRequest struct {
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// delete pattern to perform setting deletions in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// DELETE request to identify the rule set version you are deleting.
	Etag string `json:"-" url:"etag,omitempty"`

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

Get the enhanced security monitoring setting

func (GetEnhancedSecurityMonitoringSettingRequest) MarshalJSON added in v0.40.0

func (*GetEnhancedSecurityMonitoringSettingRequest) UnmarshalJSON added in v0.40.0

type GetEsmEnablementAccountSettingRequest added in v0.36.0

type GetEsmEnablementAccountSettingRequest struct {
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// delete pattern to perform setting deletions in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// DELETE request to identify the rule set version you are deleting.
	Etag string `json:"-" url:"etag,omitempty"`

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

Get the enhanced security monitoring setting for new workspaces

func (GetEsmEnablementAccountSettingRequest) MarshalJSON added in v0.36.0

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

func (*GetEsmEnablementAccountSettingRequest) UnmarshalJSON added in v0.36.0

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

type GetIpAccessListRequest

type GetIpAccessListRequest struct {
	// The ID for the corresponding IP access list
	IpAccessListId string `json:"-" url:"-"`
}

Get access list

type GetIpAccessListResponse

type GetIpAccessListResponse struct {
	// Definition of an IP Access list
	IpAccessList *IpAccessListInfo `json:"ip_access_list,omitempty"`
}

type GetIpAccessListsResponse

type GetIpAccessListsResponse struct {
	IpAccessLists []IpAccessListInfo `json:"ip_access_lists,omitempty"`
}

IP access lists were successfully returned.

type GetNetworkConnectivityConfigurationRequest added in v0.25.0

type GetNetworkConnectivityConfigurationRequest struct {
	// Your Network Connectvity Configuration ID.
	NetworkConnectivityConfigId string `json:"-" url:"-"`
}

Get a network connectivity configuration

type GetNotificationDestinationRequest added in v0.44.0

type GetNotificationDestinationRequest struct {
	Id string `json:"-" url:"-"`
}

Get a notification destination

type GetPersonalComputeSettingRequest added in v0.31.0

type GetPersonalComputeSettingRequest struct {
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// delete pattern to perform setting deletions in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// DELETE request to identify the rule set version you are deleting.
	Etag string `json:"-" url:"etag,omitempty"`

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

Get Personal Compute setting

func (GetPersonalComputeSettingRequest) MarshalJSON added in v0.31.0

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

func (*GetPersonalComputeSettingRequest) UnmarshalJSON added in v0.31.0

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

type GetPrivateEndpointRuleRequest added in v0.25.0

type GetPrivateEndpointRuleRequest struct {
	// Your Network Connectvity Configuration ID.
	NetworkConnectivityConfigId string `json:"-" url:"-"`
	// Your private endpoint rule ID.
	PrivateEndpointRuleId string `json:"-" url:"-"`
}

Get a private endpoint rule

type GetRestrictWorkspaceAdminsSettingRequest added in v0.31.0

type GetRestrictWorkspaceAdminsSettingRequest struct {
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// delete pattern to perform setting deletions in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// DELETE request to identify the rule set version you are deleting.
	Etag string `json:"-" url:"etag,omitempty"`

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

Get the restrict workspace admins setting

func (GetRestrictWorkspaceAdminsSettingRequest) MarshalJSON added in v0.31.0

func (*GetRestrictWorkspaceAdminsSettingRequest) UnmarshalJSON added in v0.31.0

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

type GetStatusRequest

type GetStatusRequest struct {
	Keys string `json:"-" url:"keys"`
}

Check configuration status

type GetTokenManagementRequest

type GetTokenManagementRequest struct {
	// The ID of the token to get.
	TokenId string `json:"-" url:"-"`
}

Get token info

type GetTokenPermissionLevelsResponse added in v0.15.0

type GetTokenPermissionLevelsResponse struct {
	// Specific permission levels
	PermissionLevels []TokenPermissionsDescription `json:"permission_levels,omitempty"`
}

type GetTokenResponse added in v0.30.0

type GetTokenResponse struct {
	TokenInfo *TokenInfo `json:"token_info,omitempty"`
}

Token with specified Token ID was successfully returned.

type IpAccessListInfo

type IpAccessListInfo struct {
	// Total number of IP or CIDR values.
	AddressCount int `json:"address_count,omitempty"`
	// Creation timestamp in milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// User ID of the user who created this list.
	CreatedBy int64 `json:"created_by,omitempty"`
	// Specifies whether this IP access list is enabled.
	Enabled bool `json:"enabled,omitempty"`

	IpAddresses []string `json:"ip_addresses,omitempty"`
	// Label for the IP access list. This **cannot** be empty.
	Label string `json:"label,omitempty"`
	// Universally unique identifier (UUID) of the IP access list.
	ListId string `json:"list_id,omitempty"`
	// Type of IP access list. Valid values are as follows and are
	// case-sensitive:
	//
	// * `ALLOW`: An allow list. Include this IP or range. * `BLOCK`: A block
	// list. Exclude this IP or range. IP addresses in the block list are
	// excluded even if they are included in an allow list.
	ListType ListType `json:"list_type,omitempty"`
	// Update timestamp in milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// User ID of the user who updated this list.
	UpdatedBy int64 `json:"updated_by,omitempty"`

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

Definition of an IP Access list

func (IpAccessListInfo) MarshalJSON added in v0.23.0

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

func (*IpAccessListInfo) UnmarshalJSON added in v0.23.0

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

type IpAccessListsAPI

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

IP Access List enables admins to configure IP access lists.

IP access lists affect web application access and REST API access to this workspace only. If the feature is disabled for a workspace, all access is allowed for this workspace. There is support for allow lists (inclusion) and block lists (exclusion).

When a connection is attempted: 1. **First, all block lists are checked.** If the connection IP address matches any block list, the connection is rejected. 2. **If the connection was not rejected by block lists**, the IP address is compared with the allow lists.

If there is at least one allow list for the workspace, the connection is allowed only if the IP address matches an allow list. If there are no allow lists for the workspace, all IP addresses are allowed.

For all allow lists and block lists combined, the workspace supports a maximum of 1000 IP/CIDR values, where one CIDR counts as a single value.

After changes to the IP access list feature, it can take a few minutes for changes to take effect.

func NewIpAccessLists

func NewIpAccessLists(client *client.DatabricksClient) *IpAccessListsAPI

func (*IpAccessListsAPI) Create

func (a *IpAccessListsAPI) Create(ctx context.Context, request CreateIpAccessList) (*CreateIpAccessListResponse, error)
Example (IpAccessLists)
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
	panic(err)
}

created, err := w.IpAccessLists.Create(ctx, settings.CreateIpAccessList{
	Label:       fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
	IpAddresses: []string{"1.0.0.0/16"},
	ListType:    settings.ListTypeBlock,
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", created)

// cleanup

err = w.IpAccessLists.DeleteByIpAccessListId(ctx, created.IpAccessList.ListId)
if err != nil {
	panic(err)
}
Output:

func (*IpAccessListsAPI) Delete

func (a *IpAccessListsAPI) Delete(ctx context.Context, request DeleteIpAccessListRequest) error

func (*IpAccessListsAPI) DeleteByIpAccessListId

func (a *IpAccessListsAPI) DeleteByIpAccessListId(ctx context.Context, ipAccessListId string) error

Delete access list.

Deletes an IP access list, specified by its list ID.

func (*IpAccessListsAPI) Get

func (a *IpAccessListsAPI) Get(ctx context.Context, request GetIpAccessListRequest) (*FetchIpAccessListResponse, error)
Example (IpAccessLists)
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
	panic(err)
}

created, err := w.IpAccessLists.Create(ctx, settings.CreateIpAccessList{
	Label:       fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
	IpAddresses: []string{"1.0.0.0/16"},
	ListType:    settings.ListTypeBlock,
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", created)

byId, err := w.IpAccessLists.GetByIpAccessListId(ctx, created.IpAccessList.ListId)
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", byId)

// cleanup

err = w.IpAccessLists.DeleteByIpAccessListId(ctx, created.IpAccessList.ListId)
if err != nil {
	panic(err)
}
Output:

func (*IpAccessListsAPI) GetByIpAccessListId

func (a *IpAccessListsAPI) GetByIpAccessListId(ctx context.Context, ipAccessListId string) (*FetchIpAccessListResponse, error)

Get access list.

Gets an IP access list, specified by its list ID.

func (*IpAccessListsAPI) GetByLabel

func (a *IpAccessListsAPI) GetByLabel(ctx context.Context, name string) (*IpAccessListInfo, error)

GetByLabel calls IpAccessListsAPI.IpAccessListInfoLabelToListIdMap and returns a single IpAccessListInfo.

Returns an error if there's more than one IpAccessListInfo with the same .Label.

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

This method is generated by Databricks SDK Code Generator.

func (*IpAccessListsAPI) IpAccessListInfoLabelToListIdMap

func (a *IpAccessListsAPI) IpAccessListInfoLabelToListIdMap(ctx context.Context) (map[string]string, error)

IpAccessListInfoLabelToListIdMap calls IpAccessListsAPI.ListAll and creates a map of results with IpAccessListInfo.Label as key and IpAccessListInfo.ListId as value.

Returns an error if there's more than one IpAccessListInfo with the same .Label.

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

This method is generated by Databricks SDK Code Generator.

func (*IpAccessListsAPI) List added in v0.24.0

Get access lists.

Gets all IP access lists for the specified workspace.

This method is generated by Databricks SDK Code Generator.

func (*IpAccessListsAPI) ListAll

func (a *IpAccessListsAPI) ListAll(ctx context.Context) ([]IpAccessListInfo, error)

Get access lists.

Gets all IP access lists for the specified workspace.

This method is generated by Databricks SDK Code Generator.

Example (IpAccessLists)
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
	panic(err)
}

all, err := w.IpAccessLists.ListAll(ctx)
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", all)
Output:

func (*IpAccessListsAPI) Replace

func (a *IpAccessListsAPI) Replace(ctx context.Context, request ReplaceIpAccessList) error
Example (IpAccessLists)
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
	panic(err)
}

created, err := w.IpAccessLists.Create(ctx, settings.CreateIpAccessList{
	Label:       fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
	IpAddresses: []string{"1.0.0.0/16"},
	ListType:    settings.ListTypeBlock,
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", created)

err = w.IpAccessLists.Replace(ctx, settings.ReplaceIpAccessList{
	IpAccessListId: created.IpAccessList.ListId,
	Label:          fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
	IpAddresses:    []string{"1.0.0.0/24"},
	ListType:       settings.ListTypeBlock,
	Enabled:        false,
})
if err != nil {
	panic(err)
}

// cleanup

err = w.IpAccessLists.DeleteByIpAccessListId(ctx, created.IpAccessList.ListId)
if err != nil {
	panic(err)
}
Output:

func (*IpAccessListsAPI) Update

func (a *IpAccessListsAPI) Update(ctx context.Context, request UpdateIpAccessList) error

type IpAccessListsInterface added in v0.29.0

type IpAccessListsInterface interface {

	// Create access list.
	//
	// Creates an IP access list for this workspace.
	//
	// A list can be an allow list or a block list. See the top of this file for a
	// description of how the server treats allow lists and block lists at runtime.
	//
	// When creating or updating an IP access list:
	//
	// * For all allow lists and block lists combined, the API supports a maximum of
	// 1000 IP/CIDR values, where one CIDR counts as a single value. Attempts to
	// exceed that number return error 400 with `error_code` value `QUOTA_EXCEEDED`.
	// * If the new list would block the calling user's current IP, error 400 is
	// returned with `error_code` value `INVALID_STATE`.
	//
	// It can take a few minutes for the changes to take effect. **Note**: Your new
	// IP access list has no effect until you enable the feature. See
	// :method:workspaceconf/setStatus
	Create(ctx context.Context, request CreateIpAccessList) (*CreateIpAccessListResponse, error)

	// Delete access list.
	//
	// Deletes an IP access list, specified by its list ID.
	Delete(ctx context.Context, request DeleteIpAccessListRequest) error

	// Delete access list.
	//
	// Deletes an IP access list, specified by its list ID.
	DeleteByIpAccessListId(ctx context.Context, ipAccessListId string) error

	// Get access list.
	//
	// Gets an IP access list, specified by its list ID.
	Get(ctx context.Context, request GetIpAccessListRequest) (*FetchIpAccessListResponse, error)

	// Get access list.
	//
	// Gets an IP access list, specified by its list ID.
	GetByIpAccessListId(ctx context.Context, ipAccessListId string) (*FetchIpAccessListResponse, error)

	// Get access lists.
	//
	// Gets all IP access lists for the specified workspace.
	//
	// This method is generated by Databricks SDK Code Generator.
	List(ctx context.Context) listing.Iterator[IpAccessListInfo]

	// Get access lists.
	//
	// Gets all IP access lists for the specified workspace.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListAll(ctx context.Context) ([]IpAccessListInfo, error)

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

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

	// Replace access list.
	//
	// Replaces an IP access list, specified by its ID.
	//
	// A list can include allow lists and block lists. See the top of this file for
	// a description of how the server treats allow lists and block lists at run
	// time. When replacing an IP access list: * For all allow lists and block lists
	// combined, the API supports a maximum of 1000 IP/CIDR values, where one CIDR
	// counts as a single value. Attempts to exceed that number return error 400
	// with `error_code` value `QUOTA_EXCEEDED`. * If the resulting list would block
	// the calling user's current IP, error 400 is returned with `error_code` value
	// `INVALID_STATE`. It can take a few minutes for the changes to take effect.
	// Note that your resulting IP access list has no effect until you enable the
	// feature. See :method:workspaceconf/setStatus.
	Replace(ctx context.Context, request ReplaceIpAccessList) error

	// Update access list.
	//
	// Updates an existing IP access list, specified by its ID.
	//
	// A list can include allow lists and block lists. See the top of this file for
	// a description of how the server treats allow lists and block lists at run
	// time.
	//
	// When updating an IP access list:
	//
	// * For all allow lists and block lists combined, the API supports a maximum of
	// 1000 IP/CIDR values, where one CIDR counts as a single value. Attempts to
	// exceed that number return error 400 with `error_code` value `QUOTA_EXCEEDED`.
	// * If the updated list would block the calling user's current IP, error 400 is
	// returned with `error_code` value `INVALID_STATE`.
	//
	// It can take a few minutes for the changes to take effect. Note that your
	// resulting IP access list has no effect until you enable the feature. See
	// :method:workspaceconf/setStatus.
	Update(ctx context.Context, request UpdateIpAccessList) error
}

type IpAccessListsService

type IpAccessListsService interface {

	// Create access list.
	//
	// Creates an IP access list for this workspace.
	//
	// A list can be an allow list or a block list. See the top of this file for
	// a description of how the server treats allow lists and block lists at
	// runtime.
	//
	// When creating or updating an IP access list:
	//
	// * For all allow lists and block lists combined, the API supports a
	// maximum of 1000 IP/CIDR values, where one CIDR counts as a single value.
	// Attempts to exceed that number return error 400 with `error_code` value
	// `QUOTA_EXCEEDED`. * If the new list would block the calling user's
	// current IP, error 400 is returned with `error_code` value
	// `INVALID_STATE`.
	//
	// It can take a few minutes for the changes to take effect. **Note**: Your
	// new IP access list has no effect until you enable the feature. See
	// :method:workspaceconf/setStatus
	Create(ctx context.Context, request CreateIpAccessList) (*CreateIpAccessListResponse, error)

	// Delete access list.
	//
	// Deletes an IP access list, specified by its list ID.
	Delete(ctx context.Context, request DeleteIpAccessListRequest) error

	// Get access list.
	//
	// Gets an IP access list, specified by its list ID.
	Get(ctx context.Context, request GetIpAccessListRequest) (*FetchIpAccessListResponse, error)

	// Get access lists.
	//
	// Gets all IP access lists for the specified workspace.
	//
	// Use ListAll() to get all IpAccessListInfo instances
	List(ctx context.Context) (*ListIpAccessListResponse, error)

	// Replace access list.
	//
	// Replaces an IP access list, specified by its ID.
	//
	// A list can include allow lists and block lists. See the top of this file
	// for a description of how the server treats allow lists and block lists at
	// run time. When replacing an IP access list: * For all allow lists and
	// block lists combined, the API supports a maximum of 1000 IP/CIDR values,
	// where one CIDR counts as a single value. Attempts to exceed that number
	// return error 400 with `error_code` value `QUOTA_EXCEEDED`. * If the
	// resulting list would block the calling user's current IP, error 400 is
	// returned with `error_code` value `INVALID_STATE`. It can take a few
	// minutes for the changes to take effect. Note that your resulting IP
	// access list has no effect until you enable the feature. See
	// :method:workspaceconf/setStatus.
	Replace(ctx context.Context, request ReplaceIpAccessList) error

	// Update access list.
	//
	// Updates an existing IP access list, specified by its ID.
	//
	// A list can include allow lists and block lists. See the top of this file
	// for a description of how the server treats allow lists and block lists at
	// run time.
	//
	// When updating an IP access list:
	//
	// * For all allow lists and block lists combined, the API supports a
	// maximum of 1000 IP/CIDR values, where one CIDR counts as a single value.
	// Attempts to exceed that number return error 400 with `error_code` value
	// `QUOTA_EXCEEDED`. * If the updated list would block the calling user's
	// current IP, error 400 is returned with `error_code` value
	// `INVALID_STATE`.
	//
	// It can take a few minutes for the changes to take effect. Note that your
	// resulting IP access list has no effect until you enable the feature. See
	// :method:workspaceconf/setStatus.
	Update(ctx context.Context, request UpdateIpAccessList) error
}

IP Access List enables admins to configure IP access lists.

IP access lists affect web application access and REST API access to this workspace only. If the feature is disabled for a workspace, all access is allowed for this workspace. There is support for allow lists (inclusion) and block lists (exclusion).

When a connection is attempted: 1. **First, all block lists are checked.** If the connection IP address matches any block list, the connection is rejected. 2. **If the connection was not rejected by block lists**, the IP address is compared with the allow lists.

If there is at least one allow list for the workspace, the connection is allowed only if the IP address matches an allow list. If there are no allow lists for the workspace, all IP addresses are allowed.

For all allow lists and block lists combined, the workspace supports a maximum of 1000 IP/CIDR values, where one CIDR counts as a single value.

After changes to the IP access list feature, it can take a few minutes for changes to take effect.

type ListIpAccessListResponse added in v0.23.0

type ListIpAccessListResponse struct {
	IpAccessLists []IpAccessListInfo `json:"ip_access_lists,omitempty"`
}

IP access lists were successfully returned.

type ListNccAzurePrivateEndpointRulesResponse added in v0.26.0

type ListNccAzurePrivateEndpointRulesResponse struct {
	Items []NccAzurePrivateEndpointRule `json:"items,omitempty"`
	// A token that can be used to get the next page of results. If null, there
	// are no more results to show.
	NextPageToken string `json:"next_page_token,omitempty"`

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

func (ListNccAzurePrivateEndpointRulesResponse) MarshalJSON added in v0.26.0

func (*ListNccAzurePrivateEndpointRulesResponse) UnmarshalJSON added in v0.26.0

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

type ListNetworkConnectivityConfigurationsRequest added in v0.26.0

type ListNetworkConnectivityConfigurationsRequest struct {
	// Pagination token to go to next page based on previous query.
	PageToken string `json:"-" url:"page_token,omitempty"`

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

List network connectivity configurations

func (ListNetworkConnectivityConfigurationsRequest) MarshalJSON added in v0.26.0

func (*ListNetworkConnectivityConfigurationsRequest) UnmarshalJSON added in v0.26.0

type ListNetworkConnectivityConfigurationsResponse added in v0.26.0

type ListNetworkConnectivityConfigurationsResponse struct {
	Items []NetworkConnectivityConfiguration `json:"items,omitempty"`
	// A token that can be used to get the next page of results. If null, there
	// are no more results to show.
	NextPageToken string `json:"next_page_token,omitempty"`

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

func (ListNetworkConnectivityConfigurationsResponse) MarshalJSON added in v0.26.0

func (*ListNetworkConnectivityConfigurationsResponse) UnmarshalJSON added in v0.26.0

type ListNotificationDestinationsRequest added in v0.44.0

type ListNotificationDestinationsRequest struct {
	PageSize int64 `json:"-" url:"page_size,omitempty"`

	PageToken string `json:"-" url:"page_token,omitempty"`

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

List notification destinations

func (ListNotificationDestinationsRequest) MarshalJSON added in v0.44.0

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

func (*ListNotificationDestinationsRequest) UnmarshalJSON added in v0.44.0

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

type ListNotificationDestinationsResponse added in v0.44.0

type ListNotificationDestinationsResponse struct {
	// Page token for next of results.
	NextPageToken string `json:"next_page_token,omitempty"`

	Results []ListNotificationDestinationsResult `json:"results,omitempty"`

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

func (ListNotificationDestinationsResponse) MarshalJSON added in v0.44.0

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

func (*ListNotificationDestinationsResponse) UnmarshalJSON added in v0.44.0

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

type ListNotificationDestinationsResult added in v0.44.0

type ListNotificationDestinationsResult struct {
	// [Output-only] The type of the notification destination. The type can not
	// be changed once set.
	DestinationType DestinationType `json:"destination_type,omitempty"`
	// The display name for the notification destination.
	DisplayName string `json:"display_name,omitempty"`
	// UUID identifying notification destination.
	Id string `json:"id,omitempty"`

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

func (ListNotificationDestinationsResult) MarshalJSON added in v0.44.0

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

func (*ListNotificationDestinationsResult) UnmarshalJSON added in v0.44.0

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

type ListPrivateEndpointRulesRequest added in v0.26.0

type ListPrivateEndpointRulesRequest struct {
	// Your Network Connectvity Configuration ID.
	NetworkConnectivityConfigId string `json:"-" url:"-"`
	// Pagination token to go to next page based on previous query.
	PageToken string `json:"-" url:"page_token,omitempty"`

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

List private endpoint rules

func (ListPrivateEndpointRulesRequest) MarshalJSON added in v0.26.0

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

func (*ListPrivateEndpointRulesRequest) UnmarshalJSON added in v0.26.0

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

type ListPublicTokensResponse added in v0.29.0

type ListPublicTokensResponse struct {
	// The information for each token.
	TokenInfos []PublicTokenInfo `json:"token_infos,omitempty"`
}

type ListTokenManagementRequest

type ListTokenManagementRequest struct {
	// User ID of the user that created the token.
	CreatedById int64 `json:"-" url:"created_by_id,omitempty"`
	// Username of the user that created the token.
	CreatedByUsername string `json:"-" url:"created_by_username,omitempty"`

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

List all tokens

func (ListTokenManagementRequest) MarshalJSON added in v0.23.0

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

func (*ListTokenManagementRequest) UnmarshalJSON added in v0.23.0

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

type ListTokensResponse

type ListTokensResponse struct {
	// Token metadata of each user-created token in the workspace
	TokenInfos []TokenInfo `json:"token_infos,omitempty"`
}

Tokens were successfully returned.

type ListType

type ListType string

Type of IP access list. Valid values are as follows and are case-sensitive:

* `ALLOW`: An allow list. Include this IP or range. * `BLOCK`: A block list. Exclude this IP or range. IP addresses in the block list are excluded even if they are included in an allow list.

const ListTypeAllow ListType = `ALLOW`

An allow list. Include this IP or range.

const ListTypeBlock ListType = `BLOCK`

A block list. Exclude this IP or range. IP addresses in the block list are excluded even if they are included in an allow list.

func (*ListType) Set

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

Set raw string value and validate it against allowed values

func (*ListType) String

func (f *ListType) String() string

String representation for fmt.Print

func (*ListType) Type

func (f *ListType) Type() string

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

type MicrosoftTeamsConfig added in v0.44.0

type MicrosoftTeamsConfig struct {
	// [Input-Only] URL for Microsoft Teams.
	Url string `json:"url,omitempty"`
	// [Output-Only] Whether URL is set.
	UrlSet bool `json:"url_set,omitempty"`

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

func (MicrosoftTeamsConfig) MarshalJSON added in v0.44.0

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

func (*MicrosoftTeamsConfig) UnmarshalJSON added in v0.44.0

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

type NccAwsStableIpRule added in v0.34.0

type NccAwsStableIpRule struct {
	// The list of stable IP CIDR blocks from which Databricks network traffic
	// originates when accessing your resources.
	CidrBlocks []string `json:"cidr_blocks,omitempty"`
}

The stable AWS IP CIDR blocks. You can use these to configure the firewall of your resources to allow traffic from your Databricks workspace.

type NccAzurePrivateEndpointRule added in v0.25.0

type NccAzurePrivateEndpointRule struct {
	// The current status of this private endpoint. The private endpoint rules
	// are effective only if the connection state is `ESTABLISHED`. Remember
	// that you must approve new endpoints on your resources in the Azure portal
	// before they take effect.
	//
	// The possible values are: - INIT: (deprecated) The endpoint has been
	// created and pending approval. - PENDING: The endpoint has been created
	// and pending approval. - ESTABLISHED: The endpoint has been approved and
	// is ready to use in your serverless compute resources. - REJECTED:
	// Connection was rejected by the private link resource owner. -
	// DISCONNECTED: Connection was removed by the private link resource owner,
	// the private endpoint becomes informative and should be deleted for
	// clean-up.
	ConnectionState NccAzurePrivateEndpointRuleConnectionState `json:"connection_state,omitempty"`
	// Time in epoch milliseconds when this object was created.
	CreationTime int64 `json:"creation_time,omitempty"`
	// Whether this private endpoint is deactivated.
	Deactivated bool `json:"deactivated,omitempty"`
	// Time in epoch milliseconds when this object was deactivated.
	DeactivatedAt int64 `json:"deactivated_at,omitempty"`
	// The name of the Azure private endpoint resource.
	EndpointName string `json:"endpoint_name,omitempty"`
	// The sub-resource type (group ID) of the target resource. Note that to
	// connect to workspace root storage (root DBFS), you need two endpoints,
	// one for `blob` and one for `dfs`.
	GroupId NccAzurePrivateEndpointRuleGroupId `json:"group_id,omitempty"`
	// The ID of a network connectivity configuration, which is the parent
	// resource of this private endpoint rule object.
	NetworkConnectivityConfigId string `json:"network_connectivity_config_id,omitempty"`
	// The Azure resource ID of the target resource.
	ResourceId string `json:"resource_id,omitempty"`
	// The ID of a private endpoint rule.
	RuleId string `json:"rule_id,omitempty"`
	// Time in epoch milliseconds when this object was updated.
	UpdatedTime int64 `json:"updated_time,omitempty"`

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

func (NccAzurePrivateEndpointRule) MarshalJSON added in v0.25.0

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

func (*NccAzurePrivateEndpointRule) UnmarshalJSON added in v0.25.0

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

type NccAzurePrivateEndpointRuleConnectionState added in v0.25.0

type NccAzurePrivateEndpointRuleConnectionState string

The current status of this private endpoint. The private endpoint rules are effective only if the connection state is `ESTABLISHED`. Remember that you must approve new endpoints on your resources in the Azure portal before they take effect.

The possible values are: - INIT: (deprecated) The endpoint has been created and pending approval. - PENDING: The endpoint has been created and pending approval. - ESTABLISHED: The endpoint has been approved and is ready to use in your serverless compute resources. - REJECTED: Connection was rejected by the private link resource owner. - DISCONNECTED: Connection was removed by the private link resource owner, the private endpoint becomes informative and should be deleted for clean-up.

const NccAzurePrivateEndpointRuleConnectionStateDisconnected NccAzurePrivateEndpointRuleConnectionState = `DISCONNECTED`
const NccAzurePrivateEndpointRuleConnectionStateEstablished NccAzurePrivateEndpointRuleConnectionState = `ESTABLISHED`
const NccAzurePrivateEndpointRuleConnectionStateInit NccAzurePrivateEndpointRuleConnectionState = `INIT`
const NccAzurePrivateEndpointRuleConnectionStatePending NccAzurePrivateEndpointRuleConnectionState = `PENDING`
const NccAzurePrivateEndpointRuleConnectionStateRejected NccAzurePrivateEndpointRuleConnectionState = `REJECTED`

func (*NccAzurePrivateEndpointRuleConnectionState) Set added in v0.25.0

Set raw string value and validate it against allowed values

func (*NccAzurePrivateEndpointRuleConnectionState) String added in v0.25.0

String representation for fmt.Print

func (*NccAzurePrivateEndpointRuleConnectionState) Type added in v0.25.0

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

type NccAzurePrivateEndpointRuleGroupId added in v0.25.0

type NccAzurePrivateEndpointRuleGroupId string

The sub-resource type (group ID) of the target resource. Note that to connect to workspace root storage (root DBFS), you need two endpoints, one for `blob` and one for `dfs`.

const NccAzurePrivateEndpointRuleGroupIdBlob NccAzurePrivateEndpointRuleGroupId = `blob`
const NccAzurePrivateEndpointRuleGroupIdDfs NccAzurePrivateEndpointRuleGroupId = `dfs`
const NccAzurePrivateEndpointRuleGroupIdMysqlServer NccAzurePrivateEndpointRuleGroupId = `mysqlServer`
const NccAzurePrivateEndpointRuleGroupIdSqlServer NccAzurePrivateEndpointRuleGroupId = `sqlServer`

func (*NccAzurePrivateEndpointRuleGroupId) Set added in v0.25.0

Set raw string value and validate it against allowed values

func (*NccAzurePrivateEndpointRuleGroupId) String added in v0.25.0

String representation for fmt.Print

func (*NccAzurePrivateEndpointRuleGroupId) Type added in v0.25.0

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

type NccAzureServiceEndpointRule added in v0.25.0

type NccAzureServiceEndpointRule struct {
	// The list of subnets from which Databricks network traffic originates when
	// accessing your Azure resources.
	Subnets []string `json:"subnets,omitempty"`
	// The Azure region in which this service endpoint rule applies.
	TargetRegion string `json:"target_region,omitempty"`
	// The Azure services to which this service endpoint rule applies to.
	TargetServices []string `json:"target_services,omitempty"`

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

The stable Azure service endpoints. You can configure the firewall of your Azure resources to allow traffic from your Databricks serverless compute resources.

func (NccAzureServiceEndpointRule) MarshalJSON added in v0.25.0

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

func (*NccAzureServiceEndpointRule) UnmarshalJSON added in v0.25.0

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

type NccEgressConfig added in v0.25.0

type NccEgressConfig struct {
	// The network connectivity rules that are applied by default without
	// resource specific configurations. You can find the stable network
	// information of your serverless compute resources here.
	DefaultRules *NccEgressDefaultRules `json:"default_rules,omitempty"`
	// The network connectivity rules that configured for each destinations.
	// These rules override default rules.
	TargetRules *NccEgressTargetRules `json:"target_rules,omitempty"`
}

The network connectivity rules that apply to network traffic from your serverless compute resources.

type NccEgressDefaultRules added in v0.25.0

type NccEgressDefaultRules struct {
	// The stable AWS IP CIDR blocks. You can use these to configure the
	// firewall of your resources to allow traffic from your Databricks
	// workspace.
	AwsStableIpRule *NccAwsStableIpRule `json:"aws_stable_ip_rule,omitempty"`
	// The stable Azure service endpoints. You can configure the firewall of
	// your Azure resources to allow traffic from your Databricks serverless
	// compute resources.
	AzureServiceEndpointRule *NccAzureServiceEndpointRule `json:"azure_service_endpoint_rule,omitempty"`
}

The network connectivity rules that are applied by default without resource specific configurations. You can find the stable network information of your serverless compute resources here.

type NccEgressTargetRules added in v0.25.0

type NccEgressTargetRules struct {
	AzurePrivateEndpointRules []NccAzurePrivateEndpointRule `json:"azure_private_endpoint_rules,omitempty"`
}

The network connectivity rules that configured for each destinations. These rules override default rules.

type NetworkConnectivityAPI added in v0.25.0

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

These APIs provide configurations for the network connectivity of your workspaces for serverless compute resources.

func NewNetworkConnectivity added in v0.25.0

func NewNetworkConnectivity(client *client.DatabricksClient) *NetworkConnectivityAPI

func (*NetworkConnectivityAPI) CreateNetworkConnectivityConfiguration added in v0.25.0

func (a *NetworkConnectivityAPI) CreateNetworkConnectivityConfiguration(ctx context.Context, request CreateNetworkConnectivityConfigRequest) (*NetworkConnectivityConfiguration, error)

func (*NetworkConnectivityAPI) CreatePrivateEndpointRule added in v0.25.0

func (a *NetworkConnectivityAPI) CreatePrivateEndpointRule(ctx context.Context, request CreatePrivateEndpointRuleRequest) (*NccAzurePrivateEndpointRule, error)

func (*NetworkConnectivityAPI) DeleteNetworkConnectivityConfiguration added in v0.25.0

func (a *NetworkConnectivityAPI) DeleteNetworkConnectivityConfiguration(ctx context.Context, request DeleteNetworkConnectivityConfigurationRequest) error

func (*NetworkConnectivityAPI) DeleteNetworkConnectivityConfigurationByNetworkConnectivityConfigId added in v0.25.0

func (a *NetworkConnectivityAPI) DeleteNetworkConnectivityConfigurationByNetworkConnectivityConfigId(ctx context.Context, networkConnectivityConfigId string) error

Delete a network connectivity configuration.

Deletes a network connectivity configuration.

func (*NetworkConnectivityAPI) DeletePrivateEndpointRule added in v0.25.0

func (a *NetworkConnectivityAPI) DeletePrivateEndpointRule(ctx context.Context, request DeletePrivateEndpointRuleRequest) (*NccAzurePrivateEndpointRule, error)

func (*NetworkConnectivityAPI) DeletePrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId added in v0.25.0

func (a *NetworkConnectivityAPI) DeletePrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId(ctx context.Context, networkConnectivityConfigId string, privateEndpointRuleId string) (*NccAzurePrivateEndpointRule, error)

Delete a private endpoint rule.

Initiates deleting a private endpoint rule. If the connection state is PENDING or EXPIRED, the private endpoint is immediately deleted. Otherwise, the private endpoint is deactivated and will be deleted after seven days of deactivation. When a private endpoint is deactivated, the `deactivated` field is set to `true` and the private endpoint is not available to your serverless compute resources.

func (*NetworkConnectivityAPI) GetNetworkConnectivityConfiguration added in v0.25.0

func (a *NetworkConnectivityAPI) GetNetworkConnectivityConfiguration(ctx context.Context, request GetNetworkConnectivityConfigurationRequest) (*NetworkConnectivityConfiguration, error)

func (*NetworkConnectivityAPI) GetNetworkConnectivityConfigurationByNetworkConnectivityConfigId added in v0.25.0

func (a *NetworkConnectivityAPI) GetNetworkConnectivityConfigurationByNetworkConnectivityConfigId(ctx context.Context, networkConnectivityConfigId string) (*NetworkConnectivityConfiguration, error)

Get a network connectivity configuration.

Gets a network connectivity configuration.

func (*NetworkConnectivityAPI) GetPrivateEndpointRule added in v0.25.0

func (a *NetworkConnectivityAPI) GetPrivateEndpointRule(ctx context.Context, request GetPrivateEndpointRuleRequest) (*NccAzurePrivateEndpointRule, error)

func (*NetworkConnectivityAPI) GetPrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId added in v0.25.0

func (a *NetworkConnectivityAPI) GetPrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId(ctx context.Context, networkConnectivityConfigId string, privateEndpointRuleId string) (*NccAzurePrivateEndpointRule, error)

Get a private endpoint rule.

Gets the private endpoint rule.

func (*NetworkConnectivityAPI) ListNetworkConnectivityConfigurations added in v0.26.0

List network connectivity configurations.

Gets an array of network connectivity configurations.

This method is generated by Databricks SDK Code Generator.

func (*NetworkConnectivityAPI) ListNetworkConnectivityConfigurationsAll added in v0.26.0

List network connectivity configurations.

Gets an array of network connectivity configurations.

This method is generated by Databricks SDK Code Generator.

func (*NetworkConnectivityAPI) ListPrivateEndpointRules added in v0.26.0

List private endpoint rules.

Gets an array of private endpoint rules.

This method is generated by Databricks SDK Code Generator.

func (*NetworkConnectivityAPI) ListPrivateEndpointRulesAll added in v0.26.0

List private endpoint rules.

Gets an array of private endpoint rules.

This method is generated by Databricks SDK Code Generator.

func (*NetworkConnectivityAPI) ListPrivateEndpointRulesByNetworkConnectivityConfigId added in v0.26.0

func (a *NetworkConnectivityAPI) ListPrivateEndpointRulesByNetworkConnectivityConfigId(ctx context.Context, networkConnectivityConfigId string) (*ListNccAzurePrivateEndpointRulesResponse, error)

List private endpoint rules.

Gets an array of private endpoint rules.

type NetworkConnectivityConfiguration added in v0.25.0

type NetworkConnectivityConfiguration struct {
	// The Databricks account ID that hosts the credential.
	AccountId string `json:"account_id,omitempty"`
	// Time in epoch milliseconds when this object was created.
	CreationTime int64 `json:"creation_time,omitempty"`
	// The network connectivity rules that apply to network traffic from your
	// serverless compute resources.
	EgressConfig *NccEgressConfig `json:"egress_config,omitempty"`
	// The name of the network connectivity configuration. The name can contain
	// alphanumeric characters, hyphens, and underscores. The length must be
	// between 3 and 30 characters. The name must match the regular expression
	// `^[0-9a-zA-Z-_]{3,30}$`.
	Name string `json:"name,omitempty"`
	// Databricks network connectivity configuration ID.
	NetworkConnectivityConfigId string `json:"network_connectivity_config_id,omitempty"`
	// The region for the network connectivity configuration. Only workspaces in
	// the same region can be attached to the network connectivity
	// configuration.
	Region string `json:"region,omitempty"`
	// Time in epoch milliseconds when this object was updated.
	UpdatedTime int64 `json:"updated_time,omitempty"`

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

func (NetworkConnectivityConfiguration) MarshalJSON added in v0.25.0

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

func (*NetworkConnectivityConfiguration) UnmarshalJSON added in v0.25.0

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

type NetworkConnectivityInterface added in v0.29.0

type NetworkConnectivityInterface interface {

	// Create a network connectivity configuration.
	CreateNetworkConnectivityConfiguration(ctx context.Context, request CreateNetworkConnectivityConfigRequest) (*NetworkConnectivityConfiguration, error)

	// Create a private endpoint rule.
	//
	// Create a private endpoint rule for the specified network connectivity config
	// object. Once the object is created, Databricks asynchronously provisions a
	// new Azure private endpoint to your specified Azure resource.
	//
	// **IMPORTANT**: You must use Azure portal or other Azure tools to approve the
	// private endpoint to complete the connection. To get the information of the
	// private endpoint created, make a `GET` request on the new private endpoint
	// rule. See [serverless private link].
	//
	// [serverless private link]: https://learn.microsoft.com/azure/databricks/security/network/serverless-network-security/serverless-private-link
	CreatePrivateEndpointRule(ctx context.Context, request CreatePrivateEndpointRuleRequest) (*NccAzurePrivateEndpointRule, error)

	// Delete a network connectivity configuration.
	//
	// Deletes a network connectivity configuration.
	DeleteNetworkConnectivityConfiguration(ctx context.Context, request DeleteNetworkConnectivityConfigurationRequest) error

	// Delete a network connectivity configuration.
	//
	// Deletes a network connectivity configuration.
	DeleteNetworkConnectivityConfigurationByNetworkConnectivityConfigId(ctx context.Context, networkConnectivityConfigId string) error

	// Delete a private endpoint rule.
	//
	// Initiates deleting a private endpoint rule. If the connection state is
	// PENDING or EXPIRED, the private endpoint is immediately deleted. Otherwise,
	// the private endpoint is deactivated and will be deleted after seven days of
	// deactivation. When a private endpoint is deactivated, the `deactivated` field
	// is set to `true` and the private endpoint is not available to your serverless
	// compute resources.
	DeletePrivateEndpointRule(ctx context.Context, request DeletePrivateEndpointRuleRequest) (*NccAzurePrivateEndpointRule, error)

	// Delete a private endpoint rule.
	//
	// Initiates deleting a private endpoint rule. If the connection state is
	// PENDING or EXPIRED, the private endpoint is immediately deleted. Otherwise,
	// the private endpoint is deactivated and will be deleted after seven days of
	// deactivation. When a private endpoint is deactivated, the `deactivated` field
	// is set to `true` and the private endpoint is not available to your serverless
	// compute resources.
	DeletePrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId(ctx context.Context, networkConnectivityConfigId string, privateEndpointRuleId string) (*NccAzurePrivateEndpointRule, error)

	// Get a network connectivity configuration.
	//
	// Gets a network connectivity configuration.
	GetNetworkConnectivityConfiguration(ctx context.Context, request GetNetworkConnectivityConfigurationRequest) (*NetworkConnectivityConfiguration, error)

	// Get a network connectivity configuration.
	//
	// Gets a network connectivity configuration.
	GetNetworkConnectivityConfigurationByNetworkConnectivityConfigId(ctx context.Context, networkConnectivityConfigId string) (*NetworkConnectivityConfiguration, error)

	// Get a private endpoint rule.
	//
	// Gets the private endpoint rule.
	GetPrivateEndpointRule(ctx context.Context, request GetPrivateEndpointRuleRequest) (*NccAzurePrivateEndpointRule, error)

	// Get a private endpoint rule.
	//
	// Gets the private endpoint rule.
	GetPrivateEndpointRuleByNetworkConnectivityConfigIdAndPrivateEndpointRuleId(ctx context.Context, networkConnectivityConfigId string, privateEndpointRuleId string) (*NccAzurePrivateEndpointRule, error)

	// List network connectivity configurations.
	//
	// Gets an array of network connectivity configurations.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListNetworkConnectivityConfigurations(ctx context.Context, request ListNetworkConnectivityConfigurationsRequest) listing.Iterator[NetworkConnectivityConfiguration]

	// List network connectivity configurations.
	//
	// Gets an array of network connectivity configurations.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListNetworkConnectivityConfigurationsAll(ctx context.Context, request ListNetworkConnectivityConfigurationsRequest) ([]NetworkConnectivityConfiguration, error)

	// List private endpoint rules.
	//
	// Gets an array of private endpoint rules.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListPrivateEndpointRules(ctx context.Context, request ListPrivateEndpointRulesRequest) listing.Iterator[NccAzurePrivateEndpointRule]

	// List private endpoint rules.
	//
	// Gets an array of private endpoint rules.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListPrivateEndpointRulesAll(ctx context.Context, request ListPrivateEndpointRulesRequest) ([]NccAzurePrivateEndpointRule, error)

	// List private endpoint rules.
	//
	// Gets an array of private endpoint rules.
	ListPrivateEndpointRulesByNetworkConnectivityConfigId(ctx context.Context, networkConnectivityConfigId string) (*ListNccAzurePrivateEndpointRulesResponse, error)
}

type NetworkConnectivityService added in v0.25.0

type NetworkConnectivityService interface {

	// Create a network connectivity configuration.
	CreateNetworkConnectivityConfiguration(ctx context.Context, request CreateNetworkConnectivityConfigRequest) (*NetworkConnectivityConfiguration, error)

	// Create a private endpoint rule.
	//
	// Create a private endpoint rule for the specified network connectivity
	// config object. Once the object is created, Databricks asynchronously
	// provisions a new Azure private endpoint to your specified Azure resource.
	//
	// **IMPORTANT**: You must use Azure portal or other Azure tools to approve
	// the private endpoint to complete the connection. To get the information
	// of the private endpoint created, make a `GET` request on the new private
	// endpoint rule. See [serverless private link].
	//
	// [serverless private link]: https://learn.microsoft.com/azure/databricks/security/network/serverless-network-security/serverless-private-link
	CreatePrivateEndpointRule(ctx context.Context, request CreatePrivateEndpointRuleRequest) (*NccAzurePrivateEndpointRule, error)

	// Delete a network connectivity configuration.
	//
	// Deletes a network connectivity configuration.
	DeleteNetworkConnectivityConfiguration(ctx context.Context, request DeleteNetworkConnectivityConfigurationRequest) error

	// Delete a private endpoint rule.
	//
	// Initiates deleting a private endpoint rule. If the connection state is
	// PENDING or EXPIRED, the private endpoint is immediately deleted.
	// Otherwise, the private endpoint is deactivated and will be deleted after
	// seven days of deactivation. When a private endpoint is deactivated, the
	// `deactivated` field is set to `true` and the private endpoint is not
	// available to your serverless compute resources.
	DeletePrivateEndpointRule(ctx context.Context, request DeletePrivateEndpointRuleRequest) (*NccAzurePrivateEndpointRule, error)

	// Get a network connectivity configuration.
	//
	// Gets a network connectivity configuration.
	GetNetworkConnectivityConfiguration(ctx context.Context, request GetNetworkConnectivityConfigurationRequest) (*NetworkConnectivityConfiguration, error)

	// Get a private endpoint rule.
	//
	// Gets the private endpoint rule.
	GetPrivateEndpointRule(ctx context.Context, request GetPrivateEndpointRuleRequest) (*NccAzurePrivateEndpointRule, error)

	// List network connectivity configurations.
	//
	// Gets an array of network connectivity configurations.
	//
	// Use ListNetworkConnectivityConfigurationsAll() to get all NetworkConnectivityConfiguration instances, which will iterate over every result page.
	ListNetworkConnectivityConfigurations(ctx context.Context, request ListNetworkConnectivityConfigurationsRequest) (*ListNetworkConnectivityConfigurationsResponse, error)

	// List private endpoint rules.
	//
	// Gets an array of private endpoint rules.
	//
	// Use ListPrivateEndpointRulesAll() to get all NccAzurePrivateEndpointRule instances, which will iterate over every result page.
	ListPrivateEndpointRules(ctx context.Context, request ListPrivateEndpointRulesRequest) (*ListNccAzurePrivateEndpointRulesResponse, error)
}

These APIs provide configurations for the network connectivity of your workspaces for serverless compute resources.

type NotificationDestination added in v0.44.0

type NotificationDestination struct {
	// The configuration for the notification destination. Will be exactly one
	// of the nested configs. Only returns for users with workspace admin
	// permissions.
	Config *Config `json:"config,omitempty"`
	// [Output-only] The type of the notification destination. The type can not
	// be changed once set.
	DestinationType DestinationType `json:"destination_type,omitempty"`
	// The display name for the notification destination.
	DisplayName string `json:"display_name,omitempty"`
	// UUID identifying notification destination.
	Id string `json:"id,omitempty"`

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

func (NotificationDestination) MarshalJSON added in v0.44.0

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

func (*NotificationDestination) UnmarshalJSON added in v0.44.0

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

type NotificationDestinationsAPI added in v0.44.0

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

The notification destinations API lets you programmatically manage a workspace's notification destinations. Notification destinations are used to send notifications for query alerts and jobs to destinations outside of Databricks. Only workspace admins can create, update, and delete notification destinations.

func NewNotificationDestinations added in v0.44.0

func NewNotificationDestinations(client *client.DatabricksClient) *NotificationDestinationsAPI

func (*NotificationDestinationsAPI) Create added in v0.44.0

func (a *NotificationDestinationsAPI) Create(ctx context.Context, request CreateNotificationDestinationRequest) (*NotificationDestination, error)

func (*NotificationDestinationsAPI) Delete added in v0.44.0

func (a *NotificationDestinationsAPI) Delete(ctx context.Context, request DeleteNotificationDestinationRequest) error

func (*NotificationDestinationsAPI) DeleteById added in v0.44.0

func (a *NotificationDestinationsAPI) DeleteById(ctx context.Context, id string) error

Delete a notification destination.

Deletes a notification destination. Requires workspace admin permissions.

func (*NotificationDestinationsAPI) Get added in v0.44.0

func (a *NotificationDestinationsAPI) Get(ctx context.Context, request GetNotificationDestinationRequest) (*NotificationDestination, error)

func (*NotificationDestinationsAPI) GetById added in v0.44.0

Get a notification destination.

Gets a notification destination.

func (*NotificationDestinationsAPI) List added in v0.44.0

List notification destinations.

Lists notification destinations.

This method is generated by Databricks SDK Code Generator.

func (*NotificationDestinationsAPI) ListAll added in v0.44.0

List notification destinations.

Lists notification destinations.

This method is generated by Databricks SDK Code Generator.

func (*NotificationDestinationsAPI) Update added in v0.44.0

func (a *NotificationDestinationsAPI) Update(ctx context.Context, request UpdateNotificationDestinationRequest) (*NotificationDestination, error)

type NotificationDestinationsInterface added in v0.44.0

type NotificationDestinationsInterface interface {

	// Create a notification destination.
	//
	// Creates a notification destination. Requires workspace admin permissions.
	Create(ctx context.Context, request CreateNotificationDestinationRequest) (*NotificationDestination, error)

	// Delete a notification destination.
	//
	// Deletes a notification destination. Requires workspace admin permissions.
	Delete(ctx context.Context, request DeleteNotificationDestinationRequest) error

	// Delete a notification destination.
	//
	// Deletes a notification destination. Requires workspace admin permissions.
	DeleteById(ctx context.Context, id string) error

	// Get a notification destination.
	//
	// Gets a notification destination.
	Get(ctx context.Context, request GetNotificationDestinationRequest) (*NotificationDestination, error)

	// Get a notification destination.
	//
	// Gets a notification destination.
	GetById(ctx context.Context, id string) (*NotificationDestination, error)

	// List notification destinations.
	//
	// Lists notification destinations.
	//
	// This method is generated by Databricks SDK Code Generator.
	List(ctx context.Context, request ListNotificationDestinationsRequest) listing.Iterator[ListNotificationDestinationsResult]

	// List notification destinations.
	//
	// Lists notification destinations.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListAll(ctx context.Context, request ListNotificationDestinationsRequest) ([]ListNotificationDestinationsResult, error)

	// Update a notification destination.
	//
	// Updates a notification destination. Requires workspace admin permissions. At
	// least one field is required in the request body.
	Update(ctx context.Context, request UpdateNotificationDestinationRequest) (*NotificationDestination, error)
}

type NotificationDestinationsService added in v0.44.0

type NotificationDestinationsService interface {

	// Create a notification destination.
	//
	// Creates a notification destination. Requires workspace admin permissions.
	Create(ctx context.Context, request CreateNotificationDestinationRequest) (*NotificationDestination, error)

	// Delete a notification destination.
	//
	// Deletes a notification destination. Requires workspace admin permissions.
	Delete(ctx context.Context, request DeleteNotificationDestinationRequest) error

	// Get a notification destination.
	//
	// Gets a notification destination.
	Get(ctx context.Context, request GetNotificationDestinationRequest) (*NotificationDestination, error)

	// List notification destinations.
	//
	// Lists notification destinations.
	//
	// Use ListAll() to get all ListNotificationDestinationsResult instances, which will iterate over every result page.
	List(ctx context.Context, request ListNotificationDestinationsRequest) (*ListNotificationDestinationsResponse, error)

	// Update a notification destination.
	//
	// Updates a notification destination. Requires workspace admin permissions.
	// At least one field is required in the request body.
	Update(ctx context.Context, request UpdateNotificationDestinationRequest) (*NotificationDestination, error)
}

The notification destinations API lets you programmatically manage a workspace's notification destinations. Notification destinations are used to send notifications for query alerts and jobs to destinations outside of Databricks. Only workspace admins can create, update, and delete notification destinations.

type PagerdutyConfig added in v0.44.0

type PagerdutyConfig struct {
	// [Input-Only] Integration key for PagerDuty.
	IntegrationKey string `json:"integration_key,omitempty"`
	// [Output-Only] Whether integration key is set.
	IntegrationKeySet bool `json:"integration_key_set,omitempty"`

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

func (PagerdutyConfig) MarshalJSON added in v0.44.0

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

func (*PagerdutyConfig) UnmarshalJSON added in v0.44.0

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

type PartitionId added in v0.21.0

type PartitionId struct {
	// The ID of the workspace.
	WorkspaceId int64 `json:"workspaceId,omitempty"`

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

Partition by workspace or account

func (PartitionId) MarshalJSON added in v0.23.0

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

func (*PartitionId) UnmarshalJSON added in v0.23.0

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

type PersonalComputeAPI added in v0.34.0

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

The Personal Compute enablement setting lets you control which users can use the Personal Compute default policy to create compute resources. By default all users in all workspaces have access (ON), but you can change the setting to instead let individual workspaces configure access control (DELEGATE).

There is only one instance of this setting per account. Since this setting has a default value, this setting is present on all accounts even though it's never set on a given account. Deletion reverts the value of the setting back to the default value.

func NewPersonalCompute added in v0.34.0

func NewPersonalCompute(client *client.DatabricksClient) *PersonalComputeAPI

func (*PersonalComputeAPI) Delete added in v0.34.0

func (a *PersonalComputeAPI) Delete(ctx context.Context, request DeletePersonalComputeSettingRequest) (*DeletePersonalComputeSettingResponse, error)

func (*PersonalComputeAPI) Get added in v0.34.0

func (a *PersonalComputeAPI) Get(ctx context.Context, request GetPersonalComputeSettingRequest) (*PersonalComputeSetting, error)

func (*PersonalComputeAPI) Update added in v0.34.0

func (a *PersonalComputeAPI) Update(ctx context.Context, request UpdatePersonalComputeSettingRequest) (*PersonalComputeSetting, error)

type PersonalComputeInterface added in v0.34.0

type PersonalComputeInterface interface {

	// Delete Personal Compute setting.
	//
	// Reverts back the Personal Compute setting value to default (ON)
	Delete(ctx context.Context, request DeletePersonalComputeSettingRequest) (*DeletePersonalComputeSettingResponse, error)

	// Get Personal Compute setting.
	//
	// Gets the value of the Personal Compute setting.
	Get(ctx context.Context, request GetPersonalComputeSettingRequest) (*PersonalComputeSetting, error)

	// Update Personal Compute setting.
	//
	// Updates the value of the Personal Compute setting.
	Update(ctx context.Context, request UpdatePersonalComputeSettingRequest) (*PersonalComputeSetting, error)
}

type PersonalComputeMessage added in v0.10.0

type PersonalComputeMessage struct {
	// ON: Grants all users in all workspaces access to the Personal Compute
	// default policy, allowing all users to create single-machine compute
	// resources. DELEGATE: Moves access control for the Personal Compute
	// default policy to individual workspaces and requires a workspace’s
	// users or groups to be added to the ACLs of that workspace’s Personal
	// Compute default policy before they will be able to create compute
	// resources through that policy.
	Value PersonalComputeMessageEnum `json:"value"`
}

type PersonalComputeMessageEnum added in v0.10.0

type PersonalComputeMessageEnum string

ON: Grants all users in all workspaces access to the Personal Compute default policy, allowing all users to create single-machine compute resources. DELEGATE: Moves access control for the Personal Compute default policy to individual workspaces and requires a workspace’s users or groups to be added to the ACLs of that workspace’s Personal Compute default policy before they will be able to create compute resources through that policy.

const PersonalComputeMessageEnumDelegate PersonalComputeMessageEnum = `DELEGATE`
const PersonalComputeMessageEnumOn PersonalComputeMessageEnum = `ON`

func (*PersonalComputeMessageEnum) Set added in v0.10.0

Set raw string value and validate it against allowed values

func (*PersonalComputeMessageEnum) String added in v0.10.0

func (f *PersonalComputeMessageEnum) String() string

String representation for fmt.Print

func (*PersonalComputeMessageEnum) Type added in v0.10.0

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

type PersonalComputeService added in v0.34.0

type PersonalComputeService interface {

	// Delete Personal Compute setting.
	//
	// Reverts back the Personal Compute setting value to default (ON)
	Delete(ctx context.Context, request DeletePersonalComputeSettingRequest) (*DeletePersonalComputeSettingResponse, error)

	// Get Personal Compute setting.
	//
	// Gets the value of the Personal Compute setting.
	Get(ctx context.Context, request GetPersonalComputeSettingRequest) (*PersonalComputeSetting, error)

	// Update Personal Compute setting.
	//
	// Updates the value of the Personal Compute setting.
	Update(ctx context.Context, request UpdatePersonalComputeSettingRequest) (*PersonalComputeSetting, error)
}

The Personal Compute enablement setting lets you control which users can use the Personal Compute default policy to create compute resources. By default all users in all workspaces have access (ON), but you can change the setting to instead let individual workspaces configure access control (DELEGATE).

There is only one instance of this setting per account. Since this setting has a default value, this setting is present on all accounts even though it's never set on a given account. Deletion reverts the value of the setting back to the default value.

type PersonalComputeSetting added in v0.11.0

type PersonalComputeSetting struct {
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// update pattern to perform setting updates in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// PATCH request to identify the setting version you are updating.
	Etag string `json:"etag,omitempty"`

	PersonalCompute PersonalComputeMessage `json:"personal_compute"`
	// Name of the corresponding setting. This field is populated in the
	// response, but it will not be respected even if it's set in the request
	// body. The setting name in the path parameter will be respected instead.
	// Setting name is required to be 'default' if the setting only has one
	// instance per workspace.
	SettingName string `json:"setting_name,omitempty"`

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

func (PersonalComputeSetting) MarshalJSON added in v0.23.0

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

func (*PersonalComputeSetting) UnmarshalJSON added in v0.23.0

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

type PublicTokenInfo

type PublicTokenInfo struct {
	// Comment the token was created with, if applicable.
	Comment string `json:"comment,omitempty"`
	// Server time (in epoch milliseconds) when the token was created.
	CreationTime int64 `json:"creation_time,omitempty"`
	// Server time (in epoch milliseconds) when the token will expire, or -1 if
	// not applicable.
	ExpiryTime int64 `json:"expiry_time,omitempty"`
	// The ID of this token.
	TokenId string `json:"token_id,omitempty"`

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

func (PublicTokenInfo) MarshalJSON added in v0.23.0

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

func (*PublicTokenInfo) UnmarshalJSON added in v0.23.0

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

type ReplaceIpAccessList

type ReplaceIpAccessList struct {
	// Specifies whether this IP access list is enabled.
	Enabled bool `json:"enabled"`
	// The ID for the corresponding IP access list
	IpAccessListId string `json:"-" url:"-"`

	IpAddresses []string `json:"ip_addresses,omitempty"`
	// Label for the IP access list. This **cannot** be empty.
	Label string `json:"label"`
	// Type of IP access list. Valid values are as follows and are
	// case-sensitive:
	//
	// * `ALLOW`: An allow list. Include this IP or range. * `BLOCK`: A block
	// list. Exclude this IP or range. IP addresses in the block list are
	// excluded even if they are included in an allow list.
	ListType ListType `json:"list_type"`
}

Details required to replace an IP access list.

type ReplaceResponse added in v0.34.0

type ReplaceResponse struct {
}

type RestrictWorkspaceAdminsAPI added in v0.34.0

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

The Restrict Workspace Admins setting lets you control the capabilities of workspace admins. With the setting status set to ALLOW_ALL, workspace admins can create service principal personal access tokens on behalf of any service principal in their workspace. Workspace admins can also change a job owner to any user in their workspace. And they can change the job run_as setting to any user in their workspace or to a service principal on which they have the Service Principal User role. With the setting status set to RESTRICT_TOKENS_AND_JOB_RUN_AS, workspace admins can only create personal access tokens on behalf of service principals they have the Service Principal User role on. They can also only change a job owner to themselves. And they can change the job run_as setting to themselves or to a service principal on which they have the Service Principal User role.

func NewRestrictWorkspaceAdmins added in v0.34.0

func NewRestrictWorkspaceAdmins(client *client.DatabricksClient) *RestrictWorkspaceAdminsAPI

func (*RestrictWorkspaceAdminsAPI) Delete added in v0.34.0

func (*RestrictWorkspaceAdminsAPI) Get added in v0.34.0

func (a *RestrictWorkspaceAdminsAPI) Get(ctx context.Context, request GetRestrictWorkspaceAdminsSettingRequest) (*RestrictWorkspaceAdminsSetting, error)

func (*RestrictWorkspaceAdminsAPI) Update added in v0.34.0

func (a *RestrictWorkspaceAdminsAPI) Update(ctx context.Context, request UpdateRestrictWorkspaceAdminsSettingRequest) (*RestrictWorkspaceAdminsSetting, error)

type RestrictWorkspaceAdminsInterface added in v0.34.0

type RestrictWorkspaceAdminsInterface interface {

	// Delete the restrict workspace admins setting.
	//
	// Reverts the restrict workspace admins setting status for the workspace. A
	// fresh etag needs to be provided in `DELETE` requests (as a query parameter).
	// The etag can be retrieved by making a `GET` request before the DELETE
	// request. If the setting is updated/deleted concurrently, `DELETE` fails with
	// 409 and the request must be retried by using the fresh etag in the 409
	// response.
	Delete(ctx context.Context, request DeleteRestrictWorkspaceAdminsSettingRequest) (*DeleteRestrictWorkspaceAdminsSettingResponse, error)

	// Get the restrict workspace admins setting.
	//
	// Gets the restrict workspace admins setting.
	Get(ctx context.Context, request GetRestrictWorkspaceAdminsSettingRequest) (*RestrictWorkspaceAdminsSetting, error)

	// Update the restrict workspace admins setting.
	//
	// Updates the restrict workspace admins setting for the workspace. A fresh etag
	// needs to be provided in `PATCH` requests (as part of the setting field). The
	// etag can be retrieved by making a GET request before the `PATCH` request. If
	// the setting is updated concurrently, `PATCH` fails with 409 and the request
	// must be retried by using the fresh etag in the 409 response.
	Update(ctx context.Context, request UpdateRestrictWorkspaceAdminsSettingRequest) (*RestrictWorkspaceAdminsSetting, error)
}

type RestrictWorkspaceAdminsMessage added in v0.31.0

type RestrictWorkspaceAdminsMessage struct {
	Status RestrictWorkspaceAdminsMessageStatus `json:"status"`
}

type RestrictWorkspaceAdminsMessageStatus added in v0.31.0

type RestrictWorkspaceAdminsMessageStatus string
const RestrictWorkspaceAdminsMessageStatusAllowAll RestrictWorkspaceAdminsMessageStatus = `ALLOW_ALL`
const RestrictWorkspaceAdminsMessageStatusRestrictTokensAndJobRunAs RestrictWorkspaceAdminsMessageStatus = `RESTRICT_TOKENS_AND_JOB_RUN_AS`

func (*RestrictWorkspaceAdminsMessageStatus) Set added in v0.31.0

Set raw string value and validate it against allowed values

func (*RestrictWorkspaceAdminsMessageStatus) String added in v0.31.0

String representation for fmt.Print

func (*RestrictWorkspaceAdminsMessageStatus) Type added in v0.31.0

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

type RestrictWorkspaceAdminsService added in v0.34.0

type RestrictWorkspaceAdminsService interface {

	// Delete the restrict workspace admins setting.
	//
	// Reverts the restrict workspace admins setting status for the workspace. A
	// fresh etag needs to be provided in `DELETE` requests (as a query
	// parameter). The etag can be retrieved by making a `GET` request before
	// the DELETE request. If the setting is updated/deleted concurrently,
	// `DELETE` fails with 409 and the request must be retried by using the
	// fresh etag in the 409 response.
	Delete(ctx context.Context, request DeleteRestrictWorkspaceAdminsSettingRequest) (*DeleteRestrictWorkspaceAdminsSettingResponse, error)

	// Get the restrict workspace admins setting.
	//
	// Gets the restrict workspace admins setting.
	Get(ctx context.Context, request GetRestrictWorkspaceAdminsSettingRequest) (*RestrictWorkspaceAdminsSetting, error)

	// Update the restrict workspace admins setting.
	//
	// Updates the restrict workspace admins setting for the workspace. A fresh
	// etag needs to be provided in `PATCH` requests (as part of the setting
	// field). The etag can be retrieved by making a GET request before the
	// `PATCH` request. If the setting is updated concurrently, `PATCH` fails
	// with 409 and the request must be retried by using the fresh etag in the
	// 409 response.
	Update(ctx context.Context, request UpdateRestrictWorkspaceAdminsSettingRequest) (*RestrictWorkspaceAdminsSetting, error)
}

The Restrict Workspace Admins setting lets you control the capabilities of workspace admins. With the setting status set to ALLOW_ALL, workspace admins can create service principal personal access tokens on behalf of any service principal in their workspace. Workspace admins can also change a job owner to any user in their workspace. And they can change the job run_as setting to any user in their workspace or to a service principal on which they have the Service Principal User role. With the setting status set to RESTRICT_TOKENS_AND_JOB_RUN_AS, workspace admins can only create personal access tokens on behalf of service principals they have the Service Principal User role on. They can also only change a job owner to themselves. And they can change the job run_as setting to themselves or to a service principal on which they have the Service Principal User role.

type RestrictWorkspaceAdminsSetting added in v0.31.0

type RestrictWorkspaceAdminsSetting struct {
	// etag used for versioning. The response is at least as fresh as the eTag
	// provided. This is used for optimistic concurrency control as a way to
	// help prevent simultaneous writes of a setting overwriting each other. It
	// is strongly suggested that systems make use of the etag in the read ->
	// update pattern to perform setting updates in order to avoid race
	// conditions. That is, get an etag from a GET request, and pass it with the
	// PATCH request to identify the setting version you are updating.
	Etag string `json:"etag,omitempty"`

	RestrictWorkspaceAdmins RestrictWorkspaceAdminsMessage `json:"restrict_workspace_admins"`
	// Name of the corresponding setting. This field is populated in the
	// response, but it will not be respected even if it's set in the request
	// body. The setting name in the path parameter will be respected instead.
	// Setting name is required to be 'default' if the setting only has one
	// instance per workspace.
	SettingName string `json:"setting_name,omitempty"`

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

func (RestrictWorkspaceAdminsSetting) MarshalJSON added in v0.31.0

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

func (*RestrictWorkspaceAdminsSetting) UnmarshalJSON added in v0.31.0

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

type RevokeTokenRequest

type RevokeTokenRequest struct {
	// The ID of the token to be revoked.
	TokenId string `json:"token_id"`
}

type RevokeTokenResponse added in v0.34.0

type RevokeTokenResponse struct {
}

type SetStatusResponse added in v0.34.0

type SetStatusResponse struct {
}

type SettingsAPI added in v0.21.0

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

Workspace Settings API allows users to manage settings at the workspace level.

func NewSettings added in v0.21.0

func NewSettings(client *client.DatabricksClient) *SettingsAPI

func (*SettingsAPI) AibiDashboardEmbeddingAccessPolicy added in v0.50.0

func (a *SettingsAPI) AibiDashboardEmbeddingAccessPolicy() AibiDashboardEmbeddingAccessPolicyInterface

func (*SettingsAPI) AibiDashboardEmbeddingApprovedDomains added in v0.50.0

func (a *SettingsAPI) AibiDashboardEmbeddingApprovedDomains() AibiDashboardEmbeddingApprovedDomainsInterface

func (*SettingsAPI) AutomaticClusterUpdate added in v0.34.0

func (a *SettingsAPI) AutomaticClusterUpdate() AutomaticClusterUpdateInterface

func (*SettingsAPI) ComplianceSecurityProfile added in v0.40.0

func (a *SettingsAPI) ComplianceSecurityProfile() ComplianceSecurityProfileInterface

func (*SettingsAPI) DefaultNamespace added in v0.34.0

func (a *SettingsAPI) DefaultNamespace() DefaultNamespaceInterface

func (*SettingsAPI) DisableLegacyAccess added in v0.47.0

func (a *SettingsAPI) DisableLegacyAccess() DisableLegacyAccessInterface

func (*SettingsAPI) DisableLegacyDbfs added in v0.49.0

func (a *SettingsAPI) DisableLegacyDbfs() DisableLegacyDbfsInterface

func (*SettingsAPI) EnhancedSecurityMonitoring added in v0.40.0

func (a *SettingsAPI) EnhancedSecurityMonitoring() EnhancedSecurityMonitoringInterface

func (*SettingsAPI) RestrictWorkspaceAdmins added in v0.34.0

func (a *SettingsAPI) RestrictWorkspaceAdmins() RestrictWorkspaceAdminsInterface

type SettingsInterface added in v0.29.0

type SettingsInterface interface {

	// Controls whether AI/BI published dashboard embedding is enabled,
	// conditionally enabled, or disabled at the workspace level. By default,
	// this setting is conditionally enabled (ALLOW_APPROVED_DOMAINS).
	AibiDashboardEmbeddingAccessPolicy() AibiDashboardEmbeddingAccessPolicyInterface

	// Controls the list of domains approved to host the embedded AI/BI
	// dashboards. The approved domains list can't be mutated when the current
	// access policy is not set to ALLOW_APPROVED_DOMAINS.
	AibiDashboardEmbeddingApprovedDomains() AibiDashboardEmbeddingApprovedDomainsInterface

	// Controls whether automatic cluster update is enabled for the current
	// workspace. By default, it is turned off.
	AutomaticClusterUpdate() AutomaticClusterUpdateInterface

	// Controls whether to enable the compliance security profile for the
	// current workspace. Enabling it on a workspace is permanent. By default,
	// it is turned off.
	//
	// This settings can NOT be disabled once it is enabled.
	ComplianceSecurityProfile() ComplianceSecurityProfileInterface

	// The default namespace setting API allows users to configure the default
	// namespace for a Databricks workspace.
	//
	// Through this API, users can retrieve, set, or modify the default
	// namespace used when queries do not reference a fully qualified
	// three-level name. For example, if you use the API to set 'retail_prod' as
	// the default catalog, then a query 'SELECT * FROM myTable' would reference
	// the object 'retail_prod.default.myTable' (the schema 'default' is always
	// assumed).
	//
	// This setting requires a restart of clusters and SQL warehouses to take
	// effect. Additionally, the default namespace only applies when using Unity
	// Catalog-enabled compute.
	DefaultNamespace() DefaultNamespaceInterface

	// 'Disabling legacy access' has the following impacts:
	//
	// 1. Disables direct access to the Hive Metastore. However, you can still
	// access Hive Metastore through HMS Federation. 2. Disables Fallback Mode
	// (docs link) on any External Location access from the workspace. 3. Alters
	// DBFS path access to use External Location permissions in place of legacy
	// credentials. 4. Enforces Unity Catalog access on all path based access.
	DisableLegacyAccess() DisableLegacyAccessInterface

	// When this setting is on, access to DBFS root and DBFS mounts is
	// disallowed (as well as creation of new mounts). When the setting is off,
	// all DBFS functionality is enabled
	DisableLegacyDbfs() DisableLegacyDbfsInterface

	// Controls whether enhanced security monitoring is enabled for the current
	// workspace. If the compliance security profile is enabled, this is
	// automatically enabled. By default, it is disabled. However, if the
	// compliance security profile is enabled, this is automatically enabled.
	//
	// If the compliance security profile is disabled, you can enable or disable
	// this setting and it is not permanent.
	EnhancedSecurityMonitoring() EnhancedSecurityMonitoringInterface

	// The Restrict Workspace Admins setting lets you control the capabilities
	// of workspace admins. With the setting status set to ALLOW_ALL, workspace
	// admins can create service principal personal access tokens on behalf of
	// any service principal in their workspace. Workspace admins can also
	// change a job owner to any user in their workspace. And they can change
	// the job run_as setting to any user in their workspace or to a service
	// principal on which they have the Service Principal User role. With the
	// setting status set to RESTRICT_TOKENS_AND_JOB_RUN_AS, workspace admins
	// can only create personal access tokens on behalf of service principals
	// they have the Service Principal User role on. They can also only change a
	// job owner to themselves. And they can change the job run_as setting to
	// themselves or to a service principal on which they have the Service
	// Principal User role.
	RestrictWorkspaceAdmins() RestrictWorkspaceAdminsInterface
}

type SettingsService added in v0.21.0

type SettingsService interface {
}

Workspace Settings API allows users to manage settings at the workspace level.

type SlackConfig added in v0.44.0

type SlackConfig struct {
	// [Input-Only] URL for Slack destination.
	Url string `json:"url,omitempty"`
	// [Output-Only] Whether URL is set.
	UrlSet bool `json:"url_set,omitempty"`

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

func (SlackConfig) MarshalJSON added in v0.44.0

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

func (*SlackConfig) UnmarshalJSON added in v0.44.0

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

type StringMessage added in v0.21.0

type StringMessage struct {
	// Represents a generic string value.
	Value string `json:"value,omitempty"`

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

func (StringMessage) MarshalJSON added in v0.23.0

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

func (*StringMessage) UnmarshalJSON added in v0.23.0

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

type TokenAccessControlRequest added in v0.15.0

type TokenAccessControlRequest struct {
	// name of the group
	GroupName string `json:"group_name,omitempty"`
	// Permission level
	PermissionLevel TokenPermissionLevel `json:"permission_level,omitempty"`
	// application ID of a service principal
	ServicePrincipalName string `json:"service_principal_name,omitempty"`
	// name of the user
	UserName string `json:"user_name,omitempty"`

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

func (TokenAccessControlRequest) MarshalJSON added in v0.23.0

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

func (*TokenAccessControlRequest) UnmarshalJSON added in v0.23.0

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

type TokenAccessControlResponse added in v0.15.0

type TokenAccessControlResponse struct {
	// All permissions.
	AllPermissions []TokenPermission `json:"all_permissions,omitempty"`
	// Display name of the user or service principal.
	DisplayName string `json:"display_name,omitempty"`
	// name of the group
	GroupName string `json:"group_name,omitempty"`
	// Name of the service principal.
	ServicePrincipalName string `json:"service_principal_name,omitempty"`
	// name of the user
	UserName string `json:"user_name,omitempty"`

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

func (TokenAccessControlResponse) MarshalJSON added in v0.23.0

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

func (*TokenAccessControlResponse) UnmarshalJSON added in v0.23.0

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

type TokenInfo

type TokenInfo struct {
	// Comment that describes the purpose of the token, specified by the token
	// creator.
	Comment string `json:"comment,omitempty"`
	// User ID of the user that created the token.
	CreatedById int64 `json:"created_by_id,omitempty"`
	// Username of the user that created the token.
	CreatedByUsername string `json:"created_by_username,omitempty"`
	// Timestamp when the token was created.
	CreationTime int64 `json:"creation_time,omitempty"`
	// Timestamp when the token expires.
	ExpiryTime int64 `json:"expiry_time,omitempty"`
	// Approximate timestamp for the day the token was last used. Accurate up to
	// 1 day.
	LastUsedDay int64 `json:"last_used_day,omitempty"`
	// User ID of the user that owns the token.
	OwnerId int64 `json:"owner_id,omitempty"`
	// ID of the token.
	TokenId string `json:"token_id,omitempty"`
	// If applicable, the ID of the workspace that the token was created in.
	WorkspaceId int64 `json:"workspace_id,omitempty"`

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

func (TokenInfo) MarshalJSON added in v0.23.0

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

func (*TokenInfo) UnmarshalJSON added in v0.23.0

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

type TokenManagementAPI

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

Enables administrators to get all tokens and delete tokens for other users. Admins can either get every token, get a specific token by ID, or get all tokens for a particular user.

func NewTokenManagement

func NewTokenManagement(client *client.DatabricksClient) *TokenManagementAPI

func (*TokenManagementAPI) CreateOboToken

func (a *TokenManagementAPI) CreateOboToken(ctx context.Context, request CreateOboTokenRequest) (*CreateOboTokenResponse, error)
Example (CreateOboTokenOnAws)
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
	panic(err)
}

groups, err := w.Groups.GroupDisplayNameToIdMap(ctx, iam.ListGroupsRequest{})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", groups)

spn, err := w.ServicePrincipals.Create(ctx, iam.ServicePrincipal{
	DisplayName: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
	Groups: []iam.ComplexValue{iam.ComplexValue{
		Value: groups["admins"],
	}},
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", spn)

obo, err := w.TokenManagement.CreateOboToken(ctx, settings.CreateOboTokenRequest{
	ApplicationId:   spn.ApplicationId,
	LifetimeSeconds: 60,
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", obo)

// cleanup

err = w.ServicePrincipals.DeleteById(ctx, spn.Id)
if err != nil {
	panic(err)
}
err = w.TokenManagement.DeleteByTokenId(ctx, obo.TokenInfo.TokenId)
if err != nil {
	panic(err)
}
Output:

func (*TokenManagementAPI) Delete

func (a *TokenManagementAPI) Delete(ctx context.Context, request DeleteTokenManagementRequest) error

func (*TokenManagementAPI) DeleteByTokenId

func (a *TokenManagementAPI) DeleteByTokenId(ctx context.Context, tokenId string) error

Delete a token.

Deletes a token, specified by its ID.

func (*TokenManagementAPI) Get

func (a *TokenManagementAPI) Get(ctx context.Context, request GetTokenManagementRequest) (*GetTokenResponse, error)
Example (CreateOboTokenOnAws)
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
	panic(err)
}

groups, err := w.Groups.GroupDisplayNameToIdMap(ctx, iam.ListGroupsRequest{})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", groups)

spn, err := w.ServicePrincipals.Create(ctx, iam.ServicePrincipal{
	DisplayName: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
	Groups: []iam.ComplexValue{iam.ComplexValue{
		Value: groups["admins"],
	}},
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", spn)

obo, err := w.TokenManagement.CreateOboToken(ctx, settings.CreateOboTokenRequest{
	ApplicationId:   spn.ApplicationId,
	LifetimeSeconds: 60,
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", obo)

byId, err := w.TokenManagement.GetByTokenId(ctx, obo.TokenInfo.TokenId)
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", byId)

// cleanup

err = w.ServicePrincipals.DeleteById(ctx, spn.Id)
if err != nil {
	panic(err)
}
err = w.TokenManagement.DeleteByTokenId(ctx, obo.TokenInfo.TokenId)
if err != nil {
	panic(err)
}
Output:

func (*TokenManagementAPI) GetByComment

func (a *TokenManagementAPI) GetByComment(ctx context.Context, name string) (*TokenInfo, error)

GetByComment calls TokenManagementAPI.TokenInfoCommentToTokenIdMap and returns a single TokenInfo.

Returns an error if there's more than one TokenInfo with the same .Comment.

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

This method is generated by Databricks SDK Code Generator.

func (*TokenManagementAPI) GetByTokenId

func (a *TokenManagementAPI) GetByTokenId(ctx context.Context, tokenId string) (*GetTokenResponse, error)

Get token info.

Gets information about a token, specified by its ID.

func (*TokenManagementAPI) GetPermissionLevels added in v0.19.0

func (a *TokenManagementAPI) GetPermissionLevels(ctx context.Context) (*GetTokenPermissionLevelsResponse, error)

func (*TokenManagementAPI) GetPermissions added in v0.19.0

func (a *TokenManagementAPI) GetPermissions(ctx context.Context) (*TokenPermissions, error)

func (*TokenManagementAPI) List added in v0.24.0

List all tokens.

Lists all tokens associated with the specified workspace or user.

This method is generated by Databricks SDK Code Generator.

func (*TokenManagementAPI) ListAll

List all tokens.

Lists all tokens associated with the specified workspace or user.

This method is generated by Databricks SDK Code Generator.

Example (CreateOboTokenOnAws)
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
	panic(err)
}

all, err := w.TokenManagement.ListAll(ctx, settings.ListTokenManagementRequest{})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", all)
Output:

func (*TokenManagementAPI) SetPermissions added in v0.19.0

func (a *TokenManagementAPI) SetPermissions(ctx context.Context, request TokenPermissionsRequest) (*TokenPermissions, error)

func (*TokenManagementAPI) TokenInfoCommentToTokenIdMap added in v0.9.0

func (a *TokenManagementAPI) TokenInfoCommentToTokenIdMap(ctx context.Context, request ListTokenManagementRequest) (map[string]string, error)

TokenInfoCommentToTokenIdMap calls TokenManagementAPI.ListAll and creates a map of results with TokenInfo.Comment as key and TokenInfo.TokenId as value.

Returns an error if there's more than one TokenInfo with the same .Comment.

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

This method is generated by Databricks SDK Code Generator.

func (*TokenManagementAPI) UpdatePermissions added in v0.19.0

func (a *TokenManagementAPI) UpdatePermissions(ctx context.Context, request TokenPermissionsRequest) (*TokenPermissions, error)

type TokenManagementInterface added in v0.29.0

type TokenManagementInterface interface {

	// Create on-behalf token.
	//
	// Creates a token on behalf of a service principal.
	CreateOboToken(ctx context.Context, request CreateOboTokenRequest) (*CreateOboTokenResponse, error)

	// Delete a token.
	//
	// Deletes a token, specified by its ID.
	Delete(ctx context.Context, request DeleteTokenManagementRequest) error

	// Delete a token.
	//
	// Deletes a token, specified by its ID.
	DeleteByTokenId(ctx context.Context, tokenId string) error

	// Get token info.
	//
	// Gets information about a token, specified by its ID.
	Get(ctx context.Context, request GetTokenManagementRequest) (*GetTokenResponse, error)

	// Get token info.
	//
	// Gets information about a token, specified by its ID.
	GetByTokenId(ctx context.Context, tokenId string) (*GetTokenResponse, error)

	// Get token permission levels.
	//
	// Gets the permission levels that a user can have on an object.
	GetPermissionLevels(ctx context.Context) (*GetTokenPermissionLevelsResponse, error)

	// Get token permissions.
	//
	// Gets the permissions of all tokens. Tokens can inherit permissions from their
	// root object.
	GetPermissions(ctx context.Context) (*TokenPermissions, error)

	// List all tokens.
	//
	// Lists all tokens associated with the specified workspace or user.
	//
	// This method is generated by Databricks SDK Code Generator.
	List(ctx context.Context, request ListTokenManagementRequest) listing.Iterator[TokenInfo]

	// List all tokens.
	//
	// Lists all tokens associated with the specified workspace or user.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListAll(ctx context.Context, request ListTokenManagementRequest) ([]TokenInfo, error)

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

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

	// Set token permissions.
	//
	// Sets permissions on an object, replacing existing permissions if they exist.
	// Deletes all direct permissions if none are specified. Objects can inherit
	// permissions from their root object.
	SetPermissions(ctx context.Context, request TokenPermissionsRequest) (*TokenPermissions, error)

	// Update token permissions.
	//
	// Updates the permissions on all tokens. Tokens can inherit permissions from
	// their root object.
	UpdatePermissions(ctx context.Context, request TokenPermissionsRequest) (*TokenPermissions, error)
}

type TokenManagementService

type TokenManagementService interface {

	// Create on-behalf token.
	//
	// Creates a token on behalf of a service principal.
	CreateOboToken(ctx context.Context, request CreateOboTokenRequest) (*CreateOboTokenResponse, error)

	// Delete a token.
	//
	// Deletes a token, specified by its ID.
	Delete(ctx context.Context, request DeleteTokenManagementRequest) error

	// Get token info.
	//
	// Gets information about a token, specified by its ID.
	Get(ctx context.Context, request GetTokenManagementRequest) (*GetTokenResponse, error)

	// Get token permission levels.
	//
	// Gets the permission levels that a user can have on an object.
	GetPermissionLevels(ctx context.Context) (*GetTokenPermissionLevelsResponse, error)

	// Get token permissions.
	//
	// Gets the permissions of all tokens. Tokens can inherit permissions from
	// their root object.
	GetPermissions(ctx context.Context) (*TokenPermissions, error)

	// List all tokens.
	//
	// Lists all tokens associated with the specified workspace or user.
	//
	// Use ListAll() to get all TokenInfo instances
	List(ctx context.Context, request ListTokenManagementRequest) (*ListTokensResponse, error)

	// Set token permissions.
	//
	// Sets permissions on an object, replacing existing permissions if they
	// exist. Deletes all direct permissions if none are specified. Objects can
	// inherit permissions from their root object.
	SetPermissions(ctx context.Context, request TokenPermissionsRequest) (*TokenPermissions, error)

	// Update token permissions.
	//
	// Updates the permissions on all tokens. Tokens can inherit permissions
	// from their root object.
	UpdatePermissions(ctx context.Context, request TokenPermissionsRequest) (*TokenPermissions, error)
}

Enables administrators to get all tokens and delete tokens for other users. Admins can either get every token, get a specific token by ID, or get all tokens for a particular user.

type TokenPermission added in v0.15.0

type TokenPermission struct {
	Inherited bool `json:"inherited,omitempty"`

	InheritedFromObject []string `json:"inherited_from_object,omitempty"`
	// Permission level
	PermissionLevel TokenPermissionLevel `json:"permission_level,omitempty"`

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

func (TokenPermission) MarshalJSON added in v0.23.0

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

func (*TokenPermission) UnmarshalJSON added in v0.23.0

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

type TokenPermissionLevel added in v0.15.0

type TokenPermissionLevel string

Permission level

const TokenPermissionLevelCanUse TokenPermissionLevel = `CAN_USE`

func (*TokenPermissionLevel) Set added in v0.15.0

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

Set raw string value and validate it against allowed values

func (*TokenPermissionLevel) String added in v0.15.0

func (f *TokenPermissionLevel) String() string

String representation for fmt.Print

func (*TokenPermissionLevel) Type added in v0.15.0

func (f *TokenPermissionLevel) Type() string

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

type TokenPermissions added in v0.15.0

type TokenPermissions struct {
	AccessControlList []TokenAccessControlResponse `json:"access_control_list,omitempty"`

	ObjectId string `json:"object_id,omitempty"`

	ObjectType string `json:"object_type,omitempty"`

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

func (TokenPermissions) MarshalJSON added in v0.23.0

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

func (*TokenPermissions) UnmarshalJSON added in v0.23.0

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

type TokenPermissionsDescription added in v0.15.0

type TokenPermissionsDescription struct {
	Description string `json:"description,omitempty"`
	// Permission level
	PermissionLevel TokenPermissionLevel `json:"permission_level,omitempty"`

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

func (TokenPermissionsDescription) MarshalJSON added in v0.23.0

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

func (*TokenPermissionsDescription) UnmarshalJSON added in v0.23.0

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

type TokenPermissionsRequest added in v0.15.0

type TokenPermissionsRequest struct {
	AccessControlList []TokenAccessControlRequest `json:"access_control_list,omitempty"`
}

type TokenType added in v0.20.0

type TokenType string

The type of token request. As of now, only `AZURE_ACTIVE_DIRECTORY_TOKEN` is supported.

const TokenTypeArclightAzureExchangeToken TokenType = `ARCLIGHT_AZURE_EXCHANGE_TOKEN`
const TokenTypeAzureActiveDirectoryToken TokenType = `AZURE_ACTIVE_DIRECTORY_TOKEN`

func (*TokenType) Set added in v0.20.0

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

Set raw string value and validate it against allowed values

func (*TokenType) String added in v0.20.0

func (f *TokenType) String() string

String representation for fmt.Print

func (*TokenType) Type added in v0.20.0

func (f *TokenType) Type() string

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

type TokensAPI

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

The Token API allows you to create, list, and revoke tokens that can be used to authenticate and access Databricks REST APIs.

func NewTokens

func NewTokens(client *client.DatabricksClient) *TokensAPI

func (*TokensAPI) Create

func (a *TokensAPI) Create(ctx context.Context, request CreateTokenRequest) (*CreateTokenResponse, error)
Example (Tokens)
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
	panic(err)
}

token, err := w.Tokens.Create(ctx, settings.CreateTokenRequest{
	Comment:         fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
	LifetimeSeconds: 300,
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", token)

// cleanup

err = w.Tokens.DeleteByTokenId(ctx, token.TokenInfo.TokenId)
if err != nil {
	panic(err)
}
Output:

func (*TokensAPI) Delete

func (a *TokensAPI) Delete(ctx context.Context, request RevokeTokenRequest) error

func (*TokensAPI) DeleteByTokenId

func (a *TokensAPI) DeleteByTokenId(ctx context.Context, tokenId string) error

Revoke token.

Revokes an access token.

If a token with the specified ID is not valid, this call returns an error **RESOURCE_DOES_NOT_EXIST**.

func (*TokensAPI) GetByComment

func (a *TokensAPI) GetByComment(ctx context.Context, name string) (*PublicTokenInfo, error)

GetByComment calls TokensAPI.PublicTokenInfoCommentToTokenIdMap and returns a single PublicTokenInfo.

Returns an error if there's more than one PublicTokenInfo with the same .Comment.

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

This method is generated by Databricks SDK Code Generator.

func (*TokensAPI) List added in v0.24.0

List tokens.

Lists all the valid tokens for a user-workspace pair.

This method is generated by Databricks SDK Code Generator.

func (*TokensAPI) ListAll

func (a *TokensAPI) ListAll(ctx context.Context) ([]PublicTokenInfo, error)

List tokens.

Lists all the valid tokens for a user-workspace pair.

This method is generated by Databricks SDK Code Generator.

Example (Tokens)
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
	panic(err)
}

all, err := w.Tokens.ListAll(ctx)
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", all)
Output:

func (*TokensAPI) PublicTokenInfoCommentToTokenIdMap

func (a *TokensAPI) PublicTokenInfoCommentToTokenIdMap(ctx context.Context) (map[string]string, error)

PublicTokenInfoCommentToTokenIdMap calls TokensAPI.ListAll and creates a map of results with PublicTokenInfo.Comment as key and PublicTokenInfo.TokenId as value.

Returns an error if there's more than one PublicTokenInfo with the same .Comment.

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

This method is generated by Databricks SDK Code Generator.

type TokensInterface added in v0.29.0

type TokensInterface interface {

	// Create a user token.
	//
	// Creates and returns a token for a user. If this call is made through token
	// authentication, it creates a token with the same client ID as the
	// authenticated token. If the user's token quota is exceeded, this call returns
	// an error **QUOTA_EXCEEDED**.
	Create(ctx context.Context, request CreateTokenRequest) (*CreateTokenResponse, error)

	// Revoke token.
	//
	// Revokes an access token.
	//
	// If a token with the specified ID is not valid, this call returns an error
	// **RESOURCE_DOES_NOT_EXIST**.
	Delete(ctx context.Context, request RevokeTokenRequest) error

	// Revoke token.
	//
	// Revokes an access token.
	//
	// If a token with the specified ID is not valid, this call returns an error
	// **RESOURCE_DOES_NOT_EXIST**.
	DeleteByTokenId(ctx context.Context, tokenId string) error

	// List tokens.
	//
	// Lists all the valid tokens for a user-workspace pair.
	//
	// This method is generated by Databricks SDK Code Generator.
	List(ctx context.Context) listing.Iterator[PublicTokenInfo]

	// List tokens.
	//
	// Lists all the valid tokens for a user-workspace pair.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListAll(ctx context.Context) ([]PublicTokenInfo, error)

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

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

type TokensService

type TokensService interface {

	// Create a user token.
	//
	// Creates and returns a token for a user. If this call is made through
	// token authentication, it creates a token with the same client ID as the
	// authenticated token. If the user's token quota is exceeded, this call
	// returns an error **QUOTA_EXCEEDED**.
	Create(ctx context.Context, request CreateTokenRequest) (*CreateTokenResponse, error)

	// Revoke token.
	//
	// Revokes an access token.
	//
	// If a token with the specified ID is not valid, this call returns an error
	// **RESOURCE_DOES_NOT_EXIST**.
	Delete(ctx context.Context, request RevokeTokenRequest) error

	// List tokens.
	//
	// Lists all the valid tokens for a user-workspace pair.
	//
	// Use ListAll() to get all PublicTokenInfo instances
	List(ctx context.Context) (*ListPublicTokensResponse, error)
}

The Token API allows you to create, list, and revoke tokens that can be used to authenticate and access Databricks REST APIs.

type UpdateAibiDashboardEmbeddingAccessPolicySettingRequest added in v0.50.0

type UpdateAibiDashboardEmbeddingAccessPolicySettingRequest struct {
	// This should always be set to true for Settings API. Added for AIP
	// compliance.
	AllowMissing bool `json:"allow_missing"`
	// Field mask is required to be passed into the PATCH request. Field mask
	// specifies which fields of the setting payload will be updated. The field
	// mask needs to be supplied as single string. To specify multiple fields in
	// the field mask, use comma as the separator (no space).
	FieldMask string `json:"field_mask"`

	Setting AibiDashboardEmbeddingAccessPolicySetting `json:"setting"`
}

Details required to update a setting.

type UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest added in v0.50.0

type UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest struct {
	// This should always be set to true for Settings API. Added for AIP
	// compliance.
	AllowMissing bool `json:"allow_missing"`
	// Field mask is required to be passed into the PATCH request. Field mask
	// specifies which fields of the setting payload will be updated. The field
	// mask needs to be supplied as single string. To specify multiple fields in
	// the field mask, use comma as the separator (no space).
	FieldMask string `json:"field_mask"`

	Setting AibiDashboardEmbeddingApprovedDomainsSetting `json:"setting"`
}

Details required to update a setting.

type UpdateAutomaticClusterUpdateSettingRequest added in v0.34.0

type UpdateAutomaticClusterUpdateSettingRequest struct {
	// This should always be set to true for Settings API. Added for AIP
	// compliance.
	AllowMissing bool `json:"allow_missing"`
	// Field mask is required to be passed into the PATCH request. Field mask
	// specifies which fields of the setting payload will be updated. The field
	// mask needs to be supplied as single string. To specify multiple fields in
	// the field mask, use comma as the separator (no space).
	FieldMask string `json:"field_mask"`

	Setting AutomaticClusterUpdateSetting `json:"setting"`
}

Details required to update a setting.

type UpdateComplianceSecurityProfileSettingRequest added in v0.40.0

type UpdateComplianceSecurityProfileSettingRequest struct {
	// This should always be set to true for Settings API. Added for AIP
	// compliance.
	AllowMissing bool `json:"allow_missing"`
	// Field mask is required to be passed into the PATCH request. Field mask
	// specifies which fields of the setting payload will be updated. The field
	// mask needs to be supplied as single string. To specify multiple fields in
	// the field mask, use comma as the separator (no space).
	FieldMask string `json:"field_mask"`

	Setting ComplianceSecurityProfileSetting `json:"setting"`
}

Details required to update a setting.

type UpdateCspEnablementAccountSettingRequest added in v0.34.0

type UpdateCspEnablementAccountSettingRequest struct {
	// This should always be set to true for Settings API. Added for AIP
	// compliance.
	AllowMissing bool `json:"allow_missing"`
	// Field mask is required to be passed into the PATCH request. Field mask
	// specifies which fields of the setting payload will be updated. The field
	// mask needs to be supplied as single string. To specify multiple fields in
	// the field mask, use comma as the separator (no space).
	FieldMask string `json:"field_mask"`

	Setting CspEnablementAccountSetting `json:"setting"`
}

Details required to update a setting.

type UpdateDefaultNamespaceSettingRequest added in v0.31.0

type UpdateDefaultNamespaceSettingRequest struct {
	// This should always be set to true for Settings API. Added for AIP
	// compliance.
	AllowMissing bool `json:"allow_missing"`
	// Field mask is required to be passed into the PATCH request. Field mask
	// specifies which fields of the setting payload will be updated. The field
	// mask needs to be supplied as single string. To specify multiple fields in
	// the field mask, use comma as the separator (no space).
	FieldMask string `json:"field_mask"`
	// This represents the setting configuration for the default namespace in
	// the Databricks workspace. Setting the default catalog for the workspace
	// determines the catalog that is used when queries do not reference a fully
	// qualified 3 level name. For example, if the default catalog is set to
	// 'retail_prod' then a query 'SELECT * FROM myTable' would reference the
	// object 'retail_prod.default.myTable' (the schema 'default' is always
	// assumed). This setting requires a restart of clusters and SQL warehouses
	// to take effect. Additionally, the default namespace only applies when
	// using Unity Catalog-enabled compute.
	Setting DefaultNamespaceSetting `json:"setting"`
}

Details required to update a setting.

type UpdateDisableLegacyAccessRequest added in v0.47.0

type UpdateDisableLegacyAccessRequest struct {
	// This should always be set to true for Settings API. Added for AIP
	// compliance.
	AllowMissing bool `json:"allow_missing"`
	// Field mask is required to be passed into the PATCH request. Field mask
	// specifies which fields of the setting payload will be updated. The field
	// mask needs to be supplied as single string. To specify multiple fields in
	// the field mask, use comma as the separator (no space).
	FieldMask string `json:"field_mask"`

	Setting DisableLegacyAccess `json:"setting"`
}

Details required to update a setting.

type UpdateDisableLegacyDbfsRequest added in v0.49.0

type UpdateDisableLegacyDbfsRequest struct {
	// This should always be set to true for Settings API. Added for AIP
	// compliance.
	AllowMissing bool `json:"allow_missing"`
	// Field mask is required to be passed into the PATCH request. Field mask
	// specifies which fields of the setting payload will be updated. The field
	// mask needs to be supplied as single string. To specify multiple fields in
	// the field mask, use comma as the separator (no space).
	FieldMask string `json:"field_mask"`

	Setting DisableLegacyDbfs `json:"setting"`
}

Details required to update a setting.

type UpdateDisableLegacyFeaturesRequest added in v0.47.0

type UpdateDisableLegacyFeaturesRequest struct {
	// This should always be set to true for Settings API. Added for AIP
	// compliance.
	AllowMissing bool `json:"allow_missing"`
	// Field mask is required to be passed into the PATCH request. Field mask
	// specifies which fields of the setting payload will be updated. The field
	// mask needs to be supplied as single string. To specify multiple fields in
	// the field mask, use comma as the separator (no space).
	FieldMask string `json:"field_mask"`

	Setting DisableLegacyFeatures `json:"setting"`
}

Details required to update a setting.

type UpdateEnhancedSecurityMonitoringSettingRequest added in v0.40.0

type UpdateEnhancedSecurityMonitoringSettingRequest struct {
	// This should always be set to true for Settings API. Added for AIP
	// compliance.
	AllowMissing bool `json:"allow_missing"`
	// Field mask is required to be passed into the PATCH request. Field mask
	// specifies which fields of the setting payload will be updated. The field
	// mask needs to be supplied as single string. To specify multiple fields in
	// the field mask, use comma as the separator (no space).
	FieldMask string `json:"field_mask"`

	Setting EnhancedSecurityMonitoringSetting `json:"setting"`
}

Details required to update a setting.

type UpdateEsmEnablementAccountSettingRequest added in v0.34.0

type UpdateEsmEnablementAccountSettingRequest struct {
	// This should always be set to true for Settings API. Added for AIP
	// compliance.
	AllowMissing bool `json:"allow_missing"`
	// Field mask is required to be passed into the PATCH request. Field mask
	// specifies which fields of the setting payload will be updated. The field
	// mask needs to be supplied as single string. To specify multiple fields in
	// the field mask, use comma as the separator (no space).
	FieldMask string `json:"field_mask"`

	Setting EsmEnablementAccountSetting `json:"setting"`
}

Details required to update a setting.

type UpdateIpAccessList

type UpdateIpAccessList struct {
	// Specifies whether this IP access list is enabled.
	Enabled bool `json:"enabled,omitempty"`
	// The ID for the corresponding IP access list
	IpAccessListId string `json:"-" url:"-"`

	IpAddresses []string `json:"ip_addresses,omitempty"`
	// Label for the IP access list. This **cannot** be empty.
	Label string `json:"label,omitempty"`
	// Type of IP access list. Valid values are as follows and are
	// case-sensitive:
	//
	// * `ALLOW`: An allow list. Include this IP or range. * `BLOCK`: A block
	// list. Exclude this IP or range. IP addresses in the block list are
	// excluded even if they are included in an allow list.
	ListType ListType `json:"list_type,omitempty"`

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

Details required to update an IP access list.

func (UpdateIpAccessList) MarshalJSON added in v0.23.0

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

func (*UpdateIpAccessList) UnmarshalJSON added in v0.23.0

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

type UpdateNotificationDestinationRequest added in v0.44.0

type UpdateNotificationDestinationRequest struct {
	// The configuration for the notification destination. Must wrap EXACTLY one
	// of the nested configs.
	Config *Config `json:"config,omitempty"`
	// The display name for the notification destination.
	DisplayName string `json:"display_name,omitempty"`
	// UUID identifying notification destination.
	Id string `json:"-" url:"-"`

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

func (UpdateNotificationDestinationRequest) MarshalJSON added in v0.44.0

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

func (*UpdateNotificationDestinationRequest) UnmarshalJSON added in v0.44.0

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

type UpdatePersonalComputeSettingRequest added in v0.11.0

type UpdatePersonalComputeSettingRequest struct {
	// This should always be set to true for Settings API. Added for AIP
	// compliance.
	AllowMissing bool `json:"allow_missing"`
	// Field mask is required to be passed into the PATCH request. Field mask
	// specifies which fields of the setting payload will be updated. The field
	// mask needs to be supplied as single string. To specify multiple fields in
	// the field mask, use comma as the separator (no space).
	FieldMask string `json:"field_mask"`

	Setting PersonalComputeSetting `json:"setting"`
}

Details required to update a setting.

type UpdateResponse added in v0.34.0

type UpdateResponse struct {
}

type UpdateRestrictWorkspaceAdminsSettingRequest added in v0.31.0

type UpdateRestrictWorkspaceAdminsSettingRequest struct {
	// This should always be set to true for Settings API. Added for AIP
	// compliance.
	AllowMissing bool `json:"allow_missing"`
	// Field mask is required to be passed into the PATCH request. Field mask
	// specifies which fields of the setting payload will be updated. The field
	// mask needs to be supplied as single string. To specify multiple fields in
	// the field mask, use comma as the separator (no space).
	FieldMask string `json:"field_mask"`

	Setting RestrictWorkspaceAdminsSetting `json:"setting"`
}

Details required to update a setting.

type WorkspaceConf

type WorkspaceConf map[string]string

type WorkspaceConfAPI

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

This API allows updating known workspace settings for advanced users.

func NewWorkspaceConf

func NewWorkspaceConf(client *client.DatabricksClient) *WorkspaceConfAPI

func (*WorkspaceConfAPI) GetStatus

func (a *WorkspaceConfAPI) GetStatus(ctx context.Context, request GetStatusRequest) (*map[string]string, error)
Example (Repos)
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
	panic(err)
}

conf, err := w.WorkspaceConf.GetStatus(ctx, settings.GetStatusRequest{
	Keys: "enableWorkspaceFilesystem",
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", conf)
Output:

func (*WorkspaceConfAPI) SetStatus

func (a *WorkspaceConfAPI) SetStatus(ctx context.Context, request WorkspaceConf) error

type WorkspaceConfInterface added in v0.29.0

type WorkspaceConfInterface interface {

	// Check configuration status.
	//
	// Gets the configuration status for a workspace.
	GetStatus(ctx context.Context, request GetStatusRequest) (*map[string]string, error)

	// Enable/disable features.
	//
	// Sets the configuration status for a workspace, including enabling or
	// disabling it.
	SetStatus(ctx context.Context, request WorkspaceConf) error
}

type WorkspaceConfService

type WorkspaceConfService interface {

	// Check configuration status.
	//
	// Gets the configuration status for a workspace.
	GetStatus(ctx context.Context, request GetStatusRequest) (*map[string]string, error)

	// Enable/disable features.
	//
	// Sets the configuration status for a workspace, including enabling or
	// disabling it.
	SetStatus(ctx context.Context, request WorkspaceConf) error
}

This API allows updating known workspace settings for advanced users.

Jump to

Keyboard shortcuts

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