database

package
v0.73.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2025 License: Apache-2.0 Imports: 10 Imported by: 8

Documentation

Overview

Database Instances provide access to a database via REST API or direct SQL.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateDatabaseCatalogRequest

type CreateDatabaseCatalogRequest struct {

	// Wire name: 'catalog'
	Catalog DatabaseCatalog `json:"catalog"`
}

Create a Database Catalog

func (CreateDatabaseCatalogRequest) MarshalJSON added in v0.73.0

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

func (*CreateDatabaseCatalogRequest) UnmarshalJSON added in v0.73.0

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

type CreateDatabaseInstanceRequest

type CreateDatabaseInstanceRequest struct {
	// A DatabaseInstance represents a logical Postgres instance, comprised of
	// both compute and storage.
	// Wire name: 'database_instance'
	DatabaseInstance DatabaseInstance `json:"database_instance"`
}

Create a Database Instance

func (CreateDatabaseInstanceRequest) MarshalJSON added in v0.73.0

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

func (*CreateDatabaseInstanceRequest) UnmarshalJSON added in v0.73.0

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

type CreateDatabaseTableRequest

type CreateDatabaseTableRequest struct {
	// Next field marker: 13
	// Wire name: 'table'
	Table DatabaseTable `json:"table"`
}

Create a Database Table

func (CreateDatabaseTableRequest) MarshalJSON added in v0.73.0

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

func (*CreateDatabaseTableRequest) UnmarshalJSON added in v0.73.0

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

type CreateSyncedDatabaseTableRequest

type CreateSyncedDatabaseTableRequest struct {
	// Next field marker: 12
	// Wire name: 'synced_table'
	SyncedTable SyncedDatabaseTable `json:"synced_table"`
}

Create a Synced Database Table

func (CreateSyncedDatabaseTableRequest) MarshalJSON added in v0.73.0

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

func (*CreateSyncedDatabaseTableRequest) UnmarshalJSON added in v0.73.0

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

type DatabaseAPI

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

Database Instances provide access to a database via REST API or direct SQL.

func NewDatabase

func NewDatabase(client *client.DatabricksClient) *DatabaseAPI

func (*DatabaseAPI) CreateDatabaseCatalog

func (a *DatabaseAPI) CreateDatabaseCatalog(ctx context.Context, request CreateDatabaseCatalogRequest) (*DatabaseCatalog, error)

func (*DatabaseAPI) CreateDatabaseInstance

func (a *DatabaseAPI) CreateDatabaseInstance(ctx context.Context, request CreateDatabaseInstanceRequest) (*DatabaseInstance, error)

func (*DatabaseAPI) CreateDatabaseTable

func (a *DatabaseAPI) CreateDatabaseTable(ctx context.Context, request CreateDatabaseTableRequest) (*DatabaseTable, error)

func (*DatabaseAPI) CreateSyncedDatabaseTable

func (a *DatabaseAPI) CreateSyncedDatabaseTable(ctx context.Context, request CreateSyncedDatabaseTableRequest) (*SyncedDatabaseTable, error)

func (*DatabaseAPI) DeleteDatabaseCatalog

func (a *DatabaseAPI) DeleteDatabaseCatalog(ctx context.Context, request DeleteDatabaseCatalogRequest) error

func (*DatabaseAPI) DeleteDatabaseCatalogByName

func (a *DatabaseAPI) DeleteDatabaseCatalogByName(ctx context.Context, name string) error

Delete a Database Catalog.

func (*DatabaseAPI) DeleteDatabaseInstance

func (a *DatabaseAPI) DeleteDatabaseInstance(ctx context.Context, request DeleteDatabaseInstanceRequest) error

func (*DatabaseAPI) DeleteDatabaseInstanceByName

func (a *DatabaseAPI) DeleteDatabaseInstanceByName(ctx context.Context, name string) error

Delete a Database Instance.

func (*DatabaseAPI) DeleteDatabaseTable

func (a *DatabaseAPI) DeleteDatabaseTable(ctx context.Context, request DeleteDatabaseTableRequest) error

func (*DatabaseAPI) DeleteDatabaseTableByName

func (a *DatabaseAPI) DeleteDatabaseTableByName(ctx context.Context, name string) error

Delete a Database Table.

func (*DatabaseAPI) DeleteSyncedDatabaseTable

func (a *DatabaseAPI) DeleteSyncedDatabaseTable(ctx context.Context, request DeleteSyncedDatabaseTableRequest) error

func (*DatabaseAPI) DeleteSyncedDatabaseTableByName

func (a *DatabaseAPI) DeleteSyncedDatabaseTableByName(ctx context.Context, name string) error

Delete a Synced Database Table.

func (*DatabaseAPI) FindDatabaseInstanceByUid

func (a *DatabaseAPI) FindDatabaseInstanceByUid(ctx context.Context, request FindDatabaseInstanceByUidRequest) (*DatabaseInstance, error)

func (*DatabaseAPI) GenerateDatabaseCredential

func (a *DatabaseAPI) GenerateDatabaseCredential(ctx context.Context, request GenerateDatabaseCredentialRequest) (*DatabaseCredential, error)

func (*DatabaseAPI) GetDatabaseCatalog

func (a *DatabaseAPI) GetDatabaseCatalog(ctx context.Context, request GetDatabaseCatalogRequest) (*DatabaseCatalog, error)

