sharing

package
v0.73.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2025 License: Apache-2.0 Imports: 12 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 {

	// Wire name: 'policy'
	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:"-" tf:"-"`
}

Create recipient federation policy

func (CreateFederationPolicyRequest) MarshalJSON added in v0.73.0

func (st CreateFederationPolicyRequest) MarshalJSON() ([]byte, error)

func (*CreateFederationPolicyRequest) UnmarshalJSON added in v0.73.0

func (st *CreateFederationPolicyRequest) UnmarshalJSON(b []byte) error

type CreateProvider

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

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

func (CreateProvider) MarshalJSON added in v0.23.0

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

func (*CreateProvider) UnmarshalJSON added in v0.23.0

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

type CreateRecipient

type CreateRecipient struct {
	// The delta sharing authentication type.
	// Wire name: 'authentication_type'
	AuthenticationType AuthenticationType `json:"authentication_type"`
	// Description about the recipient.
	// Wire name: 'comment'
	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__.
	// Wire name: 'data_recipient_global_metastore_id'
	DataRecipientGlobalMetastoreId string `json:"data_recipient_global_metastore_id,omitempty"`
	// Expiration timestamp of the token, in epoch milliseconds.
	// Wire name: 'expiration_time'
	ExpirationTime int64 `json:"expiration_time,omitempty"`
	// IP Access List
	// Wire name: 'ip_access_list'
	IpAccessList *IpAccessList `json:"ip_access_list,omitempty"`
	// Name of Recipient.
	// Wire name: 'name'
	Name string `json:"name"`
	// Username of the recipient owner.
	// Wire name: '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.
	// Wire name: 'properties_kvpairs'
	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**.
	// Wire name: 'sharing_code'
	SharingCode string `json:"sharing_code,omitempty"`

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

func (CreateRecipient) MarshalJSON added in v0.23.0

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

func (*CreateRecipient) UnmarshalJSON added in v0.23.0

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

type CreateShare

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

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

func (CreateShare) MarshalJSON added in v0.23.0

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

func (*CreateShare) UnmarshalJSON added in v0.23.0

func (st *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:"-" tf:"-"`
	// Name of the recipient. This is the name of the recipient for which the
	// policy is being deleted.
	RecipientName string `json:"-" tf:"-"`
}

Delete recipient federation policy

func (DeleteFederationPolicyRequest) MarshalJSON added in v0.73.0

func (st DeleteFederationPolicyRequest) MarshalJSON() ([]byte, error)

func (*DeleteFederationPolicyRequest) UnmarshalJSON added in v0.73.0

func (st *DeleteFederationPolicyRequest) UnmarshalJSON(b []byte) error

type DeleteProviderRequest

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

Delete a provider

func (DeleteProviderRequest) MarshalJSON added in v0.73.0

func (st DeleteProviderRequest) MarshalJSON() ([]byte, error)

func (*DeleteProviderRequest) UnmarshalJSON added in v0.73.0

func (st *DeleteProviderRequest) UnmarshalJSON(b []byte) error

type DeleteRecipientRequest

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

Delete a share recipient

func (DeleteRecipientRequest) MarshalJSON added in v0.73.0

func (st DeleteRecipientRequest) MarshalJSON() ([]byte, error)

func (*DeleteRecipientRequest) UnmarshalJSON added in v0.73.0

func (st *DeleteRecipientRequest) UnmarshalJSON(b []byte) error

type DeleteResponse added in v0.34.0

type DeleteResponse struct {
}

func (DeleteResponse) MarshalJSON added in v0.73.0

func (st DeleteResponse) MarshalJSON() ([]byte, error)

func (*DeleteResponse) UnmarshalJSON added in v0.73.0

func (st *DeleteResponse) UnmarshalJSON(b []byte) error

type DeleteShareRequest

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

Delete a share

func (DeleteShareRequest) MarshalJSON added in v0.73.0

func (st DeleteShareRequest) MarshalJSON() ([]byte, error)

func (*DeleteShareRequest) UnmarshalJSON added in v0.73.0

func (st *DeleteShareRequest) UnmarshalJSON(b []byte) error

type DeltaSharingDependency added in v0.59.0

type DeltaSharingDependency struct {
	// A Function in UC as a dependency.
	// Wire name: 'function'
	Function *DeltaSharingFunctionDependency `json:"function,omitempty"`
	// A Table in UC as a dependency.
	// Wire name: 'table'
	Table *DeltaSharingTableDependency `json:"table,omitempty"`
}

Represents a UC dependency.

