permissions

package
v1.59.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Mappings = SecurableMapping{
	"catalog":            catalog.SecurableType("catalog"),
	"foreign_connection": catalog.SecurableType("connection"),
	"external_location":  catalog.SecurableType("external_location"),
	"function":           catalog.SecurableType("function"),
	"metastore":          catalog.SecurableType("metastore"),
	"model":              catalog.SecurableType("function"),
	"pipeline":           catalog.SecurableType("pipeline"),
	"recipient":          catalog.SecurableType("recipient"),
	"schema":             catalog.SecurableType("schema"),
	"share":              catalog.SecurableType("share"),
	"storage_credential": catalog.SecurableType("storage_credential"),
	"table":              catalog.SecurableType("table"),
	"volume":             catalog.SecurableType("volume"),
}

Mappings See https://docs.databricks.com/api/workspace/grants/update for full list Omitting provider as a reserved keyword

Functions

func NormalizePrivilege added in v1.48.0

func NormalizePrivilege(privilege string) string

Unity Catalog accepts privileges with spaces, but will automatically convert them to underscores

func SetToSlice

func SetToSlice(set *schema.Set) (ss []catalog.Privilege)

func SliceToSet

func SliceToSet(in []catalog.Privilege) *schema.Set

Utils for Slice and Set

func SliceWithoutString

func SliceWithoutString(in []string, without string) (out []string)

Types

type SecurableMapping

type SecurableMapping map[string]catalog.SecurableType

func (SecurableMapping) GetSecurableType

func (sm SecurableMapping) GetSecurableType(securable string) catalog.SecurableType

func (SecurableMapping) Id

func (SecurableMapping) KeyValue

func (sm SecurableMapping) KeyValue(d attributeGetter) (string, string)

type UnityCatalogPermissionsAPI

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

API

func NewUnityCatalogPermissionsAPI

func NewUnityCatalogPermissionsAPI(ctx context.Context, m any) UnityCatalogPermissionsAPI

func (UnityCatalogPermissionsAPI) GetPermissions

func (a UnityCatalogPermissionsAPI) GetPermissions(securable catalog.SecurableType, name string) (list *catalog.PermissionsList, err error)

func (UnityCatalogPermissionsAPI) UpdatePermissions

func (a UnityCatalogPermissionsAPI) UpdatePermissions(securable catalog.SecurableType, name string, diff []catalog.PermissionsChange) error

func (UnityCatalogPermissionsAPI) WaitForUpdate

type UnityCatalogPrivilegeAssignment

type UnityCatalogPrivilegeAssignment struct {
	Principal  string   `json:"principal"`
	Privileges []string `json:"privileges" tf:"slice_set"`
}

Terraform Schema

Jump to

Keyboard shortcuts

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