func (*DatabaseAPI) GetDatabaseCatalogByName

func (a *DatabaseAPI) GetDatabaseCatalogByName(ctx context.Context, name string) (*DatabaseCatalog, error)

Get a Database Catalog.

func (*DatabaseAPI) GetDatabaseInstance

func (a *DatabaseAPI) GetDatabaseInstance(ctx context.Context, request GetDatabaseInstanceRequest) (*DatabaseInstance, error)

func (*DatabaseAPI) GetDatabaseInstanceByName

func (a *DatabaseAPI) GetDatabaseInstanceByName(ctx context.Context, name string) (*DatabaseInstance, error)

Get a Database Instance.

func (*DatabaseAPI) GetDatabaseTable

func (a *DatabaseAPI) GetDatabaseTable(ctx context.Context, request GetDatabaseTableRequest) (*DatabaseTable, error)

func (*DatabaseAPI) GetDatabaseTableByName

func (a *DatabaseAPI) GetDatabaseTableByName(ctx context.Context, name string) (*DatabaseTable, error)

Get a Database Table.

func (*DatabaseAPI) GetSyncedDatabaseTable

func (a *DatabaseAPI) GetSyncedDatabaseTable(ctx context.Context, request GetSyncedDatabaseTableRequest) (*SyncedDatabaseTable, error)

func (*DatabaseAPI) GetSyncedDatabaseTableByName

func (a *DatabaseAPI) GetSyncedDatabaseTableByName(ctx context.Context, name string) (*SyncedDatabaseTable, error)

Get a Synced Database Table.

func (*DatabaseAPI) ListDatabaseInstances

func (a *DatabaseAPI) ListDatabaseInstances(ctx context.Context, request ListDatabaseInstancesRequest) listing.Iterator[DatabaseInstance]

List Database Instances.

func (*DatabaseAPI) ListDatabaseInstancesAll

func (a *DatabaseAPI) ListDatabaseInstancesAll(ctx context.Context, request ListDatabaseInstancesRequest) ([]DatabaseInstance, error)

List Database Instances.

func (*DatabaseAPI) UpdateDatabaseInstance

func (a *DatabaseAPI) UpdateDatabaseInstance(ctx context.Context, request UpdateDatabaseInstanceRequest) (*DatabaseInstance, error)

type DatabaseCatalog

