Documentation
¶
Overview ¶
Database Instances provide access to a database via REST API or direct SQL.
Index ¶
- type CreateDatabaseCatalogRequest
- type CreateDatabaseInstanceRequest
- type CreateDatabaseInstanceRoleRequest
- type CreateDatabaseTableRequest
- type CreateSyncedDatabaseTableRequest
- type CustomTag
- type DatabaseAPI
- func (a *DatabaseAPI) CreateDatabaseCatalog(ctx context.Context, request CreateDatabaseCatalogRequest) (*DatabaseCatalog, error)
- func (a *DatabaseAPI) CreateDatabaseInstance(ctx context.Context, ...) (*WaitGetDatabaseInstanceDatabaseAvailable[DatabaseInstance], error)
- func (a *DatabaseAPI) CreateDatabaseInstanceAndWait(ctx context.Context, ...) (*DatabaseInstance, error)deprecated
- func (a *DatabaseAPI) CreateDatabaseInstanceRole(ctx context.Context, request CreateDatabaseInstanceRoleRequest) (*DatabaseInstanceRole, error)
- func (a *DatabaseAPI) CreateDatabaseTable(ctx context.Context, request CreateDatabaseTableRequest) (*DatabaseTable, error)
- func (a *DatabaseAPI) CreateSyncedDatabaseTable(ctx context.Context, request CreateSyncedDatabaseTableRequest) (*SyncedDatabaseTable, error)
- func (a *DatabaseAPI) DeleteDatabaseCatalog(ctx context.Context, request DeleteDatabaseCatalogRequest) error
- func (a *DatabaseAPI) DeleteDatabaseCatalogByName(ctx context.Context, name string) error
- func (a *DatabaseAPI) DeleteDatabaseInstance(ctx context.Context, request DeleteDatabaseInstanceRequest) error
- func (a *DatabaseAPI) DeleteDatabaseInstanceByName(ctx context.Context, name string) error
- func (a *DatabaseAPI) DeleteDatabaseInstanceRole(ctx context.Context, request DeleteDatabaseInstanceRoleRequest) error
- func (a *DatabaseAPI) DeleteDatabaseInstanceRoleByInstanceNameAndName(ctx context.Context, instanceName string, name string) error
- func (a *DatabaseAPI) DeleteDatabaseTable(ctx context.Context, request DeleteDatabaseTableRequest) error
- func (a *DatabaseAPI) DeleteDatabaseTableByName(ctx context.Context, name string) error
- func (a *DatabaseAPI) DeleteSyncedDatabaseTable(ctx context.Context, request DeleteSyncedDatabaseTableRequest) error
- func (a *DatabaseAPI) DeleteSyncedDatabaseTableByName(ctx context.Context, name string) error
- func (a *DatabaseAPI) FindDatabaseInstanceByUid(ctx context.Context, request FindDatabaseInstanceByUidRequest) (*DatabaseInstance, error)
- func (a *DatabaseAPI) GenerateDatabaseCredential(ctx context.Context, request GenerateDatabaseCredentialRequest) (*DatabaseCredential, error)
- func (a *DatabaseAPI) GetDatabaseCatalog(ctx context.Context, request GetDatabaseCatalogRequest) (*DatabaseCatalog, error)
- func (a *DatabaseAPI) GetDatabaseCatalogByName(ctx context.Context, name string) (*DatabaseCatalog, error)
- func (a *DatabaseAPI) GetDatabaseInstance(ctx context.Context, request GetDatabaseInstanceRequest) (*DatabaseInstance, error)
- func (a *DatabaseAPI) GetDatabaseInstanceByName(ctx context.Context, name string) (*DatabaseInstance, error)
- func (a *DatabaseAPI) GetDatabaseInstanceRole(ctx context.Context, request GetDatabaseInstanceRoleRequest) (*DatabaseInstanceRole, error)
- func (a *DatabaseAPI) GetDatabaseInstanceRoleByInstanceNameAndName(ctx context.Context, instanceName string, name string) (*DatabaseInstanceRole, error)
- func (a *DatabaseAPI) GetDatabaseTable(ctx context.Context, request GetDatabaseTableRequest) (*DatabaseTable, error)
- func (a *DatabaseAPI) GetDatabaseTableByName(ctx context.Context, name string) (*DatabaseTable, error)
- func (a *DatabaseAPI) GetSyncedDatabaseTable(ctx context.Context, request GetSyncedDatabaseTableRequest) (*SyncedDatabaseTable, error)
- func (a *DatabaseAPI) GetSyncedDatabaseTableByName(ctx context.Context, name string) (*SyncedDatabaseTable, error)
- func (a *DatabaseAPI) ListDatabaseCatalogs(ctx context.Context, request ListDatabaseCatalogsRequest) listing.Iterator[DatabaseCatalog]
- func (a *DatabaseAPI) ListDatabaseCatalogsAll(ctx context.Context, request ListDatabaseCatalogsRequest) ([]DatabaseCatalog, error)
- func (a *DatabaseAPI) ListDatabaseCatalogsByInstanceName(ctx context.Context, instanceName string) (*ListDatabaseCatalogsResponse, error)
- func (a *DatabaseAPI) ListDatabaseInstanceRoles(ctx context.Context, request ListDatabaseInstanceRolesRequest) listing.Iterator[DatabaseInstanceRole]
- func (a *DatabaseAPI) ListDatabaseInstanceRolesAll(ctx context.Context, request ListDatabaseInstanceRolesRequest) ([]DatabaseInstanceRole, error)
- func (a *DatabaseAPI) ListDatabaseInstanceRolesByInstanceName(ctx context.Context, instanceName string) (*ListDatabaseInstanceRolesResponse, error)
- func (a *DatabaseAPI) ListDatabaseInstances(ctx context.Context, request ListDatabaseInstancesRequest) listing.Iterator[DatabaseInstance]
- func (a *DatabaseAPI) ListDatabaseInstancesAll(ctx context.Context, request ListDatabaseInstancesRequest) ([]DatabaseInstance, error)
- func (a *DatabaseAPI) ListSyncedDatabaseTables(ctx context.Context, request ListSyncedDatabaseTablesRequest) listing.Iterator[SyncedDatabaseTable]
- func (a *DatabaseAPI) ListSyncedDatabaseTablesAll(ctx context.Context, request ListSyncedDatabaseTablesRequest) ([]SyncedDatabaseTable, error)
- func (a *DatabaseAPI) ListSyncedDatabaseTablesByInstanceName(ctx context.Context, instanceName string) (*ListSyncedDatabaseTablesResponse, error)
- func (a *DatabaseAPI) UpdateDatabaseCatalog(ctx context.Context, request UpdateDatabaseCatalogRequest) (*DatabaseCatalog, error)
- func (a *DatabaseAPI) UpdateDatabaseInstance(ctx context.Context, request UpdateDatabaseInstanceRequest) (*DatabaseInstance, error)
- func (a *DatabaseAPI) UpdateSyncedDatabaseTable(ctx context.Context, request UpdateSyncedDatabaseTableRequest) (*SyncedDatabaseTable, error)
- func (a *DatabaseAPI) WaitGetDatabaseInstanceDatabaseAvailable(ctx context.Context, name string, timeout time.Duration, ...) (*DatabaseInstance, error)
- type DatabaseCatalog
- type DatabaseCredential
- type DatabaseInstance
- type DatabaseInstanceRef
- type DatabaseInstanceRole
- type DatabaseInstanceRoleAttributes
- type DatabaseInstanceRoleIdentityType
- type DatabaseInstanceRoleMembershipRole
- type DatabaseInstanceState
- type DatabaseInterface
- type DatabaseServicedeprecated
- type DatabaseTable
- type DeleteDatabaseCatalogRequest
- type DeleteDatabaseInstanceRequest
- type DeleteDatabaseInstanceRoleRequest
- type DeleteDatabaseTableRequest
- type DeleteSyncedDatabaseTableRequest
- type DeltaTableSyncInfo
- type FindDatabaseInstanceByUidRequest
- type GenerateDatabaseCredentialRequest
- type GetDatabaseCatalogRequest
- type GetDatabaseInstanceRequest
- type GetDatabaseInstanceRoleRequest
- type GetDatabaseTableRequest
- type GetSyncedDatabaseTableRequest
- type ListDatabaseCatalogsRequest
- type ListDatabaseCatalogsResponse
- type ListDatabaseInstanceRolesRequest
- type ListDatabaseInstanceRolesResponse
- type ListDatabaseInstancesRequest
- type ListDatabaseInstancesResponse
- type ListSyncedDatabaseTablesRequest
- type ListSyncedDatabaseTablesResponse
- type NewPipelineSpec
- type ProvisioningInfoState
- type ProvisioningPhase
- type RequestedClaims
- type RequestedClaimsPermissionSet
- type RequestedResource
- type SyncedDatabaseTable
- type SyncedTableContinuousUpdateStatus
- type SyncedTableFailedStatus
- type SyncedTablePipelineProgress
- type SyncedTablePosition
- type SyncedTableProvisioningStatus
- type SyncedTableSchedulingPolicy
- type SyncedTableSpec
- type SyncedTableState
- type SyncedTableStatus
- type SyncedTableTriggeredUpdateStatus
- type UpdateDatabaseCatalogRequest
- type UpdateDatabaseInstanceRequest
- type UpdateSyncedDatabaseTableRequest
- type WaitGetDatabaseInstanceDatabaseAvailable
- func (w *WaitGetDatabaseInstanceDatabaseAvailable[R]) Get() (*DatabaseInstance, error)
- func (w *WaitGetDatabaseInstanceDatabaseAvailable[R]) GetWithTimeout(timeout time.Duration) (*DatabaseInstance, error)
- func (w *WaitGetDatabaseInstanceDatabaseAvailable[R]) OnProgress(callback func(*DatabaseInstance)) *WaitGetDatabaseInstanceDatabaseAvailable[R]
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 {
DatabaseInstanceName string `json:"-" url:"database_instance_name,omitempty"`
DatabaseInstanceRole DatabaseInstanceRole `json:"database_instance_role"`
InstanceName string `json:"-" url:"-"`
ForceSendFields []string `json:"-" url:"-"`
}
func (CreateDatabaseInstanceRoleRequest) MarshalJSON ¶ added in v0.86.0
func (s CreateDatabaseInstanceRoleRequest) MarshalJSON() ([]byte, error)
func (*CreateDatabaseInstanceRoleRequest) UnmarshalJSON ¶ added in v0.86.0
func (s *CreateDatabaseInstanceRoleRequest) UnmarshalJSON(b []byte) error
type CreateDatabaseTableRequest ¶
type CreateDatabaseTableRequest struct {
Table DatabaseTable `json:"table"`
}
type CreateSyncedDatabaseTableRequest ¶
type CreateSyncedDatabaseTableRequest struct {
SyncedTable SyncedDatabaseTable `json:"synced_table"`
}
type CustomTag ¶ added in v0.86.0
type CustomTag struct {
// The key of the custom tag.
Key string `json:"key,omitempty"`
// The value of the custom tag.
Value string `json:"value,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (CustomTag) MarshalJSON ¶ added in v0.86.0
func (*CustomTag) UnmarshalJSON ¶ added in v0.86.0
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"`
// Custom tags associated with the instance. This field is only included on
// create and update responses.
CustomTags []CustomTag `json:"custom_tags,omitempty"`
// Deprecated. The sku of the instance; this field will always match the
// value of capacity.
EffectiveCapacity string `json:"effective_capacity,omitempty"`
// The recorded custom tags associated with the instance.
EffectiveCustomTags []CustomTag `json:"effective_custom_tags,omitempty"`
// Whether the instance has PG native password login enabled.
EffectiveEnablePgNativeLogin bool `json:"effective_enable_pg_native_login,omitempty"`
// Whether secondaries serving read-only traffic are enabled. Defaults to
// false.
EffectiveEnableReadableSecondaries bool `json:"effective_enable_readable_secondaries,omitempty"`
// The number of nodes in the instance, composed of 1 primary and 0 or more
// secondaries. Defaults to 1 primary and 0 secondaries.
EffectiveNodeCount int `json:"effective_node_count,omitempty"`
// The retention window for the instance. This is the time window in days
// for which the historical data is retained.
EffectiveRetentionWindowInDays int `json:"effective_retention_window_in_days,omitempty"`
// Whether the instance is stopped.
EffectiveStopped bool `json:"effective_stopped,omitempty"`
// The policy that is applied to the instance.
EffectiveUsagePolicyId string `json:"effective_usage_policy_id,omitempty"`
// Whether to enable PG native password login on the instance. Defaults to
// false.
EnablePgNativeLogin bool `json:"enable_pg_native_login,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. This field is input
// only, see effective_node_count for the output.
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 to stop the instance. An input only param, see effective_stopped
// for the output.
Stopped bool `json:"stopped,omitempty"`
// An immutable UUID identifier for the instance.
Uid string `json:"uid,omitempty"`
// The desired usage policy to associate with the instance.
UsagePolicyId string `json:"usage_policy_id,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"`
// 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 {
// The desired API-exposed Postgres role attribute to associate with the
// role. Optional.
Attributes *DatabaseInstanceRoleAttributes `json:"attributes,omitempty"`
// The attributes that are applied to the role.
EffectiveAttributes *DatabaseInstanceRoleAttributes `json:"effective_attributes,omitempty"`
// The type of the role.
IdentityType DatabaseInstanceRoleIdentityType `json:"identity_type,omitempty"`
InstanceName string `json:"instance_name,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"`
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
func (f *DatabaseInstanceRoleIdentityType) Set(v string) error
Set raw string value and validate it against allowed values
func (*DatabaseInstanceRoleIdentityType) String ¶ added in v0.74.0
func (f *DatabaseInstanceRoleIdentityType) String() string
String representation for fmt.Print
func (*DatabaseInstanceRoleIdentityType) Type ¶ added in v0.74.0
func (f *DatabaseInstanceRoleIdentityType) Type() string
Type always returns DatabaseInstanceRoleIdentityType to satisfy [pflag.Value] interface
func (*DatabaseInstanceRoleIdentityType) Values ¶ added in v0.74.0
func (f *DatabaseInstanceRoleIdentityType) Values() []DatabaseInstanceRoleIdentityType
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
func (f *DatabaseInstanceRoleMembershipRole) Set(v string) error
Set raw string value and validate it against allowed values
func (*DatabaseInstanceRoleMembershipRole) String ¶ added in v0.74.0
func (f *DatabaseInstanceRoleMembershipRole) String() string
String representation for fmt.Print
func (*DatabaseInstanceRoleMembershipRole) Type ¶ added in v0.74.0
func (f *DatabaseInstanceRoleMembershipRole) Type() string
Type always returns DatabaseInstanceRoleMembershipRole to satisfy [pflag.Value] interface
func (*DatabaseInstanceRoleMembershipRole) Values ¶ added in v0.74.0
func (f *DatabaseInstanceRoleMembershipRole) Values() []DatabaseInstanceRoleMembershipRole
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 ¶
func (f *DatabaseInstanceState) Set(v string) error
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 ¶
func (f *DatabaseInstanceState) Values() []DatabaseInstanceState
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:"-"`
// Deprecated. Omitting the field or setting it to true will result in the
// field being hard deleted. Setting a value of false will throw a bad
// request.
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:"-"`
// Optional. When set to true, the actual PostgreSQL table will be dropped
// from the database.
PurgeData bool `json:"-" url:"purge_data,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (DeleteSyncedDatabaseTableRequest) MarshalJSON ¶ added in v0.73.0
func (s DeleteSyncedDatabaseTableRequest) MarshalJSON() ([]byte, error)
func (*DeleteSyncedDatabaseTableRequest) UnmarshalJSON ¶ added in v0.73.0
func (s *DeleteSyncedDatabaseTableRequest) UnmarshalJSON(b []byte) error
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 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 {
// Budget policy to set on the newly created pipeline.
BudgetPolicyId string `json:"budget_policy_id,omitempty"`
// 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 ¶
func (f *ProvisioningInfoState) Set(v string) error
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 ¶
func (f *ProvisioningInfoState) Values() []ProvisioningInfoState
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
func (f *RequestedClaimsPermissionSet) Set(v string) error
Set raw string value and validate it against allowed values
func (*RequestedClaimsPermissionSet) String ¶ added in v0.74.0
func (f *RequestedClaimsPermissionSet) String() string
String representation for fmt.Print
func (*RequestedClaimsPermissionSet) Type ¶ added in v0.74.0
func (f *RequestedClaimsPermissionSet) Type() string
Type always returns RequestedClaimsPermissionSet to satisfy [pflag.Value] interface
func (*RequestedClaimsPermissionSet) Values ¶ added in v0.74.0
func (f *RequestedClaimsPermissionSet) Values() []RequestedClaimsPermissionSet
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: 18
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 ¶
func (f *SyncedTableSchedulingPolicy) Set(v string) error
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 ¶
func (f *SyncedTableSchedulingPolicy) Type() string
Type always returns SyncedTableSchedulingPolicy to satisfy [pflag.Value] interface
func (*SyncedTableSchedulingPolicy) Values ¶
func (f *SyncedTableSchedulingPolicy) Values() []SyncedTableSchedulingPolicy
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
func (w *WaitGetDatabaseInstanceDatabaseAvailable[R]) Get() (*DatabaseInstance, error)
Get the DatabaseInstance with the default timeout of 20 minutes.
func (*WaitGetDatabaseInstanceDatabaseAvailable[R]) GetWithTimeout ¶ added in v0.78.0
func (w *WaitGetDatabaseInstanceDatabaseAvailable[R]) GetWithTimeout(timeout time.Duration) (*DatabaseInstance, error)
Get the DatabaseInstance with custom timeout.
func (*WaitGetDatabaseInstanceDatabaseAvailable[R]) OnProgress ¶ added in v0.78.0
func (w *WaitGetDatabaseInstanceDatabaseAvailable[R]) OnProgress(callback func(*DatabaseInstance)) *WaitGetDatabaseInstanceDatabaseAvailable[R]
OnProgress invokes a callback every time it polls for the status update.