func (DeltaSharingDependency) MarshalJSON added in v0.73.0

func (st DeltaSharingDependency) MarshalJSON() ([]byte, error)

func (*DeltaSharingDependency) UnmarshalJSON added in v0.73.0

func (st *DeltaSharingDependency) UnmarshalJSON(b []byte) error

type DeltaSharingDependencyList added in v0.59.0

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

Represents a list of dependencies.

func (DeltaSharingDependencyList) MarshalJSON added in v0.73.0

func (st DeltaSharingDependencyList) MarshalJSON() ([]byte, error)

func (*DeltaSharingDependencyList) UnmarshalJSON added in v0.73.0

func (st *DeltaSharingDependencyList) UnmarshalJSON(b []byte) error

type DeltaSharingFunction added in v0.61.0

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

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

func (DeltaSharingFunction) MarshalJSON added in v0.61.0

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

func (*DeltaSharingFunction) UnmarshalJSON added in v0.61.0

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

type DeltaSharingFunctionDependency added in v0.59.0

type DeltaSharingFunctionDependency struct {

	// Wire name: 'function_name'
	FunctionName string `json:"function_name,omitempty"`

	// Wire name: 'schema_name'
	SchemaName string `json:"schema_name,omitempty"`

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

A Function in UC as a dependency.

func (DeltaSharingFunctionDependency) MarshalJSON added in v0.59.0

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

func (*DeltaSharingFunctionDependency) UnmarshalJSON added in v0.59.0

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

type DeltaSharingTableDependency added in v0.59.0

type DeltaSharingTableDependency struct {

	// Wire name: 'schema_name'
	SchemaName string `json:"schema_name,omitempty"`

	// Wire name: 'table_name'
	TableName string `json:"table_name,omitempty"`

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

A Table in UC as a dependency.

func (DeltaSharingTableDependency) MarshalJSON added in v0.59.0

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

func (*DeltaSharingTableDependency) UnmarshalJSON added in v0.59.0

func (st *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.
	// Wire name: 'comment'
	Comment string `json:"comment,omitempty"`
	// System-generated timestamp indicating when the policy was created.
	// Wire name: 'create_time'
	CreateTime string `json:"create_time,omitempty"`
	// Unique, immutable system-generated identifier for the federation policy.
	// Wire name: 'id'
	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.
	// Wire name: 'name'
	Name string `json:"name,omitempty"`
	// Specifies the policy to use for validating OIDC claims in the federated
	// tokens.
	// Wire name: 'oidc_policy'
	OidcPolicy *OidcFederationPolicy `json:"oidc_policy,omitempty"`
	// System-generated timestamp indicating when the policy was last updated.
	// Wire name: 'update_time'
	UpdateTime string `json:"update_time,omitempty"`

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

func (FederationPolicy) MarshalJSON added in v0.70.0

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

func (*FederationPolicy) UnmarshalJSON added in v0.70.0

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

type FunctionParameterInfo added in v0.59.0

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

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

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 (st FunctionParameterInfo) MarshalJSON() ([]byte, error)

func (*FunctionParameterInfo) UnmarshalJSON added in v0.59.0

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

type FunctionParameterInfos added in v0.59.0

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

func (FunctionParameterInfos) MarshalJSON added in v0.73.0

func (st FunctionParameterInfos) MarshalJSON() ([]byte, error)

func (*FunctionParameterInfos) UnmarshalJSON added in v0.73.0

func (st *FunctionParameterInfos) UnmarshalJSON(b []byte) error

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:"-" tf:"-"`
}

Get a share activation URL

func (GetActivationUrlInfoRequest) MarshalJSON added in v0.73.0

func (st GetActivationUrlInfoRequest) MarshalJSON() ([]byte, error)

func (*GetActivationUrlInfoRequest) UnmarshalJSON added in v0.73.0

func (st *GetActivationUrlInfoRequest) UnmarshalJSON(b []byte) error

type GetActivationUrlInfoResponse added in v0.34.0

type GetActivationUrlInfoResponse struct {
}

func (GetActivationUrlInfoResponse) MarshalJSON added in v0.73.0

func (st GetActivationUrlInfoResponse) MarshalJSON() ([]byte, error)

func (*GetActivationUrlInfoResponse) UnmarshalJSON added in v0.73.0

func (st *GetActivationUrlInfoResponse) UnmarshalJSON(b []byte) error

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:"-" tf:"-"`
	// Name of the recipient. This is the name of the recipient for which the
	// policy is being retrieved.
	RecipientName string `json:"-" tf:"-"`
}

Get recipient federation policy

func (GetFederationPolicyRequest) MarshalJSON added in v0.73.0

func (st GetFederationPolicyRequest) MarshalJSON() ([]byte, error)

func (*GetFederationPolicyRequest) UnmarshalJSON added in v0.73.0

func (st *GetFederationPolicyRequest) UnmarshalJSON(b []byte) error

type GetProviderRequest

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

Get a provider

func (GetProviderRequest) MarshalJSON added in v0.73.0

func (st GetProviderRequest) MarshalJSON() ([]byte, error)

func (*GetProviderRequest) UnmarshalJSON added in v0.73.0

func (st *GetProviderRequest) UnmarshalJSON(b []byte) error

type GetRecipientRequest

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

Get a share recipient

func (GetRecipientRequest) MarshalJSON added in v0.73.0

func (st GetRecipientRequest) MarshalJSON() ([]byte, error)

func (*GetRecipientRequest) UnmarshalJSON added in v0.73.0

func (st *GetRecipientRequest) UnmarshalJSON(b []byte) error

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).
	// Wire name: 'next_page_token'
	NextPageToken string `json:"next_page_token,omitempty"`
	// An array of data share permissions for a recipient.
	// Wire name: 'permissions_out'
	PermissionsOut []ShareToPrivilegeAssignment `json:"permissions_out,omitempty"`

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

func (GetRecipientSharePermissionsResponse) MarshalJSON added in v0.44.0

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

func (*GetRecipientSharePermissionsResponse) UnmarshalJSON added in v0.44.0

func (st *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).
	// Wire name: 'next_page_token'
	NextPageToken string `json:"next_page_token,omitempty"`
	// The privileges assigned to each principal
	// Wire name: 'privilege_assignments'
	PrivilegeAssignments []PrivilegeAssignment `json:"privilege_assignments,omitempty"`

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

func (GetSharePermissionsResponse) MarshalJSON added in v0.59.0

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

func (*GetSharePermissionsResponse) UnmarshalJSON added in v0.59.0

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

type GetShareRequest

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

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

Get a share

func (GetShareRequest) MarshalJSON added in v0.23.0

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

func (*GetShareRequest) UnmarshalJSON added in v0.23.0

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

type IpAccessList

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

func (IpAccessList) MarshalJSON added in v0.73.0

func (st IpAccessList) MarshalJSON() ([]byte, error)

func (*IpAccessList) UnmarshalJSON added in v0.73.0

func (st *IpAccessList) UnmarshalJSON(b []byte) error

type ListFederationPoliciesRequest added in v0.70.0

type ListFederationPoliciesRequest struct {
	MaxResults int `json:"-" tf:"-"`

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

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

List recipient federation policies

func (ListFederationPoliciesRequest) MarshalJSON added in v0.70.0

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

func (*ListFederationPoliciesRequest) UnmarshalJSON added in v0.70.0

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

type ListFederationPoliciesResponse added in v0.70.0

type ListFederationPoliciesResponse struct {

	// Wire name: 'next_page_token'
	NextPageToken string `json:"next_page_token,omitempty"`

	// Wire name: 'policies'
	Policies []FederationPolicy `json:"policies,omitempty"`

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

func (ListFederationPoliciesResponse) MarshalJSON added in v0.70.0

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

func (*ListFederationPoliciesResponse) UnmarshalJSON added in v0.70.0

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

type ListProviderShareAssetsRequest added in v0.59.0

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

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

List assets by provider share

func (ListProviderShareAssetsRequest) MarshalJSON added in v0.59.0

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

func (*ListProviderShareAssetsRequest) UnmarshalJSON added in v0.59.0

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

type ListProviderShareAssetsResponse added in v0.59.0

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

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

func (ListProviderShareAssetsResponse) MarshalJSON added in v0.73.0

func (st ListProviderShareAssetsResponse) MarshalJSON() ([]byte, error)

func (*ListProviderShareAssetsResponse) UnmarshalJSON added in v0.73.0

func (st *ListProviderShareAssetsResponse) UnmarshalJSON(b []byte) error

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).
	// Wire name: 'next_page_token'
	NextPageToken string `json:"next_page_token,omitempty"`
	// An array of provider shares.
	// Wire name: 'shares'
	Shares []ProviderShare `json:"shares,omitempty"`

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

func (ListProviderSharesResponse) MarshalJSON added in v0.44.0

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

func (*ListProviderSharesResponse) UnmarshalJSON added in v0.44.0

func (st *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:"-" tf:"-"`
	// 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:"-" tf:"-"`
	// Opaque pagination token to go to next page based on previous query.
	PageToken string `json:"-" tf:"-"`

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

List providers

func (ListProvidersRequest) MarshalJSON added in v0.23.0

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

func (*ListProvidersRequest) UnmarshalJSON added in v0.23.0

func (st *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).
	// Wire name: 'next_page_token'
	NextPageToken string `json:"next_page_token,omitempty"`
	// An array of provider information objects.
	// Wire name: 'providers'
	Providers []ProviderInfo `json:"providers,omitempty"`

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

func (ListProvidersResponse) MarshalJSON added in v0.44.0

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

func (*ListProvidersResponse) UnmarshalJSON added in v0.44.0

func (st *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:"-" tf:"-"`
	// 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:"-" tf:"-"`
	// Opaque pagination token to go to next page based on previous query.
	PageToken string `json:"-" tf:"-"`

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

List share recipients

func (ListRecipientsRequest) MarshalJSON added in v0.23.0

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

func (*ListRecipientsRequest) UnmarshalJSON added in v0.23.0

func (st *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).
	// Wire name: 'next_page_token'
	NextPageToken string `json:"next_page_token,omitempty"`
	// An array of recipient information objects.
	// Wire name: 'recipients'
	Recipients []RecipientInfo `json:"recipients,omitempty"`

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

func (ListRecipientsResponse) MarshalJSON added in v0.44.0

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

func (*ListRecipientsResponse) UnmarshalJSON added in v0.44.0

func (st *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:"-" tf:"-"`
	// Name of the provider in which to list shares.
	Name string `json:"-" tf:"-"`
	// Opaque pagination token to go to next page based on previous query.
	PageToken string `json:"-" tf:"-"`

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

List shares by Provider

func (ListSharesRequest) MarshalJSON added in v0.44.0

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

func (*ListSharesRequest) UnmarshalJSON added in v0.44.0

func (st *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).
	// Wire name: 'next_page_token'
	NextPageToken string `json:"next_page_token,omitempty"`
	// An array of data share information objects.
	// Wire name: 'shares'
	Shares []ShareInfo `json:"shares,omitempty"`

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

func (ListSharesResponse) MarshalJSON added in v0.44.0

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

func (*ListSharesResponse) UnmarshalJSON added in v0.44.0

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

type NotebookFile added in v0.59.0

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

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

func (NotebookFile) MarshalJSON added in v0.59.0

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

func (*NotebookFile) UnmarshalJSON added in v0.59.0

func (st *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,
	// Wire name: 'audiences'
	Audiences []string `json:"audiences,omitempty"`
	// The required token issuer, as specified in the 'iss' claim of federated
	// tokens.
	// Wire name: 'issuer'
	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.
	// Wire name: 'subject'
	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.
	// Wire name: 'subject_claim'
	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.

func (OidcFederationPolicy) MarshalJSON added in v0.73.0

func (st OidcFederationPolicy) MarshalJSON() ([]byte, error)

func (*OidcFederationPolicy) UnmarshalJSON added in v0.73.0

func (st *OidcFederationPolicy) UnmarshalJSON(b []byte) error

type Partition

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

func (Partition) MarshalJSON added in v0.73.0

func (st Partition) MarshalJSON() ([]byte, error)

func (*Partition) UnmarshalJSON added in v0.73.0

func (st *Partition) UnmarshalJSON(b []byte) error

type PartitionValue

type PartitionValue struct {
	// The name of the partition column.
	// Wire name: 'name'
	Name string `json:"name,omitempty"`
	// The operator to apply for the value.
	// Wire name: 'op'
	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.
	// Wire name: 'recipient_property_key'
	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.
	// Wire name: 'value'
	Value string `json:"value,omitempty"`

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

func (PartitionValue) MarshalJSON added in v0.23.0

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

func (*PartitionValue) UnmarshalJSON added in v0.23.0

func (st *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.
	// Wire name: 'add'
	Add []string `json:"add,omitempty"`
	// The principal whose privileges we are changing.
	// Wire name: 'principal'
	Principal string `json:"principal,omitempty"`
	// The set of privileges to remove.
	// Wire name: 'remove'
	Remove []string `json:"remove,omitempty"`

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

func (PermissionsChange) MarshalJSON added in v0.59.0

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

func (*PermissionsChange) UnmarshalJSON added in v0.59.0

func (st *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).
	// Wire name: 'principal'
	Principal string `json:"principal,omitempty"`
	// The privileges assigned to the principal.
	// Wire name: 'privileges'
	Privileges []Privilege `json:"privileges,omitempty"`

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

func (PrivilegeAssignment) MarshalJSON added in v0.23.0

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

func (*PrivilegeAssignment) UnmarshalJSON added in v0.23.0

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

type ProviderInfo

type ProviderInfo struct {
	// The delta sharing authentication type.
	// Wire name: 'authentication_type'
	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**.
	// Wire name: 'cloud'
	Cloud string `json:"cloud,omitempty"`
	// Description about the provider.
	// Wire name: 'comment'
	Comment string `json:"comment,omitempty"`
	// Time at which this Provider was created, in epoch milliseconds.
	// Wire name: 'created_at'
	CreatedAt int64 `json:"created_at,omitempty"`
	// Username of Provider creator.
	// Wire name: 'created_by'
	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__.
	// Wire name: 'data_provider_global_metastore_id'
	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**.
	// Wire name: 'metastore_id'
	MetastoreId string `json:"metastore_id,omitempty"`
	// The name of the Provider.
	// Wire name: 'name'
	Name string `json:"name,omitempty"`
	// Username of Provider owner.
	// Wire name: 'owner'
	Owner string `json:"owner,omitempty"`
	// The recipient profile. This field is only present when the
	// authentication_type is `TOKEN` or `OAUTH_CLIENT_CREDENTIALS`.
	// Wire name: 'recipient_profile'
	RecipientProfile *RecipientProfile `json:"recipient_profile,omitempty"`
	// This field is required when the __authentication_type__ is **TOKEN**,
	// **OAUTH_CLIENT_CREDENTIALS** or not provided.
	// Wire name: 'recipient_profile_str'
	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**.
	// Wire name: 'region'
	Region string `json:"region,omitempty"`
	// Time at which this Provider was created, in epoch milliseconds.
	// Wire name: 'updated_at'
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// Username of user who last modified Provider.
	// Wire name: 'updated_by'
	UpdatedBy string `json:"updated_by,omitempty"`

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

func (ProviderInfo) MarshalJSON added in v0.23.0

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

func (*ProviderInfo) UnmarshalJSON added in v0.23.0

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

type ProviderShare

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

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

func (ProviderShare) MarshalJSON added in v0.23.0

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

func (*ProviderShare) UnmarshalJSON added in v0.23.0

func (st *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.
	// Wire name: 'activated'
	Activated bool `json:"activated,omitempty"`
	// Full activation url to retrieve the access token. It will be empty if the
	// token is already retrieved.
	// Wire name: 'activation_url'
	ActivationUrl string `json:"activation_url,omitempty"`
	// The delta sharing authentication type.
	// Wire name: 'authentication_type'
	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**.
	// Wire name: 'cloud'
	Cloud string `json:"cloud,omitempty"`
	// Description about the recipient.
	// Wire name: 'comment'
	Comment string `json:"comment,omitempty"`
	// Time at which this recipient was created, in epoch milliseconds.
	// Wire name: 'created_at'
	CreatedAt int64 `json:"created_at,omitempty"`
	// Username of recipient creator.
	// Wire name: 'created_by'
	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__.
	// Wire name: 'data_recipient_global_metastore_id'
	DataRecipientGlobalMetastoreId string `json:"data_recipient_global_metastore_id,omitempty"`
	// Expiration timestamp of the token, in epoch milliseconds.
	// Wire name: 'expiration_time'
	ExpirationTime int64 `json:"expiration_time,omitempty"`
	// IP Access List
	// Wire name: '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**.
	// Wire name: 'metastore_id'
	MetastoreId string `json:"metastore_id,omitempty"`
	// Name of Recipient.
	// Wire name: 'name'
	Name string `json:"name,omitempty"`
	// Username of the recipient owner.
	// Wire name: '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.
	// Wire name: 'properties_kvpairs'
	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**.
	// Wire name: 'region'
	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**.
	// Wire name: 'sharing_code'
	SharingCode string `json:"sharing_code,omitempty"`
	// This field is only present when the __authentication_type__ is **TOKEN**.
	// Wire name: 'tokens'
	Tokens []RecipientTokenInfo `json:"tokens,omitempty"`
	// Time at which the recipient was updated, in epoch milliseconds.
	// Wire name: 'updated_at'
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// Username of recipient updater.
	// Wire name: 'updated_by'
	UpdatedBy string `json:"updated_by,omitempty"`

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

func (RecipientInfo) MarshalJSON added in v0.23.0

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

func (*RecipientInfo) UnmarshalJSON added in v0.23.0

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

type RecipientProfile

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

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

func (RecipientProfile) MarshalJSON added in v0.23.0

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

func (*RecipientProfile) UnmarshalJSON added in v0.23.0

func (st *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.
	// Wire name: 'activation_url'
	ActivationUrl string `json:"activation_url,omitempty"`
	// Time at which this recipient token was created, in epoch milliseconds.
	// Wire name: 'created_at'
	CreatedAt int64 `json:"created_at,omitempty"`
	// Username of recipient token creator.
	// Wire name: 'created_by'
	CreatedBy string `json:"created_by,omitempty"`
	// Expiration timestamp of the token in epoch milliseconds.
	// Wire name: 'expiration_time'
	ExpirationTime int64 `json:"expiration_time,omitempty"`
	// Unique ID of the recipient token.
	// Wire name: 'id'
	Id string `json:"id,omitempty"`
	// Time at which this recipient token was updated, in epoch milliseconds.
	// Wire name: 'updated_at'
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// Username of recipient token updater.
	// Wire name: 'updated_by'
	UpdatedBy string `json:"updated_by,omitempty"`

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

func (RecipientTokenInfo) MarshalJSON added in v0.23.0

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

func (*RecipientTokenInfo) UnmarshalJSON added in v0.23.0

func (st *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.
	// Wire name: 'alias_name'
	AliasName string `json:"alias_name,omitempty"`
	// Numeric model version that alias will reference.
	// Wire name: 'version_num'
	VersionNum int64 `json:"version_num,omitempty"`

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

func (RegisteredModelAlias) MarshalJSON added in v0.59.0

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

func (*RegisteredModelAlias) UnmarshalJSON added in v0.59.0

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

type RetrieveTokenRequest

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

Get an access token

func (RetrieveTokenRequest) MarshalJSON added in v0.73.0

func (st RetrieveTokenRequest) MarshalJSON() ([]byte, error)

func (*RetrieveTokenRequest) UnmarshalJSON added in v0.73.0

func (st *RetrieveTokenRequest) UnmarshalJSON(b []byte) error

type RetrieveTokenResponse

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

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

func (RetrieveTokenResponse) MarshalJSON added in v0.23.0

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

func (*RetrieveTokenResponse) UnmarshalJSON added in v0.23.0

func (st *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.
	// Wire name: 'existing_token_expire_in_seconds'
	ExistingTokenExpireInSeconds int64 `json:"existing_token_expire_in_seconds"`
	// The name of the Recipient.
	Name string `json:"-" tf:"-"`
}

func (RotateRecipientToken) MarshalJSON added in v0.73.0

func (st RotateRecipientToken) MarshalJSON() ([]byte, error)

func (*RotateRecipientToken) UnmarshalJSON added in v0.73.0

func (st *RotateRecipientToken) UnmarshalJSON(b []byte) error

type SecurablePropertiesKvPairs added in v0.9.0

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

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

func (SecurablePropertiesKvPairs) MarshalJSON added in v0.73.0

func (st SecurablePropertiesKvPairs) MarshalJSON() ([]byte, error)

func (*SecurablePropertiesKvPairs) UnmarshalJSON added in v0.73.0

func (st *SecurablePropertiesKvPairs) UnmarshalJSON(b []byte) error

type ShareInfo

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

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

func (ShareInfo) MarshalJSON added in v0.23.0

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

func (*ShareInfo) UnmarshalJSON added in v0.23.0

func (st *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:"-" tf:"-"`
	// The name of the Recipient.
	Name string `json:"-" tf:"-"`
	// Opaque pagination token to go to next page based on previous query.
	PageToken string `json:"-" tf:"-"`

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

Get recipient share permissions

func (SharePermissionsRequest) MarshalJSON added in v0.44.0

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

func (*SharePermissionsRequest) UnmarshalJSON added in v0.44.0

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

type ShareToPrivilegeAssignment

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

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

func (ShareToPrivilegeAssignment) MarshalJSON added in v0.23.0

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

func (*ShareToPrivilegeAssignment) UnmarshalJSON added in v0.23.0

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

type SharedDataObject

type SharedDataObject struct {
	// The time when this data object is added to the share, in epoch
	// milliseconds.
	// Wire name: 'added_at'
	AddedAt int64 `json:"added_at,omitempty"`
	// Username of the sharer.
	// Wire name: 'added_by'
	AddedBy string `json:"added_by,omitempty"`
	// Whether to enable cdf or indicate if cdf is enabled on the shared object.
	// Wire name: 'cdf_enabled'
	CdfEnabled bool `json:"cdf_enabled,omitempty"`
	// A user-provided comment when adding the data object to the share.
	// Wire name: 'comment'
	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.
	// Wire name: 'content'
	Content string `json:"content,omitempty"`
	// The type of the data object.
	// Wire name: 'data_object_type'
	DataObjectType SharedDataObjectDataObjectType `json:"data_object_type,omitempty"`
	// Whether to enable or disable sharing of data history. If not specified,
	// the default is **DISABLED**.
	// Wire name: 'history_data_sharing_status'
	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>`,
	// Wire name: 'name'
	Name string `json:"name"`
	// Array of partitions for the shared data.
	// Wire name: 'partitions'
	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>`.
	// Wire name: 'shared_as'
	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.
	// Wire name: 'start_version'
	StartVersion int64 `json:"start_version,omitempty"`
	// One of: **ACTIVE**, **PERMISSION_DENIED**.
	// Wire name: 'status'
	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.
	// Wire name: 'string_shared_as'
	StringSharedAs string `json:"string_shared_as,omitempty"`

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

func (SharedDataObject) MarshalJSON added in v0.23.0

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

func (*SharedDataObject) UnmarshalJSON added in v0.23.0

func (st *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**.
	// Wire name: 'action'
	Action SharedDataObjectUpdateAction `json:"action,omitempty"`
	// The data object that is being added, removed, or updated.
	// Wire name: 'data_object'
	DataObject *SharedDataObject `json:"data_object,omitempty"`
}

func (SharedDataObjectUpdate) MarshalJSON added in v0.73.0

func (st SharedDataObjectUpdate) MarshalJSON() ([]byte, error)

func (*SharedDataObjectUpdate) UnmarshalJSON added in v0.73.0

func (st *SharedDataObjectUpdate) UnmarshalJSON(b []byte) error

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 added in v0.24.0

func (a *SharesAPI) List(ctx context.Context, request ListSharesRequest) 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.

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

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.

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.
	List(ctx context.Context, request ListSharesRequest) 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.
	ListAll(ctx context.Context, request ListSharesRequest) ([]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)
}

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.
	List(ctx context.Context, request ListSharesRequest) (*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.
	// Wire name: 'comment'
	Comment string `json:"comment,omitempty"`
	// The id of the table.
	// Wire name: 'id'
	Id string `json:"id,omitempty"`
	// Internal information for D2D sharing that should not be disclosed to
	// external users.
	// Wire name: 'internal_attributes'
	InternalAttributes *TableInternalAttributes `json:"internal_attributes,omitempty"`
	// The catalog and schema of the materialized table
	// Wire name: 'materialization_namespace'
	MaterializationNamespace string `json:"materialization_namespace,omitempty"`
	// The name of a materialized table.
	// Wire name: 'materialized_table_name'
	MaterializedTableName string `json:"materialized_table_name,omitempty"`
	// The name of the table.
	// Wire name: 'name'
	Name string `json:"name,omitempty"`
	// The name of the schema that the table belongs to.
	// Wire name: 'schema'
	Schema string `json:"schema,omitempty"`
	// The name of the share that the table belongs to.
	// Wire name: 'share'
	Share string `json:"share,omitempty"`
	// The id of the share that the table belongs to.
	// Wire name: 'share_id'
	ShareId string `json:"share_id,omitempty"`
	// The Tags of the table.
	// Wire name: 'tags'
	Tags []catalog.TagKeyValue `json:"tags,omitempty"`

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

func (Table) MarshalJSON added in v0.59.0

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

func (*Table) UnmarshalJSON added in v0.59.0

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

type TableInternalAttributes added in v0.59.0

type TableInternalAttributes struct {
	// 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.
	// Wire name: 'parent_storage_location'
	ParentStorageLocation string `json:"parent_storage_location,omitempty"`
	// The cloud storage location of a shard table with DIRECTORY_BASED_TABLE
	// type.
	// Wire name: 'storage_location'
	StorageLocation string `json:"storage_location,omitempty"`
	// The type of the shared table.
	// Wire name: 'type'
	Type TableInternalAttributesSharedTableType `json:"type,omitempty"`
	// The view definition of a shared view. DEPRECATED.
	// Wire name: 'view_definition'
	ViewDefinition string `json:"view_definition,omitempty"`

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

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

func (TableInternalAttributes) MarshalJSON added in v0.59.0

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

func (*TableInternalAttributes) UnmarshalJSON added in v0.59.0

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

type TableInternalAttributesSharedTableType added in v0.59.0

type TableInternalAttributesSharedTableType string
const TableInternalAttributesSharedTableTypeDirectoryBasedTable TableInternalAttributesSharedTableType = `DIRECTORY_BASED_TABLE`
const TableInternalAttributesSharedTableTypeFileBasedTable TableInternalAttributesSharedTableType = `FILE_BASED_TABLE`
const TableInternalAttributesSharedTableTypeForeignTable TableInternalAttributesSharedTableType = `FOREIGN_TABLE`
const TableInternalAttributesSharedTableTypeMaterializedView TableInternalAttributesSharedTableType = `MATERIALIZED_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:"-" tf:"-"`

	// Wire name: 'policy'
	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:"-" tf:"-"`
	// 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:"-" tf:"-"`

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

Update recipient federation policy

func (UpdateFederationPolicyRequest) MarshalJSON added in v0.70.0

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

func (*UpdateFederationPolicyRequest) UnmarshalJSON added in v0.70.0

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

type UpdateProvider

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

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

func (UpdateProvider) MarshalJSON added in v0.23.0

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

func (*UpdateProvider) UnmarshalJSON added in v0.23.0

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

type UpdateRecipient

type UpdateRecipient struct {
	// Description about the recipient.
	// Wire name: 'comment'
	Comment string `json:"comment,omitempty"`
	// Expiration timestamp of the token, in epoch milliseconds.
	// Wire name: 'expiration_time'
	ExpirationTime int64 `json:"expiration_time,omitempty"`
	// IP Access List
	// Wire name: 'ip_access_list'
	IpAccessList *IpAccessList `json:"ip_access_list,omitempty"`
	// Name of the recipient.
	Name string `json:"-" tf:"-"`
	// New name for the recipient. .
	// Wire name: 'new_name'
	NewName string `json:"new_name,omitempty"`
	// Username of the recipient owner.
	// Wire name: '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.
	// Wire name: 'properties_kvpairs'
	PropertiesKvpairs *SecurablePropertiesKvPairs `json:"properties_kvpairs,omitempty"`

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

func (UpdateRecipient) MarshalJSON added in v0.23.0

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

func (*UpdateRecipient) UnmarshalJSON added in v0.23.0

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

type UpdateShare

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

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

func (UpdateShare) MarshalJSON added in v0.23.0

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

func (*UpdateShare) UnmarshalJSON added in v0.23.0

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

type UpdateSharePermissions

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

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

func (UpdateSharePermissions) MarshalJSON added in v0.44.0

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

func (*UpdateSharePermissions) UnmarshalJSON added in v0.44.0

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

type UpdateSharePermissionsResponse added in v0.59.0

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

func (UpdateSharePermissionsResponse) MarshalJSON added in v0.73.0

func (st UpdateSharePermissionsResponse) MarshalJSON() ([]byte, error)

func (*UpdateSharePermissionsResponse) UnmarshalJSON added in v0.73.0

func (st *UpdateSharePermissionsResponse) UnmarshalJSON(b []byte) error

type Volume added in v0.59.0

type Volume struct {
	// The comment of the volume.
	// Wire name: 'comment'
	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.
	// Wire name: 'id'
	Id string `json:"id,omitempty"`
	// Internal attributes for D2D sharing that should not be disclosed to
	// external users.
	// Wire name: 'internal_attributes'
	InternalAttributes *VolumeInternalAttributes `json:"internal_attributes,omitempty"`
	// The name of the volume.
	// Wire name: 'name'
	Name string `json:"name,omitempty"`
	// The name of the schema that the volume belongs to.
	// Wire name: 'schema'
	Schema string `json:"schema,omitempty"`
	// The name of the share that the volume belongs to.
	// Wire name: 'share'
	Share string `json:"share,omitempty"`
	// / The id of the share that the volume belongs to.
	// Wire name: 'share_id'
	ShareId string `json:"share_id,omitempty"`
	// The tags of the volume.
	// Wire name: 'tags'
	Tags []catalog.TagKeyValue `json:"tags,omitempty"`

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

func (Volume) MarshalJSON added in v0.59.0

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

func (*Volume) UnmarshalJSON added in v0.59.0

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

type VolumeInternalAttributes added in v0.59.0

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

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

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

func (VolumeInternalAttributes) MarshalJSON added in v0.59.0

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

func (*VolumeInternalAttributes) UnmarshalJSON added in v0.59.0

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

Jump to

Keyboard shortcuts

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