sharing

package
v0.85.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: Apache-2.0 Imports: 9 Imported by: 13

Documentation

Overview

These APIs allow you to manage Providers, Recipient Activation, Recipient Federation Policies, Recipients, Shares, etc.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticationType

type AuthenticationType string

The delta sharing authentication type.

const AuthenticationTypeDatabricks AuthenticationType = `DATABRICKS`
const AuthenticationTypeOauthClientCredentials AuthenticationType = `OAUTH_CLIENT_CREDENTIALS`
const AuthenticationTypeOidcFederation AuthenticationType = `OIDC_FEDERATION`
const AuthenticationTypeToken AuthenticationType = `TOKEN`

func (*AuthenticationType) Set

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

Set raw string value and validate it against allowed values

func (*AuthenticationType) String

func (f *AuthenticationType) String() string

String representation for fmt.Print

func (*AuthenticationType) Type

func (f *AuthenticationType) Type() string

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

func (*AuthenticationType) Values added in v0.72.0

func (f *AuthenticationType) Values() []AuthenticationType

Values returns all possible values for AuthenticationType.

There is no guarantee on the order of the values in the slice.

type ColumnTypeName added in v0.13.0

type ColumnTypeName string

UC supported column types Copied from https://src.dev.databricks.com/databricks/universe@23a85902bb58695ab9293adc9f327b0714b55e72/-/blob/managed-catalog/api/messages/table.proto?L68

const ColumnTypeNameArray ColumnTypeName = `ARRAY`
const ColumnTypeNameBinary ColumnTypeName = `BINARY`
const ColumnTypeNameBoolean ColumnTypeName = `BOOLEAN`
const ColumnTypeNameByte ColumnTypeName = `BYTE`
const ColumnTypeNameChar ColumnTypeName = `CHAR`
const ColumnTypeNameDate ColumnTypeName = `DATE`
const ColumnTypeNameDecimal ColumnTypeName = `DECIMAL`
const ColumnTypeNameDouble ColumnTypeName = `DOUBLE`
const ColumnTypeNameFloat ColumnTypeName = `FLOAT`
const ColumnTypeNameInt ColumnTypeName = `INT`
const ColumnTypeNameInterval ColumnTypeName = `INTERVAL`
const ColumnTypeNameLong ColumnTypeName = `LONG`
const ColumnTypeNameMap ColumnTypeName = `MAP`
const ColumnTypeNameNull ColumnTypeName = `NULL`
const ColumnTypeNameShort ColumnTypeName = `SHORT`
const ColumnTypeNameString ColumnTypeName = `STRING`
const ColumnTypeNameStruct ColumnTypeName = `STRUCT`
const ColumnTypeNameTableType ColumnTypeName = `TABLE_TYPE`
const ColumnTypeNameTimestamp ColumnTypeName = `TIMESTAMP`
const ColumnTypeNameTimestampNtz ColumnTypeName = `TIMESTAMP_NTZ`
const ColumnTypeNameUserDefinedType ColumnTypeName = `USER_DEFINED_TYPE`
const ColumnTypeNameVariant ColumnTypeName = `VARIANT`

func (*ColumnTypeName) Set added in v0.13.0

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

Set raw string value and validate it against allowed values

func (*ColumnTypeName) String added in v0.13.0

func (f *ColumnTypeName) String() string

String representation for fmt.Print

func (*ColumnTypeName) Type added in v0.13.0

func (f *ColumnTypeName) Type() string

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

func (*ColumnTypeName) Values added in v0.72.0

func (f *ColumnTypeName) Values() []ColumnTypeName

Values returns all possible values for ColumnTypeName.

There is no guarantee on the order of the values in the slice.

type CreateFederationPolicyRequest added in v0.70.0

type CreateFederationPolicyRequest struct {
	// Name of the policy. This is the name of the policy to be created.
	Policy FederationPolicy `json:"policy"`
	// Name of the recipient. This is the name of the recipient for which the
	// policy is being created.
	RecipientName string `json:"-" url:"-"`
}

type CreateProvider

