database

package
v0.81.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2025 License: Apache-2.0 Imports: 9 Imported by: 7

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 {
	Catalog DatabaseCatalog `json:"catalog"`
}

type CreateDatabaseInstanceRequest

type CreateDatabaseInstanceRequest struct {
	// Instance to create.
	DatabaseInstance DatabaseInstance `json:"database_instance"`
}

type CreateDatabaseInstanceRoleRequest added in v0.74.0

type CreateDatabaseInstanceRoleRequest struct {
	DatabaseInstanceRole DatabaseInstanceRole `json:"database_instance_role"`

	InstanceName string `json:"-" url:"-"`
}

type CreateDatabaseTableRequest

type CreateDatabaseTableRequest struct {
	Table DatabaseTable `json:"table"`
}

type CreateSyncedDatabaseTableRequest

type CreateSyncedDatabaseTableRequest struct {
	SyncedTable SyncedDatabaseTable `json:"synced_table"`
}

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, createDatabaseInstanceRequest CreateDatabaseInstanceRequest) (*WaitGetDatabaseInstanceDatabaseAvailable[DatabaseInstance], error)

Create a Database Instance.

func (*DatabaseAPI) CreateDatabaseInstanceAndWait deprecated added in v0.78.0

func (a *DatabaseAPI) CreateDatabaseInstanceAndWait(ctx context.Context, createDatabaseInstanceRequest CreateDatabaseInstanceRequest, options ...retries.Option[DatabaseInstance]) (*DatabaseInstance, error)

Calls DatabaseAPI.CreateDatabaseInstance and waits to reach AVAILABLE state

You can override the default timeout of 20 minutes by calling adding retries.Timeout[DatabaseInstance](60*time.Minute) functional option.

Deprecated: use DatabaseAPI.CreateDatabaseInstance.Get() or DatabaseAPI.WaitGetDatabaseInstanceDatabaseAvailable

func (*DatabaseAPI) CreateDatabaseInstanceRole added in v0.74.0

func (a *DatabaseAPI) CreateDatabaseInstanceRole(ctx context.Context, request CreateDatabaseInstanceRoleRequest) (*DatabaseInstanceRole, 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) DeleteDatabaseInstanceRole added in v0.74.0

func (a *DatabaseAPI) DeleteDatabaseInstanceRole(ctx context.Context, request DeleteDatabaseInstanceRoleRequest) error

func (*DatabaseAPI) DeleteDatabaseInstanceRoleByInstanceNameAndName added in v0.74.0

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

Deletes a role for 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) GetDatabaseInstanceRole added in v0.74.0

func (a *DatabaseAPI) GetDatabaseInstanceRole(ctx context.Context, request GetDatabaseInstanceRoleRequest) (*DatabaseInstanceRole, error)

func (*DatabaseAPI) GetDatabaseInstanceRoleByInstanceNameAndName added in v0.74.0

func (a *DatabaseAPI) GetDatabaseInstanceRoleByInstanceNameAndName(ctx context.Context, instanceName string, name string) (*DatabaseInstanceRole, error)

Gets a role for 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) ListDatabaseCatalogs added in v0.80.0

func (a *DatabaseAPI) ListDatabaseCatalogs(ctx context.Context, request ListDatabaseCatalogsRequest) listing.Iterator[DatabaseCatalog]

This API is currently unimplemented, but exposed for Terraform support.

func (*DatabaseAPI) ListDatabaseCatalogsAll added in v0.80.0

func (a *DatabaseAPI) ListDatabaseCatalogsAll(ctx context.Context, request ListDatabaseCatalogsRequest) ([]DatabaseCatalog, error)

This API is currently unimplemented, but exposed for Terraform support.

func (*DatabaseAPI) ListDatabaseCatalogsByInstanceName added in v0.80.0

func (a *DatabaseAPI) ListDatabaseCatalogsByInstanceName(ctx context.Context, instanceName string) (*ListDatabaseCatalogsResponse, error)

This API is currently unimplemented, but exposed for Terraform support.

func (*DatabaseAPI) ListDatabaseInstanceRoles added in v0.74.0

func (a *DatabaseAPI) ListDatabaseInstanceRoles(ctx context.Context, request ListDatabaseInstanceRolesRequest) listing.Iterator[DatabaseInstanceRole]

START OF PG ROLE APIs Section These APIs are marked a PUBLIC with stage < PUBLIC_PREVIEW. With more recent Lakebase V2 plans, we don't plan to ever advance these to PUBLIC_PREVIEW. These APIs will remain effectively undocumented/UI-only and we'll aim for a new public roles API as part of V2 PuPr.

func (*DatabaseAPI) ListDatabaseInstanceRolesAll added in v0.74.0

func (a *DatabaseAPI) ListDatabaseInstanceRolesAll(ctx context.Context, request ListDatabaseInstanceRolesRequest) ([]DatabaseInstanceRole, error)

START OF PG ROLE APIs Section These APIs are marked a PUBLIC with stage < PUBLIC_PREVIEW. With more recent Lakebase V2 plans, we don't plan to ever advance these to PUBLIC_PREVIEW. These APIs will remain effectively undocumented/UI-only and we'll aim for a new public roles API as part of V2 PuPr.

func (*DatabaseAPI) ListDatabaseInstanceRolesByInstanceName added in v0.74.0

func (a *DatabaseAPI) ListDatabaseInstanceRolesByInstanceName(ctx context.Context, instanceName string) (*ListDatabaseInstanceRolesResponse, error)

START OF PG ROLE APIs Section These APIs are marked a PUBLIC with stage < PUBLIC_PREVIEW. With more recent Lakebase V2 plans, we don't plan to ever advance these to PUBLIC_PREVIEW. These APIs will remain effectively undocumented/UI-only and we'll aim for a new public roles API as part of V2 PuPr.

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) ListSyncedDatabaseTables added in v0.80.0

func (a *DatabaseAPI) ListSyncedDatabaseTables(ctx context.Context, request ListSyncedDatabaseTablesRequest) listing.Iterator[SyncedDatabaseTable]

