unitycatalog

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

These APIs allow you to manage Catalogs, External Locations, Grants, Metastores, Providers, Recipient Activation, Recipients, Schemas, Shares, Storage Credentials, Tables, etc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsIamRole

type AwsIamRole struct {
	// The external ID used in role assumption to prevent confused deputy
	// problem.
	//
	// [Create:IGN].
	ExternalId string `json:"external_id,omitempty"`
	// The Amazon Resource Name (ARN) of the AWS IAM role for S3 data access.
	// [Create:REQ].
	RoleArn string `json:"role_arn,omitempty"`
	// The Amazon Resource Name (ARN) of the AWS IAM user managed by Databricks.
	// This is the identity that is going to assume the AWS IAM role.
	//
	// [Create:IGN].
	UnityCatalogIamArn string `json:"unity_catalog_iam_arn,omitempty"`
}

type AzureServicePrincipal

type AzureServicePrincipal struct {
	// The application ID of the application registration within the referenced
	// AAD tenant. [Create:REQ]
	ApplicationId string `json:"application_id,omitempty"`
	// The client secret generated for the above app ID in AAD. [Create:REQ]
	ClientSecret string `json:"client_secret,omitempty"`
	// The directory ID corresponding to the Azure Active Directory (AAD) tenant
	// of the application. [Create:REQ].
	DirectoryId string `json:"directory_id,omitempty"`
}

type CatalogInfo