type CreateProvider struct {
	AuthenticationType AuthenticationType `json:"authentication_type"`
	// Description about the provider.
	Comment string `json:"comment,omitempty"`
	// The name of the Provider.
	Name string `json:"name"`
	// This field is required when the __authentication_type__ is **TOKEN**,
	// **OAUTH_CLIENT_CREDENTIALS** or not provided.
	RecipientProfileStr string `json:"recipient_profile_str,omitempty"`

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

func (CreateProvider) MarshalJSON added in v0.23.0

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

func (*CreateProvider) UnmarshalJSON added in v0.23.0

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

type CreateRecipient

type CreateRecipient struct {
	AuthenticationType AuthenticationType `json:"authentication_type"`
	// Description about the recipient.
	Comment string `json:"comment,omitempty"`
	// The global Unity Catalog metastore id provided by the data recipient.
	// This field is only present when the __authentication_type__ is
	// **DATABRICKS**. The identifier is of format
	// __cloud__:__region__:__metastore-uuid__.
	DataRecipientGlobalMetastoreId string `json:"data_recipient_global_metastore_id,omitempty"`
	// Expiration timestamp of the token, in epoch milliseconds.
	ExpirationTime int64 `json:"expiration_time,omitempty"`
	// IP Access List
	IpAccessList *IpAccessList `json:"ip_access_list,omitempty"`
	// Name of Recipient.
	Name string `json:"name"`
	// Username of the recipient owner.
	Owner string `json:"owner,omitempty"`
	// Recipient properties as map of string key-value pairs. When provided in
	// update request, the specified properties will override the existing
	// properties. To add and remove properties, one would need to perform a
	// read-modify-write.
	PropertiesKvpairs *SecurablePropertiesKvPairs `json:"properties_kvpairs,omitempty"`
	// The one-time sharing code provided by the data recipient. This field is
	// only present when the __authentication_type__ is **DATABRICKS**.
	SharingCode string `json:"sharing_code,omitempty"`

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

func (CreateRecipient) MarshalJSON added in v0.23.0

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

func (*CreateRecipient) UnmarshalJSON added in v0.23.0

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

type CreateShare

type CreateShare struct {
	// User-provided free-form text description.
	Comment string `json:"comment,omitempty"`
	// Name of the share.
	Name string `json:"name"`
	// Storage root URL for the share.
	StorageRoot string `json:"storage_root,omitempty"`

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

func (CreateShare) MarshalJSON added in v0.23.0

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

func (*CreateShare) UnmarshalJSON added in v0.23.0

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

type DeleteFederationPolicyRequest added in v0.70.0

type DeleteFederationPolicyRequest struct {
	// Name of the policy. This is the name of the policy to be deleted.
	Name string `json:"-" url:"-"`
	// Name of the recipient. This is the name of the recipient for which the
	// policy is being deleted.
	RecipientName string `json:"-" url:"-"`
}

type DeleteProviderRequest

type DeleteProviderRequest struct {
	// Name of the provider.
	Name string `json:"-" url:"-"`
}

type DeleteRecipientRequest

type DeleteRecipientRequest struct {
	// Name of the recipient.
	Name string `json:"-" url:"-"`
}

type DeleteShareRequest

type DeleteShareRequest struct {
	// The name of the share.
	Name string `json:"-" url:"-"`
}

type DeltaSharingDependency added in v0.59.0

type DeltaSharingDependency struct {
	Function *DeltaSharingFunctionDependency `json:"function,omitempty"`

	Table *DeltaSharingTableDependency `json:"table,omitempty"`
}

Represents a UC dependency.

type DeltaSharingDependencyList added in v0.59.0

type DeltaSharingDependencyList struct {
	// An array of Dependency.
	Dependencies []DeltaSharingDependency `json:"dependencies,omitempty"`
}

Represents a list of dependencies.

type DeltaSharingFunction added in v0.61.0

type DeltaSharingFunction struct {
	// The aliass of registered model.
	Aliases []RegisteredModelAlias `json:"aliases,omitempty"`
	// The comment of the function.
	Comment string `json:"comment,omitempty"`
	// The data type of the function.
	DataType ColumnTypeName `json:"data_type,omitempty"`
	// The dependency list of the function.
	DependencyList *DeltaSharingDependencyList `json:"dependency_list,omitempty"`
	// The full data type of the function.
	FullDataType string `json:"full_data_type,omitempty"`
	// The id of the function.
	Id string `json:"id,omitempty"`
	// The function parameter information.
	InputParams *FunctionParameterInfos `json:"input_params,omitempty"`
	// The name of the function.
	Name string `json:"name,omitempty"`
	// The properties of the function.
	Properties string `json:"properties,omitempty"`
	// The routine definition of the function.
	RoutineDefinition string `json:"routine_definition,omitempty"`
	// The name of the schema that the function belongs to.
	Schema string `json:"schema,omitempty"`
	// The securable kind of the function.
	SecurableKind SharedSecurableKind `json:"securable_kind,omitempty"`
	// The name of the share that the function belongs to.
	Share string `json:"share,omitempty"`
	// The id of the share that the function belongs to.
	ShareId string `json:"share_id,omitempty"`
	// The storage location of the function.
	StorageLocation string `json:"storage_location,omitempty"`
	// The tags of the function.
	Tags []catalog.TagKeyValue `json:"tags,omitempty"`

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

func (DeltaSharingFunction) MarshalJSON added in v0.61.0

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

func (*DeltaSharingFunction) UnmarshalJSON added in v0.61.0

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

type DeltaSharingFunctionDependency added in v0.59.0

type DeltaSharingFunctionDependency struct {
	FunctionName string `json:"function_name,omitempty"`

	SchemaName string `json:"schema_name,omitempty"`

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

A Function in UC as a dependency.

func (DeltaSharingFunctionDependency) MarshalJSON added in v0.59.0

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

func (*DeltaSharingFunctionDependency) UnmarshalJSON added in v0.59.0

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

type DeltaSharingTableDependency added in v0.59.0

type DeltaSharingTableDependency struct {
	SchemaName string `json:"schema_name,omitempty"`

	TableName string `json:"table_name,omitempty"`

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

A Table in UC as a dependency.

func (DeltaSharingTableDependency) MarshalJSON added in v0.59.0

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

func (*DeltaSharingTableDependency) UnmarshalJSON added in v0.59.0

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

type FederationPolicy added in v0.70.0

type FederationPolicy struct {
	// Description of the policy. This is a user-provided description.
	Comment string `json:"comment,omitempty"`
	// System-generated timestamp indicating when the policy was created.
	CreateTime string `json:"create_time,omitempty"`
	// Unique, immutable system-generated identifier for the federation policy.
	Id string `json:"id,omitempty"`
	// Name of the federation policy. A recipient can have multiple policies
	// with different names. The name must contain only lowercase alphanumeric
	// characters, numbers, and hyphens.
	Name string `json:"name,omitempty"`
	// Specifies the policy to use for validating OIDC claims in the federated
	// tokens.
	OidcPolicy *OidcFederationPolicy `json:"oidc_policy,omitempty"`
	// System-generated timestamp indicating when the policy was last updated.
	UpdateTime string `json:"update_time,omitempty"`

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

func (FederationPolicy) MarshalJSON added in v0.70.0

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

func (*FederationPolicy) UnmarshalJSON added in v0.70.0

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

type FunctionParameterInfo added in v0.59.0

type FunctionParameterInfo struct {
	// The comment of the parameter.
	Comment string `json:"comment,omitempty"`
	// The name of the parameter.
	Name string `json:"name,omitempty"`
	// The default value of the parameter.
	ParameterDefault string `json:"parameter_default,omitempty"`
	// The mode of the function parameter.
	ParameterMode FunctionParameterMode `json:"parameter_mode,omitempty"`
	// The type of the function parameter.
	ParameterType FunctionParameterType `json:"parameter_type,omitempty"`
	// The position of the parameter.
	Position int `json:"position,omitempty"`
	// The interval type of the parameter type.
	TypeIntervalType string `json:"type_interval_type,omitempty"`
	// The type of the parameter in JSON format.
	TypeJson string `json:"type_json,omitempty"`
	// The type of the parameter in Enum format.
	TypeName ColumnTypeName `json:"type_name,omitempty"`
	// The precision of the parameter type.
	TypePrecision int `json:"type_precision,omitempty"`
	// The scale of the parameter type.
	TypeScale int `json:"type_scale,omitempty"`
	// The type of the parameter in text format.
	TypeText string `json:"type_text,omitempty"`

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

Represents a parameter of a function. The same message is used for both input and output columns.

func (FunctionParameterInfo) MarshalJSON added in v0.59.0

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

func (*FunctionParameterInfo) UnmarshalJSON added in v0.59.0

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

type FunctionParameterInfos added in v0.59.0

type FunctionParameterInfos struct {
	// The list of parameters of the function.
	Parameters []FunctionParameterInfo `json:"parameters,omitempty"`
}

type FunctionParameterMode added in v0.59.0

type FunctionParameterMode string
const FunctionParameterModeIn FunctionParameterMode = `IN`
const FunctionParameterModeInout FunctionParameterMode = `INOUT`
const FunctionParameterModeOut FunctionParameterMode = `OUT`

func (*FunctionParameterMode) Set added in v0.59.0

Set raw string value and validate it against allowed values

func (*FunctionParameterMode) String added in v0.59.0

func (f *FunctionParameterMode) String() string

String representation for fmt.Print

func (*FunctionParameterMode) Type added in v0.59.0

func (f *FunctionParameterMode) Type() string

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

func (*FunctionParameterMode) Values added in v0.72.0

Values returns all possible values for FunctionParameterMode.

There is no guarantee on the order of the values in the slice.

type FunctionParameterType added in v0.59.0

type FunctionParameterType string
const FunctionParameterTypeColumn FunctionParameterType = `COLUMN`
const FunctionParameterTypeParam FunctionParameterType = `PARAM`

func (*FunctionParameterType) Set added in v0.59.0

Set raw string value and validate it against allowed values

func (*FunctionParameterType) String added in v0.59.0

func (f *FunctionParameterType) String() string

String representation for fmt.Print

func (*FunctionParameterType) Type added in v0.59.0

func (f *FunctionParameterType) Type() string

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

func (*FunctionParameterType) Values added in v0.72.0

Values returns all possible values for FunctionParameterType.

There is no guarantee on the order of the values in the slice.

type GetActivationUrlInfoRequest

type GetActivationUrlInfoRequest struct {
	// The one time activation url. It also accepts activation token.
	ActivationUrl string `json:"-" url:"-"`
}

type GetFederationPolicyRequest added in v0.70.0

type GetFederationPolicyRequest struct {
	// Name of the policy. This is the name of the policy to be retrieved.
	Name string `json:"-" url:"-"`
	// Name of the recipient. This is the name of the recipient for which the
	// policy is being retrieved.
	RecipientName string `json:"-" url:"-"`
}

type GetProviderRequest

type GetProviderRequest struct {
	// Name of the provider.
	Name string `json:"-" url:"-"`
}

type GetRecipientRequest

type GetRecipientRequest struct {
	// Name of the recipient.
	Name string `json:"-" url:"-"`
}

type GetRecipientSharePermissionsResponse

type GetRecipientSharePermissionsResponse struct {
	// Opaque token to retrieve the next page of results. Absent if there are no
	// more pages. __page_token__ should be set to this value for the next
	// request (for the next page of results).
	NextPageToken string `json:"next_page_token,omitempty"`
	// An array of data share permissions for a recipient.
	PermissionsOut []ShareToPrivilegeAssignment `json:"permissions_out,omitempty"`

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

func (GetRecipientSharePermissionsResponse) MarshalJSON added in v0.44.0

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

func (*GetRecipientSharePermissionsResponse) UnmarshalJSON added in v0.44.0

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

type GetSharePermissionsResponse added in v0.59.0

type GetSharePermissionsResponse struct {
	// Opaque token to retrieve the next page of results. Absent if there are no
	// more pages. __page_token__ should be set to this value for the next
	// request (for the next page of results).
	NextPageToken string `json:"next_page_token,omitempty"`
	// The privileges assigned to each principal
	PrivilegeAssignments []PrivilegeAssignment `json:"privilege_assignments,omitempty"`

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

func (GetSharePermissionsResponse) MarshalJSON added in v0.59.0

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

func (*GetSharePermissionsResponse) UnmarshalJSON added in v0.59.0

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

type GetShareRequest

type GetShareRequest struct {
	// Query for data to include in the share.
	IncludeSharedData bool `json:"-" url:"include_shared_data,omitempty"`
	// The name of the share.
	Name string `json:"-" url:"-"`

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

func (GetShareRequest) MarshalJSON added in v0.23.0

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

func (*GetShareRequest) UnmarshalJSON added in v0.23.0

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

type IpAccessList

type IpAccessList struct {
	// Allowed IP Addresses in CIDR notation. Limit of 100.
	AllowedIpAddresses []string `json:"allowed_ip_addresses,omitempty"`
}

type ListFederationPoliciesRequest added in v0.70.0

type ListFederationPoliciesRequest struct {
	MaxResults int `json:"-" url:"max_results,omitempty"`

	PageToken string `json:"-" url:"page_token,omitempty"`
	// Name of the recipient. This is the name of the recipient for which the
	// policies are being listed.
	RecipientName string `json:"-" url:"-"`

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

func (ListFederationPoliciesRequest) MarshalJSON added in v0.70.0

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

func (*ListFederationPoliciesRequest) UnmarshalJSON added in v0.70.0

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

type ListFederationPoliciesResponse added in v0.70.0

type ListFederationPoliciesResponse struct {
	NextPageToken string `json:"next_page_token,omitempty"`

	Policies []FederationPolicy `json:"policies,omitempty"`

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

func (ListFederationPoliciesResponse) MarshalJSON added in v0.70.0

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

func (*ListFederationPoliciesResponse) UnmarshalJSON added in v0.70.0

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

type ListProviderShareAssetsRequest added in v0.59.0

type ListProviderShareAssetsRequest struct {
	// Maximum number of functions to return.
	FunctionMaxResults int `json:"-" url:"function_max_results,omitempty"`
	// Maximum number of notebooks to return.
	NotebookMaxResults int `json:"-" url:"notebook_max_results,omitempty"`
	// The name of the provider who owns the share.
	ProviderName string `json:"-" url:"-"`
	// The name of the share.
	ShareName string `json:"-" url:"-"`
	// Maximum number of tables to return.
	TableMaxResults int `json:"-" url:"table_max_results,omitempty"`
	// Maximum number of volumes to return.
	VolumeMaxResults int `json:"-" url:"volume_max_results,omitempty"`

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

func (ListProviderShareAssetsRequest) MarshalJSON added in v0.59.0

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

func (*ListProviderShareAssetsRequest) UnmarshalJSON added in v0.59.0

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

type ListProviderShareAssetsResponse added in v0.59.0

type ListProviderShareAssetsResponse struct {
	// The list of functions in the share.
	Functions []DeltaSharingFunction `json:"functions,omitempty"`
	// The list of notebooks in the share.
	Notebooks []NotebookFile `json:"notebooks,omitempty"`
	// The metadata of the share.
	Share *Share `json:"share,omitempty"`
	// The list of tables in the share.
	Tables []Table `json:"tables,omitempty"`
	// The list of volumes in the share.
	Volumes []Volume `json:"volumes,omitempty"`
}

Response to ListProviderShareAssets, which contains the list of assets of a share.

type ListProviderSharesResponse

type ListProviderSharesResponse struct {
	// Opaque token to retrieve the next page of results. Absent if there are no
	// more pages. __page_token__ should be set to this value for the next
	// request (for the next page of results).
	NextPageToken string `json:"next_page_token,omitempty"`
	// An array of provider shares.
	Shares []ProviderShare `json:"shares,omitempty"`

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

func (ListProviderSharesResponse) MarshalJSON added in v0.44.0

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

func (*ListProviderSharesResponse) UnmarshalJSON added in v0.44.0

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

type ListProvidersRequest

type ListProvidersRequest struct {
	// If not provided, all providers will be returned. If no providers exist
	// with this ID, no results will be returned.
	DataProviderGlobalMetastoreId string `json:"-" url:"data_provider_global_metastore_id,omitempty"`
	// Maximum number of providers to return. - when set to 0, the page length
	// is set to a server configured value (recommended); - when set to a value
	// greater than 0, the page length is the minimum of this value and a server
	// configured value; - when set to a value less than 0, an invalid parameter
	// error is returned; - If not set, all valid providers are returned (not
	// recommended). - Note: The number of returned providers might be less than
	// the specified max_results size, even zero. The only definitive indication
	// that no further providers can be fetched is when the next_page_token is
	// unset from the response.
	MaxResults int `json:"-" url:"max_results,omitempty"`
	// Opaque pagination token to go to next page based on previous query.
	PageToken string `json:"-" url:"page_token,omitempty"`

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

func (ListProvidersRequest) MarshalJSON added in v0.23.0

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

func (*ListProvidersRequest) UnmarshalJSON added in v0.23.0

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

type ListProvidersResponse

type ListProvidersResponse struct {
	// Opaque token to retrieve the next page of results. Absent if there are no
	// more pages. __page_token__ should be set to this value for the next
	// request (for the next page of results).
	NextPageToken string `json:"next_page_token,omitempty"`
	// An array of provider information objects.
	Providers []ProviderInfo `json:"providers,omitempty"`

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

func (ListProvidersResponse) MarshalJSON added in v0.44.0

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

func (*ListProvidersResponse) UnmarshalJSON added in v0.44.0

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

type ListRecipientsRequest

type ListRecipientsRequest struct {
	// If not provided, all recipients will be returned. If no recipients exist
	// with this ID, no results will be returned.
	DataRecipientGlobalMetastoreId string `json:"-" url:"data_recipient_global_metastore_id,omitempty"`
	// Maximum number of recipients to return. - when set to 0, the page length
	// is set to a server configured value (recommended); - when set to a value
	// greater than 0, the page length is the minimum of this value and a server
	// configured value; - when set to a value less than 0, an invalid parameter
	// error is returned; - If not set, all valid recipients are returned (not
	// recommended). - Note: The number of returned recipients might be less
	// than the specified max_results size, even zero. The only definitive
	// indication that no further recipients can be fetched is when the
	// next_page_token is unset from the response.
	MaxResults int `json:"-" url:"max_results,omitempty"`
	// Opaque pagination token to go to next page based on previous query.
	PageToken string `json:"-" url:"page_token,omitempty"`

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

func (ListRecipientsRequest) MarshalJSON added in v0.23.0

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

func (*ListRecipientsRequest) UnmarshalJSON added in v0.23.0

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

type ListRecipientsResponse

type ListRecipientsResponse struct {
	// Opaque token to retrieve the next page of results. Absent if there are no
	// more pages. __page_token__ should be set to this value for the next
	// request (for the next page of results).
	NextPageToken string `json:"next_page_token,omitempty"`
	// An array of recipient information objects.
	Recipients []RecipientInfo `json:"recipients,omitempty"`

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

func (ListRecipientsResponse) MarshalJSON added in v0.44.0

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

func (*ListRecipientsResponse) UnmarshalJSON added in v0.44.0

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

type ListSharesRequest

type ListSharesRequest struct {
	// Maximum number of shares to return. - when set to 0, the page length is
	// set to a server configured value (recommended); - when set to a value
	// greater than 0, the page length is the minimum of this value and a server
	// configured value; - when set to a value less than 0, an invalid parameter
	// error is returned; - If not set, all valid shares are returned (not
	// recommended). - Note: The number of returned shares might be less than
	// the specified max_results size, even zero. The only definitive indication
	// that no further shares can be fetched is when the next_page_token is
	// unset from the response.
	MaxResults int `json:"-" url:"max_results,omitempty"`
	// Name of the provider in which to list shares.
	Name string `json:"-" url:"-"`
	// Opaque pagination token to go to next page based on previous query.
	PageToken string `json:"-" url:"page_token,omitempty"`

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

func (ListSharesRequest) MarshalJSON added in v0.44.0

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

func (*ListSharesRequest) UnmarshalJSON added in v0.44.0

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

type ListSharesResponse

type ListSharesResponse struct {
	// Opaque token to retrieve the next page of results. Absent if there are no
	// more pages. __page_token__ should be set to this value for the next
	// request (for the next page of results).
	NextPageToken string `json:"next_page_token,omitempty"`
	// An array of data share information objects.
	Shares []ShareInfo `json:"shares,omitempty"`

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

func (ListSharesResponse) MarshalJSON added in v0.44.0

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

func (*ListSharesResponse) UnmarshalJSON added in v0.44.0

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

type NotebookFile added in v0.59.0

type NotebookFile struct {
	// The comment of the notebook file.
	Comment string `json:"comment,omitempty"`
	// The id of the notebook file.
	Id string `json:"id,omitempty"`
	// Name of the notebook file.
	Name string `json:"name,omitempty"`
	// The name of the share that the notebook file belongs to.
	Share string `json:"share,omitempty"`
	// The id of the share that the notebook file belongs to.
	ShareId string `json:"share_id,omitempty"`
	// The tags of the notebook file.
	Tags []catalog.TagKeyValue `json:"tags,omitempty"`

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

func (NotebookFile) MarshalJSON added in v0.59.0

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

func (*NotebookFile) UnmarshalJSON added in v0.59.0

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

type OidcFederationPolicy added in v0.70.0

type OidcFederationPolicy struct {
	// The allowed token audiences, as specified in the 'aud' claim of federated
	// tokens. The audience identifier is intended to represent the recipient of
	// the token. Can be any non-empty string value. As long as the audience in
	// the token matches at least one audience in the policy,
	Audiences []string `json:"audiences,omitempty"`
	// The required token issuer, as specified in the 'iss' claim of federated
	// tokens.
	Issuer string `json:"issuer"`
	// The required token subject, as specified in the subject claim of
	// federated tokens. The subject claim identifies the identity of the user
	// or machine accessing the resource. Examples for Entra ID (AAD): - U2M
	// flow (group access): If the subject claim is `groups`, this must be the
	// Object ID of the group in Entra ID. - U2M flow (user access): If the
	// subject claim is `oid`, this must be the Object ID of the user in Entra
	// ID. - M2M flow (OAuth App access): If the subject claim is `azp`, this
	// must be the client ID of the OAuth app registered in Entra ID.
	Subject string `json:"subject"`
	// The claim that contains the subject of the token. Depending on the
	// identity provider and the use case (U2M or M2M), this can vary: - For
	// Entra ID (AAD): * U2M flow (group access): Use `groups`. * U2M flow (user
	// access): Use `oid`. * M2M flow (OAuth App access): Use `azp`. - For other
	// IdPs, refer to the specific IdP documentation.
	//
	// Supported `subject_claim` values are: - `oid`: Object ID of the user. -
	// `azp`: Client ID of the OAuth app. - `groups`: Object ID of the group. -
	// `sub`: Subject identifier for other use cases.
	SubjectClaim string `json:"subject_claim"`
}

Specifies the policy to use for validating OIDC claims in your federated tokens from Delta Sharing Clients. Refer to https://docs.databricks.com/en/delta-sharing/create-recipient-oidc-fed for more details.

type Partition

type Partition struct {
	// An array of partition values.
	Values []PartitionValue `json:"values,omitempty"`
}

type PartitionValue

type PartitionValue struct {
	// The name of the partition column.
	Name string `json:"name,omitempty"`
	// The operator to apply for the value.
	Op PartitionValueOp `json:"op,omitempty"`
	// The key of a Delta Sharing recipient's property. For example
	// "databricks-account-id". When this field is set, field `value` can not be
	// set.
	RecipientPropertyKey string `json:"recipient_property_key,omitempty"`
	// The value of the partition column. When this value is not set, it means
	// `null` value. When this field is set, field `recipient_property_key` can
	// not be set.
	Value string `json:"value,omitempty"`

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

func (PartitionValue) MarshalJSON added in v0.23.0

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

func (*PartitionValue) UnmarshalJSON added in v0.23.0

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

type PartitionValueOp

type PartitionValueOp string
const PartitionValueOpEqual PartitionValueOp = `EQUAL`
const PartitionValueOpLike PartitionValueOp = `LIKE`

func (*PartitionValueOp) Set

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

Set raw string value and validate it against allowed values

func (*PartitionValueOp) String

func (f *PartitionValueOp) String() string

String representation for fmt.Print

func (*PartitionValueOp) Type

func (f *PartitionValueOp) Type() string

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

func (*PartitionValueOp) Values added in v0.72.0

func (f *PartitionValueOp) Values() []PartitionValueOp

Values returns all possible values for PartitionValueOp.

There is no guarantee on the order of the values in the slice.

type PermissionsChange added in v0.59.0

type PermissionsChange struct {
	// The set of privileges to add.
	Add []string `json:"add,omitempty"`
	// The principal whose privileges we are changing. Only one of principal or
	// principal_id should be specified, never both at the same time.
	Principal string `json:"principal,omitempty"`
	// The set of privileges to remove.
	Remove []string `json:"remove,omitempty"`

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

func (PermissionsChange) MarshalJSON added in v0.59.0

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

func (*PermissionsChange) UnmarshalJSON added in v0.59.0

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

type Privilege

type Privilege string
const PrivilegeAccess Privilege = `ACCESS`
const PrivilegeAllPrivileges Privilege = `ALL_PRIVILEGES`
const PrivilegeApplyTag Privilege = `APPLY_TAG`
const PrivilegeCreate Privilege = `CREATE`
const PrivilegeCreateCatalog Privilege = `CREATE_CATALOG`
const PrivilegeCreateConnection Privilege = `CREATE_CONNECTION`
const PrivilegeCreateExternalLocation Privilege = `CREATE_EXTERNAL_LOCATION`
const PrivilegeCreateExternalTable Privilege = `CREATE_EXTERNAL_TABLE`
const PrivilegeCreateExternalVolume Privilege = `CREATE_EXTERNAL_VOLUME`
const PrivilegeCreateForeignCatalog Privilege = `CREATE_FOREIGN_CATALOG`
const PrivilegeCreateForeignSecurable Privilege = `CREATE_FOREIGN_SECURABLE`
const PrivilegeCreateFunction Privilege = `CREATE_FUNCTION`
const PrivilegeCreateManagedStorage Privilege = `CREATE_MANAGED_STORAGE`
const PrivilegeCreateMaterializedView Privilege = `CREATE_MATERIALIZED_VIEW`
const PrivilegeCreateModel Privilege = `CREATE_MODEL`
const PrivilegeCreateProvider Privilege = `CREATE_PROVIDER`
const PrivilegeCreateRecipient Privilege = `CREATE_RECIPIENT`
const PrivilegeCreateSchema Privilege = `CREATE_SCHEMA`
const PrivilegeCreateServiceCredential Privilege = `CREATE_SERVICE_CREDENTIAL`
const PrivilegeCreateShare Privilege = `CREATE_SHARE`
const PrivilegeCreateStorageCredential Privilege = `CREATE_STORAGE_CREDENTIAL`
const PrivilegeCreateTable Privilege = `CREATE_TABLE`
const PrivilegeCreateView Privilege = `CREATE_VIEW`
const PrivilegeCreateVolume Privilege = `CREATE_VOLUME`
const PrivilegeExecute Privilege = `EXECUTE`
const PrivilegeManage Privilege = `MANAGE`
const PrivilegeManageAllowlist Privilege = `MANAGE_ALLOWLIST`
const PrivilegeModify Privilege = `MODIFY`
const PrivilegeReadFiles Privilege = `READ_FILES`
const PrivilegeReadPrivateFiles Privilege = `READ_PRIVATE_FILES`
const PrivilegeReadVolume Privilege = `READ_VOLUME`
const PrivilegeRefresh Privilege = `REFRESH`
const PrivilegeSelect Privilege = `SELECT`
const PrivilegeSetSharePermission Privilege = `SET_SHARE_PERMISSION`
const PrivilegeUsage Privilege = `USAGE`
const PrivilegeUseCatalog Privilege = `USE_CATALOG`
const PrivilegeUseConnection Privilege = `USE_CONNECTION`
const PrivilegeUseMarketplaceAssets Privilege = `USE_MARKETPLACE_ASSETS`
const PrivilegeUseProvider Privilege = `USE_PROVIDER`
const PrivilegeUseRecipient Privilege = `USE_RECIPIENT`
const PrivilegeUseSchema Privilege = `USE_SCHEMA`
const PrivilegeUseShare Privilege = `USE_SHARE`
const PrivilegeWriteFiles Privilege = `WRITE_FILES`
const PrivilegeWritePrivateFiles Privilege = `WRITE_PRIVATE_FILES`
const PrivilegeWriteVolume Privilege = `WRITE_VOLUME`

func (*Privilege) Set

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

Set raw string value and validate it against allowed values

func (*Privilege) String

func (f *Privilege) String() string

String representation for fmt.Print

func (*Privilege) Type

func (f *Privilege) Type() string

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

func (*Privilege) Values added in v0.72.0

func (f *Privilege) Values() []Privilege

Values returns all possible values for Privilege.

There is no guarantee on the order of the values in the slice.

type PrivilegeAssignment

type PrivilegeAssignment struct {
	// The principal (user email address or group name). For deleted principals,
	// `principal` is empty while `principal_id` is populated.
	Principal string `json:"principal,omitempty"`
	// The privileges assigned to the principal.
	Privileges []Privilege `json:"privileges,omitempty"`

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

func (PrivilegeAssignment) MarshalJSON added in v0.23.0

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

func (*PrivilegeAssignment) UnmarshalJSON added in v0.23.0

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

type ProviderInfo

type ProviderInfo struct {
	AuthenticationType AuthenticationType `json:"authentication_type,omitempty"`
	// Cloud vendor of the provider's UC metastore. This field is only present
	// when the __authentication_type__ is **DATABRICKS**.
	Cloud string `json:"cloud,omitempty"`
	// Description about the provider.
	Comment string `json:"comment,omitempty"`
	// Time at which this Provider was created, in epoch milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// Username of Provider creator.
	CreatedBy string `json:"created_by,omitempty"`
	// The global UC metastore id of the data provider. This field is only
	// present when the __authentication_type__ is **DATABRICKS**. The
	// identifier is of format __cloud__:__region__:__metastore-uuid__.
	DataProviderGlobalMetastoreId string `json:"data_provider_global_metastore_id,omitempty"`
	// UUID of the provider's UC metastore. This field is only present when the
	// __authentication_type__ is **DATABRICKS**.
	MetastoreId string `json:"metastore_id,omitempty"`
	// The name of the Provider.
	Name string `json:"name,omitempty"`
	// Username of Provider owner.
	Owner string `json:"owner,omitempty"`
	// The recipient profile. This field is only present when the
	// authentication_type is `TOKEN` or `OAUTH_CLIENT_CREDENTIALS`.
	RecipientProfile *RecipientProfile `json:"recipient_profile,omitempty"`
	// This field is required when the __authentication_type__ is **TOKEN**,
	// **OAUTH_CLIENT_CREDENTIALS** or not provided.
	RecipientProfileStr string `json:"recipient_profile_str,omitempty"`
	// Cloud region of the provider's UC metastore. This field is only present
	// when the __authentication_type__ is **DATABRICKS**.
	Region string `json:"region,omitempty"`
	// Time at which this Provider was created, in epoch milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// Username of user who last modified Provider.
	UpdatedBy string `json:"updated_by,omitempty"`

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

func (ProviderInfo) MarshalJSON added in v0.23.0

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

func (*ProviderInfo) UnmarshalJSON added in v0.23.0

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

type ProviderShare

type ProviderShare struct {
	// The name of the Provider Share.
	Name string `json:"name,omitempty"`

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

func (ProviderShare) MarshalJSON added in v0.23.0

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

func (*ProviderShare) UnmarshalJSON added in v0.23.0

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

type ProvidersAPI

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

A data provider is an object representing the organization in the real world who shares the data. A provider contains shares which further contain the shared data.

func NewProviders

func NewProviders(client *client.DatabricksClient) *ProvidersAPI

func (*ProvidersAPI) Create

func (a *ProvidersAPI) Create(ctx context.Context, request CreateProvider) (*ProviderInfo, error)
Example (Providers)
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
	panic(err)
}

publicShareRecipient := `{
        "shareCredentialsVersion":1,
        "bearerToken":"dapiabcdefghijklmonpqrstuvwxyz",
        "endpoint":"https://sharing.delta.io/delta-sharing/"
    }
`

created, err := w.Providers.Create(ctx, sharing.CreateProvider{
	Name:                fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
	RecipientProfileStr: publicShareRecipient,
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", created)

// cleanup

err = w.Providers.DeleteByName(ctx, created.Name)
if err != nil {
	panic(err)
}

func (*ProvidersAPI) Delete

func (a *ProvidersAPI) Delete(ctx context.Context, request DeleteProviderRequest) error

func (*ProvidersAPI) DeleteByName

func (a *ProvidersAPI) DeleteByName(ctx context.Context, name string) error

Deletes an authentication provider, if the caller is a metastore admin or is the owner of the provider.

func (*ProvidersAPI) Get

func (a *ProvidersAPI) Get(ctx context.Context, request GetProviderRequest) (*ProviderInfo, error)
Example (Providers)
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
	panic(err)
}

publicShareRecipient := `{
        "shareCredentialsVersion":1,
        "bearerToken":"dapiabcdefghijklmonpqrstuvwxyz",
        "endpoint":"https://sharing.delta.io/delta-sharing/"
    }
`

created, err := w.Providers.Create(ctx, sharing.CreateProvider{
	Name:                fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
	RecipientProfileStr: publicShareRecipient,
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", created)

_, err = w.Providers.GetByName(ctx, created.Name)
if err != nil {
	panic(err)
}

// cleanup

err = w.Providers.DeleteByName(ctx, created.Name)
if err != nil {
	panic(err)
}

func (*ProvidersAPI) GetByName

func (a *ProvidersAPI) GetByName(ctx context.Context, name string) (*ProviderInfo, error)

Gets a specific authentication provider. The caller must supply the name of the provider, and must either be a metastore admin or the owner of the provider.

func (*ProvidersAPI) List added in v0.24.0

func (a *ProvidersAPI) List(ctx context.Context, request ListProvidersRequest) listing.Iterator[ProviderInfo]

Gets an array of available authentication providers. The caller must either be a metastore admin or the owner of the providers. Providers not owned by the caller are not included in the response. There is no guarantee of a specific ordering of the elements in the array.

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

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

func (*ProvidersAPI) ListAll

func (a *ProvidersAPI) ListAll(ctx context.Context, request ListProvidersRequest) ([]ProviderInfo, error)

Gets an array of available authentication providers. The caller must either be a metastore admin or the owner of the providers. Providers not owned by the caller are not included in the response. There is no guarantee of a specific ordering of the elements in the array.

func (*ProvidersAPI) ListProviderShareAssets added in v0.59.0

func (a *ProvidersAPI) ListProviderShareAssets(ctx context.Context, request ListProviderShareAssetsRequest) (*ListProviderShareAssetsResponse, error)

func (*ProvidersAPI) ListProviderShareAssetsByProviderNameAndShareName added in v0.59.0

func (a *ProvidersAPI) ListProviderShareAssetsByProviderNameAndShareName(ctx context.Context, providerName string, shareName string) (*ListProviderShareAssetsResponse, error)

Get arrays of assets associated with a specified provider's share. The caller is the recipient of the share.

func (*ProvidersAPI) ListShares

func (a *ProvidersAPI) ListShares(ctx context.Context, request ListSharesRequest) listing.Iterator[ProviderShare]

Gets an array of a specified provider's shares within the metastore where:

* the caller is a metastore admin, or * the caller is the owner.

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

publicShareRecipient := `{
        "shareCredentialsVersion":1,
        "bearerToken":"dapiabcdefghijklmonpqrstuvwxyz",
        "endpoint":"https://sharing.delta.io/delta-sharing/"
    }
`

created, err := w.Providers.Create(ctx, sharing.CreateProvider{
	Name:                fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
	RecipientProfileStr: publicShareRecipient,
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", created)

shares, err := w.Providers.ListSharesAll(ctx, sharing.ListSharesRequest{
	Name: created.Name,
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", shares)

// cleanup

err = w.Providers.DeleteByName(ctx, created.Name)
if err != nil {
	panic(err)
}

func (*ProvidersAPI) ListSharesAll added in v0.10.0

func (a *ProvidersAPI) ListSharesAll(ctx context.Context, request ListSharesRequest) ([]ProviderShare, error)

Gets an array of a specified provider's shares within the metastore where:

* the caller is a metastore admin, or * the caller is the owner.

func (*ProvidersAPI) ListSharesByName

func (a *ProvidersAPI) ListSharesByName(ctx context.Context, name string) (*ListProviderSharesResponse, error)

Gets an array of a specified provider's shares within the metastore where:

* the caller is a metastore admin, or * the caller is the owner.

func (*ProvidersAPI) ProviderInfoNameToMetastoreIdMap

func (a *ProvidersAPI) ProviderInfoNameToMetastoreIdMap(ctx context.Context, request ListProvidersRequest) (map[string]string, error)

ProviderInfoNameToMetastoreIdMap calls ProvidersAPI.ListAll and creates a map of results with ProviderInfo.Name as key and ProviderInfo.MetastoreId as value.

Returns an error if there's more than one ProviderInfo with the same .Name.

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

This method is generated by Databricks SDK Code Generator.

func (*ProvidersAPI) Update

func (a *ProvidersAPI) Update(ctx context.Context, request UpdateProvider) (*ProviderInfo, error)
Example (Providers)
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
	panic(err)
}

publicShareRecipient := `{
        "shareCredentialsVersion":1,
        "bearerToken":"dapiabcdefghijklmonpqrstuvwxyz",
        "endpoint":"https://sharing.delta.io/delta-sharing/"
    }
`

created, err := w.Providers.Create(ctx, sharing.CreateProvider{
	Name:                fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
	RecipientProfileStr: publicShareRecipient,
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", created)

_, err = w.Providers.Update(ctx, sharing.UpdateProvider{
	Name:    created.Name,
	Comment: "Comment for update",
})
if err != nil {
	panic(err)
}

// cleanup

err = w.Providers.DeleteByName(ctx, created.Name)
if err != nil {
	panic(err)
}

type ProvidersInterface added in v0.29.0

type ProvidersInterface interface {

	// Creates a new authentication provider minimally based on a name and
	// authentication type. The caller must be an admin on the metastore.
	Create(ctx context.Context, request CreateProvider) (*ProviderInfo, error)

	// Deletes an authentication provider, if the caller is a metastore admin or is
	// the owner of the provider.
	Delete(ctx context.Context, request DeleteProviderRequest) error

	// Deletes an authentication provider, if the caller is a metastore admin or is
	// the owner of the provider.
	DeleteByName(ctx context.Context, name string) error

	// Gets a specific authentication provider. The caller must supply the name of
	// the provider, and must either be a metastore admin or the owner of the
	// provider.
	Get(ctx context.Context, request GetProviderRequest) (*ProviderInfo, error)

	// Gets a specific authentication provider. The caller must supply the name of
	// the provider, and must either be a metastore admin or the owner of the
	// provider.
	GetByName(ctx context.Context, name string) (*ProviderInfo, error)

	// Gets an array of available authentication providers. The caller must either
	// be a metastore admin or the owner of the providers. Providers not owned by
	// the caller are not included in the response. There is no guarantee of a
	// specific ordering of the elements in the array.
	//
	// This method is generated by Databricks SDK Code Generator.
	List(ctx context.Context, request ListProvidersRequest) listing.Iterator[ProviderInfo]

	// Gets an array of available authentication providers. The caller must either
	// be a metastore admin or the owner of the providers. Providers not owned by
	// the caller are not included in the response. There is no guarantee of a
	// specific ordering of the elements in the array.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListAll(ctx context.Context, request ListProvidersRequest) ([]ProviderInfo, error)

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

	// Get arrays of assets associated with a specified provider's share. The caller
	// is the recipient of the share.
	ListProviderShareAssets(ctx context.Context, request ListProviderShareAssetsRequest) (*ListProviderShareAssetsResponse, error)

	// Get arrays of assets associated with a specified provider's share. The caller
	// is the recipient of the share.
	ListProviderShareAssetsByProviderNameAndShareName(ctx context.Context, providerName string, shareName string) (*ListProviderShareAssetsResponse, error)

	// Gets an array of a specified provider's shares within the metastore where:
	//
	// * the caller is a metastore admin, or * the caller is the owner.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListShares(ctx context.Context, request ListSharesRequest) listing.Iterator[ProviderShare]

	// Gets an array of a specified provider's shares within the metastore where:
	//
	// * the caller is a metastore admin, or * the caller is the owner.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListSharesAll(ctx context.Context, request ListSharesRequest) ([]ProviderShare, error)

	// Gets an array of a specified provider's shares within the metastore where:
	//
	// * the caller is a metastore admin, or * the caller is the owner.
	ListSharesByName(ctx context.Context, name string) (*ListProviderSharesResponse, error)

	// Updates the information for an authentication provider, if the caller is a
	// metastore admin or is the owner of the provider. If the update changes the
	// provider name, the caller must be both a metastore admin and the owner of the
	// provider.
	Update(ctx context.Context, request UpdateProvider) (*ProviderInfo, error)
}

type ProvidersService deprecated

type ProvidersService interface {

	// Creates a new authentication provider minimally based on a name and
	// authentication type. The caller must be an admin on the metastore.
	Create(ctx context.Context, request CreateProvider) (*ProviderInfo, error)

	// Deletes an authentication provider, if the caller is a metastore admin or
	// is the owner of the provider.
	Delete(ctx context.Context, request DeleteProviderRequest) error

	// Gets a specific authentication provider. The caller must supply the name
	// of the provider, and must either be a metastore admin or the owner of the
	// provider.
	Get(ctx context.Context, request GetProviderRequest) (*ProviderInfo, error)

	// Gets an array of available authentication providers. The caller must
	// either be a metastore admin or the owner of the providers. Providers not
	// owned by the caller are not included in the response. There is no
	// guarantee of a specific ordering of the elements in the array.
	List(ctx context.Context, request ListProvidersRequest) (*ListProvidersResponse, error)

	// Get arrays of assets associated with a specified provider's share. The
	// caller is the recipient of the share.
	ListProviderShareAssets(ctx context.Context, request ListProviderShareAssetsRequest) (*ListProviderShareAssetsResponse, error)

	// Gets an array of a specified provider's shares within the metastore
	// where:
	//
	// * the caller is a metastore admin, or * the caller is the owner.
	ListShares(ctx context.Context, request ListSharesRequest) (*ListProviderSharesResponse, error)

	// Updates the information for an authentication provider, if the caller is
	// a metastore admin or is the owner of the provider. If the update changes
	// the provider name, the caller must be both a metastore admin and the
	// owner of the provider.
	Update(ctx context.Context, request UpdateProvider) (*ProviderInfo, error)
}

A data provider is an object representing the organization in the real world who shares the data. A provider contains shares which further contain the shared data.

Deprecated: Do not use this interface, it will be removed in a future version of the SDK.

type RecipientActivationAPI

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

The Recipient Activation API is only applicable in the open sharing model where the recipient object has the authentication type of `TOKEN`. The data recipient follows the activation link shared by the data provider to download the credential file that includes the access token. The recipient will then use the credential file to establish a secure connection with the provider to receive the shared data.

Note that you can download the credential file only once. Recipients should treat the downloaded credential as a secret and must not share it outside of their organization.

func NewRecipientActivation

func NewRecipientActivation(client *client.DatabricksClient) *RecipientActivationAPI

func (*RecipientActivationAPI) GetActivationUrlInfo

func (a *RecipientActivationAPI) GetActivationUrlInfo(ctx context.Context, request GetActivationUrlInfoRequest) error

func (*RecipientActivationAPI) GetActivationUrlInfoByActivationUrl

func (a *RecipientActivationAPI) GetActivationUrlInfoByActivationUrl(ctx context.Context, activationUrl string) error

Gets an activation URL for a share.

func (*RecipientActivationAPI) RetrieveToken

func (a *RecipientActivationAPI) RetrieveToken(ctx context.Context, request RetrieveTokenRequest) (*RetrieveTokenResponse, error)

func (*RecipientActivationAPI) RetrieveTokenByActivationUrl

func (a *RecipientActivationAPI) RetrieveTokenByActivationUrl(ctx context.Context, activationUrl string) (*RetrieveTokenResponse, error)

Retrieve access token with an activation url. This is a public API without any authentication.

type RecipientActivationInterface added in v0.29.0

type RecipientActivationInterface interface {

	// Gets an activation URL for a share.
	GetActivationUrlInfo(ctx context.Context, request GetActivationUrlInfoRequest) error

	// Gets an activation URL for a share.
	GetActivationUrlInfoByActivationUrl(ctx context.Context, activationUrl string) error

	// Retrieve access token with an activation url. This is a public API without
	// any authentication.
	RetrieveToken(ctx context.Context, request RetrieveTokenRequest) (*RetrieveTokenResponse, error)

	// Retrieve access token with an activation url. This is a public API without
	// any authentication.
	RetrieveTokenByActivationUrl(ctx context.Context, activationUrl string) (*RetrieveTokenResponse, error)
}

type RecipientActivationService deprecated

type RecipientActivationService interface {

	// Gets an activation URL for a share.
	GetActivationUrlInfo(ctx context.Context, request GetActivationUrlInfoRequest) error

	// Retrieve access token with an activation url. This is a public API
	// without any authentication.
	RetrieveToken(ctx context.Context, request RetrieveTokenRequest) (*RetrieveTokenResponse, error)
}

The Recipient Activation API is only applicable in the open sharing model where the recipient object has the authentication type of `TOKEN`. The data recipient follows the activation link shared by the data provider to download the credential file that includes the access token. The recipient will then use the credential file to establish a secure connection with the provider to receive the shared data.

Note that you can download the credential file only once. Recipients should treat the downloaded credential as a secret and must not share it outside of their organization.

Deprecated: Do not use this interface, it will be removed in a future version of the SDK.

type RecipientFederationPoliciesAPI added in v0.70.0

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

The Recipient Federation Policies APIs are only applicable in the open sharing model where the recipient object has the authentication type of `OIDC_RECIPIENT`, enabling data sharing from Databricks to non-Databricks recipients. OIDC Token Federation enables secure, secret-less authentication for accessing Delta Sharing servers. Users and applications authenticate using short-lived OIDC tokens issued by their own Identity Provider (IdP), such as Azure Entra ID or Okta, without the need for managing static credentials or client secrets. A federation policy defines how non-Databricks recipients authenticate using OIDC tokens. It validates the OIDC claims in federated tokens and is set at the recipient level. The caller must be the owner of the recipient to create or manage a federation policy. Federation policies support the following scenarios: - User-to-Machine (U2M) flow: A user accesses Delta Shares using their own identity, such as connecting through PowerBI Delta Sharing Client. - Machine-to-Machine (M2M) flow: An application accesses Delta Shares using its own identity, typically for automation tasks like nightly jobs through Python Delta Sharing Client. OIDC Token Federation enables fine-grained access control, supports Multi-Factor Authentication (MFA), and enhances security by minimizing the risk of credential leakage through the use of short-lived, expiring tokens. It is designed for strong identity governance, secure cross-platform data sharing, and reduced operational overhead for credential management.

For more information, see https://www.databricks.com/blog/announcing-oidc-token-federation-enhanced-delta-sharing-security and https://docs.databricks.com/en/delta-sharing/create-recipient-oidc-fed

func NewRecipientFederationPolicies added in v0.70.0

func NewRecipientFederationPolicies(client *client.DatabricksClient) *RecipientFederationPoliciesAPI

func (*RecipientFederationPoliciesAPI) Create added in v0.70.0

func (a *RecipientFederationPoliciesAPI) Create(ctx context.Context, request CreateFederationPolicyRequest) (*FederationPolicy, error)

func (*RecipientFederationPoliciesAPI) Delete added in v0.70.0

func (a *RecipientFederationPoliciesAPI) Delete(ctx context.Context, request DeleteFederationPolicyRequest) error

func (*RecipientFederationPoliciesAPI) DeleteByRecipientNameAndName added in v0.70.0

func (a *RecipientFederationPoliciesAPI) DeleteByRecipientNameAndName(ctx context.Context, recipientName string, name string) error

Deletes an existing federation policy for an OIDC_FEDERATION recipient. The caller must be the owner of the recipient.

func (*RecipientFederationPoliciesAPI) GetFederationPolicy added in v0.70.0

func (a *RecipientFederationPoliciesAPI) GetFederationPolicy(ctx context.Context, request GetFederationPolicyRequest) (*FederationPolicy, error)

func (*RecipientFederationPoliciesAPI) GetFederationPolicyByRecipientNameAndName added in v0.70.0

func (a *RecipientFederationPoliciesAPI) GetFederationPolicyByRecipientNameAndName(ctx context.Context, recipientName string, name string) (*FederationPolicy, error)

Reads an existing federation policy for an OIDC_FEDERATION recipient for sharing data from Databricks to non-Databricks recipients. The caller must have read access to the recipient.

func (*RecipientFederationPoliciesAPI) List added in v0.70.0

func (a *RecipientFederationPoliciesAPI) List(ctx context.Context, request ListFederationPoliciesRequest) listing.Iterator[FederationPolicy]

Lists federation policies for an OIDC_FEDERATION recipient for sharing data from Databricks to non-Databricks recipients. The caller must have read access to the recipient.

func (*RecipientFederationPoliciesAPI) ListAll added in v0.70.0

func (a *RecipientFederationPoliciesAPI) ListAll(ctx context.Context, request ListFederationPoliciesRequest) ([]FederationPolicy, error)

Lists federation policies for an OIDC_FEDERATION recipient for sharing data from Databricks to non-Databricks recipients. The caller must have read access to the recipient.

func (*RecipientFederationPoliciesAPI) ListByRecipientName added in v0.70.0

func (a *RecipientFederationPoliciesAPI) ListByRecipientName(ctx context.Context, recipientName string) (*ListFederationPoliciesResponse, error)

Lists federation policies for an OIDC_FEDERATION recipient for sharing data from Databricks to non-Databricks recipients. The caller must have read access to the recipient.

func (*RecipientFederationPoliciesAPI) Update added in v0.70.0

func (a *RecipientFederationPoliciesAPI) Update(ctx context.Context, request UpdateFederationPolicyRequest) (*FederationPolicy, error)

type RecipientFederationPoliciesInterface added in v0.70.0

type RecipientFederationPoliciesInterface interface {

	// Create a federation policy for an OIDC_FEDERATION recipient for sharing data
	// from Databricks to non-Databricks recipients. The caller must be the owner of
	// the recipient. When sharing data from Databricks to non-Databricks clients,
	// you can define a federation policy to authenticate non-Databricks recipients.
	// The federation policy validates OIDC claims in federated tokens and is
	// defined at the recipient level. This enables secretless sharing clients to
	// authenticate using OIDC tokens.
	//
	// Supported scenarios for federation policies: 1. **User-to-Machine (U2M)
	// flow** (e.g., PowerBI): A user accesses a resource using their own identity.
	// 2. **Machine-to-Machine (M2M) flow** (e.g., OAuth App): An OAuth App accesses
	// a resource using its own identity, typically for tasks like running nightly
	// jobs.
	//
	// For an overview, refer to: - Blog post: Overview of feature:
	// https://www.databricks.com/blog/announcing-oidc-token-federation-enhanced-delta-sharing-security
	//
	// For detailed configuration guides based on your use case: - Creating a
	// Federation Policy as a provider:
	// https://docs.databricks.com/en/delta-sharing/create-recipient-oidc-fed -
	// Configuration and usage for Machine-to-Machine (M2M) applications (e.g.,
	// Python Delta Sharing Client):
	// https://docs.databricks.com/aws/en/delta-sharing/sharing-over-oidc-m2m -
	// Configuration and usage for User-to-Machine (U2M) applications (e.g.,
	// PowerBI):
	// https://docs.databricks.com/aws/en/delta-sharing/sharing-over-oidc-u2m
	Create(ctx context.Context, request CreateFederationPolicyRequest) (*FederationPolicy, error)

	// Deletes an existing federation policy for an OIDC_FEDERATION recipient. The
	// caller must be the owner of the recipient.
	Delete(ctx context.Context, request DeleteFederationPolicyRequest) error

	// Deletes an existing federation policy for an OIDC_FEDERATION recipient. The
	// caller must be the owner of the recipient.
	DeleteByRecipientNameAndName(ctx context.Context, recipientName string, name string) error

	// Reads an existing federation policy for an OIDC_FEDERATION recipient for
	// sharing data from Databricks to non-Databricks recipients. The caller must
	// have read access to the recipient.
	GetFederationPolicy(ctx context.Context, request GetFederationPolicyRequest) (*FederationPolicy, error)

	// Reads an existing federation policy for an OIDC_FEDERATION recipient for
	// sharing data from Databricks to non-Databricks recipients. The caller must
	// have read access to the recipient.
	GetFederationPolicyByRecipientNameAndName(ctx context.Context, recipientName string, name string) (*FederationPolicy, error)

	// Lists federation policies for an OIDC_FEDERATION recipient for sharing data
	// from Databricks to non-Databricks recipients. The caller must have read
	// access to the recipient.
	//
	// This method is generated by Databricks SDK Code Generator.
	List(ctx context.Context, request ListFederationPoliciesRequest) listing.Iterator[FederationPolicy]

	// Lists federation policies for an OIDC_FEDERATION recipient for sharing data
	// from Databricks to non-Databricks recipients. The caller must have read
	// access to the recipient.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListAll(ctx context.Context, request ListFederationPoliciesRequest) ([]FederationPolicy, error)

	// Lists federation policies for an OIDC_FEDERATION recipient for sharing data
	// from Databricks to non-Databricks recipients. The caller must have read
	// access to the recipient.
	ListByRecipientName(ctx context.Context, recipientName string) (*ListFederationPoliciesResponse, error)

	// Updates an existing federation policy for an OIDC_RECIPIENT. The caller must
	// be the owner of the recipient.
	Update(ctx context.Context, request UpdateFederationPolicyRequest) (*FederationPolicy, error)
}

type RecipientFederationPoliciesService deprecated added in v0.70.0

type RecipientFederationPoliciesService interface {

	// Create a federation policy for an OIDC_FEDERATION recipient for sharing
	// data from Databricks to non-Databricks recipients. The caller must be the
	// owner of the recipient. When sharing data from Databricks to
	// non-Databricks clients, you can define a federation policy to
	// authenticate non-Databricks recipients. The federation policy validates
	// OIDC claims in federated tokens and is defined at the recipient level.
	// This enables secretless sharing clients to authenticate using OIDC
	// tokens.
	//
	// Supported scenarios for federation policies: 1. **User-to-Machine (U2M)
	// flow** (e.g., PowerBI): A user accesses a resource using their own
	// identity. 2. **Machine-to-Machine (M2M) flow** (e.g., OAuth App): An
	// OAuth App accesses a resource using its own identity, typically for tasks
	// like running nightly jobs.
	//
	// For an overview, refer to: - Blog post: Overview of feature:
	// https://www.databricks.com/blog/announcing-oidc-token-federation-enhanced-delta-sharing-security
	//
	// For detailed configuration guides based on your use case: - Creating a
	// Federation Policy as a provider:
	// https://docs.databricks.com/en/delta-sharing/create-recipient-oidc-fed -
	// Configuration and usage for Machine-to-Machine (M2M) applications (e.g.,
	// Python Delta Sharing Client):
	// https://docs.databricks.com/aws/en/delta-sharing/sharing-over-oidc-m2m -
	// Configuration and usage for User-to-Machine (U2M) applications (e.g.,
	// PowerBI):
	// https://docs.databricks.com/aws/en/delta-sharing/sharing-over-oidc-u2m
	Create(ctx context.Context, request CreateFederationPolicyRequest) (*FederationPolicy, error)

	// Deletes an existing federation policy for an OIDC_FEDERATION recipient.
	// The caller must be the owner of the recipient.
	Delete(ctx context.Context, request DeleteFederationPolicyRequest) error

	// Reads an existing federation policy for an OIDC_FEDERATION recipient for
	// sharing data from Databricks to non-Databricks recipients. The caller
	// must have read access to the recipient.
	GetFederationPolicy(ctx context.Context, request GetFederationPolicyRequest) (*FederationPolicy, error)

	// Lists federation policies for an OIDC_FEDERATION recipient for sharing
	// data from Databricks to non-Databricks recipients. The caller must have
	// read access to the recipient.
	List(ctx context.Context, request ListFederationPoliciesRequest) (*ListFederationPoliciesResponse, error)

	// Updates an existing federation policy for an OIDC_RECIPIENT. The caller
	// must be the owner of the recipient.
	Update(ctx context.Context, request UpdateFederationPolicyRequest) (*FederationPolicy, error)
}

The Recipient Federation Policies APIs are only applicable in the open sharing model where the recipient object has the authentication type of `OIDC_RECIPIENT`, enabling data sharing from Databricks to non-Databricks recipients. OIDC Token Federation enables secure, secret-less authentication for accessing Delta Sharing servers. Users and applications authenticate using short-lived OIDC tokens issued by their own Identity Provider (IdP), such as Azure Entra ID or Okta, without the need for managing static credentials or client secrets. A federation policy defines how non-Databricks recipients authenticate using OIDC tokens. It validates the OIDC claims in federated tokens and is set at the recipient level. The caller must be the owner of the recipient to create or manage a federation policy. Federation policies support the following scenarios: - User-to-Machine (U2M) flow: A user accesses Delta Shares using their own identity, such as connecting through PowerBI Delta Sharing Client. - Machine-to-Machine (M2M) flow: An application accesses Delta Shares using its own identity, typically for automation tasks like nightly jobs through Python Delta Sharing Client. OIDC Token Federation enables fine-grained access control, supports Multi-Factor Authentication (MFA), and enhances security by minimizing the risk of credential leakage through the use of short-lived, expiring tokens. It is designed for strong identity governance, secure cross-platform data sharing, and reduced operational overhead for credential management.

For more information, see https://www.databricks.com/blog/announcing-oidc-token-federation-enhanced-delta-sharing-security and https://docs.databricks.com/en/delta-sharing/create-recipient-oidc-fed

Deprecated: Do not use this interface, it will be removed in a future version of the SDK.

type RecipientInfo

type RecipientInfo struct {
	// A boolean status field showing whether the Recipient's activation URL has
	// been exercised or not.
	Activated bool `json:"activated,omitempty"`
	// Full activation url to retrieve the access token. It will be empty if the
	// token is already retrieved.
	ActivationUrl string `json:"activation_url,omitempty"`

	AuthenticationType AuthenticationType `json:"authentication_type,omitempty"`
	// Cloud vendor of the recipient's Unity Catalog Metastore. This field is
	// only present when the __authentication_type__ is **DATABRICKS**.
	Cloud string `json:"cloud,omitempty"`
	// Description about the recipient.
	Comment string `json:"comment,omitempty"`
	// Time at which this recipient was created, in epoch milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// Username of recipient creator.
	CreatedBy string `json:"created_by,omitempty"`
	// The global Unity Catalog metastore id provided by the data recipient.
	// This field is only present when the __authentication_type__ is
	// **DATABRICKS**. The identifier is of format
	// __cloud__:__region__:__metastore-uuid__.
	DataRecipientGlobalMetastoreId string `json:"data_recipient_global_metastore_id,omitempty"`
	// Expiration timestamp of the token, in epoch milliseconds.
	ExpirationTime int64 `json:"expiration_time,omitempty"`
	// IP Access List
	IpAccessList *IpAccessList `json:"ip_access_list,omitempty"`
	// Unique identifier of recipient's Unity Catalog Metastore. This field is
	// only present when the __authentication_type__ is **DATABRICKS**.
	MetastoreId string `json:"metastore_id,omitempty"`
	// Name of Recipient.
	Name string `json:"name,omitempty"`
	// Username of the recipient owner.
	Owner string `json:"owner,omitempty"`
	// Recipient properties as map of string key-value pairs. When provided in
	// update request, the specified properties will override the existing
	// properties. To add and remove properties, one would need to perform a
	// read-modify-write.
	PropertiesKvpairs *SecurablePropertiesKvPairs `json:"properties_kvpairs,omitempty"`
	// Cloud region of the recipient's Unity Catalog Metastore. This field is
	// only present when the __authentication_type__ is **DATABRICKS**.
	Region string `json:"region,omitempty"`
	// The one-time sharing code provided by the data recipient. This field is
	// only present when the __authentication_type__ is **DATABRICKS**.
	SharingCode string `json:"sharing_code,omitempty"`
	// This field is only present when the __authentication_type__ is **TOKEN**.
	Tokens []RecipientTokenInfo `json:"tokens,omitempty"`
	// Time at which the recipient was updated, in epoch milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// Username of recipient updater.
	UpdatedBy string `json:"updated_by,omitempty"`

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

func (RecipientInfo) MarshalJSON added in v0.23.0

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

func (*RecipientInfo) UnmarshalJSON added in v0.23.0

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

type RecipientProfile

type RecipientProfile struct {
	// The token used to authorize the recipient.
	BearerToken string `json:"bearer_token,omitempty"`
	// The endpoint for the share to be used by the recipient.
	Endpoint string `json:"endpoint,omitempty"`
	// The version number of the recipient's credentials on a share.
	ShareCredentialsVersion int `json:"share_credentials_version,omitempty"`

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

func (RecipientProfile) MarshalJSON added in v0.23.0

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

func (*RecipientProfile) UnmarshalJSON added in v0.23.0

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

type RecipientTokenInfo

type RecipientTokenInfo struct {
	// Full activation URL to retrieve the access token. It will be empty if the
	// token is already retrieved.
	ActivationUrl string `json:"activation_url,omitempty"`
	// Time at which this recipient token was created, in epoch milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// Username of recipient token creator.
	CreatedBy string `json:"created_by,omitempty"`
	// Expiration timestamp of the token in epoch milliseconds.
	ExpirationTime int64 `json:"expiration_time,omitempty"`
	// Unique ID of the recipient token.
	Id string `json:"id,omitempty"`
	// Time at which this recipient token was updated, in epoch milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// Username of recipient token updater.
	UpdatedBy string `json:"updated_by,omitempty"`

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

func (RecipientTokenInfo) MarshalJSON added in v0.23.0

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

func (*RecipientTokenInfo) UnmarshalJSON added in v0.23.0

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

type RecipientsAPI

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

A recipient is an object you create using :method:recipients/create to represent an organization which you want to allow access shares. The way how sharing works differs depending on whether or not your recipient has access to a Databricks workspace that is enabled for Unity Catalog:

- For recipients with access to a Databricks workspace that is enabled for Unity Catalog, you can create a recipient object along with a unique sharing identifier you get from the recipient. The sharing identifier is the key identifier that enables the secure connection. This sharing mode is called **Databricks-to-Databricks sharing**.

- For recipients without access to a Databricks workspace that is enabled for Unity Catalog, when you create a recipient object, Databricks generates an activation link you can send to the recipient. The recipient follows the activation link to download the credential file, and then uses the credential file to establish a secure connection to receive the shared data. This sharing mode is called **open sharing**.

func NewRecipients

func NewRecipients(client *client.DatabricksClient) *RecipientsAPI

func (*RecipientsAPI) Create

func (a *RecipientsAPI) Create(ctx context.Context, request CreateRecipient) (*RecipientInfo, error)
Example (Recipients)
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
	panic(err)
}

created, err := w.Recipients.Create(ctx, sharing.CreateRecipient{
	Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", created)

// cleanup

err = w.Recipients.DeleteByName(ctx, created.Name)
if err != nil {
	panic(err)
}

func (*RecipientsAPI) Delete

func (a *RecipientsAPI) Delete(ctx context.Context, request DeleteRecipientRequest) error

func (*RecipientsAPI) DeleteByName

func (a *RecipientsAPI) DeleteByName(ctx context.Context, name string) error

Deletes the specified recipient from the metastore. The caller must be the owner of the recipient.

func (*RecipientsAPI) Get

func (a *RecipientsAPI) Get(ctx context.Context, request GetRecipientRequest) (*RecipientInfo, error)
Example (Recipients)
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
	panic(err)
}

created, err := w.Recipients.Create(ctx, sharing.CreateRecipient{
	Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", created)

_, err = w.Recipients.GetByName(ctx, created.Name)
if err != nil {
	panic(err)
}

// cleanup

err = w.Recipients.DeleteByName(ctx, created.Name)
if err != nil {
	panic(err)
}

func (*RecipientsAPI) GetByName

func (a *RecipientsAPI) GetByName(ctx context.Context, name string) (*RecipientInfo, error)

Gets a share recipient from the metastore if:

* the caller is the owner of the share recipient, or: * is a metastore admin

func (*RecipientsAPI) List added in v0.24.0

func (a *RecipientsAPI) List(ctx context.Context, request ListRecipientsRequest) listing.Iterator[RecipientInfo]

Gets an array of all share recipients within the current metastore where:

* the caller is a metastore admin, or * the caller is the owner. There is no guarantee of a specific ordering of the elements in the array.

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

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

func (*RecipientsAPI) ListAll

func (a *RecipientsAPI) ListAll(ctx context.Context, request ListRecipientsRequest) ([]RecipientInfo, error)

Gets an array of all share recipients within the current metastore where:

* the caller is a metastore admin, or * the caller is the owner. There is no guarantee of a specific ordering of the elements in the array.

func (*RecipientsAPI) RotateToken

func (a *RecipientsAPI) RotateToken(ctx context.Context, request RotateRecipientToken) (*RecipientInfo, error)
Example (Recipients)
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
	panic(err)
}

created, err := w.Recipients.Create(ctx, sharing.CreateRecipient{
	Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", created)

recipientInfo, err := w.Recipients.RotateToken(ctx, sharing.RotateRecipientToken{
	Name:                         created.Name,
	ExistingTokenExpireInSeconds: 0,
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", recipientInfo)

// cleanup

err = w.Recipients.DeleteByName(ctx, created.Name)
if err != nil {
	panic(err)
}

func (*RecipientsAPI) SharePermissions

func (a *RecipientsAPI) SharePermissions(ctx context.Context, request SharePermissionsRequest) (*GetRecipientSharePermissionsResponse, error)
Example (Recipients)
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
	panic(err)
}

created, err := w.Recipients.Create(ctx, sharing.CreateRecipient{
	Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", created)

sharePermissions, err := w.Recipients.SharePermissionsByName(ctx, created.Name)
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", sharePermissions)

// cleanup

err = w.Recipients.DeleteByName(ctx, created.Name)
if err != nil {
	panic(err)
}

func (*RecipientsAPI) SharePermissionsByName

func (a *RecipientsAPI) SharePermissionsByName(ctx context.Context, name string) (*GetRecipientSharePermissionsResponse, error)

Gets the share permissions for the specified Recipient. The caller must be a metastore admin or the owner of the Recipient.

func (*RecipientsAPI) Update

func (a *RecipientsAPI) Update(ctx context.Context, request UpdateRecipient) (*RecipientInfo, error)
Example (Recipients)
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
	panic(err)
}

created, err := w.Recipients.Create(ctx, sharing.CreateRecipient{
	Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", created)

_, err = w.Recipients.Update(ctx, sharing.UpdateRecipient{
	Name:    created.Name,
	Comment: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
	panic(err)
}

// cleanup

err = w.Recipients.DeleteByName(ctx, created.Name)
if err != nil {
	panic(err)
}

type RecipientsInterface added in v0.29.0

type RecipientsInterface interface {

	// Creates a new recipient with the delta sharing authentication type in the
	// metastore. The caller must be a metastore admin or have the
	// **CREATE_RECIPIENT** privilege on the metastore.
	Create(ctx context.Context, request CreateRecipient) (*RecipientInfo, error)

	// Deletes the specified recipient from the metastore. The caller must be the
	// owner of the recipient.
	Delete(ctx context.Context, request DeleteRecipientRequest) error

	// Deletes the specified recipient from the metastore. The caller must be the
	// owner of the recipient.
	DeleteByName(ctx context.Context, name string) error

	// Gets a share recipient from the metastore if:
	//
	// * the caller is the owner of the share recipient, or: * is a metastore admin
	Get(ctx context.Context, request GetRecipientRequest) (*RecipientInfo, error)

	// Gets a share recipient from the metastore if:
	//
	// * the caller is the owner of the share recipient, or: * is a metastore admin
	GetByName(ctx context.Context, name string) (*RecipientInfo, error)

	// Gets an array of all share recipients within the current metastore where:
	//
	// * the caller is a metastore admin, or * the caller is the owner. There is no
	// guarantee of a specific ordering of the elements in the array.
	//
	// This method is generated by Databricks SDK Code Generator.
	List(ctx context.Context, request ListRecipientsRequest) listing.Iterator[RecipientInfo]

	// Gets an array of all share recipients within the current metastore where:
	//
	// * the caller is a metastore admin, or * the caller is the owner. There is no
	// guarantee of a specific ordering of the elements in the array.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListAll(ctx context.Context, request ListRecipientsRequest) ([]RecipientInfo, error)

	// Refreshes the specified recipient's delta sharing authentication token with
	// the provided token info. The caller must be the owner of the recipient.
	RotateToken(ctx context.Context, request RotateRecipientToken) (*RecipientInfo, error)

	// Gets the share permissions for the specified Recipient. The caller must be a
	// metastore admin or the owner of the Recipient.
	SharePermissions(ctx context.Context, request SharePermissionsRequest) (*GetRecipientSharePermissionsResponse, error)

	// Gets the share permissions for the specified Recipient. The caller must be a
	// metastore admin or the owner of the Recipient.
	SharePermissionsByName(ctx context.Context, name string) (*GetRecipientSharePermissionsResponse, error)

	// Updates an existing recipient in the metastore. The caller must be a
	// metastore admin or the owner of the recipient. If the recipient name will be
	// updated, the user must be both a metastore admin and the owner of the
	// recipient.
	Update(ctx context.Context, request UpdateRecipient) (*RecipientInfo, error)
}

type RecipientsService deprecated

type RecipientsService interface {

	// Creates a new recipient with the delta sharing authentication type in the
	// metastore. The caller must be a metastore admin or have the
	// **CREATE_RECIPIENT** privilege on the metastore.
	Create(ctx context.Context, request CreateRecipient) (*RecipientInfo, error)

	// Deletes the specified recipient from the metastore. The caller must be
	// the owner of the recipient.
	Delete(ctx context.Context, request DeleteRecipientRequest) error

	// Gets a share recipient from the metastore if:
	//
	// * the caller is the owner of the share recipient, or: * is a metastore
	// admin
	Get(ctx context.Context, request GetRecipientRequest) (*RecipientInfo, error)

	// Gets an array of all share recipients within the current metastore where:
	//
	// * the caller is a metastore admin, or * the caller is the owner. There is
	// no guarantee of a specific ordering of the elements in the array.
	List(ctx context.Context, request ListRecipientsRequest) (*ListRecipientsResponse, error)

	// Refreshes the specified recipient's delta sharing authentication token
	// with the provided token info. The caller must be the owner of the
	// recipient.
	RotateToken(ctx context.Context, request RotateRecipientToken) (*RecipientInfo, error)

	// Gets the share permissions for the specified Recipient. The caller must
	// be a metastore admin or the owner of the Recipient.
	SharePermissions(ctx context.Context, request SharePermissionsRequest) (*GetRecipientSharePermissionsResponse, error)

	// Updates an existing recipient in the metastore. The caller must be a
	// metastore admin or the owner of the recipient. If the recipient name will
	// be updated, the user must be both a metastore admin and the owner of the
	// recipient.
	Update(ctx context.Context, request UpdateRecipient) (*RecipientInfo, error)
}

A recipient is an object you create using :method:recipients/create to represent an organization which you want to allow access shares. The way how sharing works differs depending on whether or not your recipient has access to a Databricks workspace that is enabled for Unity Catalog:

- For recipients with access to a Databricks workspace that is enabled for Unity Catalog, you can create a recipient object along with a unique sharing identifier you get from the recipient. The sharing identifier is the key identifier that enables the secure connection. This sharing mode is called **Databricks-to-Databricks sharing**.

- For recipients without access to a Databricks workspace that is enabled for Unity Catalog, when you create a recipient object, Databricks generates an activation link you can send to the recipient. The recipient follows the activation link to download the credential file, and then uses the credential file to establish a secure connection to receive the shared data. This sharing mode is called **open sharing**.

Deprecated: Do not use this interface, it will be removed in a future version of the SDK.

type RegisteredModelAlias added in v0.59.0

type RegisteredModelAlias struct {
	// Name of the alias.
	AliasName string `json:"alias_name,omitempty"`
	// Numeric model version that alias will reference.
	VersionNum int64 `json:"version_num,omitempty"`

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

func (RegisteredModelAlias) MarshalJSON added in v0.59.0

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

func (*RegisteredModelAlias) UnmarshalJSON added in v0.59.0

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

type RetrieveTokenRequest

type RetrieveTokenRequest struct {
	// The one time activation url. It also accepts activation token.
	ActivationUrl string `json:"-" url:"-"`
}

type RetrieveTokenResponse

type RetrieveTokenResponse struct {
	// The token used to authorize the recipient.
	BearerToken string `json:"bearerToken,omitempty"`
	// The endpoint for the share to be used by the recipient.
	Endpoint string `json:"endpoint,omitempty"`
	// Expiration timestamp of the token in epoch milliseconds.
	ExpirationTime string `json:"expirationTime,omitempty"`
	// These field names must follow the delta sharing protocol.
	ShareCredentialsVersion int `json:"shareCredentialsVersion,omitempty"`

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

func (RetrieveTokenResponse) MarshalJSON added in v0.23.0

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

func (*RetrieveTokenResponse) UnmarshalJSON added in v0.23.0

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

type RotateRecipientToken

type RotateRecipientToken struct {
	// The expiration time of the bearer token in ISO 8601 format. This will set
	// the expiration_time of existing token only to a smaller timestamp, it
	// cannot extend the expiration_time. Use 0 to expire the existing token
	// immediately, negative number will return an error.
	ExistingTokenExpireInSeconds int64 `json:"existing_token_expire_in_seconds"`
	// The name of the Recipient.
	Name string `json:"-" url:"-"`
}

type SecurablePropertiesKvPairs added in v0.9.0

type SecurablePropertiesKvPairs struct {
	// A map of key-value properties attached to the securable.
	Properties map[string]string `json:"properties"`
}

An object with __properties__ containing map of key-value properties attached to the securable.

type Share added in v0.78.0

type Share struct {
	Id string `json:"id,omitempty"`

	Name string `json:"name,omitempty"`

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

func (Share) MarshalJSON added in v0.78.0

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

func (*Share) UnmarshalJSON added in v0.78.0

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

type ShareInfo

type ShareInfo struct {
	// User-provided free-form text description.
	Comment string `json:"comment,omitempty"`
	// Time at which this share was created, in epoch milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// Username of share creator.
	CreatedBy string `json:"created_by,omitempty"`
	// Name of the share.
	Name string `json:"name,omitempty"`
	// A list of shared data objects within the share.
	Objects []SharedDataObject `json:"objects,omitempty"`
	// Username of current owner of share.
	Owner string `json:"owner,omitempty"`
	// Storage Location URL (full path) for the share.
	StorageLocation string `json:"storage_location,omitempty"`
	// Storage root URL for the share.
	StorageRoot string `json:"storage_root,omitempty"`
	// Time at which this share was updated, in epoch milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// Username of share updater.
	UpdatedBy string `json:"updated_by,omitempty"`

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

func (ShareInfo) MarshalJSON added in v0.23.0

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

func (*ShareInfo) UnmarshalJSON added in v0.23.0

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

type SharePermissionsRequest

type SharePermissionsRequest struct {
	// Maximum number of permissions to return. - when set to 0, the page length
	// is set to a server configured value (recommended); - when set to a value
	// greater than 0, the page length is the minimum of this value and a server
	// configured value; - when set to a value less than 0, an invalid parameter
	// error is returned; - If not set, all valid permissions are returned (not
	// recommended). - Note: The number of returned permissions might be less
	// than the specified max_results size, even zero. The only definitive
	// indication that no further permissions can be fetched is when the
	// next_page_token is unset from the response.
	MaxResults int `json:"-" url:"max_results,omitempty"`
	// The name of the Recipient.
	Name string `json:"-" url:"-"`
	// Opaque pagination token to go to next page based on previous query.
	PageToken string `json:"-" url:"page_token,omitempty"`

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

func (SharePermissionsRequest) MarshalJSON added in v0.44.0

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

func (*SharePermissionsRequest) UnmarshalJSON added in v0.44.0

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

type ShareToPrivilegeAssignment

type ShareToPrivilegeAssignment struct {
	// The privileges assigned to the principal.
	PrivilegeAssignments []PrivilegeAssignment `json:"privilege_assignments,omitempty"`
	// The share name.
	ShareName string `json:"share_name,omitempty"`

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

func (ShareToPrivilegeAssignment) MarshalJSON added in v0.23.0

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

func (*ShareToPrivilegeAssignment) UnmarshalJSON added in v0.23.0

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

type SharedDataObject

type SharedDataObject struct {
	// The time when this data object is added to the share, in epoch
	// milliseconds.
	AddedAt int64 `json:"added_at,omitempty"`
	// Username of the sharer.
	AddedBy string `json:"added_by,omitempty"`
	// Whether to enable cdf or indicate if cdf is enabled on the shared object.
	CdfEnabled bool `json:"cdf_enabled,omitempty"`
	// A user-provided comment when adding the data object to the share.
	Comment string `json:"comment,omitempty"`
	// The content of the notebook file when the data object type is
	// NOTEBOOK_FILE. This should be base64 encoded. Required for adding a
	// NOTEBOOK_FILE, optional for updating, ignored for other types.
	Content string `json:"content,omitempty"`
	// The type of the data object.
	DataObjectType SharedDataObjectDataObjectType `json:"data_object_type,omitempty"`
	// Whether to enable or disable sharing of data history. If not specified,
	// the default is **DISABLED**.
	HistoryDataSharingStatus SharedDataObjectHistoryDataSharingStatus `json:"history_data_sharing_status,omitempty"`
	// A fully qualified name that uniquely identifies a data object. For
	// example, a table's fully qualified name is in the format of
	// `<catalog>.<schema>.<table>`,
	Name string `json:"name"`
	// Array of partitions for the shared data.
	Partitions []Partition `json:"partitions,omitempty"`
	// A user-provided new name for the data object within the share. If this
	// new name is not provided, the object's original name will be used as the
	// `shared_as` name. The `shared_as` name must be unique within a share. For
	// tables, the new name must follow the format of `<schema>.<table>`.
	SharedAs string `json:"shared_as,omitempty"`
	// The start version associated with the object. This allows data providers
	// to control the lowest object version that is accessible by clients. If
	// specified, clients can query snapshots or changes for versions >=
	// start_version. If not specified, clients can only query starting from the
	// version of the object at the time it was added to the share.
	//
	// NOTE: The start_version should be <= the `current` version of the object.
	StartVersion int64 `json:"start_version,omitempty"`
	// One of: **ACTIVE**, **PERMISSION_DENIED**.
	Status SharedDataObjectStatus `json:"status,omitempty"`
	// A user-provided new name for the shared object within the share. If this
	// new name is not not provided, the object's original name will be used as
	// the `string_shared_as` name. The `string_shared_as` name must be unique
	// for objects of the same type within a Share. For notebooks, the new name
	// should be the new notebook file name.
	StringSharedAs string `json:"string_shared_as,omitempty"`

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

func (SharedDataObject) MarshalJSON added in v0.23.0

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

func (*SharedDataObject) UnmarshalJSON added in v0.23.0

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

type SharedDataObjectDataObjectType added in v0.36.0

type SharedDataObjectDataObjectType string
const SharedDataObjectDataObjectTypeFeatureSpec SharedDataObjectDataObjectType = `FEATURE_SPEC`
const SharedDataObjectDataObjectTypeFunction SharedDataObjectDataObjectType = `FUNCTION`
const SharedDataObjectDataObjectTypeMaterializedView SharedDataObjectDataObjectType = `MATERIALIZED_VIEW`
const SharedDataObjectDataObjectTypeModel SharedDataObjectDataObjectType = `MODEL`
const SharedDataObjectDataObjectTypeNotebookFile SharedDataObjectDataObjectType = `NOTEBOOK_FILE`
const SharedDataObjectDataObjectTypeSchema SharedDataObjectDataObjectType = `SCHEMA`
const SharedDataObjectDataObjectTypeStreamingTable SharedDataObjectDataObjectType = `STREAMING_TABLE`
const SharedDataObjectDataObjectTypeTable SharedDataObjectDataObjectType = `TABLE`
const SharedDataObjectDataObjectTypeView SharedDataObjectDataObjectType = `VIEW`

func (*SharedDataObjectDataObjectType) Set added in v0.36.0

Set raw string value and validate it against allowed values

func (*SharedDataObjectDataObjectType) String added in v0.36.0

String representation for fmt.Print

func (*SharedDataObjectDataObjectType) Type added in v0.36.0

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

func (*SharedDataObjectDataObjectType) Values added in v0.72.0

Values returns all possible values for SharedDataObjectDataObjectType.

There is no guarantee on the order of the values in the slice.

type SharedDataObjectHistoryDataSharingStatus added in v0.12.0

type SharedDataObjectHistoryDataSharingStatus string
const SharedDataObjectHistoryDataSharingStatusDisabled SharedDataObjectHistoryDataSharingStatus = `DISABLED`
const SharedDataObjectHistoryDataSharingStatusEnabled SharedDataObjectHistoryDataSharingStatus = `ENABLED`

func (*SharedDataObjectHistoryDataSharingStatus) Set added in v0.12.0

Set raw string value and validate it against allowed values

func (*SharedDataObjectHistoryDataSharingStatus) String added in v0.12.0

String representation for fmt.Print

func (*SharedDataObjectHistoryDataSharingStatus) Type added in v0.12.0

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

func (*SharedDataObjectHistoryDataSharingStatus) Values added in v0.72.0

Values returns all possible values for SharedDataObjectHistoryDataSharingStatus.

There is no guarantee on the order of the values in the slice.

type SharedDataObjectStatus

type SharedDataObjectStatus string
const SharedDataObjectStatusActive SharedDataObjectStatus = `ACTIVE`
const SharedDataObjectStatusPermissionDenied SharedDataObjectStatus = `PERMISSION_DENIED`

func (*SharedDataObjectStatus) Set

Set raw string value and validate it against allowed values

func (*SharedDataObjectStatus) String

func (f *SharedDataObjectStatus) String() string

String representation for fmt.Print

func (*SharedDataObjectStatus) Type

func (f *SharedDataObjectStatus) Type() string

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

func (*SharedDataObjectStatus) Values added in v0.72.0

Values returns all possible values for SharedDataObjectStatus.

There is no guarantee on the order of the values in the slice.

type SharedDataObjectUpdate

type SharedDataObjectUpdate struct {
	// One of: **ADD**, **REMOVE**, **UPDATE**.
	Action SharedDataObjectUpdateAction `json:"action,omitempty"`
	// The data object that is being added, removed, or updated. The maximum
	// number update data objects allowed is a 100.
	DataObject *SharedDataObject `json:"data_object,omitempty"`
}

type SharedDataObjectUpdateAction

type SharedDataObjectUpdateAction string
const SharedDataObjectUpdateActionAdd SharedDataObjectUpdateAction = `ADD`
const SharedDataObjectUpdateActionRemove SharedDataObjectUpdateAction = `REMOVE`
const SharedDataObjectUpdateActionUpdate SharedDataObjectUpdateAction = `UPDATE`

func (*SharedDataObjectUpdateAction) Set

Set raw string value and validate it against allowed values

func (*SharedDataObjectUpdateAction) String

String representation for fmt.Print

func (*SharedDataObjectUpdateAction) Type

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

func (*SharedDataObjectUpdateAction) Values added in v0.72.0

Values returns all possible values for SharedDataObjectUpdateAction.

There is no guarantee on the order of the values in the slice.

type SharedSecurableKind added in v0.59.0

type SharedSecurableKind string

The SecurableKind of a delta-shared object.

const SharedSecurableKindFunctionFeatureSpec SharedSecurableKind = `FUNCTION_FEATURE_SPEC`
const SharedSecurableKindFunctionRegisteredModel SharedSecurableKind = `FUNCTION_REGISTERED_MODEL`
const SharedSecurableKindFunctionStandard SharedSecurableKind = `FUNCTION_STANDARD`

func (*SharedSecurableKind) Set added in v0.59.0

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

Set raw string value and validate it against allowed values

func (*SharedSecurableKind) String added in v0.59.0

func (f *SharedSecurableKind) String() string

String representation for fmt.Print

func (*SharedSecurableKind) Type added in v0.59.0

func (f *SharedSecurableKind) Type() string

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

func (*SharedSecurableKind) Values added in v0.72.0

Values returns all possible values for SharedSecurableKind.

There is no guarantee on the order of the values in the slice.

type SharesAPI

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

A share is a container instantiated with :method:shares/create. Once created you can iteratively register a collection of existing data assets defined within the metastore using :method:shares/update. You can register data assets under their original name, qualified by their original schema, or provide alternate exposed names.

func NewShares

func NewShares(client *client.DatabricksClient) *SharesAPI

func (*SharesAPI) Create

func (a *SharesAPI) Create(ctx context.Context, request CreateShare) (*ShareInfo, error)
Example (Shares)
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
	panic(err)
}

createdShare, err := w.Shares.Create(ctx, sharing.CreateShare{
	Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", createdShare)

// cleanup

err = w.Shares.DeleteByName(ctx, createdShare.Name)
if err != nil {
	panic(err)
}

func (*SharesAPI) Delete

func (a *SharesAPI) Delete(ctx context.Context, request DeleteShareRequest) error

func (*SharesAPI) DeleteByName

func (a *SharesAPI) DeleteByName(ctx context.Context, name string) error

Deletes a data object share from the metastore. The caller must be an owner of the share.

func (*SharesAPI) Get

func (a *SharesAPI) Get(ctx context.Context, request GetShareRequest) (*ShareInfo, error)
Example (Shares)
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
	panic(err)
}

createdShare, err := w.Shares.Create(ctx, sharing.CreateShare{
	Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", createdShare)

_, err = w.Shares.GetByName(ctx, createdShare.Name)
if err != nil {
	panic(err)
}

// cleanup

err = w.Shares.DeleteByName(ctx, createdShare.Name)
if err != nil {
	panic(err)
}

func (*SharesAPI) GetByName

func (a *SharesAPI) GetByName(ctx context.Context, name string) (*ShareInfo, error)

Gets a data object share from the metastore. The caller must be a metastore admin or the owner of the share.

func (*SharesAPI) List deprecated added in v0.24.0

Gets an array of data object shares from the metastore. The caller must be a metastore admin or the owner of the share. There is no guarantee of a specific ordering of the elements in the array.

Deprecated: Do not use this interface, it will be removed in a future version of the SDK.

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

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

func (*SharesAPI) ListAll deprecated

func (a *SharesAPI) ListAll(ctx context.Context, request ListSharesRequest) ([]ShareInfo, error)

Gets an array of data object shares from the metastore. The caller must be a metastore admin or the owner of the share. There is no guarantee of a specific ordering of the elements in the array.

Deprecated: Do not use this interface, it will be removed in a future version of the SDK.

func (*SharesAPI) ListShares added in v0.84.0

func (a *SharesAPI) ListShares(ctx context.Context, request SharesListRequest) listing.Iterator[ShareInfo]

Gets an array of data object shares from the metastore. The caller must be a metastore admin or the owner of the share. There is no guarantee of a specific ordering of the elements in the array.

func (*SharesAPI) ListSharesAll added in v0.84.0

func (a *SharesAPI) ListSharesAll(ctx context.Context, request SharesListRequest) ([]ShareInfo, error)

Gets an array of data object shares from the metastore. The caller must be a metastore admin or the owner of the share. There is no guarantee of a specific ordering of the elements in the array.

func (*SharesAPI) SharePermissions

func (a *SharesAPI) SharePermissions(ctx context.Context, request SharePermissionsRequest) (*GetSharePermissionsResponse, error)

func (*SharesAPI) SharePermissionsByName

func (a *SharesAPI) SharePermissionsByName(ctx context.Context, name string) (*GetSharePermissionsResponse, error)

Gets the permissions for a data share from the metastore. The caller must be a metastore admin or the owner of the share.

func (*SharesAPI) Update

func (a *SharesAPI) Update(ctx context.Context, request UpdateShare) (*ShareInfo, error)
Example (Shares)
ctx := context.Background()
w, err := databricks.NewWorkspaceClient()
if err != nil {
	panic(err)
}

tableName := fmt.Sprintf("sdk-%x", time.Now().UnixNano())

createdCatalog, err := w.Catalogs.Create(ctx, catalog.CreateCatalog{
	Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", createdCatalog)

createdSchema, err := w.Schemas.Create(ctx, catalog.CreateSchema{
	Name:        fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
	CatalogName: createdCatalog.Name,
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", createdSchema)

_, err = w.StatementExecution.ExecuteAndWait(ctx, sql.ExecuteStatementRequest{
	WarehouseId: os.Getenv("TEST_DEFAULT_WAREHOUSE_ID"),
	Catalog:     createdCatalog.Name,
	Schema:      createdSchema.Name,
	Statement:   fmt.Sprintf("CREATE TABLE %s TBLPROPERTIES (delta.enableDeletionVectors=false) AS SELECT 2+2 as four", tableName),
})
if err != nil {
	panic(err)
}

tableFullName := fmt.Sprintf("%s.%s.%s", createdCatalog.Name, createdSchema.Name, tableName)

createdShare, err := w.Shares.Create(ctx, sharing.CreateShare{
	Name: fmt.Sprintf("sdk-%x", time.Now().UnixNano()),
})
if err != nil {
	panic(err)
}
logger.Infof(ctx, "found %v", createdShare)

_, err = w.Shares.Update(ctx, sharing.UpdateShare{
	Name: createdShare.Name,
	Updates: []sharing.SharedDataObjectUpdate{sharing.SharedDataObjectUpdate{
		Action: sharing.SharedDataObjectUpdateActionAdd,
		DataObject: &sharing.SharedDataObject{
			Name:           tableFullName,
			DataObjectType: "TABLE",
		},
	}},
})
if err != nil {
	panic(err)
}

// cleanup

err = w.Schemas.DeleteByFullName(ctx, createdSchema.FullName)
if err != nil {
	panic(err)
}
err = w.Catalogs.Delete(ctx, catalog.DeleteCatalogRequest{
	Name:  createdCatalog.Name,
	Force: true,
})
if err != nil {
	panic(err)
}
err = w.Tables.DeleteByFullName(ctx, tableFullName)
if err != nil {
	panic(err)
}
err = w.Shares.DeleteByName(ctx, createdShare.Name)
if err != nil {
	panic(err)
}

func (*SharesAPI) UpdatePermissions

func (a *SharesAPI) UpdatePermissions(ctx context.Context, request UpdateSharePermissions) (*UpdateSharePermissionsResponse, error)

type SharesInterface added in v0.29.0

type SharesInterface interface {

	// Creates a new share for data objects. Data objects can be added after
	// creation with **update**. The caller must be a metastore admin or have the
	// **CREATE_SHARE** privilege on the metastore.
	Create(ctx context.Context, request CreateShare) (*ShareInfo, error)

	// Deletes a data object share from the metastore. The caller must be an owner
	// of the share.
	Delete(ctx context.Context, request DeleteShareRequest) error

	// Deletes a data object share from the metastore. The caller must be an owner
	// of the share.
	DeleteByName(ctx context.Context, name string) error

	// Gets a data object share from the metastore. The caller must be a metastore
	// admin or the owner of the share.
	Get(ctx context.Context, request GetShareRequest) (*ShareInfo, error)

	// Gets a data object share from the metastore. The caller must be a metastore
	// admin or the owner of the share.
	GetByName(ctx context.Context, name string) (*ShareInfo, error)

	// Gets an array of data object shares from the metastore. The caller must be a
	// metastore admin or the owner of the share. There is no guarantee of a
	// specific ordering of the elements in the array.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListShares(ctx context.Context, request SharesListRequest) listing.Iterator[ShareInfo]

	// Gets an array of data object shares from the metastore. The caller must be a
	// metastore admin or the owner of the share. There is no guarantee of a
	// specific ordering of the elements in the array.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListSharesAll(ctx context.Context, request SharesListRequest) ([]ShareInfo, error)

	// Gets the permissions for a data share from the metastore. The caller must be
	// a metastore admin or the owner of the share.
	SharePermissions(ctx context.Context, request SharePermissionsRequest) (*GetSharePermissionsResponse, error)

	// Gets the permissions for a data share from the metastore. The caller must be
	// a metastore admin or the owner of the share.
	SharePermissionsByName(ctx context.Context, name string) (*GetSharePermissionsResponse, error)

	// Updates the share with the changes and data objects in the request. The
	// caller must be the owner of the share or a metastore admin.
	//
	// When the caller is a metastore admin, only the __owner__ field can be
	// updated.
	//
	// In the case the share name is changed, **updateShare** requires that the
	// caller is the owner of the share and has the CREATE_SHARE privilege.
	//
	// If there are notebook files in the share, the __storage_root__ field cannot
	// be updated.
	//
	// For each table that is added through this method, the share owner must also
	// have **SELECT** privilege on the table. This privilege must be maintained
	// indefinitely for recipients to be able to access the table. Typically, you
	// should use a group as the share owner.
	//
	// Table removals through **update** do not require additional privileges.
	Update(ctx context.Context, request UpdateShare) (*ShareInfo, error)

	// Updates the permissions for a data share in the metastore. The caller must be
	// a metastore admin or an owner of the share.
	//
	// For new recipient grants, the user must also be the recipient owner or
	// metastore admin. recipient revocations do not require additional privileges.
	UpdatePermissions(ctx context.Context, request UpdateSharePermissions) (*UpdateSharePermissionsResponse, error)
	// contains filtered or unexported methods
}

type SharesListRequest added in v0.84.0

type SharesListRequest struct {
	// Maximum number of shares to return. - when set to 0, the page length is
	// set to a server configured value (recommended); - when set to a value
	// greater than 0, the page length is the minimum of this value and a server
	// configured value; - when set to a value less than 0, an invalid parameter
	// error is returned; - If not set, all valid shares are returned (not
	// recommended). - Note: The number of returned shares might be less than
	// the specified max_results size, even zero. The only definitive indication
	// that no further shares can be fetched is when the next_page_token is
	// unset from the response.
	MaxResults int `json:"-" url:"max_results,omitempty"`
	// Opaque pagination token to go to next page based on previous query.
	PageToken string `json:"-" url:"page_token,omitempty"`

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

func (SharesListRequest) MarshalJSON added in v0.84.0

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

func (*SharesListRequest) UnmarshalJSON added in v0.84.0

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

type SharesService deprecated

type SharesService interface {

	// Creates a new share for data objects. Data objects can be added after
	// creation with **update**. The caller must be a metastore admin or have
	// the **CREATE_SHARE** privilege on the metastore.
	Create(ctx context.Context, request CreateShare) (*ShareInfo, error)

	// Deletes a data object share from the metastore. The caller must be an
	// owner of the share.
	Delete(ctx context.Context, request DeleteShareRequest) error

	// Gets a data object share from the metastore. The caller must be a
	// metastore admin or the owner of the share.
	Get(ctx context.Context, request GetShareRequest) (*ShareInfo, error)

	// Gets an array of data object shares from the metastore. The caller must
	// be a metastore admin or the owner of the share. There is no guarantee of
	// a specific ordering of the elements in the array.
	ListShares(ctx context.Context, request SharesListRequest) (*ListSharesResponse, error)

	// Gets the permissions for a data share from the metastore. The caller must
	// be a metastore admin or the owner of the share.
	SharePermissions(ctx context.Context, request SharePermissionsRequest) (*GetSharePermissionsResponse, error)

	// Updates the share with the changes and data objects in the request. The
	// caller must be the owner of the share or a metastore admin.
	//
	// When the caller is a metastore admin, only the __owner__ field can be
	// updated.
	//
	// In the case the share name is changed, **updateShare** requires that the
	// caller is the owner of the share and has the CREATE_SHARE privilege.
	//
	// If there are notebook files in the share, the __storage_root__ field
	// cannot be updated.
	//
	// For each table that is added through this method, the share owner must
	// also have **SELECT** privilege on the table. This privilege must be
	// maintained indefinitely for recipients to be able to access the table.
	// Typically, you should use a group as the share owner.
	//
	// Table removals through **update** do not require additional privileges.
	Update(ctx context.Context, request UpdateShare) (*ShareInfo, error)

	// Updates the permissions for a data share in the metastore. The caller
	// must be a metastore admin or an owner of the share.
	//
	// For new recipient grants, the user must also be the recipient owner or
	// metastore admin. recipient revocations do not require additional
	// privileges.
	UpdatePermissions(ctx context.Context, request UpdateSharePermissions) (*UpdateSharePermissionsResponse, error)
}

A share is a container instantiated with :method:shares/create. Once created you can iteratively register a collection of existing data assets defined within the metastore using :method:shares/update. You can register data assets under their original name, qualified by their original schema, or provide alternate exposed names.

Deprecated: Do not use this interface, it will be removed in a future version of the SDK.

type Table added in v0.59.0

type Table struct {
	// The comment of the table.
	Comment string `json:"comment,omitempty"`
	// The id of the table.
	Id string `json:"id,omitempty"`
	// Internal information for D2D sharing that should not be disclosed to
	// external users.
	InternalAttributes *TableInternalAttributes `json:"internal_attributes,omitempty"`
	// The catalog and schema of the materialized table
	MaterializationNamespace string `json:"materialization_namespace,omitempty"`
	// The name of a materialized table.
	MaterializedTableName string `json:"materialized_table_name,omitempty"`
	// The name of the table.
	Name string `json:"name,omitempty"`
	// The name of the schema that the table belongs to.
	Schema string `json:"schema,omitempty"`
	// The name of the share that the table belongs to.
	Share string `json:"share,omitempty"`
	// The id of the share that the table belongs to.
	ShareId string `json:"share_id,omitempty"`
	// The Tags of the table.
	Tags []catalog.TagKeyValue `json:"tags,omitempty"`

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

func (Table) MarshalJSON added in v0.59.0

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

func (*Table) UnmarshalJSON added in v0.59.0

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

type TableInternalAttributes added in v0.59.0

type TableInternalAttributes struct {
	// Managed Delta Metadata location for foreign iceberg tables.
	AuxiliaryManagedLocation string `json:"auxiliary_managed_location,omitempty"`
	// Will be populated in the reconciliation response for VIEW and
	// FOREIGN_TABLE, with the value of the parent UC entity's storage_location,
	// following the same logic as getManagedEntityPath in
	// CreateStagingTableHandler, which is used to store the materialized table
	// for a shared VIEW/FOREIGN_TABLE for D2O queries. The value will be used
	// on the recipient side to be whitelisted when SEG is enabled on the
	// workspace of the recipient, to allow the recipient users to query this
	// shared VIEW/FOREIGN_TABLE.
	ParentStorageLocation string `json:"parent_storage_location,omitempty"`
	// The cloud storage location of a shard table with DIRECTORY_BASED_TABLE
	// type.
	StorageLocation string `json:"storage_location,omitempty"`
	// The type of the shared table.
	Type TableInternalAttributesSharedTableType `json:"type,omitempty"`
	// The view definition of a shared view. DEPRECATED.
	ViewDefinition string `json:"view_definition,omitempty"`

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

Internal information for D2D sharing that should not be disclosed to external users.

func (TableInternalAttributes) MarshalJSON added in v0.59.0

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

func (*TableInternalAttributes) UnmarshalJSON added in v0.59.0

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

type TableInternalAttributesSharedTableType added in v0.59.0

type TableInternalAttributesSharedTableType string
const TableInternalAttributesSharedTableTypeDeltaIcebergTable TableInternalAttributesSharedTableType = `DELTA_ICEBERG_TABLE`
const TableInternalAttributesSharedTableTypeDirectoryBasedTable TableInternalAttributesSharedTableType = `DIRECTORY_BASED_TABLE`
const TableInternalAttributesSharedTableTypeFileBasedTable TableInternalAttributesSharedTableType = `FILE_BASED_TABLE`
const TableInternalAttributesSharedTableTypeForeignIcebergTable TableInternalAttributesSharedTableType = `FOREIGN_ICEBERG_TABLE`
const TableInternalAttributesSharedTableTypeForeignTable TableInternalAttributesSharedTableType = `FOREIGN_TABLE`
const TableInternalAttributesSharedTableTypeMaterializedView TableInternalAttributesSharedTableType = `MATERIALIZED_VIEW`
const TableInternalAttributesSharedTableTypeMetricView TableInternalAttributesSharedTableType = `METRIC_VIEW`
const TableInternalAttributesSharedTableTypeStreamingTable TableInternalAttributesSharedTableType = `STREAMING_TABLE`
const TableInternalAttributesSharedTableTypeView TableInternalAttributesSharedTableType = `VIEW`

func (*TableInternalAttributesSharedTableType) Set added in v0.59.0

Set raw string value and validate it against allowed values

func (*TableInternalAttributesSharedTableType) String added in v0.59.0

String representation for fmt.Print

func (*TableInternalAttributesSharedTableType) Type added in v0.59.0

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

func (*TableInternalAttributesSharedTableType) Values added in v0.72.0

Values returns all possible values for TableInternalAttributesSharedTableType.

There is no guarantee on the order of the values in the slice.

type UpdateFederationPolicyRequest added in v0.70.0

type UpdateFederationPolicyRequest struct {
	// Name of the policy. This is the name of the current name of the policy.
	Name string `json:"-" url:"-"`

	Policy FederationPolicy `json:"policy"`
	// Name of the recipient. This is the name of the recipient for which the
	// policy is being updated.
	RecipientName string `json:"-" url:"-"`
	// The field mask specifies which fields of the policy to update. To specify
	// multiple fields in the field mask, use comma as the separator (no space).
	// The special value '*' indicates that all fields should be updated (full
	// replacement). If unspecified, all fields that are set in the policy
	// provided in the update request will overwrite the corresponding fields in
	// the existing policy. Example value: 'comment,oidc_policy.audiences'.
	UpdateMask string `json:"-" url:"update_mask,omitempty"`

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

func (UpdateFederationPolicyRequest) MarshalJSON added in v0.70.0

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

func (*UpdateFederationPolicyRequest) UnmarshalJSON added in v0.70.0

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

type UpdateProvider

type UpdateProvider struct {
	// Description about the provider.
	Comment string `json:"comment,omitempty"`
	// Name of the provider.
	Name string `json:"-" url:"-"`
	// New name for the provider.
	NewName string `json:"new_name,omitempty"`
	// Username of Provider owner.
	Owner string `json:"owner,omitempty"`
	// This field is required when the __authentication_type__ is **TOKEN**,
	// **OAUTH_CLIENT_CREDENTIALS** or not provided.
	RecipientProfileStr string `json:"recipient_profile_str,omitempty"`

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

func (UpdateProvider) MarshalJSON added in v0.23.0

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

func (*UpdateProvider) UnmarshalJSON added in v0.23.0

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

type UpdateRecipient

type UpdateRecipient struct {
	// Description about the recipient.
	Comment string `json:"comment,omitempty"`
	// Expiration timestamp of the token, in epoch milliseconds.
	ExpirationTime int64 `json:"expiration_time,omitempty"`
	// IP Access List
	IpAccessList *IpAccessList `json:"ip_access_list,omitempty"`
	// Name of the recipient.
	Name string `json:"-" url:"-"`
	// New name for the recipient. .
	NewName string `json:"new_name,omitempty"`
	// Username of the recipient owner.
	Owner string `json:"owner,omitempty"`
	// Recipient properties as map of string key-value pairs. When provided in
	// update request, the specified properties will override the existing
	// properties. To add and remove properties, one would need to perform a
	// read-modify-write.
	PropertiesKvpairs *SecurablePropertiesKvPairs `json:"properties_kvpairs,omitempty"`

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

func (UpdateRecipient) MarshalJSON added in v0.23.0

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

func (*UpdateRecipient) UnmarshalJSON added in v0.23.0

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

type UpdateShare

type UpdateShare struct {
	// User-provided free-form text description.
	Comment string `json:"comment,omitempty"`
	// The name of the share.
	Name string `json:"-" url:"-"`
	// New name for the share.
	NewName string `json:"new_name,omitempty"`
	// Username of current owner of share.
	Owner string `json:"owner,omitempty"`
	// Storage root URL for the share.
	StorageRoot string `json:"storage_root,omitempty"`
	// Array of shared data object updates.
	Updates []SharedDataObjectUpdate `json:"updates,omitempty"`

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

func (UpdateShare) MarshalJSON added in v0.23.0

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

func (*UpdateShare) UnmarshalJSON added in v0.23.0

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

type UpdateSharePermissions

type UpdateSharePermissions struct {
	// Array of permissions change objects.
	Changes []PermissionsChange `json:"changes,omitempty"`
	// The name of the share.
	Name string `json:"-" url:"-"`
	// Optional. Whether to return the latest permissions list of the share in
	// the response.
	OmitPermissionsList bool `json:"omit_permissions_list,omitempty"`

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

func (UpdateSharePermissions) MarshalJSON added in v0.44.0

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

func (*UpdateSharePermissions) UnmarshalJSON added in v0.44.0

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

type UpdateSharePermissionsResponse added in v0.59.0

type UpdateSharePermissionsResponse struct {
	// The privileges assigned to each principal
	PrivilegeAssignments []PrivilegeAssignment `json:"privilege_assignments,omitempty"`
}

type Volume added in v0.59.0

type Volume struct {
	// The comment of the volume.
	Comment string `json:"comment,omitempty"`
	// This id maps to the shared_volume_id in database Recipient needs
	// shared_volume_id for recon to check if this volume is already in
	// recipient's DB or not.
	Id string `json:"id,omitempty"`
	// Internal attributes for D2D sharing that should not be disclosed to
	// external users.
	InternalAttributes *VolumeInternalAttributes `json:"internal_attributes,omitempty"`
	// The name of the volume.
	Name string `json:"name,omitempty"`
	// The name of the schema that the volume belongs to.
	Schema string `json:"schema,omitempty"`
	// The name of the share that the volume belongs to.
	Share string `json:"share,omitempty"`
	// / The id of the share that the volume belongs to.
	ShareId string `json:"share_id,omitempty"`
	// The tags of the volume.
	Tags []catalog.TagKeyValue `json:"tags,omitempty"`

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

func (Volume) MarshalJSON added in v0.59.0

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

func (*Volume) UnmarshalJSON added in v0.59.0

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

type VolumeInternalAttributes added in v0.59.0

type VolumeInternalAttributes struct {
	// The cloud storage location of the volume
	StorageLocation string `json:"storage_location,omitempty"`
	// The type of the shared volume.
	Type string `json:"type,omitempty"`

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

Internal information for D2D sharing that should not be disclosed to external users.

func (VolumeInternalAttributes) MarshalJSON added in v0.59.0

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

func (*VolumeInternalAttributes) UnmarshalJSON added in v0.59.0

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

Jump to

Keyboard shortcuts

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