This API is currently unimplemented, but exposed for Terraform support.

func (*DatabaseAPI) ListSyncedDatabaseTablesAll added in v0.80.0

func (a *DatabaseAPI) ListSyncedDatabaseTablesAll(ctx context.Context, request ListSyncedDatabaseTablesRequest) ([]SyncedDatabaseTable, error)

This API is currently unimplemented, but exposed for Terraform support.

func (*DatabaseAPI) ListSyncedDatabaseTablesByInstanceName added in v0.80.0

func (a *DatabaseAPI) ListSyncedDatabaseTablesByInstanceName(ctx context.Context, instanceName string) (*ListSyncedDatabaseTablesResponse, error)

This API is currently unimplemented, but exposed for Terraform support.

func (*DatabaseAPI) UpdateDatabaseCatalog added in v0.80.0

func (a *DatabaseAPI) UpdateDatabaseCatalog(ctx context.Context, request UpdateDatabaseCatalogRequest) (*DatabaseCatalog, error)

func (*DatabaseAPI) UpdateDatabaseInstance

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

func (*DatabaseAPI) UpdateSyncedDatabaseTable added in v0.80.0

func (a *DatabaseAPI) UpdateSyncedDatabaseTable(ctx context.Context, request UpdateSyncedDatabaseTableRequest) (*SyncedDatabaseTable, error)

func (*DatabaseAPI) WaitGetDatabaseInstanceDatabaseAvailable added in v0.78.0

func (a *DatabaseAPI) WaitGetDatabaseInstanceDatabaseAvailable(ctx context.Context, name string,
	timeout time.Duration, callback func(*DatabaseInstance)) (*DatabaseInstance, error)

WaitGetDatabaseInstanceDatabaseAvailable repeatedly calls DatabaseAPI.GetDatabaseInstance and waits to reach AVAILABLE state

type DatabaseCatalog

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

	Uid string `json:"uid,omitempty"`

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

func (DatabaseCatalog) MarshalJSON

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

func (*DatabaseCatalog) UnmarshalJSON

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

type DatabaseCredential

