Documentation
¶
Overview ¶
Manage data classification for Unity Catalog catalogs. Data classification automatically identifies and tags sensitive data (PII) in Unity Catalog tables. Each catalog can have at most one configuration resource that controls scanning behavior and auto-tagging rules.
Index ¶
- type AutoTaggingConfig
- type AutoTaggingConfigAutoTaggingMode
- type CatalogConfig
- type CatalogConfigSchemaNames
- type CreateCatalogConfigRequest
- type DataClassificationAPI
- func (a *DataClassificationAPI) CreateCatalogConfig(ctx context.Context, request CreateCatalogConfigRequest) (*CatalogConfig, error)
- func (a *DataClassificationAPI) DeleteCatalogConfig(ctx context.Context, request DeleteCatalogConfigRequest) error
- func (a *DataClassificationAPI) GetCatalogConfig(ctx context.Context, request GetCatalogConfigRequest) (*CatalogConfig, error)
- func (a *DataClassificationAPI) UpdateCatalogConfig(ctx context.Context, request UpdateCatalogConfigRequest) (*CatalogConfig, error)
- type DataClassificationInterface
- type DataClassificationServicedeprecated
- type DeleteCatalogConfigRequest
- type GetCatalogConfigRequest
- type UpdateCatalogConfigRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoTaggingConfig ¶
type AutoTaggingConfig struct {
// Whether auto-tagging is enabled or disabled for this classification tag.
AutoTaggingMode AutoTaggingConfigAutoTaggingMode `json:"auto_tagging_mode"`
// The Classification Tag. For built-in classes this is a system tag (e.g.,
// "class.name", "class.location"); for custom classes it is a user-defined
// governance tag key. The built-in tags are listed at
// https://docs.databricks.com/aws/en/data-governance/unity-catalog/data-classification-tags.
ClassificationTag string `json:"classification_tag"`
}
Auto-tagging configuration for a classification tag. When enabled, detected columns are automatically tagged with Unity Catalog tags.
func (*AutoTaggingConfig) UnmarshalJSON ¶ added in v0.174.0
func (s *AutoTaggingConfig) UnmarshalJSON(b []byte) error
type AutoTaggingConfigAutoTaggingMode ¶
type AutoTaggingConfigAutoTaggingMode string
Auto-tagging mode.
const AutoTaggingConfigAutoTaggingModeAutoTaggingDisabled AutoTaggingConfigAutoTaggingMode = `AUTO_TAGGING_DISABLED`
const AutoTaggingConfigAutoTaggingModeAutoTaggingEnabled AutoTaggingConfigAutoTaggingMode = `AUTO_TAGGING_ENABLED`
func (*AutoTaggingConfigAutoTaggingMode) Set ¶
func (f *AutoTaggingConfigAutoTaggingMode) Set(v string) error
Set raw string value and validate it against allowed values
func (*AutoTaggingConfigAutoTaggingMode) String ¶
func (f *AutoTaggingConfigAutoTaggingMode) String() string
String representation for fmt.Print
func (*AutoTaggingConfigAutoTaggingMode) Type ¶
func (f *AutoTaggingConfigAutoTaggingMode) Type() string
Type always returns AutoTaggingConfigAutoTaggingMode to satisfy [pflag.Value] interface
func (*AutoTaggingConfigAutoTaggingMode) Values ¶
func (f *AutoTaggingConfigAutoTaggingMode) Values() []AutoTaggingConfigAutoTaggingMode
Values returns all possible values for AutoTaggingConfigAutoTaggingMode.
There is no guarantee on the order of the values in the slice.
type CatalogConfig ¶
type CatalogConfig struct {
// Auto-tagging configurations that apply to this catalog. Each entry
// overrides the metastore-level auto-tagging setting for its classification
// tag; tags without an entry inherit the metastore-level setting.
AutoTagConfigs []AutoTaggingConfig `json:"auto_tag_configs,omitempty"`
// Schemas to exclude from the scan, each named relative to the parent
// catalog. If specified, all schemas except the specified ones will be
// scanned, including schemas created later. Mutually exclusive with
// `included_schemas`: only one may be set per request. If neither
// `included_schemas` nor `excluded_schemas` is set, all schemas are
// scanned.
ExcludedSchemas *CatalogConfigSchemaNames `json:"excluded_schemas,omitempty"`
// Schemas to include in the scan, each named relative to the parent
// catalog. If specified, only listed schemas will be scanned. Schemas
// created later are not scanned until you add them to the list. Mutually
// exclusive with `excluded_schemas`: only one may be set per request. If
// neither `included_schemas` nor `excluded_schemas` is set, all schemas are
// scanned.
IncludedSchemas *CatalogConfigSchemaNames `json:"included_schemas,omitempty"`
// Resource name in the format: catalogs/{catalog_name}/config.
Name string `json:"name,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
Data Classification configuration for a Unity Catalog catalog. This message follows the "At Most One Resource" pattern: at most one CatalogConfig exists per catalog. - Full CRUD operations are supported: Create enables Data Classification, Delete disables it - It has no unique identifier of its own and uses its parent catalog's identifier (catalog_name)
func (CatalogConfig) MarshalJSON ¶
func (s CatalogConfig) MarshalJSON() ([]byte, error)
func (*CatalogConfig) UnmarshalJSON ¶
func (s *CatalogConfig) UnmarshalJSON(b []byte) error
type CatalogConfigSchemaNames ¶
type CatalogConfigSchemaNames struct {
// Schema names, each relative to the parent catalog. Must not be empty.
Names []string `json:"names"`
}
Wrapper message for a list of schema names.
func (*CatalogConfigSchemaNames) UnmarshalJSON ¶ added in v0.174.0
func (s *CatalogConfigSchemaNames) UnmarshalJSON(b []byte) error
type CreateCatalogConfigRequest ¶
type CreateCatalogConfigRequest struct {
// The configuration to create.
CatalogConfig CatalogConfig `json:"catalog_config"`
// Name of the catalog to enable, in the format catalogs/{catalog_name}.
Parent string `json:"-" url:"-"`
}
func (*CreateCatalogConfigRequest) UnmarshalJSON ¶ added in v0.174.0
func (s *CreateCatalogConfigRequest) UnmarshalJSON(b []byte) error
type DataClassificationAPI ¶
type DataClassificationAPI struct {
// contains filtered or unexported fields
}
Manage data classification for Unity Catalog catalogs. Data classification automatically identifies and tags sensitive data (PII) in Unity Catalog tables. Each catalog can have at most one configuration resource that controls scanning behavior and auto-tagging rules.
func NewDataClassification ¶
func NewDataClassification(client *client.DatabricksClient) *DataClassificationAPI
func (*DataClassificationAPI) CreateCatalogConfig ¶
func (a *DataClassificationAPI) CreateCatalogConfig(ctx context.Context, request CreateCatalogConfigRequest) (*CatalogConfig, error)
func (*DataClassificationAPI) DeleteCatalogConfig ¶
func (a *DataClassificationAPI) DeleteCatalogConfig(ctx context.Context, request DeleteCatalogConfigRequest) error
func (*DataClassificationAPI) GetCatalogConfig ¶
func (a *DataClassificationAPI) GetCatalogConfig(ctx context.Context, request GetCatalogConfigRequest) (*CatalogConfig, error)
func (*DataClassificationAPI) UpdateCatalogConfig ¶
func (a *DataClassificationAPI) UpdateCatalogConfig(ctx context.Context, request UpdateCatalogConfigRequest) (*CatalogConfig, error)
type DataClassificationInterface ¶
type DataClassificationInterface interface {
// Create Data Classification configuration for a catalog.
//
// Creates a new config resource, which enables Data Classification for the
// specified catalog. The catalog must not already have a config. Creating the
// config starts a scan of the selected schemas and schedules recurring scans.
CreateCatalogConfig(ctx context.Context, request CreateCatalogConfigRequest) (*CatalogConfig, error)
// Delete Data Classification configuration for a catalog.
//
// Deleting the config disables Data Classification for the catalog and stops
// its scheduled scans. Tags that auto-tagging already applied to columns are
// not removed. Deleting a config that does not exist succeeds.
DeleteCatalogConfig(ctx context.Context, request DeleteCatalogConfigRequest) error
// Get the Data Classification configuration for a catalog.
GetCatalogConfig(ctx context.Context, request GetCatalogConfigRequest) (*CatalogConfig, error)
// Update the Data Classification configuration for a catalog.
//
// The config must already exist for the catalog. Only the fields named in
// `update_mask` change; the other fields keep their current values.
UpdateCatalogConfig(ctx context.Context, request UpdateCatalogConfigRequest) (*CatalogConfig, error)
}
type DataClassificationService
deprecated
type DataClassificationService interface {
// Create Data Classification configuration for a catalog.
//
// Creates a new config resource, which enables Data Classification for the
// specified catalog. The catalog must not already have a config. Creating
// the config starts a scan of the selected schemas and schedules recurring
// scans.
CreateCatalogConfig(ctx context.Context, request CreateCatalogConfigRequest) (*CatalogConfig, error)
// Delete Data Classification configuration for a catalog.
//
// Deleting the config disables Data Classification for the catalog and
// stops its scheduled scans. Tags that auto-tagging already applied to
// columns are not removed. Deleting a config that does not exist succeeds.
DeleteCatalogConfig(ctx context.Context, request DeleteCatalogConfigRequest) error
// Get the Data Classification configuration for a catalog.
GetCatalogConfig(ctx context.Context, request GetCatalogConfigRequest) (*CatalogConfig, error)
// Update the Data Classification configuration for a catalog.
//
// The config must already exist for the catalog. Only the fields named in
// `update_mask` change; the other fields keep their current values.
UpdateCatalogConfig(ctx context.Context, request UpdateCatalogConfigRequest) (*CatalogConfig, error)
}
Manage data classification for Unity Catalog catalogs. Data classification automatically identifies and tags sensitive data (PII) in Unity Catalog tables. Each catalog can have at most one configuration resource that controls scanning behavior and auto-tagging rules.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type DeleteCatalogConfigRequest ¶
type DeleteCatalogConfigRequest struct {
// Resource name of the config, in the format
// catalogs/{catalog_name}/config.
Name string `json:"-" url:"-"`
}
func (*DeleteCatalogConfigRequest) UnmarshalJSON ¶ added in v0.174.0
func (s *DeleteCatalogConfigRequest) UnmarshalJSON(b []byte) error
type GetCatalogConfigRequest ¶
type GetCatalogConfigRequest struct {
// Resource name of the config, in the format
// catalogs/{catalog_name}/config.
Name string `json:"-" url:"-"`
}
func (*GetCatalogConfigRequest) UnmarshalJSON ¶ added in v0.174.0
func (s *GetCatalogConfigRequest) UnmarshalJSON(b []byte) error
type UpdateCatalogConfigRequest ¶
type UpdateCatalogConfigRequest struct {
// The configuration to apply to the catalog. The name field in
// catalog_config identifies which resource to update.
CatalogConfig CatalogConfig `json:"catalog_config"`
// Resource name in the format: catalogs/{catalog_name}/config.
Name string `json:"-" url:"-"`
// Comma-separated list of the fields of catalog_config to update, for
// example `included_schemas` or `auto_tag_configs`.
UpdateMask fieldmask.FieldMask `json:"-" url:"update_mask"`
}
func (*UpdateCatalogConfigRequest) UnmarshalJSON ¶ added in v0.174.0
func (s *UpdateCatalogConfigRequest) UnmarshalJSON(b []byte) error