type CatalogInfo struct {
	// [Create,Update:IGN] The type of the catalog.
	CatalogType CatalogInfoCatalogType `json:"catalog_type,omitempty"`
	// [Create,Update:OPT] User-provided free-form text description.
	Comment string `json:"comment,omitempty"`
	// [Create,Update:IGN] Time at which this Catalog was created, in epoch
	// milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of Catalog creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create,Update:IGN] Unique identifier of parent Metastore.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ Update:OPT] Name of Catalog.
	Name string `json:"name,omitempty"`
	// [Create:IGN,Update:OPT] Username of current owner of Catalog.
	Owner string `json:"owner,omitempty"`
	// [Create,Update:IGN] Privileges the user has on the Catalog.
	Privileges []CatalogInfoPrivilegesItem `json:"privileges,omitempty"`
	// This name ('properties') is what the client sees as the field name in
	// messages that include PropertiesKVPairs using 'json_inline' (e.g.,
	// TableInfo).
	Properties []StringKeyValuePair `json:"properties,omitempty"`
	// Delta Sharing Catalog specific fields. A Delta Sharing Catalog is a
	// catalog that is based on a Delta share on a remote sharing server.
	// [Create:OPT,Update:IGN] The name of delta sharing provider.
	ProviderName string `json:"provider_name,omitempty"`
	// [Create:OPT,Update: IGN] The name of the share under the share provider.
	ShareName string `json:"share_name,omitempty"`
	// [Create,Update:IGN] Time at which this Catalog was last modified, in
	// epoch milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified Catalog.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type CatalogInfoCatalogType

type CatalogInfoCatalogType string

[Create,Update:IGN] The type of the catalog.

const CatalogInfoCatalogTypeDeltasharingCatalog CatalogInfoCatalogType = `DELTASHARING_CATALOG`
const CatalogInfoCatalogTypeManagedCatalog CatalogInfoCatalogType = `MANAGED_CATALOG`
const CatalogInfoCatalogTypeSystemCatalog CatalogInfoCatalogType = `SYSTEM_CATALOG`
const CatalogInfoCatalogTypeUnknownCatalogType CatalogInfoCatalogType = `UNKNOWN_CATALOG_TYPE`

type CatalogInfoPrivilegesItem

type CatalogInfoPrivilegesItem string
const CatalogInfoPrivilegesItemCreate CatalogInfoPrivilegesItem = `CREATE`
const CatalogInfoPrivilegesItemCreateMount CatalogInfoPrivilegesItem = `CREATE_MOUNT`
const CatalogInfoPrivilegesItemCreateTable CatalogInfoPrivilegesItem = `CREATE_TABLE`
const CatalogInfoPrivilegesItemModify CatalogInfoPrivilegesItem = `MODIFY`
const CatalogInfoPrivilegesItemReadFiles CatalogInfoPrivilegesItem = `READ_FILES`
const CatalogInfoPrivilegesItemSelect CatalogInfoPrivilegesItem = `SELECT`
const CatalogInfoPrivilegesItemUnknownPrivilege CatalogInfoPrivilegesItem = `UNKNOWN_PRIVILEGE`
const CatalogInfoPrivilegesItemUsage CatalogInfoPrivilegesItem = `USAGE`
const CatalogInfoPrivilegesItemWriteFiles CatalogInfoPrivilegesItem = `WRITE_FILES`

type CatalogsAPI

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

A catalog is the first layer of Unity Catalog’s three-level namespace. It’s used to organize your data assets. Users can see all catalogs on which they have been assigned the USAGE data permission.

In Unity Catalog, admins and data stewards manage users and their access to data centrally across all of the workspaces in a Databricks account. Users in different workspaces can share access to the same data, depending on privileges granted centrally in Unity Catalog.

func NewCatalogs

func NewCatalogs(client *client.DatabricksClient) *CatalogsAPI

func (*CatalogsAPI) Create

Create a catalog

Creates a new catalog instance in the parent Metastore if the caller is a Metastore admin or has the CREATE CATALOG privilege.

func (*CatalogsAPI) Delete

func (a *CatalogsAPI) Delete(ctx context.Context, request DeleteCatalogRequest) error

Delete a catalog

Deletes the catalog that matches the supplied name. The caller must be a Metastore admin or the owner of the catalog.

func (*CatalogsAPI) DeleteByName

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

Delete a catalog

Deletes the catalog that matches the supplied name. The caller must be a Metastore admin or the owner of the catalog.

func (*CatalogsAPI) Get

Get a catalog

Gets an array of all catalogs in the current Metastore for which the user is an admin or Catalog owner, or has the USAGE privilege set for their account.

func (*CatalogsAPI) GetByName

func (a *CatalogsAPI) GetByName(ctx context.Context, name string) (*GetCatalogResponse, error)

Get a catalog

Gets an array of all catalogs in the current Metastore for which the user is an admin or Catalog owner, or has the USAGE privilege set for their account.

func (*CatalogsAPI) Impl

func (a *CatalogsAPI) Impl() CatalogsService

Impl returns low-level Catalogs API implementation

func (*CatalogsAPI) ListAll

func (a *CatalogsAPI) ListAll(ctx context.Context) ([]CatalogInfo, error)

List catalogs

Gets an array of External Locations (ExternalLocationInfo objects) from the Metastore. The caller must be a Metastore admin, is the owner of the External Location, or has privileges to access the External Location.

This method is generated by Databricks SDK Code Generator.

func (*CatalogsAPI) Update

func (a *CatalogsAPI) Update(ctx context.Context, request UpdateCatalog) error

Update a catalog

Updates the catalog that matches the supplied name. The caller must be either the owner of the catalog, or a Metastore admin (when changing the owner field of the catalog).

func (*CatalogsAPI) WithImpl

func (a *CatalogsAPI) WithImpl(impl CatalogsService) *CatalogsAPI

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

type CatalogsService

type CatalogsService interface {

	// Create a catalog
	//
	// Creates a new catalog instance in the parent Metastore if the caller is a
	// Metastore admin or has the CREATE CATALOG privilege.
	Create(ctx context.Context, request CreateCatalog) (*CreateCatalogResponse, error)

	// Delete a catalog
	//
	// Deletes the catalog that matches the supplied name. The caller must be a
	// Metastore admin or the owner of the catalog.
	Delete(ctx context.Context, request DeleteCatalogRequest) error

	// Get a catalog
	//
	// Gets an array of all catalogs in the current Metastore for which the user
	// is an admin or Catalog owner, or has the USAGE privilege set for their
	// account.
	Get(ctx context.Context, request GetCatalogRequest) (*GetCatalogResponse, error)

	// List catalogs
	//
	// Gets an array of External Locations (ExternalLocationInfo objects) from
	// the Metastore. The caller must be a Metastore admin, is the owner of the
	// External Location, or has privileges to access the External Location.
	//
	// Use ListAll() to get all CatalogInfo instances
	List(ctx context.Context) (*ListCatalogsResponse, error)

	// Update a catalog
	//
	// Updates the catalog that matches the supplied name. The caller must be
	// either the owner of the catalog, or a Metastore admin (when changing the
	// owner field of the catalog).
	Update(ctx context.Context, request UpdateCatalog) error
}

A catalog is the first layer of Unity Catalog’s three-level namespace. It’s used to organize your data assets. Users can see all catalogs on which they have been assigned the USAGE data permission.

In Unity Catalog, admins and data stewards manage users and their access to data centrally across all of the workspaces in a Databricks account. Users in different workspaces can share access to the same data, depending on privileges granted centrally in Unity Catalog.

type ColumnInfo

type ColumnInfo struct {
	// [Create,Update:OPT] User-provided free-form text description.
	Comment string `json:"comment,omitempty"`
	// [Create:REQ Update:OPT] Name of Column.
	Name string `json:"name,omitempty"`
	// [Create,Update:OPT] Whether field may be Null (default: True).
	Nullable bool `json:"nullable,omitempty"`
	// [Create,Update:OPT] Partition index for column.
	PartitionIndex int `json:"partition_index,omitempty"`
	// [Create:REQ Update:OPT] Ordinal position of column (starting at position
	// 0).
	Position int `json:"position,omitempty"`
	// [Create: OPT, Update: OPT] Format of IntervalType.
	TypeIntervalType string `json:"type_interval_type,omitempty"`
	// [Create:OPT Update:OPT] Full data type spec, JSON-serialized.
	TypeJson string `json:"type_json,omitempty"`
	// [Create: REQ Update: OPT] Name of type (INT, STRUCT, MAP, etc.)
	TypeName ColumnInfoTypeName `json:"type_name,omitempty"`
	// [Create: OPT, Update: OPT] Digits of precision; required on Create for
	// DecimalTypes.
	TypePrecision int `json:"type_precision,omitempty"`
	// [Create: OPT, Update: OPT] Digits to right of decimal; Required on Create
	// for DecimalTypes.
	TypeScale int `json:"type_scale,omitempty"`
	// [Create:REQ Update:OPT] Full data type spec, SQL/catalogString text.
	TypeText string `json:"type_text,omitempty"`
}

type ColumnInfoTypeName

type ColumnInfoTypeName string

[Create: REQ Update: OPT] Name of type (INT, STRUCT, MAP, etc.)

const ColumnInfoTypeNameArray ColumnInfoTypeName = `ARRAY`
const ColumnInfoTypeNameBinary ColumnInfoTypeName = `BINARY`
const ColumnInfoTypeNameBoolean ColumnInfoTypeName = `BOOLEAN`
const ColumnInfoTypeNameByte ColumnInfoTypeName = `BYTE`
const ColumnInfoTypeNameChar ColumnInfoTypeName = `CHAR`
const ColumnInfoTypeNameDate ColumnInfoTypeName = `DATE`
const ColumnInfoTypeNameDecimal ColumnInfoTypeName = `DECIMAL`
const ColumnInfoTypeNameDouble ColumnInfoTypeName = `DOUBLE`
const ColumnInfoTypeNameFloat ColumnInfoTypeName = `FLOAT`
const ColumnInfoTypeNameInt ColumnInfoTypeName = `INT`
const ColumnInfoTypeNameInterval ColumnInfoTypeName = `INTERVAL`
const ColumnInfoTypeNameLong ColumnInfoTypeName = `LONG`
const ColumnInfoTypeNameMap ColumnInfoTypeName = `MAP`
const ColumnInfoTypeNameNull ColumnInfoTypeName = `NULL`
const ColumnInfoTypeNameShort ColumnInfoTypeName = `SHORT`
const ColumnInfoTypeNameString ColumnInfoTypeName = `STRING`
const ColumnInfoTypeNameStruct ColumnInfoTypeName = `STRUCT`
const ColumnInfoTypeNameTimestamp ColumnInfoTypeName = `TIMESTAMP`
const ColumnInfoTypeNameUnknownColumnTypeName ColumnInfoTypeName = `UNKNOWN_COLUMN_TYPE_NAME`

type CreateCatalog

type CreateCatalog struct {
	// User-provided free-form text description.
	Comment string `json:"comment,omitempty"`
	// Name of Catalog
	Name string `json:"name"`
	// This name ('properties') is what the client sees as the field name in
	// messages that include PropertiesKVPairs using 'json_inline' (e.g.,
	// TableInfo).
	Properties []StringKeyValuePair `json:"properties,omitempty"`
	// Delta Sharing Catalog specific fields. A Delta Sharing Catalog is a
	// catalog that is based on a Delta share on a remote sharing server.
	// [Create:OPT,Update:IGN] The name of delta sharing provider.
	ProviderName string `json:"provider_name,omitempty"`
	// The name of the share under the share provider.
	ShareName string `json:"share_name,omitempty"`
}

type CreateCatalogResponse

type CreateCatalogResponse struct {
	// [Create,Update:IGN] The type of the catalog.
	CatalogType CreateCatalogResponseCatalogType `json:"catalog_type,omitempty"`
	// [Create,Update:OPT] User-provided free-form text description.
	Comment string `json:"comment,omitempty"`
	// [Create,Update:IGN] Time at which this Catalog was created, in epoch
	// milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of Catalog creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create,Update:IGN] Unique identifier of parent Metastore.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ Update:OPT] Name of Catalog.
	Name string `json:"name,omitempty"`
	// [Create:IGN,Update:OPT] Username of current owner of Catalog.
	Owner string `json:"owner,omitempty"`
	// [Create,Update:IGN] Privileges the user has on the Catalog.
	Privileges []CreateCatalogResponsePrivilegesItem `json:"privileges,omitempty"`
	// This name ('properties') is what the client sees as the field name in
	// messages that include PropertiesKVPairs using 'json_inline' (e.g.,
	// TableInfo).
	Properties []StringKeyValuePair `json:"properties,omitempty"`
	// Delta Sharing Catalog specific fields. A Delta Sharing Catalog is a
	// catalog that is based on a Delta share on a remote sharing server.
	// [Create:OPT,Update:IGN] The name of delta sharing provider.
	ProviderName string `json:"provider_name,omitempty"`
	// [Create:OPT,Update: IGN] The name of the share under the share provider.
	ShareName string `json:"share_name,omitempty"`
	// [Create,Update:IGN] Time at which this Catalog was last modified, in
	// epoch milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified Catalog.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type CreateCatalogResponseCatalogType

type CreateCatalogResponseCatalogType string

[Create,Update:IGN] The type of the catalog.

const CreateCatalogResponseCatalogTypeDeltasharingCatalog CreateCatalogResponseCatalogType = `DELTASHARING_CATALOG`
const CreateCatalogResponseCatalogTypeManagedCatalog CreateCatalogResponseCatalogType = `MANAGED_CATALOG`
const CreateCatalogResponseCatalogTypeSystemCatalog CreateCatalogResponseCatalogType = `SYSTEM_CATALOG`
const CreateCatalogResponseCatalogTypeUnknownCatalogType CreateCatalogResponseCatalogType = `UNKNOWN_CATALOG_TYPE`

type CreateCatalogResponsePrivilegesItem

type CreateCatalogResponsePrivilegesItem string
const CreateCatalogResponsePrivilegesItemCreate CreateCatalogResponsePrivilegesItem = `CREATE`
const CreateCatalogResponsePrivilegesItemCreateMount CreateCatalogResponsePrivilegesItem = `CREATE_MOUNT`
const CreateCatalogResponsePrivilegesItemCreateTable CreateCatalogResponsePrivilegesItem = `CREATE_TABLE`
const CreateCatalogResponsePrivilegesItemModify CreateCatalogResponsePrivilegesItem = `MODIFY`
const CreateCatalogResponsePrivilegesItemReadFiles CreateCatalogResponsePrivilegesItem = `READ_FILES`
const CreateCatalogResponsePrivilegesItemSelect CreateCatalogResponsePrivilegesItem = `SELECT`
const CreateCatalogResponsePrivilegesItemUnknownPrivilege CreateCatalogResponsePrivilegesItem = `UNKNOWN_PRIVILEGE`
const CreateCatalogResponsePrivilegesItemUsage CreateCatalogResponsePrivilegesItem = `USAGE`
const CreateCatalogResponsePrivilegesItemWriteFiles CreateCatalogResponsePrivilegesItem = `WRITE_FILES`

type CreateExternalLocation

type CreateExternalLocation struct {
	// [Create:OPT Update:OPT] User-provided free-form text description.
	Comment string `json:"comment,omitempty"`
	// [Create,Update:IGN] Time at which this External Location was created, in
	// epoch milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of External Location creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create,Update:IGN] Unique ID of the location's Storage Credential.
	CredentialId string `json:"credential_id,omitempty"`
	// [Create:REQ Update:OPT] Current name of the Storage Credential this
	// location uses.
	CredentialName string `json:"credential_name,omitempty"`
	// [Create,Update:IGN] Unique identifier of Metastore hosting the External
	// Location.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ Update:OPT] Name of the External Location.
	Name string `json:"name,omitempty"`
	// [Create:IGN Update:OPT] The owner of the External Location.
	Owner string `json:"owner,omitempty"`
	// [Create,Update:IGN] Time at which this was last modified, in epoch
	// milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified the External
	// Location.
	UpdatedBy string `json:"updated_by,omitempty"`
	// [Create:REQ Update:OPT] Path URL of the External Location.
	Url string `json:"url,omitempty"`
}

type CreateExternalLocationResponse

type CreateExternalLocationResponse struct {
	// [Create:OPT Update:OPT] User-provided free-form text description.
	Comment string `json:"comment,omitempty"`
	// [Create,Update:IGN] Time at which this External Location was created, in
	// epoch milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of External Location creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create,Update:IGN] Unique ID of the location's Storage Credential.
	CredentialId string `json:"credential_id,omitempty"`
	// [Create:REQ Update:OPT] Current name of the Storage Credential this
	// location uses.
	CredentialName string `json:"credential_name,omitempty"`
	// [Create,Update:IGN] Unique identifier of Metastore hosting the External
	// Location.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ Update:OPT] Name of the External Location.
	Name string `json:"name,omitempty"`
	// [Create:IGN Update:OPT] The owner of the External Location.
	Owner string `json:"owner,omitempty"`
	// [Create,Update:IGN] Time at which this was last modified, in epoch
	// milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified the External
	// Location.
	UpdatedBy string `json:"updated_by,omitempty"`
	// [Create:REQ Update:OPT] Path URL of the External Location.
	Url string `json:"url,omitempty"`
}

type CreateMetastore

type CreateMetastore struct {
	// [Create,Update:IGN] Time at which this Metastore was created, in epoch
	// milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of Metastore creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create:IGN Update:OPT] Unique identifier of (Default) Data Access
	// Configuration
	DefaultDataAccessConfigId string `json:"default_data_access_config_id,omitempty"`
	// [Create:IGN Update:OPT] Whether Delta Sharing is enabled on this
	// metastore.
	DeltaSharingEnabled bool `json:"delta_sharing_enabled,omitempty"`
	// [Create:IGN Update:OPT] The lifetime of delta sharing recipient token in
	// seconds
	DeltaSharingRecipientTokenLifetimeInSeconds int `json:"delta_sharing_recipient_token_lifetime_in_seconds,omitempty"`
	// [Create,Update:IGN] Unique identifier of Metastore.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ Update:OPT] Name of Metastore.
	Name string `json:"name,omitempty"`
	// [Create:IGN Update:OPT] The owner of the metastore.
	Owner string `json:"owner,omitempty"`
	// [Create,Update:IGN] Privileges the user has on the Metastore.
	Privileges []CreateMetastorePrivilegesItem `json:"privileges,omitempty"`
	// The region this metastore has an afinity to. This is used by
	// accounts-manager. Ignored by Unity Catalog.
	Region string `json:"region,omitempty"`
	// [Create:REQ Update:ERR] Storage root URL for Metastore
	StorageRoot string `json:"storage_root,omitempty"`
	// [Create:IGN Update:OPT] UUID of storage credential to access storage_root
	StorageRootCredentialId string `json:"storage_root_credential_id,omitempty"`
	// [Create,Update:IGN] Time at which the Metastore was last modified, in
	// epoch milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified the Metastore.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type CreateMetastoreAssignment

type CreateMetastoreAssignment struct {
	// THe name of the default catalog in the Metastore.
	DefaultCatalogName string `json:"default_catalog_name"`
	// The ID of the Metastore.
	MetastoreId string `json:"metastore_id"`
	// A workspace ID.
	WorkspaceId int `json:"-" url:"-"`
}

type CreateMetastorePrivilegesItem

type CreateMetastorePrivilegesItem string
const CreateMetastorePrivilegesItemCreate CreateMetastorePrivilegesItem = `CREATE`
const CreateMetastorePrivilegesItemCreateMount CreateMetastorePrivilegesItem = `CREATE_MOUNT`
const CreateMetastorePrivilegesItemCreateTable CreateMetastorePrivilegesItem = `CREATE_TABLE`
const CreateMetastorePrivilegesItemModify CreateMetastorePrivilegesItem = `MODIFY`
const CreateMetastorePrivilegesItemReadFiles CreateMetastorePrivilegesItem = `READ_FILES`
const CreateMetastorePrivilegesItemSelect CreateMetastorePrivilegesItem = `SELECT`
const CreateMetastorePrivilegesItemUnknownPrivilege CreateMetastorePrivilegesItem = `UNKNOWN_PRIVILEGE`
const CreateMetastorePrivilegesItemUsage CreateMetastorePrivilegesItem = `USAGE`
const CreateMetastorePrivilegesItemWriteFiles CreateMetastorePrivilegesItem = `WRITE_FILES`

type CreateMetastoreResponse

type CreateMetastoreResponse struct {
	// [Create,Update:IGN] Time at which this Metastore was created, in epoch
	// milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of Metastore creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create:IGN Update:OPT] Unique identifier of (Default) Data Access
	// Configuration
	DefaultDataAccessConfigId string `json:"default_data_access_config_id,omitempty"`
	// [Create:IGN Update:OPT] Whether Delta Sharing is enabled on this
	// metastore.
	DeltaSharingEnabled bool `json:"delta_sharing_enabled,omitempty"`
	// [Create:IGN Update:OPT] The lifetime of delta sharing recipient token in
	// seconds
	DeltaSharingRecipientTokenLifetimeInSeconds int `json:"delta_sharing_recipient_token_lifetime_in_seconds,omitempty"`
	// [Create,Update:IGN] Unique identifier of Metastore.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ Update:OPT] Name of Metastore.
	Name string `json:"name,omitempty"`
	// [Create:IGN Update:OPT] The owner of the metastore.
	Owner string `json:"owner,omitempty"`
	// [Create,Update:IGN] Privileges the user has on the Metastore.
	Privileges []CreateMetastoreResponsePrivilegesItem `json:"privileges,omitempty"`
	// The region this metastore has an afinity to. This is used by
	// accounts-manager. Ignored by Unity Catalog.
	Region string `json:"region,omitempty"`
	// [Create:REQ Update:ERR] Storage root URL for Metastore
	StorageRoot string `json:"storage_root,omitempty"`
	// [Create:IGN Update:OPT] UUID of storage credential to access storage_root
	StorageRootCredentialId string `json:"storage_root_credential_id,omitempty"`
	// [Create,Update:IGN] Time at which the Metastore was last modified, in
	// epoch milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified the Metastore.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type CreateMetastoreResponsePrivilegesItem

type CreateMetastoreResponsePrivilegesItem string
const CreateMetastoreResponsePrivilegesItemCreate CreateMetastoreResponsePrivilegesItem = `CREATE`
const CreateMetastoreResponsePrivilegesItemCreateMount CreateMetastoreResponsePrivilegesItem = `CREATE_MOUNT`
const CreateMetastoreResponsePrivilegesItemCreateTable CreateMetastoreResponsePrivilegesItem = `CREATE_TABLE`
const CreateMetastoreResponsePrivilegesItemModify CreateMetastoreResponsePrivilegesItem = `MODIFY`
const CreateMetastoreResponsePrivilegesItemReadFiles CreateMetastoreResponsePrivilegesItem = `READ_FILES`
const CreateMetastoreResponsePrivilegesItemSelect CreateMetastoreResponsePrivilegesItem = `SELECT`
const CreateMetastoreResponsePrivilegesItemUnknownPrivilege CreateMetastoreResponsePrivilegesItem = `UNKNOWN_PRIVILEGE`
const CreateMetastoreResponsePrivilegesItemUsage CreateMetastoreResponsePrivilegesItem = `USAGE`
const CreateMetastoreResponsePrivilegesItemWriteFiles CreateMetastoreResponsePrivilegesItem = `WRITE_FILES`

type CreateProvider

type CreateProvider struct {
	// [Create,Update:IGN] Whether this provider is successfully activated by
	// the data provider. This field is only present when the authentication
	// type is DATABRICKS.
	ActivatedByProvider bool `json:"activated_by_provider,omitempty"`
	// [Create:REQ,Update:IGN] The delta sharing authentication type.
	AuthenticationType CreateProviderAuthenticationType `json:"authentication_type,omitempty"`
	// [Create,Update:OPT] Description about the provider.
	Comment string `json:"comment,omitempty"`
	// [Create,Update:IGN] Time at which this Provider was created, in epoch
	// milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of Provider creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create,Update:REQ] The name of the Provider.
	Name string `json:"name,omitempty"`
	// [Create,Update:IGN] This field is only present when the authentication
	// type is TOKEN.
	RecipientProfile *RecipientProfile `json:"recipient_profile,omitempty"`
	// [Create,Update:OPT] This field is only present when the authentication
	// type is TOKEN.
	RecipientProfileStr string `json:"recipient_profile_str,omitempty"`
	// [Create,Update:IGN] The server-generated one-time sharing code. This
	// field is only present when the authentication type is DATABRICKS.
	SharingCode string `json:"sharing_code,omitempty"`
	// [Create,Update:IGN] Time at which this Provider was created, in epoch
	// milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified Share.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type CreateProviderAuthenticationType

type CreateProviderAuthenticationType string

[Create:REQ,Update:IGN] The delta sharing authentication type.

const CreateProviderAuthenticationTypeDatabricks CreateProviderAuthenticationType = `DATABRICKS`
const CreateProviderAuthenticationTypeToken CreateProviderAuthenticationType = `TOKEN`
const CreateProviderAuthenticationTypeUnknown CreateProviderAuthenticationType = `UNKNOWN`

type CreateProviderResponse

type CreateProviderResponse struct {
	// [Create,Update:IGN] Whether this provider is successfully activated by
	// the data provider. This field is only present when the authentication
	// type is DATABRICKS.
	ActivatedByProvider bool `json:"activated_by_provider,omitempty"`
	// [Create:REQ,Update:IGN] The delta sharing authentication type.
	AuthenticationType CreateProviderResponseAuthenticationType `json:"authentication_type,omitempty"`
	// [Create,Update:OPT] Description about the provider.
	Comment string `json:"comment,omitempty"`
	// [Create,Update:IGN] Time at which this Provider was created, in epoch
	// milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of Provider creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create,Update:REQ] The name of the Provider.
	Name string `json:"name,omitempty"`
	// [Create,Update:IGN] This field is only present when the authentication
	// type is TOKEN.
	RecipientProfile *RecipientProfile `json:"recipient_profile,omitempty"`
	// [Create,Update:OPT] This field is only present when the authentication
	// type is TOKEN.
	RecipientProfileStr string `json:"recipient_profile_str,omitempty"`
	// [Create,Update:IGN] The server-generated one-time sharing code. This
	// field is only present when the authentication type is DATABRICKS.
	SharingCode string `json:"sharing_code,omitempty"`
	// [Create,Update:IGN] Time at which this Provider was created, in epoch
	// milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified Share.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type CreateProviderResponseAuthenticationType

type CreateProviderResponseAuthenticationType string

[Create:REQ,Update:IGN] The delta sharing authentication type.

const CreateProviderResponseAuthenticationTypeDatabricks CreateProviderResponseAuthenticationType = `DATABRICKS`
const CreateProviderResponseAuthenticationTypeToken CreateProviderResponseAuthenticationType = `TOKEN`
const CreateProviderResponseAuthenticationTypeUnknown CreateProviderResponseAuthenticationType = `UNKNOWN`

type CreateRecipient

type CreateRecipient struct {
	// [Create:IGN,Update:IGN] A boolean status field showing whether the
	// Recipient's activation URL has been exercised or not.
	Activated bool `json:"activated,omitempty"`
	// [Create:IGN,Update:IGN] Full activation url to retrieve the access token.
	// It will be empty if the token is already retrieved.
	ActivationUrl string `json:"activation_url,omitempty"`
	// [Create:REQ,Update:IGN] The delta sharing authentication type.
	AuthenticationType CreateRecipientAuthenticationType `json:"authentication_type,omitempty"`
	// [Create:OPT,Update:OPT] Description about the recipient.
	Comment string `json:"comment,omitempty"`
	// [Create:IGN,Update:IGN] Time at which this recipient was created, in
	// epoch milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create:IGN,Update:IGN] Username of recipient creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create:OPT,Update:OPT] IP Access List
	IpAccessList *IpAccessList `json:"ip_access_list,omitempty"`
	// [Create:REQ,Update:OPT] Name of Recipient.
	Name string `json:"name,omitempty"`
	// [Create:OPT,Update:IGN] The one-time sharing code provided by the data
	// recipient. This field is only present when the authentication type is
	// DATABRICKS.
	SharingCode string `json:"sharing_code,omitempty"`
	// [Create:IGN,Update:IGN] recipient Tokens This field is only present when
	// the authentication type is TOKEN.
	Tokens []RecipientTokenInfo `json:"tokens,omitempty"`
	// [Create:IGN,Update:IGN] Time at which the recipient was updated, in epoch
	// milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create:IGN,Update:IGN] Username of recipient updater.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type CreateRecipientAuthenticationType

type CreateRecipientAuthenticationType string

[Create:REQ,Update:IGN] The delta sharing authentication type.

const CreateRecipientAuthenticationTypeDatabricks CreateRecipientAuthenticationType = `DATABRICKS`
const CreateRecipientAuthenticationTypeToken CreateRecipientAuthenticationType = `TOKEN`
const CreateRecipientAuthenticationTypeUnknown CreateRecipientAuthenticationType = `UNKNOWN`

type CreateRecipientResponse

type CreateRecipientResponse struct {
	// [Create:IGN,Update:IGN] A boolean status field showing whether the
	// Recipient's activation URL has been exercised or not.
	Activated bool `json:"activated,omitempty"`
	// [Create:IGN,Update:IGN] Full activation url to retrieve the access token.
	// It will be empty if the token is already retrieved.
	ActivationUrl string `json:"activation_url,omitempty"`
	// [Create:REQ,Update:IGN] The delta sharing authentication type.
	AuthenticationType CreateRecipientResponseAuthenticationType `json:"authentication_type,omitempty"`
	// [Create:OPT,Update:OPT] Description about the recipient.
	Comment string `json:"comment,omitempty"`
	// [Create:IGN,Update:IGN] Time at which this recipient was created, in
	// epoch milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create:IGN,Update:IGN] Username of recipient creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create:OPT,Update:OPT] IP Access List
	IpAccessList *IpAccessList `json:"ip_access_list,omitempty"`
	// [Create:REQ,Update:OPT] Name of Recipient.
	Name string `json:"name,omitempty"`
	// [Create:OPT,Update:IGN] The one-time sharing code provided by the data
	// recipient. This field is only present when the authentication type is
	// DATABRICKS.
	SharingCode string `json:"sharing_code,omitempty"`
	// [Create:IGN,Update:IGN] recipient Tokens This field is only present when
	// the authentication type is TOKEN.
	Tokens []RecipientTokenInfo `json:"tokens,omitempty"`
	// [Create:IGN,Update:IGN] Time at which the recipient was updated, in epoch
	// milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create:IGN,Update:IGN] Username of recipient updater.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type CreateRecipientResponseAuthenticationType

type CreateRecipientResponseAuthenticationType string

[Create:REQ,Update:IGN] The delta sharing authentication type.

const CreateRecipientResponseAuthenticationTypeDatabricks CreateRecipientResponseAuthenticationType = `DATABRICKS`
const CreateRecipientResponseAuthenticationTypeToken CreateRecipientResponseAuthenticationType = `TOKEN`
const CreateRecipientResponseAuthenticationTypeUnknown CreateRecipientResponseAuthenticationType = `UNKNOWN`

type CreateSchema

type CreateSchema struct {
	// [Create:REQ Update:IGN] Name of parent Catalog.
	CatalogName string `json:"catalog_name,omitempty"`
	// [Create,Update:OPT] User-provided free-form text description.
	Comment string `json:"comment,omitempty"`
	// [Create,Update:IGN] Time at which this Schema was created, in epoch
	// milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of Schema creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create,Update:IGN] Full name of Schema, in form of
	// <catalog_name>.<schema_name>.
	FullName string `json:"full_name,omitempty"`
	// [Create,Update:IGN] Unique identifier of parent Metastore.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ Update:OPT] Name of Schema, relative to parent Catalog.
	Name string `json:"name,omitempty"`
	// [Create:IGN Update:OPT] Username of current owner of Schema.
	Owner string `json:"owner,omitempty"`
	// [Create,Update:IGN] Privileges the user has on the Schema.
	Privileges []CreateSchemaPrivilegesItem `json:"privileges,omitempty"`
	// This name ('properties') is what the client sees as the field name in
	// messages that include PropertiesKVPairs using 'json_inline' (e.g.,
	// TableInfo).
	Properties []StringKeyValuePair `json:"properties,omitempty"`
	// [Create,Update:IGN] Time at which this Schema was created, in epoch
	// milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified Schema.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type CreateSchemaPrivilegesItem

type CreateSchemaPrivilegesItem string
const CreateSchemaPrivilegesItemCreate CreateSchemaPrivilegesItem = `CREATE`
const CreateSchemaPrivilegesItemCreateMount CreateSchemaPrivilegesItem = `CREATE_MOUNT`
const CreateSchemaPrivilegesItemCreateTable CreateSchemaPrivilegesItem = `CREATE_TABLE`
const CreateSchemaPrivilegesItemModify CreateSchemaPrivilegesItem = `MODIFY`
const CreateSchemaPrivilegesItemReadFiles CreateSchemaPrivilegesItem = `READ_FILES`
const CreateSchemaPrivilegesItemSelect CreateSchemaPrivilegesItem = `SELECT`
const CreateSchemaPrivilegesItemUnknownPrivilege CreateSchemaPrivilegesItem = `UNKNOWN_PRIVILEGE`
const CreateSchemaPrivilegesItemUsage CreateSchemaPrivilegesItem = `USAGE`
const CreateSchemaPrivilegesItemWriteFiles CreateSchemaPrivilegesItem = `WRITE_FILES`

type CreateSchemaResponse

type CreateSchemaResponse struct {
	// [Create:REQ Update:IGN] Name of parent Catalog.
	CatalogName string `json:"catalog_name,omitempty"`
	// [Create,Update:OPT] User-provided free-form text description.
	Comment string `json:"comment,omitempty"`
	// [Create,Update:IGN] Time at which this Schema was created, in epoch
	// milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of Schema creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create,Update:IGN] Full name of Schema, in form of
	// <catalog_name>.<schema_name>.
	FullName string `json:"full_name,omitempty"`
	// [Create,Update:IGN] Unique identifier of parent Metastore.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ Update:OPT] Name of Schema, relative to parent Catalog.
	Name string `json:"name,omitempty"`
	// [Create:IGN Update:OPT] Username of current owner of Schema.
	Owner string `json:"owner,omitempty"`
	// [Create,Update:IGN] Privileges the user has on the Schema.
	Privileges []CreateSchemaResponsePrivilegesItem `json:"privileges,omitempty"`
	// This name ('properties') is what the client sees as the field name in
	// messages that include PropertiesKVPairs using 'json_inline' (e.g.,
	// TableInfo).
	Properties []StringKeyValuePair `json:"properties,omitempty"`
	// [Create,Update:IGN] Time at which this Schema was created, in epoch
	// milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified Schema.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type CreateSchemaResponsePrivilegesItem

type CreateSchemaResponsePrivilegesItem string
const CreateSchemaResponsePrivilegesItemCreate CreateSchemaResponsePrivilegesItem = `CREATE`
const CreateSchemaResponsePrivilegesItemCreateMount CreateSchemaResponsePrivilegesItem = `CREATE_MOUNT`
const CreateSchemaResponsePrivilegesItemCreateTable CreateSchemaResponsePrivilegesItem = `CREATE_TABLE`
const CreateSchemaResponsePrivilegesItemModify CreateSchemaResponsePrivilegesItem = `MODIFY`
const CreateSchemaResponsePrivilegesItemReadFiles CreateSchemaResponsePrivilegesItem = `READ_FILES`
const CreateSchemaResponsePrivilegesItemSelect CreateSchemaResponsePrivilegesItem = `SELECT`
const CreateSchemaResponsePrivilegesItemUnknownPrivilege CreateSchemaResponsePrivilegesItem = `UNKNOWN_PRIVILEGE`
const CreateSchemaResponsePrivilegesItemUsage CreateSchemaResponsePrivilegesItem = `USAGE`
const CreateSchemaResponsePrivilegesItemWriteFiles CreateSchemaResponsePrivilegesItem = `WRITE_FILES`

type CreateShare

type CreateShare struct {
	// [Create: OPT] comment when creating the share
	Comment string `json:"comment,omitempty"`
	// [Create:IGN] Time at which this Share was created, in epoch milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create:IGN] Username of Share creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create:REQ] Name of the Share.
	Name string `json:"name,omitempty"`
	// [Create: IGN] A list of shared data objects within the Share.
	Objects []SharedDataObject `json:"objects,omitempty"`
}

type CreateShareResponse

type CreateShareResponse struct {
	// [Create: OPT] comment when creating the share
	Comment string `json:"comment,omitempty"`
	// [Create:IGN] Time at which this Share was created, in epoch milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create:IGN] Username of Share creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create:REQ] Name of the Share.
	Name string `json:"name,omitempty"`
	// [Create: IGN] A list of shared data objects within the Share.
	Objects []SharedDataObject `json:"objects,omitempty"`
}

type CreateStagingTable

type CreateStagingTable struct {
	// [Create:REQ] Name of parent Catalog.
	CatalogName string `json:"catalog_name,omitempty"`
	// [Create:IGN] Unique id generated for the staging table
	Id string `json:"id,omitempty"`
	// [Create:REQ] Name of Table, relative to parent Schema.
	Name string `json:"name,omitempty"`
	// [Create:REQ] Name of parent Schema relative to its parent Catalog.
	SchemaName string `json:"schema_name,omitempty"`
	// [Create:IGN] URI generated for the staging table
	StagingLocation string `json:"staging_location,omitempty"`
}

type CreateStagingTableResponse

type CreateStagingTableResponse struct {
	// [Create:REQ] Name of parent Catalog.
	CatalogName string `json:"catalog_name,omitempty"`
	// [Create:IGN] Unique id generated for the staging table
	Id string `json:"id,omitempty"`
	// [Create:REQ] Name of Table, relative to parent Schema.
	Name string `json:"name,omitempty"`
	// [Create:REQ] Name of parent Schema relative to its parent Catalog.
	SchemaName string `json:"schema_name,omitempty"`
	// [Create:IGN] URI generated for the staging table
	StagingLocation string `json:"staging_location,omitempty"`
}

type CreateStorageCredential

type CreateStorageCredential struct {
	// The AWS IAM role configuration.
	AwsIamRole *AwsIamRole `json:"aws_iam_role,omitempty"`
	// The Azure service principal configuration.
	AzureServicePrincipal *AzureServicePrincipal `json:"azure_service_principal,omitempty"`
	// [Create,Update:OPT] Comment associated with the credential.
	Comment string `json:"comment,omitempty"`
	// [Create,Update:IGN] Time at which this Credential was created, in epoch
	// milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of credential creator.
	CreatedBy string `json:"created_by,omitempty"`
	// The GCP service account key configuration.
	GcpServiceAccountKey *GcpServiceAccountKey `json:"gcp_service_account_key,omitempty"`
	// [Create:IGN] The unique identifier of the credential.
	Id string `json:"id,omitempty"`
	// [Create,Update:IGN] Unique identifier of parent Metastore.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ, Update:OPT] The credential name. The name MUST be unique
	// within the Metastore.
	Name string `json:"name,omitempty"`
	// [Create:IGN Update:OPT] Username of current owner of credential.
	Owner string `json:"owner,omitempty"`
	// Optional. Supplying true to this argument skips validation of the created
	// set of credentials.
	SkipValidation bool `json:"skip_validation,omitempty"`
	// [Create,Update:IGN] Time at which this credential was last modified, in
	// epoch milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified the credential.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type CreateStorageCredentialResponse

type CreateStorageCredentialResponse struct {
	// The AWS IAM role configuration.
	AwsIamRole *AwsIamRole `json:"aws_iam_role,omitempty"`
	// The Azure service principal configuration.
	AzureServicePrincipal *AzureServicePrincipal `json:"azure_service_principal,omitempty"`
	// [Create,Update:OPT] Comment associated with the credential.
	Comment string `json:"comment,omitempty"`
	// [Create,Update:IGN] Time at which this Credential was created, in epoch
	// milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of credential creator.
	CreatedBy string `json:"created_by,omitempty"`
	// The GCP service account key configuration.
	GcpServiceAccountKey *GcpServiceAccountKey `json:"gcp_service_account_key,omitempty"`
	// [Create:IGN] The unique identifier of the credential.
	Id string `json:"id,omitempty"`
	// [Create,Update:IGN] Unique identifier of parent Metastore.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ, Update:OPT] The credential name. The name MUST be unique
	// within the Metastore.
	Name string `json:"name,omitempty"`
	// [Create:IGN Update:OPT] Username of current owner of credential.
	Owner string `json:"owner,omitempty"`
	// [Create,Update:IGN] Time at which this credential was last modified, in
	// epoch milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified the credential.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type CreateTable

type CreateTable struct {
	// [Create:REQ Update:IGN] Name of parent Catalog.
	CatalogName string `json:"catalog_name,omitempty"`
	// This name ('columns') is what the client actually sees as the field name
	// in messages that include PropertiesKVPairs using 'json_inline' (e.g.,
	// TableInfo).
	Columns []ColumnInfo `json:"columns,omitempty"`
	// [Create,Update:OPT] User-provided free-form text description.
	Comment string `json:"comment,omitempty"`
	// [Create,Update:IGN] Time at which this Table was created, in epoch
	// milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of Table creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create,Update:IGN] Unique ID of the data_access_configuration to use.
	DataAccessConfigurationId string `json:"data_access_configuration_id,omitempty"`
	// [Create:REQ Update:OPT] Data source format ("DELTA", "CSV", etc.).
	DataSourceFormat CreateTableDataSourceFormat `json:"data_source_format,omitempty"`
	// [Create,Update:IGN] Full name of Table, in form of
	// <catalog_name>.<schema_name>.<table_name>
	FullName string `json:"full_name,omitempty"`
	// [Create,Update:IGN] Unique identifier of parent Metastore.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ Update:OPT] Name of Table, relative to parent Schema.
	Name string `json:"name,omitempty"`
	// [Create: IGN Update:OPT] Username of current owner of Table.
	Owner string `json:"owner,omitempty"`
	// [Create,Update:IGN] Privileges the user has on the Table.
	Privileges []CreateTablePrivilegesItem `json:"privileges,omitempty"`
	// This name ('properties') is what the client sees as the field name in
	// messages that include PropertiesKVPairs using 'json_inline' (e.g.,
	// TableInfo).
	Properties []StringKeyValuePair `json:"properties,omitempty"`
	// [Create:REQ Update:IGN] Name of parent Schema relative to its parent
	// Catalog.
	SchemaName string `json:"schema_name,omitempty"`
	// [Create,Update:OPT] List of schemes whose objects can be referenced
	// without qualification.
	SqlPath string `json:"sql_path,omitempty"`
	// [Create:OPT Update:IGN] Name of the storage credential this table used
	StorageCredentialName string `json:"storage_credential_name,omitempty"`
	// [Create:REQ Update:OPT] Storage root URL for table (for MANAGED, EXTERNAL
	// tables)
	StorageLocation string `json:"storage_location,omitempty"`
	// [Create:IGN Update:IGN] Name of Table, relative to parent Schema.
	TableId string `json:"table_id,omitempty"`
	// [Create:REQ Update:OPT] Table type ("MANAGED", "EXTERNAL", "VIEW").
	TableType CreateTableTableType `json:"table_type,omitempty"`
	// [Create,Update:IGN] Time at which this Table was last modified, in epoch
	// milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified the Table.
	UpdatedBy string `json:"updated_by,omitempty"`
	// [Create,Update:OPT] View definition SQL (when table_type == "VIEW")
	ViewDefinition string `json:"view_definition,omitempty"`
}

type CreateTableDataSourceFormat

type CreateTableDataSourceFormat string

[Create:REQ Update:OPT] Data source format ("DELTA", "CSV", etc.).

const CreateTableDataSourceFormatAvro CreateTableDataSourceFormat = `AVRO`
const CreateTableDataSourceFormatCsv CreateTableDataSourceFormat = `CSV`
const CreateTableDataSourceFormatDelta CreateTableDataSourceFormat = `DELTA`
const CreateTableDataSourceFormatDeltasharing CreateTableDataSourceFormat = `DELTASHARING`
const CreateTableDataSourceFormatJson CreateTableDataSourceFormat = `JSON`
const CreateTableDataSourceFormatOrc CreateTableDataSourceFormat = `ORC`
const CreateTableDataSourceFormatParquet CreateTableDataSourceFormat = `PARQUET`
const CreateTableDataSourceFormatText CreateTableDataSourceFormat = `TEXT`
const CreateTableDataSourceFormatUnityCatalog CreateTableDataSourceFormat = `UNITY_CATALOG`
const CreateTableDataSourceFormatUnknownDataSourceFormat CreateTableDataSourceFormat = `UNKNOWN_DATA_SOURCE_FORMAT`

type CreateTablePrivilegesItem

type CreateTablePrivilegesItem string
const CreateTablePrivilegesItemCreate CreateTablePrivilegesItem = `CREATE`
const CreateTablePrivilegesItemCreateMount CreateTablePrivilegesItem = `CREATE_MOUNT`
const CreateTablePrivilegesItemCreateTable CreateTablePrivilegesItem = `CREATE_TABLE`
const CreateTablePrivilegesItemModify CreateTablePrivilegesItem = `MODIFY`
const CreateTablePrivilegesItemReadFiles CreateTablePrivilegesItem = `READ_FILES`
const CreateTablePrivilegesItemSelect CreateTablePrivilegesItem = `SELECT`
const CreateTablePrivilegesItemUnknownPrivilege CreateTablePrivilegesItem = `UNKNOWN_PRIVILEGE`
const CreateTablePrivilegesItemUsage CreateTablePrivilegesItem = `USAGE`
const CreateTablePrivilegesItemWriteFiles CreateTablePrivilegesItem = `WRITE_FILES`

type CreateTableResponse

type CreateTableResponse struct {
	// [Create:REQ Update:IGN] Name of parent Catalog.
	CatalogName string `json:"catalog_name,omitempty"`
	// This name ('columns') is what the client actually sees as the field name
	// in messages that include PropertiesKVPairs using 'json_inline' (e.g.,
	// TableInfo).
	Columns []ColumnInfo `json:"columns,omitempty"`
	// [Create,Update:OPT] User-provided free-form text description.
	Comment string `json:"comment,omitempty"`
	// [Create,Update:IGN] Time at which this Table was created, in epoch
	// milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of Table creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create,Update:IGN] Unique ID of the data_access_configuration to use.
	DataAccessConfigurationId string `json:"data_access_configuration_id,omitempty"`
	// [Create:REQ Update:OPT] Data source format ("DELTA", "CSV", etc.).
	DataSourceFormat CreateTableResponseDataSourceFormat `json:"data_source_format,omitempty"`
	// [Create,Update:IGN] Full name of Table, in form of
	// <catalog_name>.<schema_name>.<table_name>
	FullName string `json:"full_name,omitempty"`
	// [Create,Update:IGN] Unique identifier of parent Metastore.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ Update:OPT] Name of Table, relative to parent Schema.
	Name string `json:"name,omitempty"`
	// [Create: IGN Update:OPT] Username of current owner of Table.
	Owner string `json:"owner,omitempty"`
	// [Create,Update:IGN] Privileges the user has on the Table.
	Privileges []CreateTableResponsePrivilegesItem `json:"privileges,omitempty"`
	// This name ('properties') is what the client sees as the field name in
	// messages that include PropertiesKVPairs using 'json_inline' (e.g.,
	// TableInfo).
	Properties []StringKeyValuePair `json:"properties,omitempty"`
	// [Create:REQ Update:IGN] Name of parent Schema relative to its parent
	// Catalog.
	SchemaName string `json:"schema_name,omitempty"`
	// [Create,Update:OPT] List of schemes whose objects can be referenced
	// without qualification.
	SqlPath string `json:"sql_path,omitempty"`
	// [Create:OPT Update:IGN] Name of the storage credential this table used
	StorageCredentialName string `json:"storage_credential_name,omitempty"`
	// [Create:REQ Update:OPT] Storage root URL for table (for MANAGED, EXTERNAL
	// tables)
	StorageLocation string `json:"storage_location,omitempty"`
	// [Create:IGN Update:IGN] Name of Table, relative to parent Schema.
	TableId string `json:"table_id,omitempty"`
	// [Create:REQ Update:OPT] Table type ("MANAGED", "EXTERNAL", "VIEW").
	TableType CreateTableResponseTableType `json:"table_type,omitempty"`
	// [Create,Update:IGN] Time at which this Table was last modified, in epoch
	// milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified the Table.
	UpdatedBy string `json:"updated_by,omitempty"`
	// [Create,Update:OPT] View definition SQL (when table_type == "VIEW")
	ViewDefinition string `json:"view_definition,omitempty"`
}

type CreateTableResponseDataSourceFormat

type CreateTableResponseDataSourceFormat string

[Create:REQ Update:OPT] Data source format ("DELTA", "CSV", etc.).

const CreateTableResponseDataSourceFormatAvro CreateTableResponseDataSourceFormat = `AVRO`
const CreateTableResponseDataSourceFormatCsv CreateTableResponseDataSourceFormat = `CSV`
const CreateTableResponseDataSourceFormatDelta CreateTableResponseDataSourceFormat = `DELTA`
const CreateTableResponseDataSourceFormatDeltasharing CreateTableResponseDataSourceFormat = `DELTASHARING`
const CreateTableResponseDataSourceFormatJson CreateTableResponseDataSourceFormat = `JSON`
const CreateTableResponseDataSourceFormatOrc CreateTableResponseDataSourceFormat = `ORC`
const CreateTableResponseDataSourceFormatParquet CreateTableResponseDataSourceFormat = `PARQUET`
const CreateTableResponseDataSourceFormatText CreateTableResponseDataSourceFormat = `TEXT`
const CreateTableResponseDataSourceFormatUnityCatalog CreateTableResponseDataSourceFormat = `UNITY_CATALOG`
const CreateTableResponseDataSourceFormatUnknownDataSourceFormat CreateTableResponseDataSourceFormat = `UNKNOWN_DATA_SOURCE_FORMAT`

type CreateTableResponsePrivilegesItem

type CreateTableResponsePrivilegesItem string
const CreateTableResponsePrivilegesItemCreate CreateTableResponsePrivilegesItem = `CREATE`
const CreateTableResponsePrivilegesItemCreateMount CreateTableResponsePrivilegesItem = `CREATE_MOUNT`
const CreateTableResponsePrivilegesItemCreateTable CreateTableResponsePrivilegesItem = `CREATE_TABLE`
const CreateTableResponsePrivilegesItemModify CreateTableResponsePrivilegesItem = `MODIFY`
const CreateTableResponsePrivilegesItemReadFiles CreateTableResponsePrivilegesItem = `READ_FILES`
const CreateTableResponsePrivilegesItemSelect CreateTableResponsePrivilegesItem = `SELECT`
const CreateTableResponsePrivilegesItemUnknownPrivilege CreateTableResponsePrivilegesItem = `UNKNOWN_PRIVILEGE`
const CreateTableResponsePrivilegesItemUsage CreateTableResponsePrivilegesItem = `USAGE`
const CreateTableResponsePrivilegesItemWriteFiles CreateTableResponsePrivilegesItem = `WRITE_FILES`

type CreateTableResponseTableType

type CreateTableResponseTableType string

[Create:REQ Update:OPT] Table type ("MANAGED", "EXTERNAL", "VIEW").

const CreateTableResponseTableTypeExternal CreateTableResponseTableType = `EXTERNAL`
const CreateTableResponseTableTypeManaged CreateTableResponseTableType = `MANAGED`
const CreateTableResponseTableTypeUnknownTableType CreateTableResponseTableType = `UNKNOWN_TABLE_TYPE`
const CreateTableResponseTableTypeView CreateTableResponseTableType = `VIEW`

type CreateTableTableType

type CreateTableTableType string

[Create:REQ Update:OPT] Table type ("MANAGED", "EXTERNAL", "VIEW").

const CreateTableTableTypeExternal CreateTableTableType = `EXTERNAL`
const CreateTableTableTypeManaged CreateTableTableType = `MANAGED`
const CreateTableTableTypeUnknownTableType CreateTableTableType = `UNKNOWN_TABLE_TYPE`
const CreateTableTableTypeView CreateTableTableType = `VIEW`

type DeleteCatalogRequest

type DeleteCatalogRequest struct {
	// Required. The name of the catalog.
	Name string `json:"-" url:"-"`
}

Delete a catalog

type DeleteExternalLocationRequest

type DeleteExternalLocationRequest struct {
	// Force deletion even if there are dependent external tables or mounts.
	Force bool `json:"-" url:"force,omitempty"`
	// Required. Name of the storage credential.
	Name string `json:"-" url:"-"`
}

Delete an external location

type DeleteMetastoreRequest

type DeleteMetastoreRequest struct {
	// Force deletion even if the metastore is not empty. Default is false.
	Force bool `json:"-" url:"force,omitempty"`
	// Required. Unique ID of the Metastore (from URL).
	Id string `json:"-" url:"-"`
}

Delete a Metastore

type DeleteProviderRequest

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

Delete a provider

type DeleteRecipientRequest

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

Delete a share recipient

type DeleteSchemaRequest

type DeleteSchemaRequest struct {
	// Required. Full name of the schema (from URL).
	FullName string `json:"-" url:"-"`
}

Delete a schema

type DeleteShareRequest

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

Delete a share

type DeleteStorageCredentialRequest

type DeleteStorageCredentialRequest struct {
	// Force deletion even if there are dependent external locations or external
	// tables.
	Force bool `json:"-" url:"force,omitempty"`
	// Required. Name of the storage credential.
	Name string `json:"-" url:"-"`
}

Delete a credential

type DeleteTableRequest

type DeleteTableRequest struct {
	// Required. Full name of the Table (from URL).
	FullName string `json:"-" url:"-"`
}

Delete a table

type ExternalLocationInfo

type ExternalLocationInfo struct {
	// [Create:OPT Update:OPT] User-provided free-form text description.
	Comment string `json:"comment,omitempty"`
	// [Create,Update:IGN] Time at which this External Location was created, in
	// epoch milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of External Location creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create,Update:IGN] Unique ID of the location's Storage Credential.
	CredentialId string `json:"credential_id,omitempty"`
	// [Create:REQ Update:OPT] Current name of the Storage Credential this
	// location uses.
	CredentialName string `json:"credential_name,omitempty"`
	// [Create,Update:IGN] Unique identifier of Metastore hosting the External
	// Location.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ Update:OPT] Name of the External Location.
	Name string `json:"name,omitempty"`
	// [Create:IGN Update:OPT] The owner of the External Location.
	Owner string `json:"owner,omitempty"`
	// [Create,Update:IGN] Time at which this was last modified, in epoch
	// milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified the External
	// Location.
	UpdatedBy string `json:"updated_by,omitempty"`
	// [Create:REQ Update:OPT] Path URL of the External Location.
	Url string `json:"url,omitempty"`
}

type ExternalLocationsAPI

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

An external location is an object that combines a cloud storage path with a storage credential that authorizes access to the cloud storage path. Each storage location is subject to Unity Catalog access-control policies that control which users and groups can access the credential. If a user does not have access to a storage location in Unity Catalog, the request fails and Unity Catalog does not attempt to authenticate to your cloud tenant on the user’s behalf.

Databricks recommends using external locations rather than using storage credentials directly.

To create external locations, you must be a metastore admin or a user with the CREATE EXTERNAL LOCATION privilege.

func NewExternalLocations

func NewExternalLocations(client *client.DatabricksClient) *ExternalLocationsAPI

func (*ExternalLocationsAPI) Create

Create an external location

Creates a new External Location entry in the Metastore. The caller must be a Metastore admin or have the CREATE EXTERNAL LOCATION privilege on the Metastore.

func (*ExternalLocationsAPI) Delete

Delete an external location

Deletes the specified external location from the Metastore. The caller must be the owner of the external location.

func (*ExternalLocationsAPI) DeleteByName

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

Delete an external location

Deletes the specified external location from the Metastore. The caller must be the owner of the external location.

func (*ExternalLocationsAPI) Get

Get an external location

Gets an external location from the Metastore. The caller must be either a Metastore admin, the owner of the external location, or has an appropriate privilege level on the Metastore.

func (*ExternalLocationsAPI) GetByName

Get an external location

Gets an external location from the Metastore. The caller must be either a Metastore admin, the owner of the external location, or has an appropriate privilege level on the Metastore.

func (*ExternalLocationsAPI) Impl

Impl returns low-level ExternalLocations API implementation

func (*ExternalLocationsAPI) ListAll

List external locations

Gets an array of External Locations (ExternalLocationInfo objects) from the Metastore. The caller must be a Metastore admin, is the owner of the external location, or has privileges to access the external location.

This method is generated by Databricks SDK Code Generator.

func (*ExternalLocationsAPI) Update

Update an external location

Updates an external location in the Metastore. The caller must be the owner of the externa location, or be a Metastore admin. In the second case, the admin can only update the name of the external location.

func (*ExternalLocationsAPI) WithImpl

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

type ExternalLocationsService

type ExternalLocationsService interface {

	// Create an external location
	//
	// Creates a new External Location entry in the Metastore. The caller must
	// be a Metastore admin or have the CREATE EXTERNAL LOCATION privilege on
	// the Metastore.
	Create(ctx context.Context, request CreateExternalLocation) (*CreateExternalLocationResponse, error)

	// Delete an external location
	//
	// Deletes the specified external location from the Metastore. The caller
	// must be the owner of the external location.
	Delete(ctx context.Context, request DeleteExternalLocationRequest) error

	// Get an external location
	//
	// Gets an external location from the Metastore. The caller must be either a
	// Metastore admin, the owner of the external location, or has an
	// appropriate privilege level on the Metastore.
	Get(ctx context.Context, request GetExternalLocationRequest) (*GetExternalLocationResponse, error)

	// List external locations
	//
	// Gets an array of External Locations (ExternalLocationInfo objects) from
	// the Metastore. The caller must be a Metastore admin, is the owner of the
	// external location, or has privileges to access the external location.
	//
	// Use ListAll() to get all ExternalLocationInfo instances
	List(ctx context.Context) (*ListExternalLocationsResponse, error)

	// Update an external location
	//
	// Updates an external location in the Metastore. The caller must be the
	// owner of the externa location, or be a Metastore admin. In the second
	// case, the admin can only update the name of the external location.
	Update(ctx context.Context, request UpdateExternalLocation) error
}

An external location is an object that combines a cloud storage path with a storage credential that authorizes access to the cloud storage path. Each storage location is subject to Unity Catalog access-control policies that control which users and groups can access the credential. If a user does not have access to a storage location in Unity Catalog, the request fails and Unity Catalog does not attempt to authenticate to your cloud tenant on the user’s behalf.

Databricks recommends using external locations rather than using storage credentials directly.

To create external locations, you must be a metastore admin or a user with the CREATE EXTERNAL LOCATION privilege.

type GcpServiceAccountKey

type GcpServiceAccountKey struct {
	// The email of the service account. [Create:REQ].
	Email string `json:"email,omitempty"`
	// The service account's RSA private key. [Create:REQ]
	PrivateKey string `json:"private_key,omitempty"`
	// The ID of the service account's private key. [Create:REQ]
	PrivateKeyId string `json:"private_key_id,omitempty"`
}

type GetActivationUrlInfoRequest

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

Get a share activation URL

type GetCatalogRequest

type GetCatalogRequest struct {
	// Required. The name of the catalog.
	Name string `json:"-" url:"-"`
}

Get a catalog

type GetCatalogResponse

type GetCatalogResponse struct {
	// [Create,Update:IGN] The type of the catalog.
	CatalogType GetCatalogResponseCatalogType `json:"catalog_type,omitempty"`
	// [Create,Update:OPT] User-provided free-form text description.
	Comment string `json:"comment,omitempty"`
	// [Create,Update:IGN] Time at which this Catalog was created, in epoch
	// milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of Catalog creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create,Update:IGN] Unique identifier of parent Metastore.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ Update:OPT] Name of Catalog.
	Name string `json:"name,omitempty"`
	// [Create:IGN,Update:OPT] Username of current owner of Catalog.
	Owner string `json:"owner,omitempty"`
	// [Create,Update:IGN] Privileges the user has on the Catalog.
	Privileges []GetCatalogResponsePrivilegesItem `json:"privileges,omitempty"`
	// This name ('properties') is what the client sees as the field name in
	// messages that include PropertiesKVPairs using 'json_inline' (e.g.,
	// TableInfo).
	Properties []StringKeyValuePair `json:"properties,omitempty"`
	// Delta Sharing Catalog specific fields. A Delta Sharing Catalog is a
	// catalog that is based on a Delta share on a remote sharing server.
	// [Create:OPT,Update:IGN] The name of delta sharing provider.
	ProviderName string `json:"provider_name,omitempty"`
	// [Create:OPT,Update: IGN] The name of the share under the share provider.
	ShareName string `json:"share_name,omitempty"`
	// [Create,Update:IGN] Time at which this Catalog was last modified, in
	// epoch milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified Catalog.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type GetCatalogResponseCatalogType

type GetCatalogResponseCatalogType string

[Create,Update:IGN] The type of the catalog.

const GetCatalogResponseCatalogTypeDeltasharingCatalog GetCatalogResponseCatalogType = `DELTASHARING_CATALOG`
const GetCatalogResponseCatalogTypeManagedCatalog GetCatalogResponseCatalogType = `MANAGED_CATALOG`
const GetCatalogResponseCatalogTypeSystemCatalog GetCatalogResponseCatalogType = `SYSTEM_CATALOG`
const GetCatalogResponseCatalogTypeUnknownCatalogType GetCatalogResponseCatalogType = `UNKNOWN_CATALOG_TYPE`

type GetCatalogResponsePrivilegesItem

type GetCatalogResponsePrivilegesItem string
const GetCatalogResponsePrivilegesItemCreate GetCatalogResponsePrivilegesItem = `CREATE`
const GetCatalogResponsePrivilegesItemCreateMount GetCatalogResponsePrivilegesItem = `CREATE_MOUNT`
const GetCatalogResponsePrivilegesItemCreateTable GetCatalogResponsePrivilegesItem = `CREATE_TABLE`
const GetCatalogResponsePrivilegesItemModify GetCatalogResponsePrivilegesItem = `MODIFY`
const GetCatalogResponsePrivilegesItemReadFiles GetCatalogResponsePrivilegesItem = `READ_FILES`
const GetCatalogResponsePrivilegesItemSelect GetCatalogResponsePrivilegesItem = `SELECT`
const GetCatalogResponsePrivilegesItemUnknownPrivilege GetCatalogResponsePrivilegesItem = `UNKNOWN_PRIVILEGE`
const GetCatalogResponsePrivilegesItemUsage GetCatalogResponsePrivilegesItem = `USAGE`
const GetCatalogResponsePrivilegesItemWriteFiles GetCatalogResponsePrivilegesItem = `WRITE_FILES`

type GetExternalLocationRequest

type GetExternalLocationRequest struct {
	// Required. Name of the storage credential.
	Name string `json:"-" url:"-"`
}

Get an external location

type GetExternalLocationResponse

type GetExternalLocationResponse struct {
	// [Create:OPT Update:OPT] User-provided free-form text description.
	Comment string `json:"comment,omitempty"`
	// [Create,Update:IGN] Time at which this External Location was created, in
	// epoch milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of External Location creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create,Update:IGN] Unique ID of the location's Storage Credential.
	CredentialId string `json:"credential_id,omitempty"`
	// [Create:REQ Update:OPT] Current name of the Storage Credential this
	// location uses.
	CredentialName string `json:"credential_name,omitempty"`
	// [Create,Update:IGN] Unique identifier of Metastore hosting the External
	// Location.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ Update:OPT] Name of the External Location.
	Name string `json:"name,omitempty"`
	// [Create:IGN Update:OPT] The owner of the External Location.
	Owner string `json:"owner,omitempty"`
	// [Create,Update:IGN] Time at which this was last modified, in epoch
	// milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified the External
	// Location.
	UpdatedBy string `json:"updated_by,omitempty"`
	// [Create:REQ Update:OPT] Path URL of the External Location.
	Url string `json:"url,omitempty"`
}

type GetGrantRequest

type GetGrantRequest struct {
	// Required. Unique identifier (full name) of Securable (from URL).
	FullName string `json:"-" url:"-"`
	// Optional. List permissions granted to this principal.
	Principal string `json:"-" url:"principal,omitempty"`
	// Required. Type of Securable (from URL).
	SecurableType string `json:"-" url:"-"`
}

Get permissions

type GetMetastoreRequest

type GetMetastoreRequest struct {
	// Required. Unique ID of the Metastore (from URL).
	Id string `json:"-" url:"-"`
}

Get a Metastore

type GetMetastoreResponse

type GetMetastoreResponse struct {
	// [Create,Update:IGN] Time at which this Metastore was created, in epoch
	// milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of Metastore creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create:IGN Update:OPT] Unique identifier of (Default) Data Access
	// Configuration
	DefaultDataAccessConfigId string `json:"default_data_access_config_id,omitempty"`
	// [Create:IGN Update:OPT] Whether Delta Sharing is enabled on this
	// metastore.
	DeltaSharingEnabled bool `json:"delta_sharing_enabled,omitempty"`
	// [Create:IGN Update:OPT] The lifetime of delta sharing recipient token in
	// seconds
	DeltaSharingRecipientTokenLifetimeInSeconds int `json:"delta_sharing_recipient_token_lifetime_in_seconds,omitempty"`
	// [Create,Update:IGN] Unique identifier of Metastore.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ Update:OPT] Name of Metastore.
	Name string `json:"name,omitempty"`
	// [Create:IGN Update:OPT] The owner of the metastore.
	Owner string `json:"owner,omitempty"`
	// [Create,Update:IGN] Privileges the user has on the Metastore.
	Privileges []GetMetastoreResponsePrivilegesItem `json:"privileges,omitempty"`
	// The region this metastore has an afinity to. This is used by
	// accounts-manager. Ignored by Unity Catalog.
	Region string `json:"region,omitempty"`
	// [Create:REQ Update:ERR] Storage root URL for Metastore
	StorageRoot string `json:"storage_root,omitempty"`
	// [Create:IGN Update:OPT] UUID of storage credential to access storage_root
	StorageRootCredentialId string `json:"storage_root_credential_id,omitempty"`
	// [Create,Update:IGN] Time at which the Metastore was last modified, in
	// epoch milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified the Metastore.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type GetMetastoreResponsePrivilegesItem

type GetMetastoreResponsePrivilegesItem string
const GetMetastoreResponsePrivilegesItemCreate GetMetastoreResponsePrivilegesItem = `CREATE`
const GetMetastoreResponsePrivilegesItemCreateMount GetMetastoreResponsePrivilegesItem = `CREATE_MOUNT`
const GetMetastoreResponsePrivilegesItemCreateTable GetMetastoreResponsePrivilegesItem = `CREATE_TABLE`
const GetMetastoreResponsePrivilegesItemModify GetMetastoreResponsePrivilegesItem = `MODIFY`
const GetMetastoreResponsePrivilegesItemReadFiles GetMetastoreResponsePrivilegesItem = `READ_FILES`
const GetMetastoreResponsePrivilegesItemSelect GetMetastoreResponsePrivilegesItem = `SELECT`
const GetMetastoreResponsePrivilegesItemUnknownPrivilege GetMetastoreResponsePrivilegesItem = `UNKNOWN_PRIVILEGE`
const GetMetastoreResponsePrivilegesItemUsage GetMetastoreResponsePrivilegesItem = `USAGE`
const GetMetastoreResponsePrivilegesItemWriteFiles GetMetastoreResponsePrivilegesItem = `WRITE_FILES`

type GetMetastoreSummaryResponse

type GetMetastoreSummaryResponse struct {
	// Unique identifier of the Metastore's (Default) Data Access Configuration
	DefaultDataAccessConfigId string `json:"default_data_access_config_id,omitempty"`
	// The unique ID (UUID) of the Metastore
	MetastoreId string `json:"metastore_id,omitempty"`
	// The user-specified name of the Metastore
	Name string `json:"name,omitempty"`
	// UUID of storage credential to access the metastore storage_root
	StorageRootCredentialId string `json:"storage_root_credential_id,omitempty"`
}

type GetPermissionsResponse

type GetPermissionsResponse struct {
	// Note to self (acain): Unfortunately, neither json_inline nor json_map
	// work here.
	PrivilegeAssignments []PrivilegeAssignment `json:"privilege_assignments,omitempty"`
}

type GetProviderRequest

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

Get a provider

type GetProviderResponse

type GetProviderResponse struct {
	// [Create,Update:IGN] Whether this provider is successfully activated by
	// the data provider. This field is only present when the authentication
	// type is DATABRICKS.
	ActivatedByProvider bool `json:"activated_by_provider,omitempty"`
	// [Create:REQ,Update:IGN] The delta sharing authentication type.
	AuthenticationType GetProviderResponseAuthenticationType `json:"authentication_type,omitempty"`
	// [Create,Update:OPT] Description about the provider.
	Comment string `json:"comment,omitempty"`
	// [Create,Update:IGN] Time at which this Provider was created, in epoch
	// milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of Provider creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create,Update:REQ] The name of the Provider.
	Name string `json:"name,omitempty"`
	// [Create,Update:IGN] This field is only present when the authentication
	// type is TOKEN.
	RecipientProfile *RecipientProfile `json:"recipient_profile,omitempty"`
	// [Create,Update:OPT] This field is only present when the authentication
	// type is TOKEN.
	RecipientProfileStr string `json:"recipient_profile_str,omitempty"`
	// [Create,Update:IGN] The server-generated one-time sharing code. This
	// field is only present when the authentication type is DATABRICKS.
	SharingCode string `json:"sharing_code,omitempty"`
	// [Create,Update:IGN] Time at which this Provider was created, in epoch
	// milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified Share.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type GetProviderResponseAuthenticationType

type GetProviderResponseAuthenticationType string

[Create:REQ,Update:IGN] The delta sharing authentication type.

const GetProviderResponseAuthenticationTypeDatabricks GetProviderResponseAuthenticationType = `DATABRICKS`
const GetProviderResponseAuthenticationTypeToken GetProviderResponseAuthenticationType = `TOKEN`
const GetProviderResponseAuthenticationTypeUnknown GetProviderResponseAuthenticationType = `UNKNOWN`

type GetRecipientRequest

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

Get a share recipient

type GetRecipientResponse

type GetRecipientResponse struct {
	// [Create:IGN,Update:IGN] A boolean status field showing whether the
	// Recipient's activation URL has been exercised or not.
	Activated bool `json:"activated,omitempty"`
	// [Create:IGN,Update:IGN] Full activation url to retrieve the access token.
	// It will be empty if the token is already retrieved.
	ActivationUrl string `json:"activation_url,omitempty"`
	// [Create:REQ,Update:IGN] The delta sharing authentication type.
	AuthenticationType GetRecipientResponseAuthenticationType `json:"authentication_type,omitempty"`
	// [Create:OPT,Update:OPT] Description about the recipient.
	Comment string `json:"comment,omitempty"`
	// [Create:IGN,Update:IGN] Time at which this recipient was created, in
	// epoch milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create:IGN,Update:IGN] Username of recipient creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create:OPT,Update:OPT] IP Access List
	IpAccessList *IpAccessList `json:"ip_access_list,omitempty"`
	// [Create:REQ,Update:OPT] Name of Recipient.
	Name string `json:"name,omitempty"`
	// [Create:OPT,Update:IGN] The one-time sharing code provided by the data
	// recipient. This field is only present when the authentication type is
	// DATABRICKS.
	SharingCode string `json:"sharing_code,omitempty"`
	// [Create:IGN,Update:IGN] recipient Tokens This field is only present when
	// the authentication type is TOKEN.
	Tokens []RecipientTokenInfo `json:"tokens,omitempty"`
	// [Create:IGN,Update:IGN] Time at which the recipient was updated, in epoch
	// milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create:IGN,Update:IGN] Username of recipient updater.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type GetRecipientResponseAuthenticationType

type GetRecipientResponseAuthenticationType string

[Create:REQ,Update:IGN] The delta sharing authentication type.

const GetRecipientResponseAuthenticationTypeDatabricks GetRecipientResponseAuthenticationType = `DATABRICKS`
const GetRecipientResponseAuthenticationTypeToken GetRecipientResponseAuthenticationType = `TOKEN`
const GetRecipientResponseAuthenticationTypeUnknown GetRecipientResponseAuthenticationType = `UNKNOWN`

type GetRecipientSharePermissionsResponse

type GetRecipientSharePermissionsResponse struct {
	// An array of data share permissions for a recipient.
	PermissionsOut []ShareToPrivilegeAssignment `json:"permissions_out,omitempty"`
}

type GetSchemaRequest

type GetSchemaRequest struct {
	// Required. Full name of the schema (from URL).
	FullName string `json:"-" url:"-"`
}

Get a schema

type GetSchemaResponse

type GetSchemaResponse struct {
	// [Create:REQ Update:IGN] Name of parent Catalog.
	CatalogName string `json:"catalog_name,omitempty"`
	// [Create,Update:OPT] User-provided free-form text description.
	Comment string `json:"comment,omitempty"`
	// [Create,Update:IGN] Time at which this Schema was created, in epoch
	// milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of Schema creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create,Update:IGN] Full name of Schema, in form of
	// <catalog_name>.<schema_name>.
	FullName string `json:"full_name,omitempty"`
	// [Create,Update:IGN] Unique identifier of parent Metastore.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ Update:OPT] Name of Schema, relative to parent Catalog.
	Name string `json:"name,omitempty"`
	// [Create:IGN Update:OPT] Username of current owner of Schema.
	Owner string `json:"owner,omitempty"`
	// [Create,Update:IGN] Privileges the user has on the Schema.
	Privileges []GetSchemaResponsePrivilegesItem `json:"privileges,omitempty"`
	// This name ('properties') is what the client sees as the field name in
	// messages that include PropertiesKVPairs using 'json_inline' (e.g.,
	// TableInfo).
	Properties []StringKeyValuePair `json:"properties,omitempty"`
	// [Create,Update:IGN] Time at which this Schema was created, in epoch
	// milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified Schema.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type GetSchemaResponsePrivilegesItem

type GetSchemaResponsePrivilegesItem string
const GetSchemaResponsePrivilegesItemCreate GetSchemaResponsePrivilegesItem = `CREATE`
const GetSchemaResponsePrivilegesItemCreateMount GetSchemaResponsePrivilegesItem = `CREATE_MOUNT`
const GetSchemaResponsePrivilegesItemCreateTable GetSchemaResponsePrivilegesItem = `CREATE_TABLE`
const GetSchemaResponsePrivilegesItemModify GetSchemaResponsePrivilegesItem = `MODIFY`
const GetSchemaResponsePrivilegesItemReadFiles GetSchemaResponsePrivilegesItem = `READ_FILES`
const GetSchemaResponsePrivilegesItemSelect GetSchemaResponsePrivilegesItem = `SELECT`
const GetSchemaResponsePrivilegesItemUnknownPrivilege GetSchemaResponsePrivilegesItem = `UNKNOWN_PRIVILEGE`
const GetSchemaResponsePrivilegesItemUsage GetSchemaResponsePrivilegesItem = `USAGE`
const GetSchemaResponsePrivilegesItemWriteFiles GetSchemaResponsePrivilegesItem = `WRITE_FILES`

type GetSharePermissionsResponse

type GetSharePermissionsResponse struct {
	// Note to self (acain): Unfortunately, neither json_inline nor json_map
	// work here.
	PrivilegeAssignments []PrivilegeAssignment `json:"privilege_assignments,omitempty"`
}

type GetShareRequest

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

Get a share

type GetShareResponse

type GetShareResponse struct {
	// [Create: OPT] comment when creating the share
	Comment string `json:"comment,omitempty"`
	// [Create:IGN] Time at which this Share was created, in epoch milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create:IGN] Username of Share creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create:REQ] Name of the Share.
	Name string `json:"name,omitempty"`
	// [Create: IGN] A list of shared data objects within the Share.
	Objects []SharedDataObject `json:"objects,omitempty"`
}

type GetStorageCredentialRequest

type GetStorageCredentialRequest struct {
	// Required. Name of the storage credential.
	Name string `json:"-" url:"-"`
}

Get a credential

type GetStorageCredentialResponse

type GetStorageCredentialResponse struct {
	// The AWS IAM role configuration.
	AwsIamRole *AwsIamRole `json:"aws_iam_role,omitempty"`
	// The Azure service principal configuration.
	AzureServicePrincipal *AzureServicePrincipal `json:"azure_service_principal,omitempty"`
	// [Create,Update:OPT] Comment associated with the credential.
	Comment string `json:"comment,omitempty"`
	// [Create,Update:IGN] Time at which this Credential was created, in epoch
	// milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of credential creator.
	CreatedBy string `json:"created_by,omitempty"`
	// The GCP service account key configuration.
	GcpServiceAccountKey *GcpServiceAccountKey `json:"gcp_service_account_key,omitempty"`
	// [Create:IGN] The unique identifier of the credential.
	Id string `json:"id,omitempty"`
	// [Create,Update:IGN] Unique identifier of parent Metastore.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ, Update:OPT] The credential name. The name MUST be unique
	// within the Metastore.
	Name string `json:"name,omitempty"`
	// [Create:IGN Update:OPT] Username of current owner of credential.
	Owner string `json:"owner,omitempty"`
	// [Create,Update:IGN] Time at which this credential was last modified, in
	// epoch milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified the credential.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type GetTableRequest

type GetTableRequest struct {
	// Required. Full name of the Table (from URL).
	FullName string `json:"-" url:"-"`
}

Get a table

type GetTableResponse

type GetTableResponse struct {
	// [Create:REQ Update:IGN] Name of parent Catalog.
	CatalogName string `json:"catalog_name,omitempty"`
	// This name ('columns') is what the client actually sees as the field name
	// in messages that include PropertiesKVPairs using 'json_inline' (e.g.,
	// TableInfo).
	Columns []ColumnInfo `json:"columns,omitempty"`
	// [Create,Update:OPT] User-provided free-form text description.
	Comment string `json:"comment,omitempty"`
	// [Create,Update:IGN] Time at which this Table was created, in epoch
	// milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of Table creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create,Update:IGN] Unique ID of the data_access_configuration to use.
	DataAccessConfigurationId string `json:"data_access_configuration_id,omitempty"`
	// [Create:REQ Update:OPT] Data source format ("DELTA", "CSV", etc.).
	DataSourceFormat GetTableResponseDataSourceFormat `json:"data_source_format,omitempty"`
	// [Create,Update:IGN] Full name of Table, in form of
	// <catalog_name>.<schema_name>.<table_name>
	FullName string `json:"full_name,omitempty"`
	// [Create,Update:IGN] Unique identifier of parent Metastore.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ Update:OPT] Name of Table, relative to parent Schema.
	Name string `json:"name,omitempty"`
	// [Create: IGN Update:OPT] Username of current owner of Table.
	Owner string `json:"owner,omitempty"`
	// [Create,Update:IGN] Privileges the user has on the Table.
	Privileges []GetTableResponsePrivilegesItem `json:"privileges,omitempty"`
	// This name ('properties') is what the client sees as the field name in
	// messages that include PropertiesKVPairs using 'json_inline' (e.g.,
	// TableInfo).
	Properties []StringKeyValuePair `json:"properties,omitempty"`
	// [Create:REQ Update:IGN] Name of parent Schema relative to its parent
	// Catalog.
	SchemaName string `json:"schema_name,omitempty"`
	// [Create,Update:OPT] List of schemes whose objects can be referenced
	// without qualification.
	SqlPath string `json:"sql_path,omitempty"`
	// [Create:OPT Update:IGN] Name of the storage credential this table used
	StorageCredentialName string `json:"storage_credential_name,omitempty"`
	// [Create:REQ Update:OPT] Storage root URL for table (for MANAGED, EXTERNAL
	// tables)
	StorageLocation string `json:"storage_location,omitempty"`
	// [Create:IGN Update:IGN] Name of Table, relative to parent Schema.
	TableId string `json:"table_id,omitempty"`
	// [Create:REQ Update:OPT] Table type ("MANAGED", "EXTERNAL", "VIEW").
	TableType GetTableResponseTableType `json:"table_type,omitempty"`
	// [Create,Update:IGN] Time at which this Table was last modified, in epoch
	// milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified the Table.
	UpdatedBy string `json:"updated_by,omitempty"`
	// [Create,Update:OPT] View definition SQL (when table_type == "VIEW")
	ViewDefinition string `json:"view_definition,omitempty"`
}

type GetTableResponseDataSourceFormat

type GetTableResponseDataSourceFormat string

[Create:REQ Update:OPT] Data source format ("DELTA", "CSV", etc.).

const GetTableResponseDataSourceFormatAvro GetTableResponseDataSourceFormat = `AVRO`
const GetTableResponseDataSourceFormatCsv GetTableResponseDataSourceFormat = `CSV`
const GetTableResponseDataSourceFormatDelta GetTableResponseDataSourceFormat = `DELTA`
const GetTableResponseDataSourceFormatDeltasharing GetTableResponseDataSourceFormat = `DELTASHARING`
const GetTableResponseDataSourceFormatJson GetTableResponseDataSourceFormat = `JSON`
const GetTableResponseDataSourceFormatOrc GetTableResponseDataSourceFormat = `ORC`
const GetTableResponseDataSourceFormatParquet GetTableResponseDataSourceFormat = `PARQUET`
const GetTableResponseDataSourceFormatText GetTableResponseDataSourceFormat = `TEXT`
const GetTableResponseDataSourceFormatUnityCatalog GetTableResponseDataSourceFormat = `UNITY_CATALOG`
const GetTableResponseDataSourceFormatUnknownDataSourceFormat GetTableResponseDataSourceFormat = `UNKNOWN_DATA_SOURCE_FORMAT`

type GetTableResponsePrivilegesItem

type GetTableResponsePrivilegesItem string
const GetTableResponsePrivilegesItemCreate GetTableResponsePrivilegesItem = `CREATE`
const GetTableResponsePrivilegesItemCreateMount GetTableResponsePrivilegesItem = `CREATE_MOUNT`
const GetTableResponsePrivilegesItemCreateTable GetTableResponsePrivilegesItem = `CREATE_TABLE`
const GetTableResponsePrivilegesItemModify GetTableResponsePrivilegesItem = `MODIFY`
const GetTableResponsePrivilegesItemReadFiles GetTableResponsePrivilegesItem = `READ_FILES`
const GetTableResponsePrivilegesItemSelect GetTableResponsePrivilegesItem = `SELECT`
const GetTableResponsePrivilegesItemUnknownPrivilege GetTableResponsePrivilegesItem = `UNKNOWN_PRIVILEGE`
const GetTableResponsePrivilegesItemUsage GetTableResponsePrivilegesItem = `USAGE`
const GetTableResponsePrivilegesItemWriteFiles GetTableResponsePrivilegesItem = `WRITE_FILES`

type GetTableResponseTableType

type GetTableResponseTableType string

[Create:REQ Update:OPT] Table type ("MANAGED", "EXTERNAL", "VIEW").

const GetTableResponseTableTypeExternal GetTableResponseTableType = `EXTERNAL`
const GetTableResponseTableTypeManaged GetTableResponseTableType = `MANAGED`
const GetTableResponseTableTypeUnknownTableType GetTableResponseTableType = `UNKNOWN_TABLE_TYPE`
const GetTableResponseTableTypeView GetTableResponseTableType = `VIEW`

type GrantsAPI

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

In Unity Catalog, data is secure by default. Initially, users have no access to data in a metastore. Access can be granted by either a metastore admin, the owner of an object, or the owner of the catalog or schema that contains the object. Securable objects in Unity Catalog are hierarchical and privileges are inherited downward.

Initially, users have no access to data in a metastore. Access can be granted by either a metastore admin, the owner of an object, or the owner of the catalog or schema that contains the object.

Securable objects in Unity Catalog are hierarchical and privileges are inherited downward. This means that granting a privilege on the catalog automatically grants the privilege to all current and future objects within the catalog. Similarly, privileges granted on a schema are inherited by all current and future objects within that schema.

func NewGrants

func NewGrants(client *client.DatabricksClient) *GrantsAPI

func (*GrantsAPI) Get

Get permissions

Gets the permissions for a Securable type.

func (*GrantsAPI) GetBySecurableTypeAndFullName

func (a *GrantsAPI) GetBySecurableTypeAndFullName(ctx context.Context, securableType string, fullName string) (*GetPermissionsResponse, error)

Get permissions

Gets the permissions for a Securable type.

func (*GrantsAPI) Impl

func (a *GrantsAPI) Impl() GrantsService

Impl returns low-level Grants API implementation

func (*GrantsAPI) Update

func (a *GrantsAPI) Update(ctx context.Context, request UpdatePermissions) error

Update permissions

Updates the permissions for a Securable type.

func (*GrantsAPI) WithImpl

func (a *GrantsAPI) WithImpl(impl GrantsService) *GrantsAPI

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

type GrantsService

type GrantsService interface {

	// Get permissions
	//
	// Gets the permissions for a Securable type.
	Get(ctx context.Context, request GetGrantRequest) (*GetPermissionsResponse, error)

	// Update permissions
	//
	// Updates the permissions for a Securable type.
	Update(ctx context.Context, request UpdatePermissions) error
}

In Unity Catalog, data is secure by default. Initially, users have no access to data in a metastore. Access can be granted by either a metastore admin, the owner of an object, or the owner of the catalog or schema that contains the object. Securable objects in Unity Catalog are hierarchical and privileges are inherited downward.

Initially, users have no access to data in a metastore. Access can be granted by either a metastore admin, the owner of an object, or the owner of the catalog or schema that contains the object.

Securable objects in Unity Catalog are hierarchical and privileges are inherited downward. This means that granting a privilege on the catalog automatically grants the privilege to all current and future objects within the catalog. Similarly, privileges granted on a schema are inherited by all current and future objects within that schema.

type IpAccessList

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

type ListCatalogsResponse

type ListCatalogsResponse struct {
	// AN array of catalog information objects.
	Catalogs []CatalogInfo `json:"catalogs,omitempty"`
}

type ListExternalLocationsResponse

type ListExternalLocationsResponse struct {
	// AN array of external locations.
	ExternalLocations []ExternalLocationInfo `json:"external_locations,omitempty"`
}

type ListMetastoresResponse

type ListMetastoresResponse struct {
	// An array of Metastore information objects.
	Metastores []MetastoreInfo `json:"metastores,omitempty"`
}

type ListProviderSharesResponse

type ListProviderSharesResponse struct {
	// An array of provider shares.
	Shares []ProviderShare `json:"shares,omitempty"`
}

type ListProvidersRequest

type ListProvidersRequest struct {
	// If not provided, all providers will be returned. If no providers exist
	// with this ID, no results will be returned.
	DataProviderGlobalMetastoreId string `json:"-" url:"data_provider_global_metastore_id,omitempty"`
}

List providers

type ListProvidersResponse

type ListProvidersResponse struct {
	// An array of provider information objects.
	Providers []ProviderInfo `json:"providers,omitempty"`
}

type ListRecipientsRequest

type ListRecipientsRequest struct {
	// If not provided, all recipients will be returned. If no recipients exist
	// with this ID, no results will be returned.
	DataRecipientGlobalMetastoreId string `json:"-" url:"data_recipient_global_metastore_id,omitempty"`
}

List share recipients

type ListRecipientsResponse

type ListRecipientsResponse struct {
	// An array of recipient information objects.
	Recipients []RecipientInfo `json:"recipients,omitempty"`
}

type ListSchemasRequest

type ListSchemasRequest struct {
	// Optional. Parent catalog for schemas of interest.
	CatalogName string `json:"-" url:"catalog_name,omitempty"`
}

List schemas

type ListSchemasResponse

type ListSchemasResponse struct {
	// An array of schema information objects.
	Schemas []SchemaInfo `json:"schemas,omitempty"`
}

type ListSharesRequest

type ListSharesRequest struct {
	// Required. Name of the provider in which to list shares.
	Name string `json:"-" url:"-"`
}

List shares

type ListSharesResponse

type ListSharesResponse struct {
	// An array of data share information objects.
	Shares []ShareInfo `json:"shares,omitempty"`
}

type ListStorageCredentialsResponse

type ListStorageCredentialsResponse struct {
	// TODO: add pagination to UC list APIs.
	StorageCredentials []StorageCredentialInfo `json:"storage_credentials,omitempty"`
}

type ListTableSummariesResponse

type ListTableSummariesResponse struct {
	// Optional. Opaque token for pagination. Empty if there's no more page.
	NextPageToken string `json:"next_page_token,omitempty"`
	// Only name, catalog_name, schema_name, full_name and table_type will be
	// set.
	Tables []TableSummary `json:"tables,omitempty"`
}

type ListTablesRequest

type ListTablesRequest struct {
	// Required. Name of parent catalog for tables of interest.
	CatalogName string `json:"-" url:"catalog_name,omitempty"`
	// Required (for now -- may be optional for wildcard search in future).
	// Parent schema of tables.
	SchemaName string `json:"-" url:"schema_name,omitempty"`
}

List tables

type ListTablesResponse

type ListTablesResponse struct {
	// An array of table information objects.
	Tables []TableInfo `json:"tables,omitempty"`
}

type MetastoreInfo

type MetastoreInfo struct {
	// [Create,Update:IGN] Time at which this Metastore was created, in epoch
	// milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of Metastore creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create:IGN Update:OPT] Unique identifier of (Default) Data Access
	// Configuration
	DefaultDataAccessConfigId string `json:"default_data_access_config_id,omitempty"`
	// [Create:IGN Update:OPT] Whether Delta Sharing is enabled on this
	// metastore.
	DeltaSharingEnabled bool `json:"delta_sharing_enabled,omitempty"`
	// [Create:IGN Update:OPT] The lifetime of delta sharing recipient token in
	// seconds
	DeltaSharingRecipientTokenLifetimeInSeconds int `json:"delta_sharing_recipient_token_lifetime_in_seconds,omitempty"`
	// [Create,Update:IGN] Unique identifier of Metastore.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ Update:OPT] Name of Metastore.
	Name string `json:"name,omitempty"`
	// [Create:IGN Update:OPT] The owner of the metastore.
	Owner string `json:"owner,omitempty"`
	// [Create,Update:IGN] Privileges the user has on the Metastore.
	Privileges []MetastoreInfoPrivilegesItem `json:"privileges,omitempty"`
	// The region this metastore has an afinity to. This is used by
	// accounts-manager. Ignored by Unity Catalog.
	Region string `json:"region,omitempty"`
	// [Create:REQ Update:ERR] Storage root URL for Metastore
	StorageRoot string `json:"storage_root,omitempty"`
	// [Create:IGN Update:OPT] UUID of storage credential to access storage_root
	StorageRootCredentialId string `json:"storage_root_credential_id,omitempty"`
	// [Create,Update:IGN] Time at which the Metastore was last modified, in
	// epoch milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified the Metastore.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type MetastoreInfoPrivilegesItem

type MetastoreInfoPrivilegesItem string
const MetastoreInfoPrivilegesItemCreate MetastoreInfoPrivilegesItem = `CREATE`
const MetastoreInfoPrivilegesItemCreateMount MetastoreInfoPrivilegesItem = `CREATE_MOUNT`
const MetastoreInfoPrivilegesItemCreateTable MetastoreInfoPrivilegesItem = `CREATE_TABLE`
const MetastoreInfoPrivilegesItemModify MetastoreInfoPrivilegesItem = `MODIFY`
const MetastoreInfoPrivilegesItemReadFiles MetastoreInfoPrivilegesItem = `READ_FILES`
const MetastoreInfoPrivilegesItemSelect MetastoreInfoPrivilegesItem = `SELECT`
const MetastoreInfoPrivilegesItemUnknownPrivilege MetastoreInfoPrivilegesItem = `UNKNOWN_PRIVILEGE`
const MetastoreInfoPrivilegesItemUsage MetastoreInfoPrivilegesItem = `USAGE`
const MetastoreInfoPrivilegesItemWriteFiles MetastoreInfoPrivilegesItem = `WRITE_FILES`

type MetastoresAPI

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

A metastore is the top-level container of objects in Unity Catalog. It stores data assets (tables and views) and the permissions that govern access to them. Databricks account admins can create metastores and assign them to Databricks workspaces to control which workloads use each metastore. For a workspace to use Unity Catalog, it must have a Unity Catalog metastore attached.

Each metastore is configured with a root storage location in a cloud storage account. This storage location is used for metadata and managed tables data.

NOTE: This metastore is distinct from the metastore included in Databricks workspaces created before Unity Catalog was released. If your workspace includes a legacy Hive metastore, the data in that metastore is available in Unity Catalog in a catalog named hive_metastore.

func NewMetastores

func NewMetastores(client *client.DatabricksClient) *MetastoresAPI

func (*MetastoresAPI) Assign

Create an assignment

Creates a new Metastore assignment. If an assignment for the same __workspace_id__ exists, it will be overwritten by the new __metastore_id__ and __default_catalog_name__. The caller must be an account admin.

func (*MetastoresAPI) Create

Create a Metastore

Creates a new Metastore based on a provided name and storage root path.

func (*MetastoresAPI) Delete

func (a *MetastoresAPI) Delete(ctx context.Context, request DeleteMetastoreRequest) error

Delete a Metastore

Deletes a Metastore. The caller must be a Metastore admin.

func (*MetastoresAPI) DeleteById

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

Delete a Metastore

Deletes a Metastore. The caller must be a Metastore admin.

func (*MetastoresAPI) Get

Get a Metastore

Gets a Metastore that matches the supplied ID. The caller must be a Metastore admin to retrieve this info.

func (*MetastoresAPI) GetById

Get a Metastore

Gets a Metastore that matches the supplied ID. The caller must be a Metastore admin to retrieve this info.

func (*MetastoresAPI) Impl

func (a *MetastoresAPI) Impl() MetastoresService

Impl returns low-level Metastores API implementation

func (*MetastoresAPI) ListAll

func (a *MetastoresAPI) ListAll(ctx context.Context) ([]MetastoreInfo, error)

List Metastores

Gets an array of the available Metastores (as MetastoreInfo objects). The caller must be an admin to retrieve this info.

This method is generated by Databricks SDK Code Generator.

func (*MetastoresAPI) Summary

Get a summary

Gets information about a Metastore. This summary includes the storage credential, the cloud vendor, the cloud region, and the global Metastore ID.

func (*MetastoresAPI) Unassign

func (a *MetastoresAPI) Unassign(ctx context.Context, request UnassignRequest) error

Delete an assignment

Deletes a Metastore assignment. The caller must be an account administrator.

func (*MetastoresAPI) UnassignByWorkspaceId

func (a *MetastoresAPI) UnassignByWorkspaceId(ctx context.Context, workspaceId int) error

Delete an assignment

Deletes a Metastore assignment. The caller must be an account administrator.

func (*MetastoresAPI) Update

func (a *MetastoresAPI) Update(ctx context.Context, request UpdateMetastore) error

Update a Metastore

Updates information for a specific Metastore. The caller must be a Metastore admin.

func (*MetastoresAPI) UpdateAssignment

func (a *MetastoresAPI) UpdateAssignment(ctx context.Context, request UpdateMetastoreAssignment) error

Update an assignment

Updates a Metastore assignment. This operation can be used to update __metastore_id__ or __default_catalog_name__ for a specified Workspace, if the Workspace is already assigned a Metastore. The caller must be an account admin to update __metastore_id__; otherwise, the caller can be a Workspace admin.

func (*MetastoresAPI) WithImpl

func (a *MetastoresAPI) WithImpl(impl MetastoresService) *MetastoresAPI

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

type MetastoresService

type MetastoresService interface {

	// Create an assignment
	//
	// Creates a new Metastore assignment. If an assignment for the same
	// __workspace_id__ exists, it will be overwritten by the new
	// __metastore_id__ and __default_catalog_name__. The caller must be an
	// account admin.
	Assign(ctx context.Context, request CreateMetastoreAssignment) error

	// Create a Metastore
	//
	// Creates a new Metastore based on a provided name and storage root path.
	Create(ctx context.Context, request CreateMetastore) (*CreateMetastoreResponse, error)

	// Delete a Metastore
	//
	// Deletes a Metastore. The caller must be a Metastore admin.
	Delete(ctx context.Context, request DeleteMetastoreRequest) error

	// Get a Metastore
	//
	// Gets a Metastore that matches the supplied ID. The caller must be a
	// Metastore admin to retrieve this info.
	Get(ctx context.Context, request GetMetastoreRequest) (*GetMetastoreResponse, error)

	// List Metastores
	//
	// Gets an array of the available Metastores (as MetastoreInfo objects). The
	// caller must be an admin to retrieve this info.
	//
	// Use ListAll() to get all MetastoreInfo instances
	List(ctx context.Context) (*ListMetastoresResponse, error)

	// Get a summary
	//
	// Gets information about a Metastore. This summary includes the storage
	// credential, the cloud vendor, the cloud region, and the global Metastore
	// ID.
	Summary(ctx context.Context) (*GetMetastoreSummaryResponse, error)

	// Delete an assignment
	//
	// Deletes a Metastore assignment. The caller must be an account
	// administrator.
	Unassign(ctx context.Context, request UnassignRequest) error

	// Update a Metastore
	//
	// Updates information for a specific Metastore. The caller must be a
	// Metastore admin.
	Update(ctx context.Context, request UpdateMetastore) error

	// Update an assignment
	//
	// Updates a Metastore assignment. This operation can be used to update
	// __metastore_id__ or __default_catalog_name__ for a specified Workspace,
	// if the Workspace is already assigned a Metastore. The caller must be an
	// account admin to update __metastore_id__; otherwise, the caller can be a
	// Workspace admin.
	UpdateAssignment(ctx context.Context, request UpdateMetastoreAssignment) error
}

A metastore is the top-level container of objects in Unity Catalog. It stores data assets (tables and views) and the permissions that govern access to them. Databricks account admins can create metastores and assign them to Databricks workspaces to control which workloads use each metastore. For a workspace to use Unity Catalog, it must have a Unity Catalog metastore attached.

Each metastore is configured with a root storage location in a cloud storage account. This storage location is used for metadata and managed tables data.

NOTE: This metastore is distinct from the metastore included in Databricks workspaces created before Unity Catalog was released. If your workspace includes a legacy Hive metastore, the data in that metastore is available in Unity Catalog in a catalog named hive_metastore.

type Partition

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

type PartitionValue

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

type PartitionValueOp

type PartitionValueOp string

The operator to apply for the value.

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

type PermissionsChange

type PermissionsChange struct {
	// The set of privileges to add.
	Add []PermissionsChangeAddItem `json:"add,omitempty"`
	// The principal whose privileges we are changing.
	Principal string `json:"principal,omitempty"`
	// The set of privileges to remove.
	Remove []PermissionsChangeRemoveItem `json:"remove,omitempty"`
}

type PermissionsChangeAddItem

type PermissionsChangeAddItem string
const PermissionsChangeAddItemCreate PermissionsChangeAddItem = `CREATE`
const PermissionsChangeAddItemCreateMount PermissionsChangeAddItem = `CREATE_MOUNT`
const PermissionsChangeAddItemCreateTable PermissionsChangeAddItem = `CREATE_TABLE`
const PermissionsChangeAddItemModify PermissionsChangeAddItem = `MODIFY`
const PermissionsChangeAddItemReadFiles PermissionsChangeAddItem = `READ_FILES`
const PermissionsChangeAddItemSelect PermissionsChangeAddItem = `SELECT`
const PermissionsChangeAddItemUnknownPrivilege PermissionsChangeAddItem = `UNKNOWN_PRIVILEGE`
const PermissionsChangeAddItemUsage PermissionsChangeAddItem = `USAGE`
const PermissionsChangeAddItemWriteFiles PermissionsChangeAddItem = `WRITE_FILES`

type PermissionsChangeRemoveItem

type PermissionsChangeRemoveItem string
const PermissionsChangeRemoveItemCreate PermissionsChangeRemoveItem = `CREATE`
const PermissionsChangeRemoveItemCreateMount PermissionsChangeRemoveItem = `CREATE_MOUNT`
const PermissionsChangeRemoveItemCreateTable PermissionsChangeRemoveItem = `CREATE_TABLE`
const PermissionsChangeRemoveItemModify PermissionsChangeRemoveItem = `MODIFY`
const PermissionsChangeRemoveItemReadFiles PermissionsChangeRemoveItem = `READ_FILES`
const PermissionsChangeRemoveItemSelect PermissionsChangeRemoveItem = `SELECT`
const PermissionsChangeRemoveItemUnknownPrivilege PermissionsChangeRemoveItem = `UNKNOWN_PRIVILEGE`
const PermissionsChangeRemoveItemUsage PermissionsChangeRemoveItem = `USAGE`
const PermissionsChangeRemoveItemWriteFiles PermissionsChangeRemoveItem = `WRITE_FILES`

type PrivilegeAssignment

type PrivilegeAssignment struct {
	// The principal (user email address or group name).
	Principal string `json:"principal,omitempty"`
	// The privileges assigned to the principal.
	Privileges []PrivilegeAssignmentPrivilegesItem `json:"privileges,omitempty"`
}

type PrivilegeAssignmentPrivilegesItem

type PrivilegeAssignmentPrivilegesItem string
const PrivilegeAssignmentPrivilegesItemCreate PrivilegeAssignmentPrivilegesItem = `CREATE`
const PrivilegeAssignmentPrivilegesItemCreateMount PrivilegeAssignmentPrivilegesItem = `CREATE_MOUNT`
const PrivilegeAssignmentPrivilegesItemCreateTable PrivilegeAssignmentPrivilegesItem = `CREATE_TABLE`
const PrivilegeAssignmentPrivilegesItemModify PrivilegeAssignmentPrivilegesItem = `MODIFY`
const PrivilegeAssignmentPrivilegesItemReadFiles PrivilegeAssignmentPrivilegesItem = `READ_FILES`
const PrivilegeAssignmentPrivilegesItemSelect PrivilegeAssignmentPrivilegesItem = `SELECT`
const PrivilegeAssignmentPrivilegesItemUnknownPrivilege PrivilegeAssignmentPrivilegesItem = `UNKNOWN_PRIVILEGE`
const PrivilegeAssignmentPrivilegesItemUsage PrivilegeAssignmentPrivilegesItem = `USAGE`
const PrivilegeAssignmentPrivilegesItemWriteFiles PrivilegeAssignmentPrivilegesItem = `WRITE_FILES`

type ProviderInfo

type ProviderInfo struct {
	// [Create:REQ,Update:IGN] The delta sharing authentication type.
	AuthenticationType ProviderInfoAuthenticationType `json:"authentication_type,omitempty"`
	// [Create:IGN,Update:IGN] Cloud vendor of the provider's UC Metastore. This
	// field is only present when the authentication type is DATABRICKS.
	Cloud string `json:"cloud,omitempty"`
	// [Create,Update:OPT] Description about the provider.
	Comment string `json:"comment,omitempty"`
	// [Create,Update:IGN] Time at which this Provider was created, in epoch
	// milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of Provider creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create:IGN,Update:IGN] The global UC metastore id of the data provider
	// This field is only present when the authentication type is DATABRICKS.
	// The identifier is of format <cloud>:<region>:<metastore-uuid>.
	DataProviderGlobalMetastoreId string `json:"data_provider_global_metastore_id,omitempty"`
	// [Create:IGN,Update:IGN] UUID of the provider's UC Metastore. This field
	// is only present when the authentication type is DATABRICKS.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create,Update:REQ] The name of the Provider.
	Name string `json:"name,omitempty"`
	// [Create,Update:OPT] Username of Provider owner.
	Owner string `json:"owner,omitempty"`
	// [Create,Update:IGN] This field is only present when the authentication
	// type is TOKEN.
	RecipientProfile *RecipientProfile `json:"recipient_profile,omitempty"`
	// [Create,Update:OPT] This field is only present when the authentication
	// type is TOKEN.
	RecipientProfileStr string `json:"recipient_profile_str,omitempty"`
	// [Create:IGN,Update:IGN] Cloud region of the provider's UC Metastore. This
	// field is only present when the authentication type is DATABRICKS.
	Region string `json:"region,omitempty"`
	// [Create,Update:IGN] Time at which this Provider was created, in epoch
	// milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified Share.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type ProviderInfoAuthenticationType

type ProviderInfoAuthenticationType string

[Create:REQ,Update:IGN] The delta sharing authentication type.

const ProviderInfoAuthenticationTypeDatabricks ProviderInfoAuthenticationType = `DATABRICKS`
const ProviderInfoAuthenticationTypeToken ProviderInfoAuthenticationType = `TOKEN`
const ProviderInfoAuthenticationTypeUnknown ProviderInfoAuthenticationType = `UNKNOWN`

type ProviderShare

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

type ProvidersAPI

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

Databricks Delta Sharing: Providers REST API

func NewProviders

func NewProviders(client *client.DatabricksClient) *ProvidersAPI

func (*ProvidersAPI) Create

Create an auth provider

Creates a new authentication provider minimally based on a name and authentication type. The caller must be an admin on the Metastore.

func (*ProvidersAPI) Delete

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

Delete a provider

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

func (*ProvidersAPI) DeleteByName

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

Delete a provider

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

func (*ProvidersAPI) Get

Get a provider

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) GetByName

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

Get a provider

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) Impl

func (a *ProvidersAPI) Impl() ProvidersService

Impl returns low-level Providers API implementation

func (*ProvidersAPI) ListAll

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

List providers

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.

This method is generated by Databricks SDK Code Generator.

func (*ProvidersAPI) ListShares

List shares

Gets an array of all 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)

List shares

Gets an array of all shares within the Metastore where:

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

func (*ProvidersAPI) Update

func (a *ProvidersAPI) Update(ctx context.Context, request UpdateProvider) error

Update a provider

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.

func (*ProvidersAPI) WithImpl

func (a *ProvidersAPI) WithImpl(impl ProvidersService) *ProvidersAPI

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

type ProvidersService

type ProvidersService interface {

	// Create an auth provider
	//
	// 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) (*CreateProviderResponse, error)

	// Delete a provider
	//
	// 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

	// Get a provider
	//
	// 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) (*GetProviderResponse, error)

	// List providers
	//
	// 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.
	//
	// Use ListAll() to get all ProviderInfo instances
	List(ctx context.Context, request ListProvidersRequest) (*ListProvidersResponse, error)

	// List shares
	//
	// Gets an array of all 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)

	// Update a provider
	//
	// 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) error
}

Databricks Delta Sharing: Providers REST API

type RecipientActivationAPI

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

Databricks Delta Sharing: Recipient Activation REST API

func NewRecipientActivation

func NewRecipientActivation(client *client.DatabricksClient) *RecipientActivationAPI

func (*RecipientActivationAPI) GetActivationUrlInfo

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

Get a share activation URL

Gets information about an Activation URL.

func (*RecipientActivationAPI) GetActivationUrlInfoByActivationUrl

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

Get a share activation URL

Gets information about an Activation URL.

func (*RecipientActivationAPI) Impl

Impl returns low-level RecipientActivation API implementation

func (*RecipientActivationAPI) RetrieveToken

Get an access token

RPC to retrieve access token with an activation token. This is a public API without any authentication.

func (*RecipientActivationAPI) RetrieveTokenByActivationUrl

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

Get an access token

RPC to retrieve access token with an activation token. This is a public API without any authentication.

func (*RecipientActivationAPI) WithImpl

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

type RecipientActivationService

type RecipientActivationService interface {

	// Get a share activation URL
	//
	// Gets information about an Activation URL.
	GetActivationUrlInfo(ctx context.Context, request GetActivationUrlInfoRequest) error

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

Databricks Delta Sharing: Recipient Activation REST API

type RecipientInfo

type RecipientInfo struct {
	// [Create:IGN,Update:IGN] A boolean status field showing whether the
	// Recipient's activation URL has been exercised or not.
	Activated bool `json:"activated,omitempty"`
	// [Create:IGN,Update:IGN] Full activation url to retrieve the access token.
	// It will be empty if the token is already retrieved.
	ActivationUrl string `json:"activation_url,omitempty"`
	// [Create:REQ,Update:IGN] The delta sharing authentication type.
	AuthenticationType RecipientInfoAuthenticationType `json:"authentication_type,omitempty"`
	// [Create:IGN,Update:IGN] Cloud vendor of the recipient's UC Metastore.
	// This field is only present when the authentication type is DATABRICKS.
	Cloud string `json:"cloud,omitempty"`
	// [Create:OPT,Update:OPT] Description about the recipient.
	Comment string `json:"comment,omitempty"`
	// [Create:IGN,Update:IGN] Time at which this recipient was created, in
	// epoch milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create:IGN,Update:IGN] Username of recipient creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create:OPT,Update:IGN] The global UC metastore id provided by the data
	// recipient. This field is only present when the authentication type is
	// DATABRICKS. The identifier is of format
	// <cloud>:<region>:<metastore-uuid>.
	DataRecipientGlobalMetastoreId string `json:"data_recipient_global_metastore_id,omitempty"`
	// [Create:OPT,Update:OPT] IP Access List
	IpAccessList *IpAccessList `json:"ip_access_list,omitempty"`
	// [Create:IGN,Update:IGN] UUID of the recipient's UC Metastore. This field
	// is only present when the authentication type is DATABRICKS.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ,Update:OPT] Name of Recipient.
	Name string `json:"name,omitempty"`
	// [Create:IGN,Update:OPT] Username of Recipient owner.
	Owner string `json:"owner,omitempty"`
	// [Create:IGN,Update:IGN] Cloud region of the recipient's UC Metastore.
	// This field is only present when the authentication type is DATABRICKS.
	Region string `json:"region,omitempty"`
	// [Create:OPT,Update:IGN] The one-time sharing code provided by the data
	// recipient. This field is only present when the authentication type is
	// DATABRICKS.
	SharingCode string `json:"sharing_code,omitempty"`
	// [Create:IGN,Update:IGN] Recipient Tokens. This field is only present when
	// the authentication type is TOKEN.
	Tokens []RecipientTokenInfo `json:"tokens,omitempty"`
	// [Create:IGN,Update:IGN] Time at which this recipient was updated, in
	// epoch milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create:IGN,Update:IGN] Username of recipient updater.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type RecipientInfoAuthenticationType

type RecipientInfoAuthenticationType string

[Create:REQ,Update:IGN] The delta sharing authentication type.

const RecipientInfoAuthenticationTypeDatabricks RecipientInfoAuthenticationType = `DATABRICKS`
const RecipientInfoAuthenticationTypeToken RecipientInfoAuthenticationType = `TOKEN`
const RecipientInfoAuthenticationTypeUnknown RecipientInfoAuthenticationType = `UNKNOWN`

type RecipientProfile

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

type RecipientTokenInfo

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

type RecipientsAPI

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

Databricks Delta Sharing: Recipients REST API

func NewRecipients

func NewRecipients(client *client.DatabricksClient) *RecipientsAPI

func (*RecipientsAPI) Create

Create a share recipient

Creates a new recipient with the delta sharing authentication type in the Metastore. The caller must be a Metastore admin or has the CREATE RECIPIENT privilege on the Metastore.

func (*RecipientsAPI) Delete

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

Delete a share recipient

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

func (*RecipientsAPI) DeleteByName

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

Delete a share recipient

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

func (*RecipientsAPI) Get

Get a share recipient

Gets a share recipient from the Metastore if:

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

func (*RecipientsAPI) GetByName

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

Get a share recipient

Gets a share recipient from the Metastore if:

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

func (*RecipientsAPI) Impl

func (a *RecipientsAPI) Impl() RecipientsService

Impl returns low-level Recipients API implementation

func (*RecipientsAPI) ListAll

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

List share recipients

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

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

This method is generated by Databricks SDK Code Generator.

func (*RecipientsAPI) RotateToken

Rotate a token

Refreshes the specified recipient's delta sharing authentication token with the provided token info. The caller must be the owner of the recipient.

func (*RecipientsAPI) SharePermissions

Get share permissions

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

func (*RecipientsAPI) SharePermissionsByName

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

Get share permissions

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) error

Update a share recipient

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.

func (*RecipientsAPI) WithImpl

func (a *RecipientsAPI) WithImpl(impl RecipientsService) *RecipientsAPI

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

type RecipientsService

type RecipientsService interface {

	// Create a share recipient
	//
	// Creates a new recipient with the delta sharing authentication type in the
	// Metastore. The caller must be a Metastore admin or has the CREATE
	// RECIPIENT privilege on the Metastore.
	Create(ctx context.Context, request CreateRecipient) (*CreateRecipientResponse, error)

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

	// Get a share recipient
	//
	// 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) (*GetRecipientResponse, error)

	// List share recipients
	//
	// Gets an array of all share recipients within the current Metastore where:
	//
	// * the caller is a Metastore admin, or * the caller is the owner.
	//
	// Use ListAll() to get all RecipientInfo instances
	List(ctx context.Context, request ListRecipientsRequest) (*ListRecipientsResponse, error)

	// Rotate a token
	//
	// 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) (*RotateRecipientTokenResponse, error)

	// Get share permissions
	//
	// 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)

	// Update a share recipient
	//
	// 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) error
}

Databricks Delta Sharing: Recipients REST API

type RetrieveTokenRequest

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

Get an access token

type RetrieveTokenResponse

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

type RotateRecipientToken

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

type RotateRecipientTokenResponse

type RotateRecipientTokenResponse struct {
	// [Create:IGN, Update:IGN] A boolean status field showing whether the
	// Recipient's activation URL has been exercised or not.
	Activated bool `json:"activated,omitempty"`
	// [Create:IGN, Update:IGN] Full activation url to retrieve the access
	// token. It will be empty if the token is already retrieved.
	ActivationUrl string `json:"activation_url,omitempty"`
	// [Create:REQ, Update:IGN] The delta sharing authentication type.
	AuthenticationType RotateRecipientTokenResponseAuthenticationType `json:"authentication_type,omitempty"`
	// [Create:OPT,Update:OPT] Description about the recipient.
	Comment string `json:"comment,omitempty"`
	// [Create:IGN, Update:IGN] Time at which this recipient was created, in
	// epoch milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create:IGN, Update:IGN] Username of recipient creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create:OPT,Update:OPT] IP Access List
	IpAccessList *IpAccessList `json:"ip_access_list,omitempty"`
	// [Create:REQ, Update:OPT] Name of Recipient.
	Name string `json:"name,omitempty"`
	// [Create:OPT,Update:IGN] The one-time sharing code provided by the data
	// recipient. This field is only present when the authentication type is
	// DATABRICKS.
	SharingCode string `json:"sharing_code,omitempty"`
	// [Create:IGN,Update:IGN] recipient Tokens. This field is only present when
	// the authentication type is TOKEN.
	Tokens []RecipientTokenInfo `json:"tokens,omitempty"`
	// [Create:IGN,Update:IGN] Time at which the recipient was updated, in epoch
	// milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create:IGN,Update:IGN] Username of recipient updater.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type RotateRecipientTokenResponseAuthenticationType

type RotateRecipientTokenResponseAuthenticationType string

[Create:REQ, Update:IGN] The delta sharing authentication type.

const RotateRecipientTokenResponseAuthenticationTypeDatabricks RotateRecipientTokenResponseAuthenticationType = `DATABRICKS`
const RotateRecipientTokenResponseAuthenticationTypeToken RotateRecipientTokenResponseAuthenticationType = `TOKEN`
const RotateRecipientTokenResponseAuthenticationTypeUnknown RotateRecipientTokenResponseAuthenticationType = `UNKNOWN`

type SchemaInfo

type SchemaInfo struct {
	// [Create:REQ Update:IGN] Name of parent Catalog.
	CatalogName string `json:"catalog_name,omitempty"`
	// [Create,Update:OPT] User-provided free-form text description.
	Comment string `json:"comment,omitempty"`
	// [Create,Update:IGN] Time at which this Schema was created, in epoch
	// milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of Schema creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create,Update:IGN] Full name of Schema, in form of
	// <catalog_name>.<schema_name>.
	FullName string `json:"full_name,omitempty"`
	// [Create,Update:IGN] Unique identifier of parent Metastore.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ Update:OPT] Name of Schema, relative to parent Catalog.
	Name string `json:"name,omitempty"`
	// [Create:IGN Update:OPT] Username of current owner of Schema.
	Owner string `json:"owner,omitempty"`
	// [Create,Update:IGN] Privileges the user has on the Schema.
	Privileges []SchemaInfoPrivilegesItem `json:"privileges,omitempty"`
	// This name ('properties') is what the client sees as the field name in
	// messages that include PropertiesKVPairs using 'json_inline' (e.g.,
	// TableInfo).
	Properties []StringKeyValuePair `json:"properties,omitempty"`
	// [Create,Update:IGN] Time at which this Schema was created, in epoch
	// milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified Schema.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type SchemaInfoPrivilegesItem

type SchemaInfoPrivilegesItem string
const SchemaInfoPrivilegesItemCreate SchemaInfoPrivilegesItem = `CREATE`
const SchemaInfoPrivilegesItemCreateMount SchemaInfoPrivilegesItem = `CREATE_MOUNT`
const SchemaInfoPrivilegesItemCreateTable SchemaInfoPrivilegesItem = `CREATE_TABLE`
const SchemaInfoPrivilegesItemModify SchemaInfoPrivilegesItem = `MODIFY`
const SchemaInfoPrivilegesItemReadFiles SchemaInfoPrivilegesItem = `READ_FILES`
const SchemaInfoPrivilegesItemSelect SchemaInfoPrivilegesItem = `SELECT`
const SchemaInfoPrivilegesItemUnknownPrivilege SchemaInfoPrivilegesItem = `UNKNOWN_PRIVILEGE`
const SchemaInfoPrivilegesItemUsage SchemaInfoPrivilegesItem = `USAGE`
const SchemaInfoPrivilegesItemWriteFiles SchemaInfoPrivilegesItem = `WRITE_FILES`

type SchemasAPI

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

A schema (also called a database) is the second layer of Unity Catalog’s three-level namespace. A schema organizes tables and views. To access (or list) a table or view in a schema, users must have the USAGE data permission on the schema and its parent catalog, and they must have the SELECT permission on the table or view.

func NewSchemas

func NewSchemas(client *client.DatabricksClient) *SchemasAPI

func (*SchemasAPI) Create

func (a *SchemasAPI) Create(ctx context.Context, request CreateSchema) (*CreateSchemaResponse, error)

Create a schema

Creates a new schema for catalog in the Metatastore. The caller must be a Metastore admin, or have the CREATE privilege in the parentcatalog.

func (*SchemasAPI) Delete

func (a *SchemasAPI) Delete(ctx context.Context, request DeleteSchemaRequest) error

Delete a schema

Deletes the specified schema from the parent catalog. The caller must be the owner of the schema or an owner of the parent catalog.

func (*SchemasAPI) DeleteByFullName

func (a *SchemasAPI) DeleteByFullName(ctx context.Context, fullName string) error

Delete a schema

Deletes the specified schema from the parent catalog. The caller must be the owner of the schema or an owner of the parent catalog.

func (*SchemasAPI) Get

Get a schema

Gets the specified schema for a catalog in the Metastore. The caller must be a Metastore admin, the owner of the schema, or a user that has the USAGE privilege on the schema.

func (*SchemasAPI) GetByFullName

func (a *SchemasAPI) GetByFullName(ctx context.Context, fullName string) (*GetSchemaResponse, error)

Get a schema

Gets the specified schema for a catalog in the Metastore. The caller must be a Metastore admin, the owner of the schema, or a user that has the USAGE privilege on the schema.

func (*SchemasAPI) Impl

func (a *SchemasAPI) Impl() SchemasService

Impl returns low-level Schemas API implementation

func (*SchemasAPI) ListAll

func (a *SchemasAPI) ListAll(ctx context.Context, request ListSchemasRequest) ([]SchemaInfo, error)

List schemas

Gets an array of schemas for catalog in the Metastore. If the caller is the Metastore admin or the owner of the parent catalog, all schemas for the catalog will be retrieved. Otherwise, only schemas owned by the caller (or for which the caller has the USAGE privilege) will be retrieved.

This method is generated by Databricks SDK Code Generator.

func (*SchemasAPI) Update

func (a *SchemasAPI) Update(ctx context.Context, request UpdateSchema) error

Update a schema

Updates a schema for a catalog. The caller must be the owner of the schema. If the caller is a Metastore admin, only the __owner__ field can be changed in the update. If the __name__ field must be updated, the caller must be a Metastore admin or have the CREATE privilege on the parent catalog.

func (*SchemasAPI) WithImpl

func (a *SchemasAPI) WithImpl(impl SchemasService) *SchemasAPI

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

type SchemasService

type SchemasService interface {

	// Create a schema
	//
	// Creates a new schema for catalog in the Metatastore. The caller must be a
	// Metastore admin, or have the CREATE privilege in the parentcatalog.
	Create(ctx context.Context, request CreateSchema) (*CreateSchemaResponse, error)

	// Delete a schema
	//
	// Deletes the specified schema from the parent catalog. The caller must be
	// the owner of the schema or an owner of the parent catalog.
	Delete(ctx context.Context, request DeleteSchemaRequest) error

	// Get a schema
	//
	// Gets the specified schema for a catalog in the Metastore. The caller must
	// be a Metastore admin, the owner of the schema, or a user that has the
	// USAGE privilege on the schema.
	Get(ctx context.Context, request GetSchemaRequest) (*GetSchemaResponse, error)

	// List schemas
	//
	// Gets an array of schemas for catalog in the Metastore. If the caller is
	// the Metastore admin or the owner of the parent catalog, all schemas for
	// the catalog will be retrieved. Otherwise, only schemas owned by the
	// caller (or for which the caller has the USAGE privilege) will be
	// retrieved.
	//
	// Use ListAll() to get all SchemaInfo instances
	List(ctx context.Context, request ListSchemasRequest) (*ListSchemasResponse, error)

	// Update a schema
	//
	// Updates a schema for a catalog. The caller must be the owner of the
	// schema. If the caller is a Metastore admin, only the __owner__ field can
	// be changed in the update. If the __name__ field must be updated, the
	// caller must be a Metastore admin or have the CREATE privilege on the
	// parent catalog.
	Update(ctx context.Context, request UpdateSchema) error
}

A schema (also called a database) is the second layer of Unity Catalog’s three-level namespace. A schema organizes tables and views. To access (or list) a table or view in a schema, users must have the USAGE data permission on the schema and its parent catalog, and they must have the SELECT permission on the table or view.

type ShareInfo

type ShareInfo struct {
	// [Create: OPT] comment when creating the share
	Comment string `json:"comment,omitempty"`
	// [Create:IGN] Time at which this Share was created, in epoch milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create:IGN] Username of Share creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create:REQ] Name of the Share.
	Name string `json:"name,omitempty"`
	// [Create: IGN] A list of shared data objects within the Share.
	Objects []SharedDataObject `json:"objects,omitempty"`
	// [Create:IGN,Update:OPT] Username of Share owner.
	Owner string `json:"owner,omitempty"`
	// [Create:IGN,Update:IGN] Time at which this Share was updated, in epoch
	// milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create:IGN,Update:IGN] Username of Share updater.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type SharePermissionsRequest

type SharePermissionsRequest struct {
	// Required. The name of the Recipient.
	Name string `json:"-" url:"-"`
}

Get share permissions

type ShareToPrivilegeAssignment

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

type SharedDataObject

type SharedDataObject struct {
	// The time when this data object is added to the Share, in epoch
	// milliseconds. Output only field. [Update:IGN]
	AddedAt int64 `json:"added_at,omitempty"`
	// Username of the sharer. Output only field. [Update:IGN]
	AddedBy string `json:"added_by,omitempty"`
	// Whether to enable cdf or indicate if cdf is enabled on the shared object.
	// [Update: OPT]
	CdfEnabled bool `json:"cdf_enabled,omitempty"`
	// A user-provided comment when adding the data object to the share.
	// [Update:OPT]
	Comment string `json:"comment,omitempty"`
	// The type of the data object. Output only field. [Update:IGN]
	DataObjectType string `json:"data_object_type,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>`. [Update:REQ]
	Name string `json:"name,omitempty"`
	// Array of partitions for the shared data.
	Partitions []Partition `json:"partitions,omitempty"`
	// A user-provided new name for the data object within the share. If this
	// new name is not 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>`.
	// [Update:OPT]
	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. [Update: OPT]
	StartVersion int64 `json:"start_version,omitempty"`
	// One of: **ACTIVE**, **PERMISSION_DENIED**.
	Status SharedDataObjectStatus `json:"status,omitempty"`
}

type SharedDataObjectStatus

type SharedDataObjectStatus string

One of: **ACTIVE**, **PERMISSION_DENIED**.

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

type SharedDataObjectUpdate

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

type SharedDataObjectUpdateAction

type SharedDataObjectUpdateAction string

One of: **ADD**, **REMOVE**, **UPDATE**.

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

type SharesAPI

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

Databricks Delta Sharing: Shares REST API

func NewShares

func NewShares(client *client.DatabricksClient) *SharesAPI

func (*SharesAPI) Create

func (a *SharesAPI) Create(ctx context.Context, request CreateShare) (*CreateShareResponse, error)

Create a share

Creates a new share for data objects. Data objects can be added at this time or after creation with **update**. The caller must be a Metastore admin or have the CREATE SHARE privilege on the Metastore.

func (*SharesAPI) Delete

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

Delete a share

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

func (*SharesAPI) DeleteByName

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

Delete a share

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

func (*SharesAPI) Get

Get a share

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

func (*SharesAPI) GetByName

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

Get a share

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

func (*SharesAPI) Impl

func (a *SharesAPI) Impl() SharesService

Impl returns low-level Shares API implementation

func (*SharesAPI) ListAll

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

List shares

Gets an array of data object shares from the Metastore. The caller must be a Metastore admin or the owner of the share.

This method is generated by Databricks SDK Code Generator.

func (*SharesAPI) SharePermissions

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

Get permissions

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) SharePermissionsByName

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

Get permissions

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) error

Update a share

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 that the Share name is changed, **updateShare** requires that the caller is both the share owner and a Metastore admin.

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.

func (*SharesAPI) UpdatePermissions

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

Update permissions

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 owner of the recipients. recipient revocations do not require additional privileges.

func (*SharesAPI) WithImpl

func (a *SharesAPI) WithImpl(impl SharesService) *SharesAPI

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

type SharesService

type SharesService interface {

	// Create a share
	//
	// Creates a new share for data objects. Data objects can be added at this
	// time or 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) (*CreateShareResponse, error)

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

	// Get a share
	//
	// 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) (*GetShareResponse, error)

	// List shares
	//
	// Gets an array of data object shares from the Metastore. The caller must
	// be a Metastore admin or the owner of the share.
	//
	// Use ListAll() to get all ShareInfo instances
	List(ctx context.Context) (*ListSharesResponse, error)

	// Get permissions
	//
	// 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)

	// Update a share
	//
	// 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 that the Share name is changed, **updateShare** requires that
	// the caller is both the share owner and a Metastore admin.
	//
	// 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) error

	// Update permissions
	//
	// 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 owner of the
	// recipients. recipient revocations do not require additional privileges.
	UpdatePermissions(ctx context.Context, request UpdateSharePermissions) error
}

Databricks Delta Sharing: Shares REST API

type StorageCredentialInfo

type StorageCredentialInfo struct {
	// The AWS IAM role configuration.
	AwsIamRole *AwsIamRole `json:"aws_iam_role,omitempty"`
	// The Azure service principal configuration.
	AzureServicePrincipal *AzureServicePrincipal `json:"azure_service_principal,omitempty"`
	// [Create,Update:OPT] Comment associated with the credential.
	Comment string `json:"comment,omitempty"`
	// [Create,Update:IGN] Time at which this Credential was created, in epoch
	// milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of credential creator.
	CreatedBy string `json:"created_by,omitempty"`
	// The GCP service account key configuration.
	GcpServiceAccountKey *GcpServiceAccountKey `json:"gcp_service_account_key,omitempty"`
	// [Create:IGN] The unique identifier of the credential.
	Id string `json:"id,omitempty"`
	// [Create,Update:IGN] Unique identifier of parent Metastore.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ, Update:OPT] The credential name. The name MUST be unique
	// within the Metastore.
	Name string `json:"name,omitempty"`
	// [Create:IGN Update:OPT] Username of current owner of credential.
	Owner string `json:"owner,omitempty"`
	// [Create,Update:IGN] Time at which this credential was last modified, in
	// epoch milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified the credential.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type StorageCredentialsAPI

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

A storage credential represents an authentication and authorization mechanism for accessing data stored on your cloud tenant, using an IAM role. Each storage credential is subject to Unity Catalog access-control policies that control which users and groups can access the credential. If a user does not have access to a storage credential in Unity Catalog, the request fails and Unity Catalog does not attempt to authenticate to your cloud tenant on the user’s behalf.

Databricks recommends using external locations rather than using storage credentials directly.

To create storage credentials, you must be a Databricks account admin. The account admin who creates the storage credential can delegate ownership to another user or group to manage permissions on it.

func NewStorageCredentials

func NewStorageCredentials(client *client.DatabricksClient) *StorageCredentialsAPI

func (*StorageCredentialsAPI) Create

Create credentials

Creates a new storage credential. The request object is specific to the cloud:

* **AwsIamRole** for AWS credentials * **AzureServicePrincipal** for Azure credentials * **GcpServiceAcountKey** for GCP credentials.

The caller must be a Metastore admin and have the CREATE STORAGE CREDENTIAL privilege on the Metastore.

func (*StorageCredentialsAPI) Delete

Delete a credential

Deletes a storage credential from the Metastore. The caller must be an owner of the storage credential.

func (*StorageCredentialsAPI) DeleteByName

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

Delete a credential

Deletes a storage credential from the Metastore. The caller must be an owner of the storage credential.

func (*StorageCredentialsAPI) Get

Get a credential

Gets a storage credential from the Metastore. The caller must be a Metastore admin, the owner of the storage credential, or have a level of privilege on the storage credential.

func (*StorageCredentialsAPI) GetByName

Get a credential

Gets a storage credential from the Metastore. The caller must be a Metastore admin, the owner of the storage credential, or have a level of privilege on the storage credential.

func (*StorageCredentialsAPI) Impl

Impl returns low-level StorageCredentials API implementation

func (*StorageCredentialsAPI) ListAll

List credentials

Gets an array of storage credentials (as StorageCredentialInfo objects). The array is limited to only those storage credentials the caller has the privilege level to access. If the caller is a Metastore admin, all storage credentials will be retrieved.

This method is generated by Databricks SDK Code Generator.

func (*StorageCredentialsAPI) Update

Update a credential

Updates a storage credential on the Metastore. The caller must be the owner of the storage credential. If the caller is a Metastore admin, only the __owner__ credential can be changed.

func (*StorageCredentialsAPI) WithImpl

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

type StorageCredentialsService

type StorageCredentialsService interface {

	// Create credentials
	//
	// Creates a new storage credential. The request object is specific to the
	// cloud:
	//
	// * **AwsIamRole** for AWS credentials * **AzureServicePrincipal** for
	// Azure credentials * **GcpServiceAcountKey** for GCP credentials.
	//
	// The caller must be a Metastore admin and have the CREATE STORAGE
	// CREDENTIAL privilege on the Metastore.
	Create(ctx context.Context, request CreateStorageCredential) (*CreateStorageCredentialResponse, error)

	// Delete a credential
	//
	// Deletes a storage credential from the Metastore. The caller must be an
	// owner of the storage credential.
	Delete(ctx context.Context, request DeleteStorageCredentialRequest) error

	// Get a credential
	//
	// Gets a storage credential from the Metastore. The caller must be a
	// Metastore admin, the owner of the storage credential, or have a level of
	// privilege on the storage credential.
	Get(ctx context.Context, request GetStorageCredentialRequest) (*GetStorageCredentialResponse, error)

	// List credentials
	//
	// Gets an array of storage credentials (as StorageCredentialInfo objects).
	// The array is limited to only those storage credentials the caller has the
	// privilege level to access. If the caller is a Metastore admin, all
	// storage credentials will be retrieved.
	//
	// Use ListAll() to get all StorageCredentialInfo instances
	List(ctx context.Context) (*ListStorageCredentialsResponse, error)

	// Update a credential
	//
	// Updates a storage credential on the Metastore. The caller must be the
	// owner of the storage credential. If the caller is a Metastore admin, only
	// the __owner__ credential can be changed.
	Update(ctx context.Context, request UpdateStorageCredential) error
}

A storage credential represents an authentication and authorization mechanism for accessing data stored on your cloud tenant, using an IAM role. Each storage credential is subject to Unity Catalog access-control policies that control which users and groups can access the credential. If a user does not have access to a storage credential in Unity Catalog, the request fails and Unity Catalog does not attempt to authenticate to your cloud tenant on the user’s behalf.

Databricks recommends using external locations rather than using storage credentials directly.

To create storage credentials, you must be a Databricks account admin. The account admin who creates the storage credential can delegate ownership to another user or group to manage permissions on it.

type StringKeyValuePair

type StringKeyValuePair struct {
	// The key for the tuple.
	Key string `json:"key"`
	// The value for the tuple.
	Value string `json:"value"`
}

type TableInfo

type TableInfo struct {
	// [Create:REQ Update:IGN] Name of parent Catalog.
	CatalogName string `json:"catalog_name,omitempty"`
	// This name ('columns') is what the client actually sees as the field name
	// in messages that include PropertiesKVPairs using 'json_inline' (e.g.,
	// TableInfo).
	Columns []ColumnInfo `json:"columns,omitempty"`
	// [Create,Update:OPT] User-provided free-form text description.
	Comment string `json:"comment,omitempty"`
	// [Create,Update:IGN] Time at which this Table was created, in epoch
	// milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of Table creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create,Update:IGN] Unique ID of the data_access_configuration to use.
	DataAccessConfigurationId string `json:"data_access_configuration_id,omitempty"`
	// [Create:REQ Update:OPT] Data source format ("DELTA", "CSV", etc.).
	DataSourceFormat TableInfoDataSourceFormat `json:"data_source_format,omitempty"`
	// [Create,Update:IGN] Full name of Table, in form of
	// <catalog_name>.<schema_name>.<table_name>
	FullName string `json:"full_name,omitempty"`
	// [Create,Update:IGN] Unique identifier of parent Metastore.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ Update:OPT] Name of Table, relative to parent Schema.
	Name string `json:"name,omitempty"`
	// [Create: IGN Update:OPT] Username of current owner of Table.
	Owner string `json:"owner,omitempty"`
	// [Create,Update:IGN] Privileges the user has on the Table.
	Privileges []TableInfoPrivilegesItem `json:"privileges,omitempty"`
	// This name ('properties') is what the client sees as the field name in
	// messages that include PropertiesKVPairs using 'json_inline' (e.g.,
	// TableInfo).
	Properties []StringKeyValuePair `json:"properties,omitempty"`
	// [Create:REQ Update:IGN] Name of parent Schema relative to its parent
	// Catalog.
	SchemaName string `json:"schema_name,omitempty"`
	// [Create,Update:OPT] List of schemes whose objects can be referenced
	// without qualification.
	SqlPath string `json:"sql_path,omitempty"`
	// [Create:OPT Update:IGN] Name of the storage credential this table used
	StorageCredentialName string `json:"storage_credential_name,omitempty"`
	// [Create:REQ Update:OPT] Storage root URL for table (for MANAGED, EXTERNAL
	// tables)
	StorageLocation string `json:"storage_location,omitempty"`
	// [Create:IGN Update:IGN] Name of Table, relative to parent Schema.
	TableId string `json:"table_id,omitempty"`
	// [Create:REQ Update:OPT] Table type ("MANAGED", "EXTERNAL", "VIEW").
	TableType TableInfoTableType `json:"table_type,omitempty"`
	// [Create,Update:IGN] Time at which this Table was last modified, in epoch
	// milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified the Table.
	UpdatedBy string `json:"updated_by,omitempty"`
	// [Create,Update:OPT] View definition SQL (when table_type == "VIEW")
	ViewDefinition string `json:"view_definition,omitempty"`
}

type TableInfoDataSourceFormat

type TableInfoDataSourceFormat string

[Create:REQ Update:OPT] Data source format ("DELTA", "CSV", etc.).

const TableInfoDataSourceFormatAvro TableInfoDataSourceFormat = `AVRO`
const TableInfoDataSourceFormatCsv TableInfoDataSourceFormat = `CSV`
const TableInfoDataSourceFormatDelta TableInfoDataSourceFormat = `DELTA`
const TableInfoDataSourceFormatDeltasharing TableInfoDataSourceFormat = `DELTASHARING`
const TableInfoDataSourceFormatJson TableInfoDataSourceFormat = `JSON`
const TableInfoDataSourceFormatOrc TableInfoDataSourceFormat = `ORC`
const TableInfoDataSourceFormatParquet TableInfoDataSourceFormat = `PARQUET`
const TableInfoDataSourceFormatText TableInfoDataSourceFormat = `TEXT`
const TableInfoDataSourceFormatUnityCatalog TableInfoDataSourceFormat = `UNITY_CATALOG`
const TableInfoDataSourceFormatUnknownDataSourceFormat TableInfoDataSourceFormat = `UNKNOWN_DATA_SOURCE_FORMAT`

type TableInfoPrivilegesItem

type TableInfoPrivilegesItem string
const TableInfoPrivilegesItemCreate TableInfoPrivilegesItem = `CREATE`
const TableInfoPrivilegesItemCreateMount TableInfoPrivilegesItem = `CREATE_MOUNT`
const TableInfoPrivilegesItemCreateTable TableInfoPrivilegesItem = `CREATE_TABLE`
const TableInfoPrivilegesItemModify TableInfoPrivilegesItem = `MODIFY`
const TableInfoPrivilegesItemReadFiles TableInfoPrivilegesItem = `READ_FILES`
const TableInfoPrivilegesItemSelect TableInfoPrivilegesItem = `SELECT`
const TableInfoPrivilegesItemUnknownPrivilege TableInfoPrivilegesItem = `UNKNOWN_PRIVILEGE`
const TableInfoPrivilegesItemUsage TableInfoPrivilegesItem = `USAGE`
const TableInfoPrivilegesItemWriteFiles TableInfoPrivilegesItem = `WRITE_FILES`

type TableInfoTableType

type TableInfoTableType string

[Create:REQ Update:OPT] Table type ("MANAGED", "EXTERNAL", "VIEW").

const TableInfoTableTypeExternal TableInfoTableType = `EXTERNAL`
const TableInfoTableTypeManaged TableInfoTableType = `MANAGED`
const TableInfoTableTypeUnknownTableType TableInfoTableType = `UNKNOWN_TABLE_TYPE`
const TableInfoTableTypeView TableInfoTableType = `VIEW`

type TableSummariesRequest

type TableSummariesRequest struct {
	// Required. Name of parent catalog for tables of interest.
	CatalogName string `json:"-" url:"catalog_name,omitempty"`
	// Optional. Maximum number of tables to return (page length). Defaults to
	// 10000.
	MaxResults int `json:"-" url:"max_results,omitempty"`
	// Optional. Opaque token to send for the next page of results (pagination).
	PageToken string `json:"-" url:"page_token,omitempty"`
	// Optional. A sql LIKE pattern (% and _) for schema names. All schemas will
	// be returned if not set or empty.
	SchemaNamePattern string `json:"-" url:"schema_name_pattern,omitempty"`
	// Optional. A sql LIKE pattern (% and _) for table names. All tables will
	// be returned if not set or empty.
	TableNamePattern string `json:"-" url:"table_name_pattern,omitempty"`
}

List table summaries

type TableSummary

type TableSummary struct {
	// The full name of the table.
	FullName string `json:"full_name,omitempty"`
	// One of: **UNKNOWN_TABLE_TYPE**, **MANAGED**, **EXTERNAL**, **VIEW**.
	TableType TableSummaryTableType `json:"table_type,omitempty"`
}

type TableSummaryTableType

type TableSummaryTableType string

One of: **UNKNOWN_TABLE_TYPE**, **MANAGED**, **EXTERNAL**, **VIEW**.

const TableSummaryTableTypeExternal TableSummaryTableType = `EXTERNAL`
const TableSummaryTableTypeManaged TableSummaryTableType = `MANAGED`
const TableSummaryTableTypeUnknownTableType TableSummaryTableType = `UNKNOWN_TABLE_TYPE`
const TableSummaryTableTypeView TableSummaryTableType = `VIEW`

type TablesAPI

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

A table resides in the third layer of Unity Catalog’s three-level namespace. It contains rows of data. To create a table, users must have CREATE and USAGE permissions on the schema, and they must have the USAGE permission on its parent catalog. To query a table, users must have the SELECT permission on the table, and they must have the USAGE permission on its parent schema and catalog.

A table can be managed or external.

func NewTables

func NewTables(client *client.DatabricksClient) *TablesAPI

func (*TablesAPI) Create

func (a *TablesAPI) Create(ctx context.Context, request CreateTable) (*CreateTableResponse, error)

Create a table

Creates a new table in the Metastore for a specific catalog and schema. **WARNING**: Do not use this API at this time.

The caller must be the owner of or have the USAGE privilege for both the parent catalog and schema, or be the owner of the parent schema (or have the CREATE privilege on it).

If the new table has a __table_type__ of EXTERNAL specified, the user must be a Metastore admin or meet the permissions requirements of the storage credential or the external location.

func (*TablesAPI) CreateStagingTable

func (a *TablesAPI) CreateStagingTable(ctx context.Context, request CreateStagingTable) (*CreateStagingTableResponse, error)

Create a staging table

Creates a new staging table for a schema. The caller must have both the USAGE privilege on the parent Catalog and the USAGE and CREATE privileges on the parent schema.

func (*TablesAPI) Delete

func (a *TablesAPI) Delete(ctx context.Context, request DeleteTableRequest) error

Delete a table

Deletes a table from the specified parent catalog and schema. The caller must be the owner of the parent catalog, have the USAGE privilege on the parent catalog and be the owner of the parent schema, or be the owner of the table and have the USAGE privilege on both the parent catalog and schema.

func (*TablesAPI) DeleteByFullName

func (a *TablesAPI) DeleteByFullName(ctx context.Context, fullName string) error

Delete a table

Deletes a table from the specified parent catalog and schema. The caller must be the owner of the parent catalog, have the USAGE privilege on the parent catalog and be the owner of the parent schema, or be the owner of the table and have the USAGE privilege on both the parent catalog and schema.

func (*TablesAPI) Get

Get a table

Gets a table from the Metastore for a specific catalog and schema. The caller must be a Metastore admin, be the owner of the table and have the USAGE privilege on both the parent catalog and schema, or be the owner of the table and have the SELECT privilege on it as well.

func (*TablesAPI) GetByFullName

func (a *TablesAPI) GetByFullName(ctx context.Context, fullName string) (*GetTableResponse, error)

Get a table

Gets a table from the Metastore for a specific catalog and schema. The caller must be a Metastore admin, be the owner of the table and have the USAGE privilege on both the parent catalog and schema, or be the owner of the table and have the SELECT privilege on it as well.

func (*TablesAPI) Impl

func (a *TablesAPI) Impl() TablesService

Impl returns low-level Tables API implementation

func (*TablesAPI) ListAll

func (a *TablesAPI) ListAll(ctx context.Context, request ListTablesRequest) ([]TableInfo, error)

List tables

Gets an array of all tables for the current Metastore under the parent catalog and schema. The caller must be a Metastore admin or an owner of (or have the SELECT privilege on) the table. For the latter case, the caller must also be the owner or have the USAGE privilege on the parent catalog and schema.

This method is generated by Databricks SDK Code Generator.

func (*TablesAPI) TableSummaries

func (a *TablesAPI) TableSummaries(ctx context.Context, request TableSummariesRequest) (*ListTableSummariesResponse, error)

List table summaries

Gets an array of summaries for tables for a schema and catalog within the Metastore. The table summaries returned are either:

* summaries for all tables (within the current Metastore and parent catalog and schema), when the user is a Metastore admin, or: * summaries for all tables and schemas (within the current Metastore and parent catalog) for which the user has ownership or the SELECT privilege on the Table and ownership or USAGE privilege on the Schema, provided that the user also has ownership or the USAGE privilege on the parent Catalog

func (*TablesAPI) Update

func (a *TablesAPI) Update(ctx context.Context, request UpdateTable) error

Update a table

Updates a table in the specified catalog and schema. The caller must be the owner of have the USAGE privilege on the parent catalog and schema, or, if changing the owner, be a Metastore admin as well.

func (*TablesAPI) WithImpl

func (a *TablesAPI) WithImpl(impl TablesService) *TablesAPI

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

type TablesService

type TablesService interface {

	// Create a table
	//
	// Creates a new table in the Metastore for a specific catalog and schema.
	// **WARNING**: Do not use this API at this time.
	//
	// The caller must be the owner of or have the USAGE privilege for both the
	// parent catalog and schema, or be the owner of the parent schema (or have
	// the CREATE privilege on it).
	//
	// If the new table has a __table_type__ of EXTERNAL specified, the user
	// must be a Metastore admin or meet the permissions requirements of the
	// storage credential or the external location.
	Create(ctx context.Context, request CreateTable) (*CreateTableResponse, error)

	// Create a staging table
	//
	// Creates a new staging table for a schema. The caller must have both the
	// USAGE privilege on the parent Catalog and the USAGE and CREATE privileges
	// on the parent schema.
	CreateStagingTable(ctx context.Context, request CreateStagingTable) (*CreateStagingTableResponse, error)

	// Delete a table
	//
	// Deletes a table from the specified parent catalog and schema. The caller
	// must be the owner of the parent catalog, have the USAGE privilege on the
	// parent catalog and be the owner of the parent schema, or be the owner of
	// the table and have the USAGE privilege on both the parent catalog and
	// schema.
	Delete(ctx context.Context, request DeleteTableRequest) error

	// Get a table
	//
	// Gets a table from the Metastore for a specific catalog and schema. The
	// caller must be a Metastore admin, be the owner of the table and have the
	// USAGE privilege on both the parent catalog and schema, or be the owner of
	// the table and have the SELECT privilege on it as well.
	Get(ctx context.Context, request GetTableRequest) (*GetTableResponse, error)

	// List tables
	//
	// Gets an array of all tables for the current Metastore under the parent
	// catalog and schema. The caller must be a Metastore admin or an owner of
	// (or have the SELECT privilege on) the table. For the latter case, the
	// caller must also be the owner or have the USAGE privilege on the parent
	// catalog and schema.
	//
	// Use ListAll() to get all TableInfo instances
	List(ctx context.Context, request ListTablesRequest) (*ListTablesResponse, error)

	// List table summaries
	//
	// Gets an array of summaries for tables for a schema and catalog within the
	// Metastore. The table summaries returned are either:
	//
	// * summaries for all tables (within the current Metastore and parent
	// catalog and schema), when the user is a Metastore admin, or: * summaries
	// for all tables and schemas (within the current Metastore and parent
	// catalog) for which the user has ownership or the SELECT privilege on the
	// Table and ownership or USAGE privilege on the Schema, provided that the
	// user also has ownership or the USAGE privilege on the parent Catalog
	TableSummaries(ctx context.Context, request TableSummariesRequest) (*ListTableSummariesResponse, error)

	// Update a table
	//
	// Updates a table in the specified catalog and schema. The caller must be
	// the owner of have the USAGE privilege on the parent catalog and schema,
	// or, if changing the owner, be a Metastore admin as well.
	Update(ctx context.Context, request UpdateTable) error
}

A table resides in the third layer of Unity Catalog’s three-level namespace. It contains rows of data. To create a table, users must have CREATE and USAGE permissions on the schema, and they must have the USAGE permission on its parent catalog. To query a table, users must have the SELECT permission on the table, and they must have the USAGE permission on its parent schema and catalog.

A table can be managed or external.

type UnassignRequest

type UnassignRequest struct {
	// Query for the ID of the Metastore to delete.
	MetastoreId string `json:"-" url:"metastore_id"`
	// A workspace ID.
	WorkspaceId int `json:"-" url:"-"`
}

Delete an assignment

type UpdateCatalog

type UpdateCatalog struct {
	// [Create,Update:IGN] The type of the catalog.
	CatalogType UpdateCatalogCatalogType `json:"catalog_type,omitempty"`
	// [Create,Update:OPT] User-provided free-form text description.
	Comment string `json:"comment,omitempty"`
	// [Create,Update:IGN] Time at which this Catalog was created, in epoch
	// milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of Catalog creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create,Update:IGN] Unique identifier of parent Metastore.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ Update:OPT] Name of Catalog.
	Name string `json:"name,omitempty" url:"-"`
	// [Create:IGN,Update:OPT] Username of current owner of Catalog.
	Owner string `json:"owner,omitempty"`
	// [Create,Update:IGN] Privileges the user has on the Catalog.
	Privileges []UpdateCatalogPrivilegesItem `json:"privileges,omitempty"`
	// This name ('properties') is what the client sees as the field name in
	// messages that include PropertiesKVPairs using 'json_inline' (e.g.,
	// TableInfo).
	Properties []StringKeyValuePair `json:"properties,omitempty"`
	// Delta Sharing Catalog specific fields. A Delta Sharing Catalog is a
	// catalog that is based on a Delta share on a remote sharing server.
	// [Create:OPT,Update:IGN] The name of delta sharing provider.
	ProviderName string `json:"provider_name,omitempty"`
	// [Create:OPT,Update: IGN] The name of the share under the share provider.
	ShareName string `json:"share_name,omitempty"`
	// [Create,Update:IGN] Time at which this Catalog was last modified, in
	// epoch milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified Catalog.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type UpdateCatalogCatalogType

type UpdateCatalogCatalogType string

[Create,Update:IGN] The type of the catalog.

const UpdateCatalogCatalogTypeDeltasharingCatalog UpdateCatalogCatalogType = `DELTASHARING_CATALOG`
const UpdateCatalogCatalogTypeManagedCatalog UpdateCatalogCatalogType = `MANAGED_CATALOG`
const UpdateCatalogCatalogTypeSystemCatalog UpdateCatalogCatalogType = `SYSTEM_CATALOG`
const UpdateCatalogCatalogTypeUnknownCatalogType UpdateCatalogCatalogType = `UNKNOWN_CATALOG_TYPE`

type UpdateCatalogPrivilegesItem

type UpdateCatalogPrivilegesItem string
const UpdateCatalogPrivilegesItemCreate UpdateCatalogPrivilegesItem = `CREATE`
const UpdateCatalogPrivilegesItemCreateMount UpdateCatalogPrivilegesItem = `CREATE_MOUNT`
const UpdateCatalogPrivilegesItemCreateTable UpdateCatalogPrivilegesItem = `CREATE_TABLE`
const UpdateCatalogPrivilegesItemModify UpdateCatalogPrivilegesItem = `MODIFY`
const UpdateCatalogPrivilegesItemReadFiles UpdateCatalogPrivilegesItem = `READ_FILES`
const UpdateCatalogPrivilegesItemSelect UpdateCatalogPrivilegesItem = `SELECT`
const UpdateCatalogPrivilegesItemUnknownPrivilege UpdateCatalogPrivilegesItem = `UNKNOWN_PRIVILEGE`
const UpdateCatalogPrivilegesItemUsage UpdateCatalogPrivilegesItem = `USAGE`
const UpdateCatalogPrivilegesItemWriteFiles UpdateCatalogPrivilegesItem = `WRITE_FILES`

type UpdateExternalLocation

type UpdateExternalLocation struct {
	// [Create:OPT Update:OPT] User-provided free-form text description.
	Comment string `json:"comment,omitempty"`
	// [Create,Update:IGN] Time at which this External Location was created, in
	// epoch milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of External Location creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create,Update:IGN] Unique ID of the location's Storage Credential.
	CredentialId string `json:"credential_id,omitempty"`
	// [Create:REQ Update:OPT] Current name of the Storage Credential this
	// location uses.
	CredentialName string `json:"credential_name,omitempty"`
	// TODO: SC-90063 re-add 'force' parameter in backward-compatible way for
	// DBR (not removed below as it still works with CLI) Optional. Force update
	// even if changing url invalidates dependent external tables or mounts.
	Force bool `json:"force,omitempty"`
	// [Create,Update:IGN] Unique identifier of Metastore hosting the External
	// Location.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ Update:OPT] Name of the External Location.
	Name string `json:"name,omitempty" url:"-"`
	// [Create:IGN Update:OPT] The owner of the External Location.
	Owner string `json:"owner,omitempty"`
	// [Create,Update:IGN] Time at which this was last modified, in epoch
	// milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified the External
	// Location.
	UpdatedBy string `json:"updated_by,omitempty"`
	// [Create:REQ Update:OPT] Path URL of the External Location.
	Url string `json:"url,omitempty"`
}

type UpdateMetastore

type UpdateMetastore struct {
	// [Create,Update:IGN] Time at which this Metastore was created, in epoch
	// milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of Metastore creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create:IGN Update:OPT] Unique identifier of (Default) Data Access
	// Configuration
	DefaultDataAccessConfigId string `json:"default_data_access_config_id,omitempty"`
	// [Create:IGN Update:OPT] Whether Delta Sharing is enabled on this
	// metastore.
	DeltaSharingEnabled bool `json:"delta_sharing_enabled,omitempty"`
	// [Create:IGN Update:OPT] The lifetime of delta sharing recipient token in
	// seconds
	DeltaSharingRecipientTokenLifetimeInSeconds int `json:"delta_sharing_recipient_token_lifetime_in_seconds,omitempty"`
	// Required. Unique ID of the Metastore (from URL).
	Id string `json:"-" url:"-"`
	// [Create,Update:IGN] Unique identifier of Metastore.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ Update:OPT] Name of Metastore.
	Name string `json:"name,omitempty"`
	// [Create:IGN Update:OPT] The owner of the metastore.
	Owner string `json:"owner,omitempty"`
	// [Create,Update:IGN] Privileges the user has on the Metastore.
	Privileges []UpdateMetastorePrivilegesItem `json:"privileges,omitempty"`
	// The region this metastore has an afinity to. This is used by
	// accounts-manager. Ignored by Unity Catalog.
	Region string `json:"region,omitempty"`
	// [Create:REQ Update:ERR] Storage root URL for Metastore
	StorageRoot string `json:"storage_root,omitempty"`
	// [Create:IGN Update:OPT] UUID of storage credential to access storage_root
	StorageRootCredentialId string `json:"storage_root_credential_id,omitempty"`
	// [Create,Update:IGN] Time at which the Metastore was last modified, in
	// epoch milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified the Metastore.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type UpdateMetastoreAssignment

type UpdateMetastoreAssignment struct {
	// The name of the default catalog for the Metastore.
	DefaultCatalogName string `json:"default_catalog_name,omitempty"`
	// The unique ID of the Metastore.
	MetastoreId string `json:"metastore_id,omitempty"`
	// A workspace ID.
	WorkspaceId int `json:"-" url:"-"`
}

type UpdateMetastorePrivilegesItem

type UpdateMetastorePrivilegesItem string
const UpdateMetastorePrivilegesItemCreate UpdateMetastorePrivilegesItem = `CREATE`
const UpdateMetastorePrivilegesItemCreateMount UpdateMetastorePrivilegesItem = `CREATE_MOUNT`
const UpdateMetastorePrivilegesItemCreateTable UpdateMetastorePrivilegesItem = `CREATE_TABLE`
const UpdateMetastorePrivilegesItemModify UpdateMetastorePrivilegesItem = `MODIFY`
const UpdateMetastorePrivilegesItemReadFiles UpdateMetastorePrivilegesItem = `READ_FILES`
const UpdateMetastorePrivilegesItemSelect UpdateMetastorePrivilegesItem = `SELECT`
const UpdateMetastorePrivilegesItemUnknownPrivilege UpdateMetastorePrivilegesItem = `UNKNOWN_PRIVILEGE`
const UpdateMetastorePrivilegesItemUsage UpdateMetastorePrivilegesItem = `USAGE`
const UpdateMetastorePrivilegesItemWriteFiles UpdateMetastorePrivilegesItem = `WRITE_FILES`

type UpdatePermissions

type UpdatePermissions struct {
	// Array of permissions change objects.
	Changes []PermissionsChange `json:"changes,omitempty"`
	// Required. Unique identifier (full name) of Securable (from URL).
	FullName string `json:"-" url:"-"`
	// Optional. List permissions granted to this principal.
	Principal string `json:"-" url:"principal,omitempty"`
	// Required. Type of Securable (from URL).
	SecurableType string `json:"-" url:"-"`
}

type UpdateProvider

type UpdateProvider struct {
	// [Create,Update:IGN] Whether this provider is successfully activated by
	// the data provider. This field is only present when the authentication
	// type is DATABRICKS.
	ActivatedByProvider bool `json:"activated_by_provider,omitempty"`
	// [Create:REQ,Update:IGN] The delta sharing authentication type.
	AuthenticationType UpdateProviderAuthenticationType `json:"authentication_type,omitempty"`
	// [Create,Update:OPT] Description about the provider.
	Comment string `json:"comment,omitempty"`
	// [Create,Update:IGN] Time at which this Provider was created, in epoch
	// milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of Provider creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create, Update:REQ] The name of the Provider.
	Name string `json:"name,omitempty" url:"-"`
	// [Create,Update:IGN] This field is only present when the authentication
	// type is TOKEN.
	RecipientProfile *RecipientProfile `json:"recipient_profile,omitempty"`
	// [Create,Update:OPT] This field is only present when the authentication
	// type is TOKEN.
	RecipientProfileStr string `json:"recipient_profile_str,omitempty"`
	// [Create,Update:IGN] The server-generated one-time sharing code. This
	// field is only present when the authentication type is DATABRICKS.
	SharingCode string `json:"sharing_code,omitempty"`
	// [Create,Update:IGN] Time at which this Provider was created, in epoch
	// milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified Share.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type UpdateProviderAuthenticationType

type UpdateProviderAuthenticationType string

[Create:REQ,Update:IGN] The delta sharing authentication type.

const UpdateProviderAuthenticationTypeDatabricks UpdateProviderAuthenticationType = `DATABRICKS`
const UpdateProviderAuthenticationTypeToken UpdateProviderAuthenticationType = `TOKEN`
const UpdateProviderAuthenticationTypeUnknown UpdateProviderAuthenticationType = `UNKNOWN`

type UpdateRecipient

type UpdateRecipient struct {
	// [Create:IGN,Update:IGN] A boolean status field showing whether the
	// Recipient's activation URL has been exercised or not.
	Activated bool `json:"activated,omitempty"`
	// [Create:IGN,Update:IGN] Full activation url to retrieve the access token.
	// It will be empty if the token is already retrieved.
	ActivationUrl string `json:"activation_url,omitempty"`
	// [Create:REQ,Update:IGN] The delta sharing authentication type.
	AuthenticationType UpdateRecipientAuthenticationType `json:"authentication_type,omitempty"`
	// [Create:OPT,Update:OPT] Description about the recipient.
	Comment string `json:"comment,omitempty"`
	// [Create:IGN,Update:IGN] Time at which this recipient was created, in
	// epoch milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create:IGN,Update:IGN] Username of recipient creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create:OPT,Update:OPT] IP Access List
	IpAccessList *IpAccessList `json:"ip_access_list,omitempty"`
	// [Create:REQ,Update:OPT] Name of Recipient.
	Name string `json:"name,omitempty" url:"-"`
	// [Create:OPT,Update:IGN] The one-time sharing code provided by the data
	// recipient. This field is only present when the authentication type is
	// DATABRICKS.
	SharingCode string `json:"sharing_code,omitempty"`
	// [Create:IGN,Update:IGN] recipient Tokens This field is only present when
	// the authentication type is TOKEN.
	Tokens []RecipientTokenInfo `json:"tokens,omitempty"`
	// [Create:IGN,Update:IGN] Time at which the recipient was updated, in epoch
	// milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create:IGN,Update:IGN] Username of recipient updater.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type UpdateRecipientAuthenticationType

type UpdateRecipientAuthenticationType string

[Create:REQ,Update:IGN] The delta sharing authentication type.

const UpdateRecipientAuthenticationTypeDatabricks UpdateRecipientAuthenticationType = `DATABRICKS`
const UpdateRecipientAuthenticationTypeToken UpdateRecipientAuthenticationType = `TOKEN`
const UpdateRecipientAuthenticationTypeUnknown UpdateRecipientAuthenticationType = `UNKNOWN`

type UpdateSchema

type UpdateSchema struct {
	// [Create:REQ Update:IGN] Name of parent Catalog.
	CatalogName string `json:"catalog_name,omitempty"`
	// [Create,Update:OPT] User-provided free-form text description.
	Comment string `json:"comment,omitempty"`
	// [Create,Update:IGN] Time at which this Schema was created, in epoch
	// milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of Schema creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create,Update:IGN] Full name of Schema, in form of
	// <catalog_name>.<schema_name>.
	FullName string `json:"full_name,omitempty" url:"-"`
	// [Create,Update:IGN] Unique identifier of parent Metastore.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ Update:OPT] Name of Schema, relative to parent Catalog.
	Name string `json:"name,omitempty"`
	// [Create:IGN Update:OPT] Username of current owner of Schema.
	Owner string `json:"owner,omitempty"`
	// [Create,Update:IGN] Privileges the user has on the Schema.
	Privileges []UpdateSchemaPrivilegesItem `json:"privileges,omitempty"`
	// This name ('properties') is what the client sees as the field name in
	// messages that include PropertiesKVPairs using 'json_inline' (e.g.,
	// TableInfo).
	Properties []StringKeyValuePair `json:"properties,omitempty"`
	// [Create,Update:IGN] Time at which this Schema was created, in epoch
	// milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified Schema.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type UpdateSchemaPrivilegesItem

type UpdateSchemaPrivilegesItem string
const UpdateSchemaPrivilegesItemCreate UpdateSchemaPrivilegesItem = `CREATE`
const UpdateSchemaPrivilegesItemCreateMount UpdateSchemaPrivilegesItem = `CREATE_MOUNT`
const UpdateSchemaPrivilegesItemCreateTable UpdateSchemaPrivilegesItem = `CREATE_TABLE`
const UpdateSchemaPrivilegesItemModify UpdateSchemaPrivilegesItem = `MODIFY`
const UpdateSchemaPrivilegesItemReadFiles UpdateSchemaPrivilegesItem = `READ_FILES`
const UpdateSchemaPrivilegesItemSelect UpdateSchemaPrivilegesItem = `SELECT`
const UpdateSchemaPrivilegesItemUnknownPrivilege UpdateSchemaPrivilegesItem = `UNKNOWN_PRIVILEGE`
const UpdateSchemaPrivilegesItemUsage UpdateSchemaPrivilegesItem = `USAGE`
const UpdateSchemaPrivilegesItemWriteFiles UpdateSchemaPrivilegesItem = `WRITE_FILES`

type UpdateShare

type UpdateShare struct {
	// The name of the share.
	Name string `json:"-" url:"-"`
	// Array of shared data object updates.
	Updates []SharedDataObjectUpdate `json:"updates,omitempty"`
}

type UpdateSharePermissions

type UpdateSharePermissions struct {
	// Array of permission changes.
	Changes []PermissionsChange `json:"changes,omitempty"`
	// Required. The name of the share.
	Name string `json:"-" url:"-"`
}

type UpdateStorageCredential

type UpdateStorageCredential struct {
	// The AWS IAM role configuration.
	AwsIamRole *AwsIamRole `json:"aws_iam_role,omitempty"`
	// The Azure service principal configuration.
	AzureServicePrincipal *AzureServicePrincipal `json:"azure_service_principal,omitempty"`
	// [Create,Update:OPT] Comment associated with the credential.
	Comment string `json:"comment,omitempty"`
	// [Create,Update:IGN] Time at which this Credential was created, in epoch
	// milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of credential creator.
	CreatedBy string `json:"created_by,omitempty"`
	// The GCP service account key configuration.
	GcpServiceAccountKey *GcpServiceAccountKey `json:"gcp_service_account_key,omitempty"`
	// [Create:IGN] The unique identifier of the credential.
	Id string `json:"id,omitempty"`
	// [Create,Update:IGN] Unique identifier of parent Metastore.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ, Update:OPT] The credential name. The name MUST be unique
	// within the Metastore.
	Name string `json:"name,omitempty" url:"-"`
	// [Create:IGN Update:OPT] Username of current owner of credential.
	Owner string `json:"owner,omitempty"`
	// Optional. Supplying true to this argument skips validation of the updated
	// set of credentials.
	SkipValidation bool `json:"skip_validation,omitempty"`
	// [Create,Update:IGN] Time at which this credential was last modified, in
	// epoch milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified the credential.
	UpdatedBy string `json:"updated_by,omitempty"`
}

type UpdateTable

type UpdateTable struct {
	// [Create:REQ Update:IGN] Name of parent Catalog.
	CatalogName string `json:"catalog_name,omitempty"`
	// This name ('columns') is what the client actually sees as the field name
	// in messages that include PropertiesKVPairs using 'json_inline' (e.g.,
	// TableInfo).
	Columns []ColumnInfo `json:"columns,omitempty"`
	// [Create,Update:OPT] User-provided free-form text description.
	Comment string `json:"comment,omitempty"`
	// [Create,Update:IGN] Time at which this Table was created, in epoch
	// milliseconds.
	CreatedAt int64 `json:"created_at,omitempty"`
	// [Create,Update:IGN] Username of Table creator.
	CreatedBy string `json:"created_by,omitempty"`
	// [Create,Update:IGN] Unique ID of the data_access_configuration to use.
	DataAccessConfigurationId string `json:"data_access_configuration_id,omitempty"`
	// [Create:REQ Update:OPT] Data source format ("DELTA", "CSV", etc.).
	DataSourceFormat UpdateTableDataSourceFormat `json:"data_source_format,omitempty"`
	// [Create,Update:IGN] Full name of Table, in form of
	// <catalog_name>.<schema_name>.<table_name>
	FullName string `json:"full_name,omitempty" url:"-"`
	// [Create,Update:IGN] Unique identifier of parent Metastore.
	MetastoreId string `json:"metastore_id,omitempty"`
	// [Create:REQ Update:OPT] Name of Table, relative to parent Schema.
	Name string `json:"name,omitempty"`
	// [Create: IGN Update:OPT] Username of current owner of Table.
	Owner string `json:"owner,omitempty"`
	// [Create,Update:IGN] Privileges the user has on the Table.
	Privileges []UpdateTablePrivilegesItem `json:"privileges,omitempty"`
	// This name ('properties') is what the client sees as the field name in
	// messages that include PropertiesKVPairs using 'json_inline' (e.g.,
	// TableInfo).
	Properties []StringKeyValuePair `json:"properties,omitempty"`
	// [Create:REQ Update:IGN] Name of parent Schema relative to its parent
	// Catalog.
	SchemaName string `json:"schema_name,omitempty"`
	// [Create,Update:OPT] List of schemes whose objects can be referenced
	// without qualification.
	SqlPath string `json:"sql_path,omitempty"`
	// [Create:OPT Update:IGN] Name of the storage credential this table used
	StorageCredentialName string `json:"storage_credential_name,omitempty"`
	// [Create:REQ Update:OPT] Storage root URL for table (for MANAGED, EXTERNAL
	// tables)
	StorageLocation string `json:"storage_location,omitempty"`
	// [Create:IGN Update:IGN] Name of Table, relative to parent Schema.
	TableId string `json:"table_id,omitempty"`
	// [Create:REQ Update:OPT] Table type ("MANAGED", "EXTERNAL", "VIEW").
	TableType UpdateTableTableType `json:"table_type,omitempty"`
	// [Create,Update:IGN] Time at which this Table was last modified, in epoch
	// milliseconds.
	UpdatedAt int64 `json:"updated_at,omitempty"`
	// [Create,Update:IGN] Username of user who last modified the Table.
	UpdatedBy string `json:"updated_by,omitempty"`
	// [Create,Update:OPT] View definition SQL (when table_type == "VIEW")
	ViewDefinition string `json:"view_definition,omitempty"`
}

type UpdateTableDataSourceFormat

type UpdateTableDataSourceFormat string

[Create:REQ Update:OPT] Data source format ("DELTA", "CSV", etc.).

const UpdateTableDataSourceFormatAvro UpdateTableDataSourceFormat = `AVRO`
const UpdateTableDataSourceFormatCsv UpdateTableDataSourceFormat = `CSV`
const UpdateTableDataSourceFormatDelta UpdateTableDataSourceFormat = `DELTA`
const UpdateTableDataSourceFormatDeltasharing UpdateTableDataSourceFormat = `DELTASHARING`
const UpdateTableDataSourceFormatJson UpdateTableDataSourceFormat = `JSON`
const UpdateTableDataSourceFormatOrc UpdateTableDataSourceFormat = `ORC`
const UpdateTableDataSourceFormatParquet UpdateTableDataSourceFormat = `PARQUET`
const UpdateTableDataSourceFormatText UpdateTableDataSourceFormat = `TEXT`
const UpdateTableDataSourceFormatUnityCatalog UpdateTableDataSourceFormat = `UNITY_CATALOG`
const UpdateTableDataSourceFormatUnknownDataSourceFormat UpdateTableDataSourceFormat = `UNKNOWN_DATA_SOURCE_FORMAT`

type UpdateTablePrivilegesItem

type UpdateTablePrivilegesItem string
const UpdateTablePrivilegesItemCreate UpdateTablePrivilegesItem = `CREATE`
const UpdateTablePrivilegesItemCreateMount UpdateTablePrivilegesItem = `CREATE_MOUNT`
const UpdateTablePrivilegesItemCreateTable UpdateTablePrivilegesItem = `CREATE_TABLE`
const UpdateTablePrivilegesItemModify UpdateTablePrivilegesItem = `MODIFY`
const UpdateTablePrivilegesItemReadFiles UpdateTablePrivilegesItem = `READ_FILES`
const UpdateTablePrivilegesItemSelect UpdateTablePrivilegesItem = `SELECT`
const UpdateTablePrivilegesItemUnknownPrivilege UpdateTablePrivilegesItem = `UNKNOWN_PRIVILEGE`
const UpdateTablePrivilegesItemUsage UpdateTablePrivilegesItem = `USAGE`
const UpdateTablePrivilegesItemWriteFiles UpdateTablePrivilegesItem = `WRITE_FILES`

type UpdateTableTableType

type UpdateTableTableType string

[Create:REQ Update:OPT] Table type ("MANAGED", "EXTERNAL", "VIEW").

const UpdateTableTableTypeExternal UpdateTableTableType = `EXTERNAL`
const UpdateTableTableTypeManaged UpdateTableTableType = `MANAGED`
const UpdateTableTableTypeUnknownTableType UpdateTableTableType = `UNKNOWN_TABLE_TYPE`
const UpdateTableTableTypeView UpdateTableTableType = `VIEW`

Jump to

Keyboard shortcuts

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