type DatabaseCredential struct {
	ExpirationTime string `json:"expiration_time,omitempty"`

	Token string `json:"token,omitempty"`

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

func (DatabaseCredential) MarshalJSON

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

func (*DatabaseCredential) UnmarshalJSON

func (s *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".
	Capacity string `json:"capacity,omitempty"`
	// The refs of the child instances. This is only available if the instance
	// is parent instance.
	ChildInstanceRefs []DatabaseInstanceRef `json:"child_instance_refs,omitempty"`
	// The timestamp when the instance was created.
	CreationTime string `json:"creation_time,omitempty"`
	// The email of the creator of the instance.
	Creator string `json:"creator,omitempty"`
	// xref AIP-129. `enable_readable_secondaries` is owned by the client, while
	// `effective_enable_readable_secondaries` is owned by the server.
	// `enable_readable_secondaries` will only be set in Create/Update response
	// messages if and only if the user provides the field via the request.
	// `effective_enable_readable_secondaries` on the other hand will always bet
	// set in all response messages (Create/Update/Get/List).
	EffectiveEnableReadableSecondaries bool `json:"effective_enable_readable_secondaries,omitempty"`
	// xref AIP-129. `node_count` is owned by the client, while
	// `effective_node_count` is owned by the server. `node_count` will only be
	// set in Create/Update response messages if and only if the user provides
	// the field via the request. `effective_node_count` on the other hand will
	// always bet set in all response messages (Create/Update/Get/List).
	EffectiveNodeCount int `json:"effective_node_count,omitempty"`
	// xref AIP-129. `retention_window_in_days` is owned by the client, while
	// `effective_retention_window_in_days` is owned by the server.
	// `retention_window_in_days` will only be set in Create/Update response
	// messages if and only if the user provides the field via the request.
	// `effective_retention_window_in_days` on the other hand will always bet
	// set in all response messages (Create/Update/Get/List).
	EffectiveRetentionWindowInDays int `json:"effective_retention_window_in_days,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).
	EffectiveStopped bool `json:"effective_stopped,omitempty"`
	// Whether to enable secondaries to serve read-only traffic. Defaults to
	// false.
	EnableReadableSecondaries bool `json:"enable_readable_secondaries,omitempty"`
	// The name of the instance. This is the unique identifier for the instance.
	Name string `json:"name"`
	// The number of nodes in the instance, composed of 1 primary and 0 or more
	// secondaries. Defaults to 1 primary and 0 secondaries.
	NodeCount int `json:"node_count,omitempty"`
	// The ref of the parent instance. This is only available if the instance is
	// child instance. Input: For specifying the parent instance to create a
	// child instance. Optional. Output: Only populated if provided as input to
	// create a child instance.
	ParentInstanceRef *DatabaseInstanceRef `json:"parent_instance_ref,omitempty"`
	// The version of Postgres running on the instance.
	PgVersion string `json:"pg_version,omitempty"`
	// The DNS endpoint to connect to the instance for read only access. This is
	// only available if enable_readable_secondaries is true.
	ReadOnlyDns string `json:"read_only_dns,omitempty"`
	// The DNS endpoint to connect to the instance for read+write access.
	ReadWriteDns string `json:"read_write_dns,omitempty"`
	// The retention window for the instance. This is the time window in days
	// for which the historical data is retained. The default value is 7 days.
	// Valid values are 2 to 35 days.
	RetentionWindowInDays int `json:"retention_window_in_days,omitempty"`
	// The current state of the instance.
	State DatabaseInstanceState `json:"state,omitempty"`
	// Whether the instance is stopped.
	Stopped bool `json:"stopped,omitempty"`
	// An immutable UUID identifier for the instance.
	Uid string `json:"uid,omitempty"`

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

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

func (DatabaseInstance) MarshalJSON

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

func (*DatabaseInstance) UnmarshalJSON

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

type DatabaseInstanceRef added in v0.74.0

type DatabaseInstanceRef struct {
	// Branch time of the ref database instance. For a parent ref instance, this
	// is the point in time on the parent instance from which the instance was
	// created. For a child ref instance, this is the point in time on the
	// instance from which the child instance was created. Input: For specifying
	// the point in time to create a child instance. Optional. Output: Only
	// populated if provided as input to create a child instance.
	BranchTime string `json:"branch_time,omitempty"`
	// xref AIP-129. `lsn` is owned by the client, while `effective_lsn` is
	// owned by the server. `lsn` will only be set in Create/Update response
	// messages if and only if the user provides the field via the request.
	// `effective_lsn` on the other hand will always bet set in all response
	// messages (Create/Update/Get/List). For a parent ref instance, this is the
	// LSN on the parent instance from which the instance was created. For a
	// child ref instance, this is the LSN on the instance from which the child
	// instance was created.
	EffectiveLsn string `json:"effective_lsn,omitempty"`
	// User-specified WAL LSN of the ref database instance.
	//
	// Input: For specifying the WAL LSN to create a child instance. Optional.
	// Output: Only populated if provided as input to create a child instance.
	Lsn string `json:"lsn,omitempty"`
	// Name of the ref database instance.
	Name string `json:"name,omitempty"`
	// Id of the ref database instance.
	Uid string `json:"uid,omitempty"`

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

DatabaseInstanceRef is a reference to a database instance. It is used in the DatabaseInstance object to refer to the parent instance of an instance and to refer the child instances of an instance. To specify as a parent instance during creation of an instance, the lsn and branch_time fields are optional. If not specified, the child instance will be created from the latest lsn of the parent. If both lsn and branch_time are specified, the lsn will be used to create the child instance.

func (DatabaseInstanceRef) MarshalJSON added in v0.74.0

func (s DatabaseInstanceRef) MarshalJSON() ([]byte, error)

func (*DatabaseInstanceRef) UnmarshalJSON added in v0.74.0

func (s *DatabaseInstanceRef) UnmarshalJSON(b []byte) error

type DatabaseInstanceRole added in v0.74.0

type DatabaseInstanceRole struct {
	// API-exposed Postgres role attributes
	Attributes *DatabaseInstanceRoleAttributes `json:"attributes,omitempty"`
	// The type of the role.
	IdentityType DatabaseInstanceRoleIdentityType `json:"identity_type,omitempty"`
	// An enum value for a standard role that this role is a member of.
	MembershipRole DatabaseInstanceRoleMembershipRole `json:"membership_role,omitempty"`
	// The name of the role. This is the unique identifier for the role in an
	// instance.
	Name string `json:"name,omitempty"`

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

A DatabaseInstanceRole represents a Postgres role in a database instance.

func (DatabaseInstanceRole) MarshalJSON added in v0.74.0

func (s DatabaseInstanceRole) MarshalJSON() ([]byte, error)

func (*DatabaseInstanceRole) UnmarshalJSON added in v0.74.0

func (s *DatabaseInstanceRole) UnmarshalJSON(b []byte) error

type DatabaseInstanceRoleAttributes added in v0.74.0

type DatabaseInstanceRoleAttributes struct {
	Bypassrls bool `json:"bypassrls,omitempty"`

	Createdb bool `json:"createdb,omitempty"`

	Createrole bool `json:"createrole,omitempty"`

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

Attributes that can be granted to a Postgres role. We are only implementing a subset for now, see xref: https://www.postgresql.org/docs/16/sql-createrole.html The values follow Postgres keyword naming e.g. CREATEDB, BYPASSRLS, etc. which is why they don't include typical underscores between words. We were requested to make this a nested object/struct representation since these are knobs from an external spec.

func (DatabaseInstanceRoleAttributes) MarshalJSON added in v0.74.0

func (s DatabaseInstanceRoleAttributes) MarshalJSON() ([]byte, error)

func (*DatabaseInstanceRoleAttributes) UnmarshalJSON added in v0.74.0

func (s *DatabaseInstanceRoleAttributes) UnmarshalJSON(b []byte) error

type DatabaseInstanceRoleIdentityType added in v0.74.0

type DatabaseInstanceRoleIdentityType string
const DatabaseInstanceRoleIdentityTypeGroup DatabaseInstanceRoleIdentityType = `GROUP`
const DatabaseInstanceRoleIdentityTypePgOnly DatabaseInstanceRoleIdentityType = `PG_ONLY`
const DatabaseInstanceRoleIdentityTypeServicePrincipal DatabaseInstanceRoleIdentityType = `SERVICE_PRINCIPAL`
const DatabaseInstanceRoleIdentityTypeUser DatabaseInstanceRoleIdentityType = `USER`

func (*DatabaseInstanceRoleIdentityType) Set added in v0.74.0

Set raw string value and validate it against allowed values

func (*DatabaseInstanceRoleIdentityType) String added in v0.74.0

String representation for fmt.Print

func (*DatabaseInstanceRoleIdentityType) Type added in v0.74.0

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

func (*DatabaseInstanceRoleIdentityType) Values added in v0.74.0

Values returns all possible values for DatabaseInstanceRoleIdentityType.

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

type DatabaseInstanceRoleMembershipRole added in v0.74.0

type DatabaseInstanceRoleMembershipRole string

Roles that the DatabaseInstanceRole can be a member of.

const DatabaseInstanceRoleMembershipRoleDatabricksSuperuser DatabaseInstanceRoleMembershipRole = `DATABRICKS_SUPERUSER`

func (*DatabaseInstanceRoleMembershipRole) Set added in v0.74.0

Set raw string value and validate it against allowed values

func (*DatabaseInstanceRoleMembershipRole) String added in v0.74.0

String representation for fmt.Print

func (*DatabaseInstanceRoleMembershipRole) Type added in v0.74.0

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

func (*DatabaseInstanceRoleMembershipRole) Values added in v0.74.0

Values returns all possible values for DatabaseInstanceRoleMembershipRole.

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

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 {

	// WaitGetDatabaseInstanceDatabaseAvailable repeatedly calls [DatabaseAPI.GetDatabaseInstance] and waits to reach AVAILABLE state
	WaitGetDatabaseInstanceDatabaseAvailable(ctx context.Context, name string,
		timeout time.Duration, callback func(*DatabaseInstance)) (*DatabaseInstance, error)

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

	// Create a Database Instance.
	CreateDatabaseInstance(ctx context.Context, createDatabaseInstanceRequest CreateDatabaseInstanceRequest) (*WaitGetDatabaseInstanceDatabaseAvailable[DatabaseInstance], error)

	// Calls [DatabaseAPIInterface.CreateDatabaseInstance] and waits to reach AVAILABLE state
	//
	// You can override the default timeout of 20 minutes by calling adding
	// retries.Timeout[DatabaseInstance](60*time.Minute) functional option.
	//
	// Deprecated: use [DatabaseAPIInterface.CreateDatabaseInstance].Get() or [DatabaseAPIInterface.WaitGetDatabaseInstanceDatabaseAvailable]
	CreateDatabaseInstanceAndWait(ctx context.Context, createDatabaseInstanceRequest CreateDatabaseInstanceRequest, options ...retries.Option[DatabaseInstance]) (*DatabaseInstance, error)

	// Create a role for a Database Instance.
	CreateDatabaseInstanceRole(ctx context.Context, request CreateDatabaseInstanceRoleRequest) (*DatabaseInstanceRole, error)

	// Create a Database Table. Useful for registering pre-existing PG tables in UC.
	// See CreateSyncedDatabaseTable for creating synced tables in PG from a source
	// table in UC.
	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

	// Deletes a role for a Database Instance.
	DeleteDatabaseInstanceRole(ctx context.Context, request DeleteDatabaseInstanceRoleRequest) error

	// Deletes a role for a Database Instance.
	DeleteDatabaseInstanceRoleByInstanceNameAndName(ctx context.Context, instanceName string, 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)

	// Gets a role for a Database Instance.
	GetDatabaseInstanceRole(ctx context.Context, request GetDatabaseInstanceRoleRequest) (*DatabaseInstanceRole, error)

	// Gets a role for a Database Instance.
	GetDatabaseInstanceRoleByInstanceNameAndName(ctx context.Context, instanceName string, name string) (*DatabaseInstanceRole, 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)

	// This API is currently unimplemented, but exposed for Terraform support.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListDatabaseCatalogs(ctx context.Context, request ListDatabaseCatalogsRequest) listing.Iterator[DatabaseCatalog]

	// This API is currently unimplemented, but exposed for Terraform support.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListDatabaseCatalogsAll(ctx context.Context, request ListDatabaseCatalogsRequest) ([]DatabaseCatalog, error)

	// This API is currently unimplemented, but exposed for Terraform support.
	ListDatabaseCatalogsByInstanceName(ctx context.Context, instanceName string) (*ListDatabaseCatalogsResponse, error)

	// START OF PG ROLE APIs Section These APIs are marked a PUBLIC with stage <
	// PUBLIC_PREVIEW. With more recent Lakebase V2 plans, we don't plan to ever
	// advance these to PUBLIC_PREVIEW. These APIs will remain effectively
	// undocumented/UI-only and we'll aim for a new public roles API as part of V2
	// PuPr.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListDatabaseInstanceRoles(ctx context.Context, request ListDatabaseInstanceRolesRequest) listing.Iterator[DatabaseInstanceRole]

	// START OF PG ROLE APIs Section These APIs are marked a PUBLIC with stage <
	// PUBLIC_PREVIEW. With more recent Lakebase V2 plans, we don't plan to ever
	// advance these to PUBLIC_PREVIEW. These APIs will remain effectively
	// undocumented/UI-only and we'll aim for a new public roles API as part of V2
	// PuPr.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListDatabaseInstanceRolesAll(ctx context.Context, request ListDatabaseInstanceRolesRequest) ([]DatabaseInstanceRole, error)

	// START OF PG ROLE APIs Section These APIs are marked a PUBLIC with stage <
	// PUBLIC_PREVIEW. With more recent Lakebase V2 plans, we don't plan to ever
	// advance these to PUBLIC_PREVIEW. These APIs will remain effectively
	// undocumented/UI-only and we'll aim for a new public roles API as part of V2
	// PuPr.
	ListDatabaseInstanceRolesByInstanceName(ctx context.Context, instanceName string) (*ListDatabaseInstanceRolesResponse, 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)

	// This API is currently unimplemented, but exposed for Terraform support.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListSyncedDatabaseTables(ctx context.Context, request ListSyncedDatabaseTablesRequest) listing.Iterator[SyncedDatabaseTable]

	// This API is currently unimplemented, but exposed for Terraform support.
	//
	// This method is generated by Databricks SDK Code Generator.
	ListSyncedDatabaseTablesAll(ctx context.Context, request ListSyncedDatabaseTablesRequest) ([]SyncedDatabaseTable, error)

	// This API is currently unimplemented, but exposed for Terraform support.
	ListSyncedDatabaseTablesByInstanceName(ctx context.Context, instanceName string) (*ListSyncedDatabaseTablesResponse, error)

	// This API is currently unimplemented, but exposed for Terraform support.
	UpdateDatabaseCatalog(ctx context.Context, request UpdateDatabaseCatalogRequest) (*DatabaseCatalog, error)

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

	// This API is currently unimplemented, but exposed for Terraform support.
	UpdateSyncedDatabaseTable(ctx context.Context, request UpdateSyncedDatabaseTableRequest) (*SyncedDatabaseTable, 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 role for a Database Instance.
	CreateDatabaseInstanceRole(ctx context.Context, request CreateDatabaseInstanceRoleRequest) (*DatabaseInstanceRole, error)

	// Create a Database Table. Useful for registering pre-existing PG tables in
	// UC. See CreateSyncedDatabaseTable for creating synced tables in PG from a
	// source table in UC.
	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

	// Deletes a role for a Database Instance.
	DeleteDatabaseInstanceRole(ctx context.Context, request DeleteDatabaseInstanceRoleRequest) 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)

	// Gets a role for a Database Instance.
	GetDatabaseInstanceRole(ctx context.Context, request GetDatabaseInstanceRoleRequest) (*DatabaseInstanceRole, 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)

	// This API is currently unimplemented, but exposed for Terraform support.
	ListDatabaseCatalogs(ctx context.Context, request ListDatabaseCatalogsRequest) (*ListDatabaseCatalogsResponse, error)

	// START OF PG ROLE APIs Section These APIs are marked a PUBLIC with stage <
	// PUBLIC_PREVIEW. With more recent Lakebase V2 plans, we don't plan to ever
	// advance these to PUBLIC_PREVIEW. These APIs will remain effectively
	// undocumented/UI-only and we'll aim for a new public roles API as part of
	// V2 PuPr.
	ListDatabaseInstanceRoles(ctx context.Context, request ListDatabaseInstanceRolesRequest) (*ListDatabaseInstanceRolesResponse, error)

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

	// This API is currently unimplemented, but exposed for Terraform support.
	ListSyncedDatabaseTables(ctx context.Context, request ListSyncedDatabaseTablesRequest) (*ListSyncedDatabaseTablesResponse, error)

	// This API is currently unimplemented, but exposed for Terraform support.
	UpdateDatabaseCatalog(ctx context.Context, request UpdateDatabaseCatalogRequest) (*DatabaseCatalog, error)

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

	// This API is currently unimplemented, but exposed for Terraform support.
	UpdateSyncedDatabaseTable(ctx context.Context, request UpdateSyncedDatabaseTableRequest) (*SyncedDatabaseTable, 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).
	DatabaseInstanceName string `json:"database_instance_name,omitempty"`
	// Target Postgres database object (logical database) name for this table.
	//
	// 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, this field is required. In
	// this scenario, specifying this field will allow targeting an arbitrary
	// postgres database.
	LogicalDatabaseName string `json:"logical_database_name,omitempty"`
	// Full three-part (catalog, schema, table) name of the table.
	Name string `json:"name"`

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

Next field marker: 13

func (DatabaseTable) MarshalJSON

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

func (*DatabaseTable) UnmarshalJSON

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

type DeleteDatabaseCatalogRequest

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

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:"-" url:"force,omitempty"`
	// Name of the instance to delete.
	Name string `json:"-" url:"-"`
	// 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:"-" url:"purge,omitempty"`

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

func (DeleteDatabaseInstanceRequest) MarshalJSON

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

func (*DeleteDatabaseInstanceRequest) UnmarshalJSON

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

type DeleteDatabaseInstanceRoleRequest added in v0.74.0

type DeleteDatabaseInstanceRoleRequest struct {
	// This is the AIP standard name for the equivalent of Postgres' `IF EXISTS`
	// option
	AllowMissing bool `json:"-" url:"allow_missing,omitempty"`

	InstanceName string `json:"-" url:"-"`

	Name string `json:"-" url:"-"`

	ReassignOwnedTo string `json:"-" url:"reassign_owned_to,omitempty"`

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

func (DeleteDatabaseInstanceRoleRequest) MarshalJSON added in v0.74.0

func (s DeleteDatabaseInstanceRoleRequest) MarshalJSON() ([]byte, error)

func (*DeleteDatabaseInstanceRoleRequest) UnmarshalJSON added in v0.74.0

func (s *DeleteDatabaseInstanceRoleRequest) UnmarshalJSON(b []byte) error

type DeleteDatabaseTableRequest

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

type DeleteSyncedDatabaseTableRequest

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

type DeltaTableSyncInfo added in v0.74.0

type DeltaTableSyncInfo struct {
	// The timestamp when the above Delta version was committed in the source
	// Delta table. Note: This is the Delta commit time, not the time the data
	// was written to the synced table.
	DeltaCommitTimestamp string `json:"delta_commit_timestamp,omitempty"`
	// The Delta Lake commit version that was last successfully synced.
	DeltaCommitVersion int64 `json:"delta_commit_version,omitempty"`

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

func (DeltaTableSyncInfo) MarshalJSON added in v0.74.0

func (s DeltaTableSyncInfo) MarshalJSON() ([]byte, error)

func (*DeltaTableSyncInfo) UnmarshalJSON added in v0.74.0

func (s *DeltaTableSyncInfo) UnmarshalJSON(b []byte) error

type FindDatabaseInstanceByUidRequest

type FindDatabaseInstanceByUidRequest struct {
	// UID of the cluster to get.
	Uid string `json:"-" url:"uid,omitempty"`

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

func (FindDatabaseInstanceByUidRequest) MarshalJSON

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

func (*FindDatabaseInstanceByUidRequest) UnmarshalJSON

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

type GenerateDatabaseCredentialRequest

type GenerateDatabaseCredentialRequest struct {
	// The returned token will be scoped to the union of instance_names and
	// instances containing the specified UC tables, so instance_names is
	// allowed to be empty.
	Claims []RequestedClaims `json:"claims,omitempty"`
	// Instances to which the token will be scoped.
	InstanceNames []string `json:"instance_names,omitempty"`

	RequestId string `json:"request_id,omitempty"`

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

Generates a credential that can be used to access database instances

func (GenerateDatabaseCredentialRequest) MarshalJSON

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

func (*GenerateDatabaseCredentialRequest) UnmarshalJSON

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

type GetDatabaseCatalogRequest

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

type GetDatabaseInstanceRequest

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

type GetDatabaseInstanceRoleRequest added in v0.74.0

type GetDatabaseInstanceRoleRequest struct {
	InstanceName string `json:"-" url:"-"`

	Name string `json:"-" url:"-"`
}

type GetDatabaseTableRequest

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

type GetSyncedDatabaseTableRequest

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

type ListDatabaseCatalogsRequest added in v0.80.0

type ListDatabaseCatalogsRequest struct {
	// Name of the instance to get database catalogs for.
	InstanceName string `json:"-" url:"-"`
	// Upper bound for items returned.
	PageSize int `json:"-" url:"page_size,omitempty"`
	// Pagination token to go to the next page of synced database tables.
	// Requests first page if absent.
	PageToken string `json:"-" url:"page_token,omitempty"`

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

func (ListDatabaseCatalogsRequest) MarshalJSON added in v0.80.0

func (s ListDatabaseCatalogsRequest) MarshalJSON() ([]byte, error)

func (*ListDatabaseCatalogsRequest) UnmarshalJSON added in v0.80.0

func (s *ListDatabaseCatalogsRequest) UnmarshalJSON(b []byte) error

type ListDatabaseCatalogsResponse added in v0.80.0

type ListDatabaseCatalogsResponse struct {
	DatabaseCatalogs []DatabaseCatalog `json:"database_catalogs,omitempty"`
	// Pagination token to request the next page of database catalogs.
	NextPageToken string `json:"next_page_token,omitempty"`

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

func (ListDatabaseCatalogsResponse) MarshalJSON added in v0.80.0

func (s ListDatabaseCatalogsResponse) MarshalJSON() ([]byte, error)

func (*ListDatabaseCatalogsResponse) UnmarshalJSON added in v0.80.0

func (s *ListDatabaseCatalogsResponse) UnmarshalJSON(b []byte) error

type ListDatabaseInstanceRolesRequest added in v0.74.0

type ListDatabaseInstanceRolesRequest struct {
	InstanceName string `json:"-" url:"-"`
	// Upper bound for items returned.
	PageSize int `json:"-" url:"page_size,omitempty"`
	// Pagination token to go to the next page of Database Instances. Requests
	// first page if absent.
	PageToken string `json:"-" url:"page_token,omitempty"`

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

func (ListDatabaseInstanceRolesRequest) MarshalJSON added in v0.74.0

func (s ListDatabaseInstanceRolesRequest) MarshalJSON() ([]byte, error)

func (*ListDatabaseInstanceRolesRequest) UnmarshalJSON added in v0.74.0

func (s *ListDatabaseInstanceRolesRequest) UnmarshalJSON(b []byte) error

type ListDatabaseInstanceRolesResponse added in v0.74.0

type ListDatabaseInstanceRolesResponse struct {
	// List of database instance roles.
	DatabaseInstanceRoles []DatabaseInstanceRole `json:"database_instance_roles,omitempty"`
	// Pagination token to request the next page of instances.
	NextPageToken string `json:"next_page_token,omitempty"`

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

func (ListDatabaseInstanceRolesResponse) MarshalJSON added in v0.74.0

func (s ListDatabaseInstanceRolesResponse) MarshalJSON() ([]byte, error)

func (*ListDatabaseInstanceRolesResponse) UnmarshalJSON added in v0.74.0

func (s *ListDatabaseInstanceRolesResponse) UnmarshalJSON(b []byte) error

type ListDatabaseInstancesRequest

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

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

func (ListDatabaseInstancesRequest) MarshalJSON

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

func (*ListDatabaseInstancesRequest) UnmarshalJSON

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

type ListDatabaseInstancesResponse

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

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

func (ListDatabaseInstancesResponse) MarshalJSON

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

func (*ListDatabaseInstancesResponse) UnmarshalJSON

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

type ListSyncedDatabaseTablesRequest added in v0.80.0

type ListSyncedDatabaseTablesRequest struct {
	// Name of the instance to get synced tables for.
	InstanceName string `json:"-" url:"-"`
	// Upper bound for items returned.
	PageSize int `json:"-" url:"page_size,omitempty"`
	// Pagination token to go to the next page of synced database tables.
	// Requests first page if absent.
	PageToken string `json:"-" url:"page_token,omitempty"`

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

func (ListSyncedDatabaseTablesRequest) MarshalJSON added in v0.80.0

func (s ListSyncedDatabaseTablesRequest) MarshalJSON() ([]byte, error)

func (*ListSyncedDatabaseTablesRequest) UnmarshalJSON added in v0.80.0

func (s *ListSyncedDatabaseTablesRequest) UnmarshalJSON(b []byte) error

type ListSyncedDatabaseTablesResponse added in v0.80.0

type ListSyncedDatabaseTablesResponse struct {
	// Pagination token to request the next page of synced tables.
	NextPageToken string `json:"next_page_token,omitempty"`

	SyncedTables []SyncedDatabaseTable `json:"synced_tables,omitempty"`

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

func (ListSyncedDatabaseTablesResponse) MarshalJSON added in v0.80.0

func (s ListSyncedDatabaseTablesResponse) MarshalJSON() ([]byte, error)

func (*ListSyncedDatabaseTablesResponse) UnmarshalJSON added in v0.80.0

func (s *ListSyncedDatabaseTablesResponse) UnmarshalJSON(b []byte) error

type NewPipelineSpec

type NewPipelineSpec struct {
	// This field needs to be specified if the destination catalog is a managed
	// postgres catalog.
	//
	// 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.
	StorageCatalog string `json:"storage_catalog,omitempty"`
	// This field needs to be specified if the destination catalog is a managed
	// postgres catalog.
	//
	// 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.
	StorageSchema string `json:"storage_schema,omitempty"`

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

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

func (*NewPipelineSpec) UnmarshalJSON

func (s *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 ProvisioningPhase added in v0.77.0

type ProvisioningPhase string
const ProvisioningPhaseProvisioningPhaseIndexScan ProvisioningPhase = `PROVISIONING_PHASE_INDEX_SCAN`
const ProvisioningPhaseProvisioningPhaseIndexSort ProvisioningPhase = `PROVISIONING_PHASE_INDEX_SORT`
const ProvisioningPhaseProvisioningPhaseMain ProvisioningPhase = `PROVISIONING_PHASE_MAIN`

func (*ProvisioningPhase) Set added in v0.77.0

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

Set raw string value and validate it against allowed values

func (*ProvisioningPhase) String added in v0.77.0

func (f *ProvisioningPhase) String() string

String representation for fmt.Print

func (*ProvisioningPhase) Type added in v0.77.0

func (f *ProvisioningPhase) Type() string

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

func (*ProvisioningPhase) Values added in v0.77.0

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

Values returns all possible values for ProvisioningPhase.

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

type RequestedClaims added in v0.74.0

type RequestedClaims struct {
	PermissionSet RequestedClaimsPermissionSet `json:"permission_set,omitempty"`

	Resources []RequestedResource `json:"resources,omitempty"`
}

type RequestedClaimsPermissionSet added in v0.74.0

type RequestedClaimsPermissionSet string

Might add WRITE in the future

const RequestedClaimsPermissionSetReadOnly RequestedClaimsPermissionSet = `READ_ONLY`

func (*RequestedClaimsPermissionSet) Set added in v0.74.0

Set raw string value and validate it against allowed values

func (*RequestedClaimsPermissionSet) String added in v0.74.0

String representation for fmt.Print

func (*RequestedClaimsPermissionSet) Type added in v0.74.0

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

func (*RequestedClaimsPermissionSet) Values added in v0.74.0

Values returns all possible values for RequestedClaimsPermissionSet.

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

type RequestedResource added in v0.74.0

type RequestedResource struct {
	TableName string `json:"table_name,omitempty"`

	UnspecifiedResourceName string `json:"unspecified_resource_name,omitempty"`

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

func (RequestedResource) MarshalJSON added in v0.74.0

func (s RequestedResource) MarshalJSON() ([]byte, error)

func (*RequestedResource) UnmarshalJSON added in v0.74.0

func (s *RequestedResource) UnmarshalJSON(b []byte) error

type SyncedDatabaseTable

type SyncedDatabaseTable struct {
	// Synced Table 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).
	DatabaseInstanceName string `json:"database_instance_name,omitempty"`
	// The name of the database instance that this table is registered to. This
	// field is always returned, and for tables inside database catalogs is
	// inferred database instance associated with the catalog.
	EffectiveDatabaseInstanceName string `json:"effective_database_instance_name,omitempty"`
	// The name of the logical database that this table is registered to.
	EffectiveLogicalDatabaseName string `json:"effective_logical_database_name,omitempty"`
	// Target Postgres database object (logical database) name for this table.
	//
	// 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, this field is
	// required. 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`.
	LogicalDatabaseName string `json:"logical_database_name,omitempty"`
	// Full three-part (catalog, schema, table) name of the table.
	Name string `json:"name"`

	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).
	UnityCatalogProvisioningState ProvisioningInfoState `json:"unity_catalog_provisioning_state,omitempty"`

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

Next field marker: 14

func (SyncedDatabaseTable) MarshalJSON

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

func (*SyncedDatabaseTable) UnmarshalJSON

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

type SyncedTableContinuousUpdateStatus

type SyncedTableContinuousUpdateStatus struct {
	// Progress of the initial data synchronization.
	InitialPipelineSyncProgress *SyncedTablePipelineProgress `json:"initial_pipeline_sync_progress,omitempty"`
	// The last source table Delta version that was successfully synced to the
	// synced table.
	LastProcessedCommitVersion int64 `json:"last_processed_commit_version,omitempty"`
	// The end timestamp of the last time any data was synchronized from the
	// source table to the synced table. This is when the data is available in
	// the synced table.
	Timestamp string `json:"timestamp,omitempty"`

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

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

func (*SyncedTableContinuousUpdateStatus) UnmarshalJSON

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

type SyncedTableFailedStatus

type SyncedTableFailedStatus struct {
	// The last source table Delta version that was successfully synced to the
	// synced table. The last source table Delta version that was synced to the
	// synced table. Only populated if the table is still synced and available
	// for serving.
	LastProcessedCommitVersion int64 `json:"last_processed_commit_version,omitempty"`
	// The end 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.
	Timestamp string `json:"timestamp,omitempty"`

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

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

func (*SyncedTableFailedStatus) UnmarshalJSON

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

type SyncedTablePipelineProgress

type SyncedTablePipelineProgress struct {
	// The estimated time remaining to complete this update in 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.
	LatestVersionCurrentlyProcessing int64 `json:"latest_version_currently_processing,omitempty"`
	// The current phase of the data synchronization pipeline.
	ProvisioningPhase ProvisioningPhase `json:"provisioning_phase,omitempty"`
	// The completion ratio of this update. This is a number between 0 and 1.
	SyncProgressCompletion float64 `json:"sync_progress_completion,omitempty"`
	// The number of rows that have been synced in this update.
	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.
	TotalRowCount int64 `json:"total_row_count,omitempty"`

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

Progress information of the Synced Table data synchronization pipeline.

func (SyncedTablePipelineProgress) MarshalJSON

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

func (*SyncedTablePipelineProgress) UnmarshalJSON

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

type SyncedTablePosition added in v0.74.0

type SyncedTablePosition struct {
	DeltaTableSyncInfo *DeltaTableSyncInfo `json:"delta_table_sync_info,omitempty"`
	// The end timestamp of the most recent successful synchronization. This is
	// the time when the data is available in the synced table.
	SyncEndTimestamp string `json:"sync_end_timestamp,omitempty"`
	// The starting timestamp of the most recent successful synchronization from
	// the source table to the destination (synced) table. Note this is the
	// starting timestamp of the sync operation, not the end time. E.g., for a
	// batch, this is the time when the sync operation started.
	SyncStartTimestamp string `json:"sync_start_timestamp,omitempty"`

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

func (SyncedTablePosition) MarshalJSON added in v0.74.0

func (s SyncedTablePosition) MarshalJSON() ([]byte, error)

func (*SyncedTablePosition) UnmarshalJSON added in v0.74.0

func (s *SyncedTablePosition) UnmarshalJSON(b []byte) error

type SyncedTableProvisioningStatus

type SyncedTableProvisioningStatus struct {
	// Details about initial data synchronization. Only populated when in the
	// PROVISIONING_INITIAL_SNAPSHOT state.
	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.

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.
	CreateDatabaseObjectsIfMissing bool `json:"create_database_objects_if_missing,omitempty"`
	// At most one of existing_pipeline_id and new_pipeline_spec should be
	// defined.
	//
	// If existing_pipeline_id is defined, the synced table will be bin packed
	// into the existing pipeline referenced. This avoids creating a new
	// pipeline and allows sharing existing compute. In this case, the
	// scheduling_policy of this synced table must match the scheduling policy
	// of the existing pipeline.
	ExistingPipelineId string `json:"existing_pipeline_id,omitempty"`
	// At most one of existing_pipeline_id and new_pipeline_spec should be
	// defined.
	//
	// If new_pipeline_spec is defined, a new pipeline is created for this
	// synced table. The location pointed to is used to store intermediate files
	// (checkpoints, event logs etc). The caller must have write permissions to
	// create Delta tables in the specified catalog and schema. Again, note this
	// requires write permissions, whereas the source table only requires read
	// permissions.
	NewPipelineSpec *NewPipelineSpec `json:"new_pipeline_spec,omitempty"`
	// Primary Key columns to be used for data insert/update in the destination.
	PrimaryKeyColumns []string `json:"primary_key_columns,omitempty"`
	// Scheduling policy of the underlying pipeline.
	SchedulingPolicy SyncedTableSchedulingPolicy `json:"scheduling_policy,omitempty"`
	// Three-part (catalog, schema, table) name of the source Delta table.
	SourceTableFullName string `json:"source_table_full_name,omitempty"`
	// Time series key to deduplicate (tie-break) rows with the same primary
	// key.
	TimeseriesKey string `json:"timeseries_key,omitempty"`

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

Specification of a synced database table.

func (SyncedTableSpec) MarshalJSON

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

func (*SyncedTableSpec) UnmarshalJSON

func (s *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 {
	ContinuousUpdateStatus *SyncedTableContinuousUpdateStatus `json:"continuous_update_status,omitempty"`
	// The state of the synced table.
	DetailedState SyncedTableState `json:"detailed_state,omitempty"`

	FailedStatus *SyncedTableFailedStatus `json:"failed_status,omitempty"`
	// Summary of the last successful synchronization from source to
	// destination.
	//
	// Will always be present if there has been a successful sync. Even if the
	// most recent syncs have failed.
	//
	// Limitation: The only exception is if the synced table is doing a FULL
	// REFRESH, then the last sync information will not be available until the
	// full refresh is complete. This limitation will be addressed in a future
	// version.
	//
	// This top-level field is a convenience for consumers who want easy access
	// to last sync information without having to traverse detailed_status.
	LastSync *SyncedTablePosition `json:"last_sync,omitempty"`
	// A text description of the current state of the synced table.
	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).
	PipelineId string `json:"pipeline_id,omitempty"`

	ProvisioningStatus *SyncedTableProvisioningStatus `json:"provisioning_status,omitempty"`

	TriggeredUpdateStatus *SyncedTableTriggeredUpdateStatus `json:"triggered_update_status,omitempty"`

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

Status of a synced table.

func (SyncedTableStatus) MarshalJSON

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

func (*SyncedTableStatus) UnmarshalJSON

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

type SyncedTableTriggeredUpdateStatus

type SyncedTableTriggeredUpdateStatus struct {
	// The last source table Delta version that was successfully synced to the
	// synced table.
	LastProcessedCommitVersion int64 `json:"last_processed_commit_version,omitempty"`
	// The end timestamp of the last time any data was synchronized from the
	// source table to the synced table. This is when the data is available in
	// the synced table.
	Timestamp string `json:"timestamp,omitempty"`
	// Progress of the active data synchronization pipeline.
	TriggeredUpdateProgress *SyncedTablePipelineProgress `json:"triggered_update_progress,omitempty"`

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

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

func (*SyncedTableTriggeredUpdateStatus) UnmarshalJSON

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

type UpdateDatabaseCatalogRequest added in v0.80.0

type UpdateDatabaseCatalogRequest struct {
	// Note that updating a database catalog is not yet supported.
	DatabaseCatalog DatabaseCatalog `json:"database_catalog"`
	// The name of the catalog in UC.
	Name string `json:"-" url:"-"`
	// The list of fields to update. Setting this field is not yet supported.
	UpdateMask string `json:"-" url:"update_mask"`
}

type UpdateDatabaseInstanceRequest

type UpdateDatabaseInstanceRequest struct {
	DatabaseInstance DatabaseInstance `json:"database_instance"`
	// The name of the instance. This is the unique identifier for the instance.
	Name string `json:"-" url:"-"`
	// The list of fields to update. If unspecified, all fields will be updated
	// when possible. To wipe out custom_tags, specify custom_tags in the
	// update_mask with an empty custom_tags map.
	UpdateMask string `json:"-" url:"update_mask"`
}

type UpdateSyncedDatabaseTableRequest added in v0.80.0

type UpdateSyncedDatabaseTableRequest struct {
	// Full three-part (catalog, schema, table) name of the table.
	Name string `json:"-" url:"-"`
	// Note that updating a synced database table is not yet supported.
	SyncedTable SyncedDatabaseTable `json:"synced_table"`
	// The list of fields to update. Setting this field is not yet supported.
	UpdateMask string `json:"-" url:"update_mask"`
}

type WaitGetDatabaseInstanceDatabaseAvailable added in v0.78.0

type WaitGetDatabaseInstanceDatabaseAvailable[R any] struct {
	Response *R
	Name     string `json:"name"`
	Poll     func(time.Duration, func(*DatabaseInstance)) (*DatabaseInstance, error)
	// contains filtered or unexported fields
}

WaitGetDatabaseInstanceDatabaseAvailable is a wrapper that calls DatabaseAPI.WaitGetDatabaseInstanceDatabaseAvailable and waits to reach AVAILABLE state.

func (*WaitGetDatabaseInstanceDatabaseAvailable[R]) Get added in v0.78.0

Get the DatabaseInstance with the default timeout of 20 minutes.

func (*WaitGetDatabaseInstanceDatabaseAvailable[R]) GetWithTimeout added in v0.78.0

Get the DatabaseInstance with custom timeout.

func (*WaitGetDatabaseInstanceDatabaseAvailable[R]) OnProgress added in v0.78.0

OnProgress invokes a callback every time it polls for the status update.

Jump to

Keyboard shortcuts

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