type DatabaseCatalog struct {

	// Wire name: 'create_database_if_not_exists'
	CreateDatabaseIfNotExists bool `json:"create_database_if_not_exists,omitempty"`
	// The name of the DatabaseInstance housing the database.
	// Wire name: 'database_instance_name'
	DatabaseInstanceName string `json:"database_instance_name"`
	// The name of the database (in a instance) associated with the catalog.
	// Wire name: 'database_name'
	DatabaseName string `json:"database_name"`
	// The name of the catalog in UC.
	// Wire name: 'name'
	Name string `json:"name"`

	// Wire name: 'uid'
	Uid string `json:"uid,omitempty"`

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

func (DatabaseCatalog) MarshalJSON

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

func (*DatabaseCatalog) UnmarshalJSON

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

type DatabaseCredential

type DatabaseCredential struct {

	// Wire name: 'expiration_time'
	ExpirationTime string `json:"expiration_time,omitempty"`

	// Wire name: 'token'
	Token string `json:"token,omitempty"`

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

func (DatabaseCredential) MarshalJSON

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

func (*DatabaseCredential) UnmarshalJSON

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

type DatabaseInstance

type DatabaseInstance struct {
	// The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8".
	// Wire name: 'capacity'
	Capacity string `json:"capacity,omitempty"`
	// The timestamp when the instance was created.
	// Wire name: 'creation_time'
	CreationTime string `json:"creation_time,omitempty"`
	// The email of the creator of the instance.
	// Wire name: 'creator'
	Creator string `json:"creator,omitempty"`
	// xref AIP-129. `stopped` is owned by the client, while `effective_stopped`
	// is owned by the server. `stopped` will only be set in Create/Update
	// response messages if and only if the user provides the field via the
	// request. `effective_stopped` on the other hand will always bet set in all
	// response messages (Create/Update/Get/List).
	// Wire name: 'effective_stopped'
	EffectiveStopped bool `json:"effective_stopped,omitempty"`
	// The name of the instance. This is the unique identifier for the instance.
	// Wire name: 'name'
	Name string `json:"name"`
	// The version of Postgres running on the instance.
	// Wire name: 'pg_version'
	PgVersion string `json:"pg_version,omitempty"`
	// The DNS endpoint to connect to the instance for read+write access.
	// Wire name: 'read_write_dns'
	ReadWriteDns string `json:"read_write_dns,omitempty"`
	// The current state of the instance.
	// Wire name: 'state'
	State DatabaseInstanceState `json:"state,omitempty"`
	// Whether the instance is stopped.
	// Wire name: 'stopped'
	Stopped bool `json:"stopped,omitempty"`
	// An immutable UUID identifier for the instance.
	// Wire name: 'uid'
	Uid string `json:"uid,omitempty"`

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

A DatabaseInstance represents a logical Postgres instance, comprised of both compute and storage.

func (DatabaseInstance) MarshalJSON

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

func (*DatabaseInstance) UnmarshalJSON

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

type DatabaseInstanceState

type DatabaseInstanceState string
const DatabaseInstanceStateAvailable DatabaseInstanceState = `AVAILABLE`
const DatabaseInstanceStateDeleting DatabaseInstanceState = `DELETING`
const DatabaseInstanceStateFailingOver DatabaseInstanceState = `FAILING_OVER`
const DatabaseInstanceStateStarting DatabaseInstanceState = `STARTING`
const DatabaseInstanceStateStopped DatabaseInstanceState = `STOPPED`
const DatabaseInstanceStateUpdating DatabaseInstanceState = `UPDATING`

func (*DatabaseInstanceState) Set

Set raw string value and validate it against allowed values

func (*DatabaseInstanceState) String

func (f *DatabaseInstanceState) String() string

String representation for fmt.Print

func (*DatabaseInstanceState) Type

func (f *DatabaseInstanceState) Type() string

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

func (*DatabaseInstanceState) Values

Values returns all possible values for DatabaseInstanceState.

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

type DatabaseInterface

type DatabaseInterface interface {

	// Create a Database Catalog.
	CreateDatabaseCatalog(ctx context.Context, request CreateDatabaseCatalogRequest) (*DatabaseCatalog, error)

	// Create a Database Instance.
	CreateDatabaseInstance(ctx context.Context, request CreateDatabaseInstanceRequest) (*DatabaseInstance, error)

	// Create a Database Table.
	CreateDatabaseTable(ctx context.Context, request CreateDatabaseTableRequest) (*DatabaseTable, error)

	// Create a Synced Database Table.
	CreateSyncedDatabaseTable(ctx context.Context, request CreateSyncedDatabaseTableRequest) (*SyncedDatabaseTable, error)

	// Delete a Database Catalog.
	DeleteDatabaseCatalog(ctx context.Context, request DeleteDatabaseCatalogRequest) error

	// Delete a Database Catalog.
	DeleteDatabaseCatalogByName(ctx context.Context, name string) error

	// Delete a Database Instance.
	DeleteDatabaseInstance(ctx context.Context, request DeleteDatabaseInstanceRequest) error

	// Delete a Database Instance.
	DeleteDatabaseInstanceByName(ctx context.Context, name string) error

	// Delete a Database Table.
	DeleteDatabaseTable(ctx context.Context, request DeleteDatabaseTableRequest) error

	// Delete a Database Table.
	DeleteDatabaseTableByName(ctx context.Context, name string) error

	// Delete a Synced Database Table.
	DeleteSyncedDatabaseTable(ctx context.Context, request DeleteSyncedDatabaseTableRequest) error

	// Delete a Synced Database Table.
	DeleteSyncedDatabaseTableByName(ctx context.Context, name string) error

	// Find a Database Instance by uid.
	FindDatabaseInstanceByUid(ctx context.Context, request FindDatabaseInstanceByUidRequest) (*DatabaseInstance, error)

	// Generates a credential that can be used to access database instances.
	GenerateDatabaseCredential(ctx context.Context, request GenerateDatabaseCredentialRequest) (*DatabaseCredential, error)

	// Get a Database Catalog.
	GetDatabaseCatalog(ctx context.Context, request GetDatabaseCatalogRequest) (*DatabaseCatalog, error)

	// Get a Database Catalog.
	GetDatabaseCatalogByName(ctx context.Context, name string) (*DatabaseCatalog, error)

	// Get a Database Instance.
	GetDatabaseInstance(ctx context.Context, request GetDatabaseInstanceRequest) (*DatabaseInstance, error)

	// Get a Database Instance.
	GetDatabaseInstanceByName(ctx context.Context, name string) (*DatabaseInstance, error)

	// Get a Database Table.
	GetDatabaseTable(ctx context.Context, request GetDatabaseTableRequest) (*DatabaseTable, error)

	// Get a Database Table.
	GetDatabaseTableByName(ctx context.Context, name string) (*DatabaseTable, error)

	// Get a Synced Database Table.
	GetSyncedDatabaseTable(ctx context.Context, request GetSyncedDatabaseTableRequest) (*SyncedDatabaseTable, error)

	// Get a Synced Database Table.
	GetSyncedDatabaseTableByName(ctx context.Context, name string) (*SyncedDatabaseTable, error)

	// List Database Instances.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListDatabaseInstances(ctx context.Context, request ListDatabaseInstancesRequest) listing.Iterator[DatabaseInstance]

	// List Database Instances.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListDatabaseInstancesAll(ctx context.Context, request ListDatabaseInstancesRequest) ([]DatabaseInstance, error)

	// Update a Database Instance.
	UpdateDatabaseInstance(ctx context.Context, request UpdateDatabaseInstanceRequest) (*DatabaseInstance, error)
}

type DatabaseService deprecated

type DatabaseService interface {

	// Create a Database Catalog.
	CreateDatabaseCatalog(ctx context.Context, request CreateDatabaseCatalogRequest) (*DatabaseCatalog, error)

	// Create a Database Instance.
	CreateDatabaseInstance(ctx context.Context, request CreateDatabaseInstanceRequest) (*DatabaseInstance, error)

	// Create a Database Table.
	CreateDatabaseTable(ctx context.Context, request CreateDatabaseTableRequest) (*DatabaseTable, error)

	// Create a Synced Database Table.
	CreateSyncedDatabaseTable(ctx context.Context, request CreateSyncedDatabaseTableRequest) (*SyncedDatabaseTable, error)

	// Delete a Database Catalog.
	DeleteDatabaseCatalog(ctx context.Context, request DeleteDatabaseCatalogRequest) error

	// Delete a Database Instance.
	DeleteDatabaseInstance(ctx context.Context, request DeleteDatabaseInstanceRequest) error

	// Delete a Database Table.
	DeleteDatabaseTable(ctx context.Context, request DeleteDatabaseTableRequest) error

	// Delete a Synced Database Table.
	DeleteSyncedDatabaseTable(ctx context.Context, request DeleteSyncedDatabaseTableRequest) error

	// Find a Database Instance by uid.
	FindDatabaseInstanceByUid(ctx context.Context, request FindDatabaseInstanceByUidRequest) (*DatabaseInstance, error)

	// Generates a credential that can be used to access database instances.
	GenerateDatabaseCredential(ctx context.Context, request GenerateDatabaseCredentialRequest) (*DatabaseCredential, error)

	// Get a Database Catalog.
	GetDatabaseCatalog(ctx context.Context, request GetDatabaseCatalogRequest) (*DatabaseCatalog, error)

	// Get a Database Instance.
	GetDatabaseInstance(ctx context.Context, request GetDatabaseInstanceRequest) (*DatabaseInstance, error)

	// Get a Database Table.
	GetDatabaseTable(ctx context.Context, request GetDatabaseTableRequest) (*DatabaseTable, error)

	// Get a Synced Database Table.
	GetSyncedDatabaseTable(ctx context.Context, request GetSyncedDatabaseTableRequest) (*SyncedDatabaseTable, error)

	// List Database Instances.
	ListDatabaseInstances(ctx context.Context, request ListDatabaseInstancesRequest) (*ListDatabaseInstancesResponse, error)

	// Update a Database Instance.
	UpdateDatabaseInstance(ctx context.Context, request UpdateDatabaseInstanceRequest) (*DatabaseInstance, error)
}

Database Instances provide access to a database via REST API or direct SQL.

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

type DatabaseTable

type DatabaseTable struct {
	// Name of the target database instance. This is required when creating
	// database tables in standard catalogs. This is optional when creating
	// database tables in registered catalogs. If this field is specified when
	// creating database tables in registered catalogs, the database instance
	// name MUST match that of the registered catalog (or the request will be
	// rejected).
	// Wire name: 'database_instance_name'
	DatabaseInstanceName string `json:"database_instance_name,omitempty"`
	// Target Postgres database object (logical database) name for this table.
	// This field is optional in all scenarios.
	//
	// When creating a table in a registered Postgres catalog, the target
	// Postgres database name is inferred to be that of the registered catalog.
	// If this field is specified in this scenario, the Postgres database name
	// MUST match that of the registered catalog (or the request will be
	// rejected).
	//
	// When creating a table in a standard catalog, the target database name is
	// inferred to be that of the standard catalog. In this scenario, specifying
	// this field will allow targeting an arbitrary postgres database. Note that
	// this has implications for the `create_database_objects_is_missing` field
	// in `spec`.
	// Wire name: 'logical_database_name'
	LogicalDatabaseName string `json:"logical_database_name,omitempty"`
	// Full three-part (catalog, schema, table) name of the table.
	// Wire name: 'name'
	Name string `json:"name"`

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

Next field marker: 13

func (DatabaseTable) MarshalJSON

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

func (*DatabaseTable) UnmarshalJSON

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

type DeleteDatabaseCatalogRequest

type DeleteDatabaseCatalogRequest struct {
	Name string `json:"-" tf:"-"`
}

Delete a Database Catalog

func (DeleteDatabaseCatalogRequest) MarshalJSON added in v0.73.0

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

func (*DeleteDatabaseCatalogRequest) UnmarshalJSON added in v0.73.0

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

type DeleteDatabaseCatalogResponse

type DeleteDatabaseCatalogResponse struct {
}

func (DeleteDatabaseCatalogResponse) MarshalJSON added in v0.73.0

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

func (*DeleteDatabaseCatalogResponse) UnmarshalJSON added in v0.73.0

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

type DeleteDatabaseInstanceRequest

type DeleteDatabaseInstanceRequest struct {
	// By default, a instance cannot be deleted if it has descendant instances
	// created via PITR. If this flag is specified as true, all descendent
	// instances will be deleted as well.
	Force bool `json:"-" tf:"-"`
	// Name of the instance to delete.
	Name string `json:"-" tf:"-"`
	// Note purge=false is in development. If false, the database instance is
	// soft deleted (implementation pending). Soft deleted instances behave as
	// if they are deleted, and cannot be used for CRUD operations nor connected
	// to. However they can be undeleted by calling the undelete API for a
	// limited time (implementation pending). If true, the database instance is
	// hard deleted and cannot be undeleted. For the time being, setting this
	// value to true is required to delete an instance (soft delete is not yet
	// supported).
	Purge bool `json:"-" tf:"-"`

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

Delete a Database Instance

func (DeleteDatabaseInstanceRequest) MarshalJSON

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

func (*DeleteDatabaseInstanceRequest) UnmarshalJSON

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

type DeleteDatabaseInstanceResponse

type DeleteDatabaseInstanceResponse struct {
}

func (DeleteDatabaseInstanceResponse) MarshalJSON added in v0.73.0

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

func (*DeleteDatabaseInstanceResponse) UnmarshalJSON added in v0.73.0

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

type DeleteDatabaseTableRequest

type DeleteDatabaseTableRequest struct {
	Name string `json:"-" tf:"-"`
}

Delete a Database Table

func (DeleteDatabaseTableRequest) MarshalJSON added in v0.73.0

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

func (*DeleteDatabaseTableRequest) UnmarshalJSON added in v0.73.0

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

type DeleteDatabaseTableResponse

type DeleteDatabaseTableResponse struct {
}

func (DeleteDatabaseTableResponse) MarshalJSON added in v0.73.0

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

func (*DeleteDatabaseTableResponse) UnmarshalJSON added in v0.73.0

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

type DeleteSyncedDatabaseTableRequest

type DeleteSyncedDatabaseTableRequest struct {
	Name string `json:"-" tf:"-"`
}

Delete a Synced Database Table

func (DeleteSyncedDatabaseTableRequest) MarshalJSON added in v0.73.0

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

func (*DeleteSyncedDatabaseTableRequest) UnmarshalJSON added in v0.73.0

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

type DeleteSyncedDatabaseTableResponse

type DeleteSyncedDatabaseTableResponse struct {
}

func (DeleteSyncedDatabaseTableResponse) MarshalJSON added in v0.73.0

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

func (*DeleteSyncedDatabaseTableResponse) UnmarshalJSON added in v0.73.0

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

type FindDatabaseInstanceByUidRequest

type FindDatabaseInstanceByUidRequest struct {
	// UID of the cluster to get.
	Uid string `json:"-" tf:"-"`

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

Find a Database Instance by uid

func (FindDatabaseInstanceByUidRequest) MarshalJSON

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

func (*FindDatabaseInstanceByUidRequest) UnmarshalJSON

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

type GenerateDatabaseCredentialRequest

type GenerateDatabaseCredentialRequest struct {
	// Instances to which the token will be scoped.
	// Wire name: 'instance_names'
	InstanceNames []string `json:"instance_names,omitempty"`

	// Wire name: 'request_id'
	RequestId string `json:"request_id,omitempty"`

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

Generates a credential that can be used to access database instances

func (GenerateDatabaseCredentialRequest) MarshalJSON

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

func (*GenerateDatabaseCredentialRequest) UnmarshalJSON

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

type GetDatabaseCatalogRequest

type GetDatabaseCatalogRequest struct {
	Name string `json:"-" tf:"-"`
}

Get a Database Catalog

func (GetDatabaseCatalogRequest) MarshalJSON added in v0.73.0

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

func (*GetDatabaseCatalogRequest) UnmarshalJSON added in v0.73.0

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

type GetDatabaseInstanceRequest

type GetDatabaseInstanceRequest struct {
	// Name of the cluster to get.
	Name string `json:"-" tf:"-"`
}

Get a Database Instance

func (GetDatabaseInstanceRequest) MarshalJSON added in v0.73.0

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

func (*GetDatabaseInstanceRequest) UnmarshalJSON added in v0.73.0

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

type GetDatabaseTableRequest

type GetDatabaseTableRequest struct {
	Name string `json:"-" tf:"-"`
}

Get a Database Table

func (GetDatabaseTableRequest) MarshalJSON added in v0.73.0

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

func (*GetDatabaseTableRequest) UnmarshalJSON added in v0.73.0

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

type GetSyncedDatabaseTableRequest

type GetSyncedDatabaseTableRequest struct {
	Name string `json:"-" tf:"-"`
}

Get a Synced Database Table

func (GetSyncedDatabaseTableRequest) MarshalJSON added in v0.73.0

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

func (*GetSyncedDatabaseTableRequest) UnmarshalJSON added in v0.73.0

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

type ListDatabaseInstancesRequest

type ListDatabaseInstancesRequest struct {
	// Upper bound for items returned.
	PageSize int `json:"-" tf:"-"`
	// Pagination token to go to the next page of Database Instances. Requests
	// first page if absent.
	PageToken string `json:"-" tf:"-"`

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

List Database Instances

func (ListDatabaseInstancesRequest) MarshalJSON

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

func (*ListDatabaseInstancesRequest) UnmarshalJSON

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

type ListDatabaseInstancesResponse

type ListDatabaseInstancesResponse struct {
	// List of instances.
	// Wire name: 'database_instances'
	DatabaseInstances []DatabaseInstance `json:"database_instances,omitempty"`
	// Pagination token to request the next page of instances.
	// Wire name: 'next_page_token'
	NextPageToken string `json:"next_page_token,omitempty"`

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

func (ListDatabaseInstancesResponse) MarshalJSON

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

func (*ListDatabaseInstancesResponse) UnmarshalJSON

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

type NewPipelineSpec

type NewPipelineSpec struct {
	// UC catalog for the pipeline to store intermediate files (checkpoints,
	// event logs etc). This needs to be a standard catalog where the user has
	// permissions to create Delta tables.
	// Wire name: 'storage_catalog'
	StorageCatalog string `json:"storage_catalog,omitempty"`
	// UC schema for the pipeline to store intermediate files (checkpoints,
	// event logs etc). This needs to be in the standard catalog where the user
	// has permissions to create Delta tables.
	// Wire name: 'storage_schema'
	StorageSchema string `json:"storage_schema,omitempty"`

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

Custom fields that user can set for pipeline while creating SyncedDatabaseTable. Note that other fields of pipeline are still inferred by table def internally

func (NewPipelineSpec) MarshalJSON

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

func (*NewPipelineSpec) UnmarshalJSON

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

type ProvisioningInfoState

type ProvisioningInfoState string
const ProvisioningInfoStateActive ProvisioningInfoState = `ACTIVE`
const ProvisioningInfoStateDegraded ProvisioningInfoState = `DEGRADED`
const ProvisioningInfoStateDeleting ProvisioningInfoState = `DELETING`
const ProvisioningInfoStateFailed ProvisioningInfoState = `FAILED`
const ProvisioningInfoStateProvisioning ProvisioningInfoState = `PROVISIONING`
const ProvisioningInfoStateUpdating ProvisioningInfoState = `UPDATING`

func (*ProvisioningInfoState) Set

Set raw string value and validate it against allowed values

func (*ProvisioningInfoState) String

func (f *ProvisioningInfoState) String() string

String representation for fmt.Print

func (*ProvisioningInfoState) Type

func (f *ProvisioningInfoState) Type() string

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

func (*ProvisioningInfoState) Values

Values returns all possible values for ProvisioningInfoState.

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

type SyncedDatabaseTable

type SyncedDatabaseTable struct {
	// Synced Table data synchronization status
	// Wire name: 'data_synchronization_status'
	DataSynchronizationStatus *SyncedTableStatus `json:"data_synchronization_status,omitempty"`
	// Name of the target database instance. This is required when creating
	// synced database tables in standard catalogs. This is optional when
	// creating synced database tables in registered catalogs. If this field is
	// specified when creating synced database tables in registered catalogs,
	// the database instance name MUST match that of the registered catalog (or
	// the request will be rejected).
	// Wire name: 'database_instance_name'
	DatabaseInstanceName string `json:"database_instance_name,omitempty"`
	// Target Postgres database object (logical database) name for this table.
	// This field is optional in all scenarios.
	//
	// When creating a synced table in a registered Postgres catalog, the target
	// Postgres database name is inferred to be that of the registered catalog.
	// If this field is specified in this scenario, the Postgres database name
	// MUST match that of the registered catalog (or the request will be
	// rejected).
	//
	// When creating a synced table in a standard catalog, the target database
	// name is inferred to be that of the standard catalog. In this scenario,
	// specifying this field will allow targeting an arbitrary postgres
	// database.
	// Wire name: 'logical_database_name'
	LogicalDatabaseName string `json:"logical_database_name,omitempty"`
	// Full three-part (catalog, schema, table) name of the table.
	// Wire name: 'name'
	Name string `json:"name"`
	// Specification of a synced database table.
	// Wire name: 'spec'
	Spec *SyncedTableSpec `json:"spec,omitempty"`
	// The provisioning state of the synced table entity in Unity Catalog. This
	// is distinct from the state of the data synchronization pipeline (i.e. the
	// table may be in "ACTIVE" but the pipeline may be in "PROVISIONING" as it
	// runs asynchronously).
	// Wire name: 'unity_catalog_provisioning_state'
	UnityCatalogProvisioningState ProvisioningInfoState `json:"unity_catalog_provisioning_state,omitempty"`

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

Next field marker: 12

func (SyncedDatabaseTable) MarshalJSON

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

func (*SyncedDatabaseTable) UnmarshalJSON

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

type SyncedTableContinuousUpdateStatus

type SyncedTableContinuousUpdateStatus struct {
	// Progress of the initial data synchronization.
	// Wire name: 'initial_pipeline_sync_progress'
	InitialPipelineSyncProgress *SyncedTablePipelineProgress `json:"initial_pipeline_sync_progress,omitempty"`
	// The last source table Delta version that was synced to the synced table.
	// Note that this Delta version may not be completely synced to the synced
	// table yet.
	// Wire name: 'last_processed_commit_version'
	LastProcessedCommitVersion int64 `json:"last_processed_commit_version,omitempty"`
	// The timestamp of the last time any data was synchronized from the source
	// table to the synced table.
	// Wire name: 'timestamp'
	Timestamp string `json:"timestamp,omitempty"`

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

Detailed status of a synced table. Shown if the synced table is in the SYNCED_CONTINUOUS_UPDATE or the SYNCED_UPDATING_PIPELINE_RESOURCES state.

func (SyncedTableContinuousUpdateStatus) MarshalJSON

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

func (*SyncedTableContinuousUpdateStatus) UnmarshalJSON

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

type SyncedTableFailedStatus

type SyncedTableFailedStatus struct {
	// The last source table Delta version that was synced to the synced table.
	// Note that this Delta version may only be partially synced to the synced
	// table. Only populated if the table is still synced and available for
	// serving.
	// Wire name: 'last_processed_commit_version'
	LastProcessedCommitVersion int64 `json:"last_processed_commit_version,omitempty"`
	// The timestamp of the last time any data was synchronized from the source
	// table to the synced table. Only populated if the table is still synced
	// and available for serving.
	// Wire name: 'timestamp'
	Timestamp string `json:"timestamp,omitempty"`

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

Detailed status of a synced table. Shown if the synced table is in the OFFLINE_FAILED or the SYNCED_PIPELINE_FAILED state.

func (SyncedTableFailedStatus) MarshalJSON

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

func (*SyncedTableFailedStatus) UnmarshalJSON

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

type SyncedTablePipelineProgress

type SyncedTablePipelineProgress struct {
	// The estimated time remaining to complete this update in seconds.
	// Wire name: 'estimated_completion_time_seconds'
	EstimatedCompletionTimeSeconds float64 `json:"estimated_completion_time_seconds,omitempty"`
	// The source table Delta version that was last processed by the pipeline.
	// The pipeline may not have completely processed this version yet.
	// Wire name: 'latest_version_currently_processing'
	LatestVersionCurrentlyProcessing int64 `json:"latest_version_currently_processing,omitempty"`
	// The completion ratio of this update. This is a number between 0 and 1.
	// Wire name: 'sync_progress_completion'
	SyncProgressCompletion float64 `json:"sync_progress_completion,omitempty"`
	// The number of rows that have been synced in this update.
	// Wire name: 'synced_row_count'
	SyncedRowCount int64 `json:"synced_row_count,omitempty"`
	// The total number of rows that need to be synced in this update. This
	// number may be an estimate.
	// Wire name: 'total_row_count'
	TotalRowCount int64 `json:"total_row_count,omitempty"`

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

Progress information of the Synced Table data synchronization pipeline.

func (SyncedTablePipelineProgress) MarshalJSON

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

func (*SyncedTablePipelineProgress) UnmarshalJSON

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

type SyncedTableProvisioningStatus

type SyncedTableProvisioningStatus struct {
	// Details about initial data synchronization. Only populated when in the
	// PROVISIONING_INITIAL_SNAPSHOT state.
	// Wire name: 'initial_pipeline_sync_progress'
	InitialPipelineSyncProgress *SyncedTablePipelineProgress `json:"initial_pipeline_sync_progress,omitempty"`
}

Detailed status of a synced table. Shown if the synced table is in the PROVISIONING_PIPELINE_RESOURCES or the PROVISIONING_INITIAL_SNAPSHOT state.

func (SyncedTableProvisioningStatus) MarshalJSON added in v0.73.0

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

func (*SyncedTableProvisioningStatus) UnmarshalJSON added in v0.73.0

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

type SyncedTableSchedulingPolicy

type SyncedTableSchedulingPolicy string
const SyncedTableSchedulingPolicyContinuous SyncedTableSchedulingPolicy = `CONTINUOUS`
const SyncedTableSchedulingPolicySnapshot SyncedTableSchedulingPolicy = `SNAPSHOT`
const SyncedTableSchedulingPolicyTriggered SyncedTableSchedulingPolicy = `TRIGGERED`

func (*SyncedTableSchedulingPolicy) Set

Set raw string value and validate it against allowed values

func (*SyncedTableSchedulingPolicy) String

func (f *SyncedTableSchedulingPolicy) String() string

String representation for fmt.Print

func (*SyncedTableSchedulingPolicy) Type

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

func (*SyncedTableSchedulingPolicy) Values

Values returns all possible values for SyncedTableSchedulingPolicy.

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

type SyncedTableSpec

type SyncedTableSpec struct {
	// If true, the synced table's logical database and schema resources in PG
	// will be created if they do not already exist.
	// Wire name: 'create_database_objects_if_missing'
	CreateDatabaseObjectsIfMissing bool `json:"create_database_objects_if_missing,omitempty"`
	// User-specified ID of a pre-existing pipeline to bin pack. This field is
	// optional, and should be empty if new_pipeline_spec is set. This field
	// will only be set by the server in response messages if it is specified in
	// the request. The SyncedTableStatus message will always contain the
	// effective pipeline ID (either client provided or server generated),
	// however.
	// Wire name: 'existing_pipeline_id'
	ExistingPipelineId string `json:"existing_pipeline_id,omitempty"`
	// Spec of new pipeline. Should be empty if pipeline_id /
	// existing_pipeline_id is set
	// Wire name: 'new_pipeline_spec'
	NewPipelineSpec *NewPipelineSpec `json:"new_pipeline_spec,omitempty"`
	// Primary Key columns to be used for data insert/update in the destination.
	// Wire name: 'primary_key_columns'
	PrimaryKeyColumns []string `json:"primary_key_columns,omitempty"`
	// Scheduling policy of the underlying pipeline.
	// Wire name: 'scheduling_policy'
	SchedulingPolicy SyncedTableSchedulingPolicy `json:"scheduling_policy,omitempty"`
	// Three-part (catalog, schema, table) name of the source Delta table.
	// Wire name: 'source_table_full_name'
	SourceTableFullName string `json:"source_table_full_name,omitempty"`
	// Time series key to deduplicate (tie-break) rows with the same primary
	// key.
	// Wire name: 'timeseries_key'
	TimeseriesKey string `json:"timeseries_key,omitempty"`

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

Specification of a synced database table.

func (SyncedTableSpec) MarshalJSON

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

func (*SyncedTableSpec) UnmarshalJSON

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

type SyncedTableState

type SyncedTableState string

The state of a synced table.

const SyncedTableStateSyncedTableOfflineFailed SyncedTableState = `SYNCED_TABLE_OFFLINE_FAILED`
const SyncedTableStateSyncedTableOnline SyncedTableState = `SYNCED_TABLE_ONLINE`
const SyncedTableStateSyncedTableOnlineContinuousUpdate SyncedTableState = `SYNCED_TABLE_ONLINE_CONTINUOUS_UPDATE`
const SyncedTableStateSyncedTableOnlineNoPendingUpdate SyncedTableState = `SYNCED_TABLE_ONLINE_NO_PENDING_UPDATE`
const SyncedTableStateSyncedTableOnlinePipelineFailed SyncedTableState = `SYNCED_TABLE_ONLINE_PIPELINE_FAILED`
const SyncedTableStateSyncedTableOnlineTriggeredUpdate SyncedTableState = `SYNCED_TABLE_ONLINE_TRIGGERED_UPDATE`
const SyncedTableStateSyncedTableOnlineUpdatingPipelineResources SyncedTableState = `SYNCED_TABLE_ONLINE_UPDATING_PIPELINE_RESOURCES`
const SyncedTableStateSyncedTableProvisioning SyncedTableState = `SYNCED_TABLE_PROVISIONING`
const SyncedTableStateSyncedTableProvisioningInitialSnapshot SyncedTableState = `SYNCED_TABLE_PROVISIONING_INITIAL_SNAPSHOT`
const SyncedTableStateSyncedTableProvisioningPipelineResources SyncedTableState = `SYNCED_TABLE_PROVISIONING_PIPELINE_RESOURCES`
const SyncedTableStateSyncedTabledOffline SyncedTableState = `SYNCED_TABLED_OFFLINE`

func (*SyncedTableState) Set

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

Set raw string value and validate it against allowed values

func (*SyncedTableState) String

func (f *SyncedTableState) String() string

String representation for fmt.Print

func (*SyncedTableState) Type

func (f *SyncedTableState) Type() string

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

func (*SyncedTableState) Values

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

Values returns all possible values for SyncedTableState.

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

type SyncedTableStatus

type SyncedTableStatus struct {
	// Detailed status of a synced table. Shown if the synced table is in the
	// SYNCED_CONTINUOUS_UPDATE or the SYNCED_UPDATING_PIPELINE_RESOURCES state.
	// Wire name: 'continuous_update_status'
	ContinuousUpdateStatus *SyncedTableContinuousUpdateStatus `json:"continuous_update_status,omitempty"`
	// The state of the synced table.
	// Wire name: 'detailed_state'
	DetailedState SyncedTableState `json:"detailed_state,omitempty"`
	// Detailed status of a synced table. Shown if the synced table is in the
	// OFFLINE_FAILED or the SYNCED_PIPELINE_FAILED state.
	// Wire name: 'failed_status'
	FailedStatus *SyncedTableFailedStatus `json:"failed_status,omitempty"`
	// A text description of the current state of the synced table.
	// Wire name: 'message'
	Message string `json:"message,omitempty"`
	// ID of the associated pipeline. The pipeline ID may have been provided by
	// the client (in the case of bin packing), or generated by the server (when
	// creating a new pipeline).
	// Wire name: 'pipeline_id'
	PipelineId string `json:"pipeline_id,omitempty"`
	// Detailed status of a synced table. Shown if the synced table is in the
	// PROVISIONING_PIPELINE_RESOURCES or the PROVISIONING_INITIAL_SNAPSHOT
	// state.
	// Wire name: 'provisioning_status'
	ProvisioningStatus *SyncedTableProvisioningStatus `json:"provisioning_status,omitempty"`
	// Detailed status of a synced table. Shown if the synced table is in the
	// SYNCED_TRIGGERED_UPDATE or the SYNCED_NO_PENDING_UPDATE state.
	// Wire name: 'triggered_update_status'
	TriggeredUpdateStatus *SyncedTableTriggeredUpdateStatus `json:"triggered_update_status,omitempty"`

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

Status of a synced table.

func (SyncedTableStatus) MarshalJSON

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

func (*SyncedTableStatus) UnmarshalJSON

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

type SyncedTableTriggeredUpdateStatus

type SyncedTableTriggeredUpdateStatus struct {
	// The last source table Delta version that was synced to the synced table.
	// Note that this Delta version may not be completely synced to the synced
	// table yet.
	// Wire name: 'last_processed_commit_version'
	LastProcessedCommitVersion int64 `json:"last_processed_commit_version,omitempty"`
	// The timestamp of the last time any data was synchronized from the source
	// table to the synced table.
	// Wire name: 'timestamp'
	Timestamp string `json:"timestamp,omitempty"`
	// Progress of the active data synchronization pipeline.
	// Wire name: 'triggered_update_progress'
	TriggeredUpdateProgress *SyncedTablePipelineProgress `json:"triggered_update_progress,omitempty"`

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

Detailed status of a synced table. Shown if the synced table is in the SYNCED_TRIGGERED_UPDATE or the SYNCED_NO_PENDING_UPDATE state.

func (SyncedTableTriggeredUpdateStatus) MarshalJSON

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

func (*SyncedTableTriggeredUpdateStatus) UnmarshalJSON

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

type UpdateDatabaseInstanceRequest

type UpdateDatabaseInstanceRequest struct {
	// A DatabaseInstance represents a logical Postgres instance, comprised of
	// both compute and storage.
	// Wire name: 'database_instance'
	DatabaseInstance DatabaseInstance `json:"database_instance"`
	// The name of the instance. This is the unique identifier for the instance.
	Name string `json:"-" tf:"-"`
	// The list of fields to update.
	UpdateMask string `json:"-" tf:"-"`
}

Update a Database Instance

func (UpdateDatabaseInstanceRequest) MarshalJSON added in v0.73.0

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

func (*UpdateDatabaseInstanceRequest) UnmarshalJSON added in v0.73.0

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

Jump to

Keyboard shortcuts

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