athena

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 28 Imported by: 0

README

Athena

Parity grade: A · SDK aws-sdk-go-v2/service/athena@v1.57.2 · last audited 2026-07-12 (c4a90472)

Coverage

Metric Value
Operations audited 15 (14 ok, 1 partial)
Feature families 1 (1 ok)
Known gaps 4
Deferred items 1
Resource leaks clean
Known gaps
  • TagResource/UntagResource/ListTagsForResource do not validate resource existence, and ListTagsForResource ignores MaxResults/NextToken (bd: unfiled — flag for future sweep)
  • CreateDataCatalog/DeleteDataCatalog do not return the optional DataCatalog object the real API (SDK v1.57.2) now includes (bd: unfiled)
  • ListEngineVersions.EngineVersionDescriptor carries a fabricated AuthEngineVersion field not present on the real type (bd: unfiled)
  • Pagination NextToken across WorkGroups/NamedQueries/DataCatalogs/PreparedStatements silently resets to offset 0 on an unrecognized token instead of erroring (bd: unfiled)
Deferred
  • none — full routed-op surface audited this pass (base + extended dispatch tables, 70 ops total)

More

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound is returned when a requested resource that AWS reports via
	// InvalidRequestException does not exist (workgroups, named queries, data
	// catalogs, query executions, notebooks, capacity reservations). AWS Athena
	// returns InvalidRequestException — not a dedicated NotFound code — for these.
	ErrNotFound = errors.New(errTypeInvalidRequestExc)
	// ErrAlreadyExists is returned when a resource already exists. AWS Athena
	// reports duplicate workgroups/catalogs/notebooks as InvalidRequestException.
	ErrAlreadyExists = errors.New(errTypeInvalidRequestExc)
	// ErrProtected is returned when an operation is not allowed on a protected
	// resource (e.g. deleting the primary workgroup). AWS returns
	// InvalidRequestException for these.
	ErrProtected = errors.New(errTypeInvalidRequestExc)
	// ErrValidation is returned when input fails validation
	// (InvalidRequestException).
	ErrValidation = errors.New(errTypeInvalidRequestExc)
	// ErrResourceNotFound is returned for resources AWS reports with the
	// dedicated ResourceNotFoundException code: sessions, calculation
	// executions, and prepared statements.
	ErrResourceNotFound = errors.New(errTypeResourceNotFoundExc)
	// ErrMetadata is returned when a metadata lookup against the (emulated Glue)
	// catalog fails — missing databases and tables — which AWS surfaces as
	// MetadataException.
	ErrMetadata = errors.New(errTypeMetadataExc)
	// ErrSessionExists is returned when a session with the same identity already
	// exists (SessionAlreadyExistsException).
	ErrSessionExists = errors.New(errTypeSessionExistsExc)
)
View Source
var ErrUnknownOperation = errors.New("InvalidRequestException")

Functions

This section is empty.

Types

type ACLConfiguration

type ACLConfiguration struct {
	S3AclOption string `json:"S3AclOption,omitempty"`
}

ACLConfiguration controls S3 canned ACL for query results.

type ApplicationDPUSizes

type ApplicationDPUSizes struct {
	ApplicationRuntimeID string  `json:"ApplicationRuntimeId"`
	SupportedDPUSizes    []int32 `json:"SupportedDPUSizes,omitempty"`
}

ApplicationDPUSizes lists DPU sizes for a Spark application.

type CalculationExecution

type CalculationExecution struct {
	Result        CalculationResult     `json:"Result,omitzero"`
	CalculationID string                `json:"CalculationExecutionId"`
	SessionID     string                `json:"SessionId"`
	Description   string                `json:"Description,omitempty"`
	WorkingDir    string                `json:"WorkingDirectory,omitempty"`
	CodeBlock     string                `json:"CodeBlock,omitempty"`
	Status        CalculationStatus     `json:"Status"`
	Statistics    CalculationStatistics `json:"Statistics,omitzero"`
}

CalculationExecution is a Spark calculation run within a session.

type CalculationResult

type CalculationResult struct {
	StdOutS3URI   string `json:"StdOutS3Uri,omitempty"`
	StdErrorS3URI string `json:"StdErrorS3Uri,omitempty"`
	ResultS3URI   string `json:"ResultS3Uri,omitempty"`
	ResultType    string `json:"ResultType,omitempty"`
}

CalculationResult holds output references for a calculation.

type CalculationStatistics

type CalculationStatistics struct {
	DpuExecutionInMillis int64 `json:"DpuExecutionInMillis,omitempty"`
	Progress             int64 `json:"Progress,omitempty"`
}

CalculationStatistics holds calculation runtime stats.

type CalculationStatus

type CalculationStatus struct {
	StateChangeReason  string  `json:"StateChangeReason,omitempty"`
	State              string  `json:"State"`
	SubmissionDateTime float64 `json:"SubmissionDateTime,omitempty"`
	CompletionDateTime float64 `json:"CompletionDateTime,omitempty"`
}

CalculationStatus holds the lifecycle of a calculation.

type CalculationSummary

type CalculationSummary struct {
	CalculationID string            `json:"CalculationExecutionId"`
	Description   string            `json:"Description,omitempty"`
	Status        CalculationStatus `json:"Status,omitzero"`
}

CalculationSummary is the list view of a calculation execution.

type CapacityAllocation

type CapacityAllocation struct {
	Status                string  `json:"Status,omitempty"`
	StatusMessage         string  `json:"StatusMessage,omitempty"`
	RequestTime           float64 `json:"RequestTime,omitempty"`
	RequestCompletionTime float64 `json:"RequestCompletionTime,omitempty"`
}

CapacityAllocation describes a single capacity allocation attempt.

type CapacityAssignment

type CapacityAssignment struct {
	WorkGroupNames []string `json:"WorkGroupNames"`
}

CapacityAssignment maps a list of workgroup ARNs to a reservation.

type CapacityAssignmentConfiguration

type CapacityAssignmentConfiguration struct {
	CapacityReservationName string               `json:"CapacityReservationName"`
	CapacityAssignments     []CapacityAssignment `json:"CapacityAssignments,omitempty"`
}

CapacityAssignmentConfiguration is the config attached to a capacity reservation.

type CapacityReservation

type CapacityReservation struct {
	Tags                         map[string]string   `json:"Tags,omitempty"`
	LastAllocation               *CapacityAllocation `json:"LastAllocation,omitempty"`
	Name                         string              `json:"Name"`
	Status                       string              `json:"Status"`
	CreationTime                 float64             `json:"CreationTime,omitempty"`
	LastSuccessfulAllocationTime float64             `json:"LastSuccessfulAllocationTime,omitempty"`
	TargetDpus                   int32               `json:"TargetDpus"`
	AllocatedDpus                int32               `json:"AllocatedDpus"`
}

CapacityReservation represents an Athena capacity reservation.

type Column

type Column struct {
	Name    string `json:"Name"`
	Type    string `json:"Type,omitempty"`
	Comment string `json:"Comment,omitempty"`
}

Column describes a single column in a table.

type ConfigProvider

type ConfigProvider interface {
	GetAthenaSettings() Settings
}

ConfigProvider is a private interface to extract Athena configuration from the abstract AppContext Config.

type CustomerEncCfg

type CustomerEncCfg struct {
	KmsKey string `json:"KmsKey,omitempty"`
}

CustomerEncCfg holds KMS key for user data encryption.

type DataCatalog

type DataCatalog struct {
	Parameters     map[string]string `json:"Parameters,omitempty"`
	Tags           map[string]string `json:"Tags,omitempty"`
	Name           string            `json:"Name"`
	Type           string            `json:"Type"`
	Description    string            `json:"Description,omitempty"`
	ConnectionType string            `json:"ConnectionType,omitempty"`
	Error          string            `json:"Error,omitempty"`
	Status         string            `json:"Status,omitempty"`
}

DataCatalog represents an Athena data catalog.

type DataCatalogSummary

type DataCatalogSummary struct {
	CatalogName    string `json:"CatalogName"`
	Type           string `json:"Type"`
	ConnectionType string `json:"ConnectionType,omitempty"`
	Error          string `json:"Error,omitempty"`
	Status         string `json:"Status,omitempty"`
}

DataCatalogSummary is a reduced view of a DataCatalog for list responses.

type Database

type Database struct {
	Parameters map[string]string `json:"Parameters,omitempty"`
	Name       string            `json:"Name"`
	// Catalog is the data catalog this database belongs to. It is the first
	// component of the composite key store.Table's keyFn derives (see
	// databaseKeyFn in store_setup.go) and of the databasesByCatalog
	// secondary index -- Database itself carries no other notion of which
	// catalog it lives in, since AWS's own Database shape does not either.
	// Tagged json:"-" because a real persistence layer would round-trip it
	// through a dedicated DTO (see services/ses's IdentityRecord.Identity for
	// the established pattern) rather than relying on this field surviving a
	// direct JSON marshal.
	Catalog     string `json:"-"`
	Description string `json:"Description,omitempty"`
}

Database describes an Athena database.

type EncryptionConfiguration

type EncryptionConfiguration struct {
	EncryptionOption string `json:"EncryptionOption,omitempty"`
	KmsKey           string `json:"KmsKey,omitempty"`
}

EncryptionConfiguration holds encryption settings for query results.

type EngineConfiguration

type EngineConfiguration struct {
	AdditionalConfigs      map[string]string `json:"AdditionalConfigs,omitempty"`
	SparkProperties        map[string]string `json:"SparkProperties,omitempty"`
	DefaultExecutorDpuSize int32             `json:"DefaultExecutorDpuSize,omitempty"`
	MaxConcurrentDpus      int32             `json:"MaxConcurrentDpus,omitempty"`
	CoordinatorDpuSize     int32             `json:"CoordinatorDpuSize,omitempty"`
}

EngineConfiguration is the engine configuration for a session.

type EngineVersion

type EngineVersion struct {
	SelectedEngineVersion  string `json:"SelectedEngineVersion,omitempty"`
	EffectiveEngineVersion string `json:"EffectiveEngineVersion,omitempty"`
}

EngineVersion holds the engine version configuration for a workgroup.

type EngineVersionDescriptor

type EngineVersionDescriptor struct {
	AuthEngineVersion      string `json:"AuthEngineVersion,omitempty"`
	EffectiveEngineVersion string `json:"EffectiveEngineVersion,omitempty"`
	SelectedEngineVersion  string `json:"SelectedEngineVersion,omitempty"`
}

EngineVersionDescriptor describes an available engine version.

type Executor

type Executor struct {
	ExecutorID          string  `json:"ExecutorId"`
	ExecutorType        string  `json:"ExecutorType"`
	ExecutorState       string  `json:"ExecutorState"`
	StartDateTime       float64 `json:"StartDateTime,omitempty"`
	TerminationDateTime float64 `json:"TerminationDateTime,omitempty"`
	ExecutorSize        int64   `json:"ExecutorSize,omitempty"`
}

Executor describes a Spark executor.

type Handler

type Handler struct {
	Backend StorageBackend
	// contains filtered or unexported fields
}

Handler is the Echo HTTP service handler for Athena operations.

func NewHandler

func NewHandler(backend StorageBackend) *Handler

NewHandler creates a new Athena handler with the given storage backend.

func (*Handler) ChaosOperations

func (h *Handler) ChaosOperations() []string

ChaosOperations returns all operations that can be fault-injected.

func (*Handler) ChaosRegions

func (h *Handler) ChaosRegions() []string

ChaosRegions returns all regions this Athena instance handles.

func (*Handler) ChaosServiceName

func (h *Handler) ChaosServiceName() string

ChaosServiceName returns the lowercase AWS service name for fault rule matching.

func (*Handler) ExtractOperation

func (h *Handler) ExtractOperation(c *echo.Context) string

ExtractOperation extracts the specific Athena operation from the request.

func (*Handler) ExtractResource

func (h *Handler) ExtractResource(c *echo.Context) string

ExtractResource extracts the primary resource name from the request body. It decodes only the "Name" field rather than the whole body: httputils.ReadBody caches and rewinds the body, so this does not conflict with the dispatcher's own read, and the typed decode avoids allocating a map for every field.

func (*Handler) GetSupportedOperations

func (h *Handler) GetSupportedOperations() []string

GetSupportedOperations returns the list of mocked Athena operations.

func (*Handler) Handler

func (h *Handler) Handler() echo.HandlerFunc

Handler returns the Echo HTTP handler for Athena operations.

func (*Handler) MatchPriority

func (h *Handler) MatchPriority() int

MatchPriority returns the routing priority for the Athena handler.

func (*Handler) Name

func (h *Handler) Name() string

Name returns the service name.

func (*Handler) Restore

func (h *Handler) Restore(ctx context.Context, data []byte) error

Restore implements persistence.Persistable by delegating to the backend.

func (*Handler) RouteMatcher

func (h *Handler) RouteMatcher() service.Matcher

RouteMatcher returns a function that matches incoming requests for Athena.

func (*Handler) Snapshot

func (h *Handler) Snapshot(ctx context.Context) []byte

Snapshot implements persistence.Persistable by delegating to the backend.

func (*Handler) StartWorker

func (h *Handler) StartWorker(ctx context.Context) error

StartWorker starts the background janitor if configured.

func (*Handler) WithJanitor

func (h *Handler) WithJanitor(
	interval, executionTTL time.Duration,
	taskTimeout ...time.Duration,
) *Handler

WithJanitor attaches a background janitor to the handler. If the backend is not an *InMemoryBackend, this is a no-op.

type InMemoryBackend

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

InMemoryBackend implements StorageBackend using in-memory maps.

Every AWS resource collection is a *store.Table[T] registered on registry (see store_setup.go for the full split between tables registered directly and the two "dirty" tables handled separately); queryResults, tableData, and resourceTags remain plain maps -- see the store_setup.go file doc for why each is left as-is.

func NewInMemoryBackend

func NewInMemoryBackend(region, accountID string) *InMemoryBackend

NewInMemoryBackend creates a new InMemoryBackend and seeds the default "primary" workgroup.

func (*InMemoryBackend) BatchGetNamedQuery

func (b *InMemoryBackend) BatchGetNamedQuery(
	ids []string,
) ([]NamedQuery, []UnprocessedNamedQueryID)

BatchGetNamedQuery retrieves multiple named queries by ID.

func (*InMemoryBackend) BatchGetPreparedStatement

func (b *InMemoryBackend) BatchGetPreparedStatement(
	workGroup string,
	names []string,
) ([]PreparedStatement, []UnprocessedPreparedStatementName)

BatchGetPreparedStatement retrieves multiple prepared statements by name within a workgroup.

func (*InMemoryBackend) BatchGetQueryExecution

func (b *InMemoryBackend) BatchGetQueryExecution(
	ids []string,
) ([]QueryExecution, []UnprocessedQueryExecutionID)

BatchGetQueryExecution retrieves multiple query executions by ID.

func (*InMemoryBackend) CancelCapacityReservation

func (b *InMemoryBackend) CancelCapacityReservation(name string) error

CancelCapacityReservation cancels an active capacity reservation.

func (*InMemoryBackend) CreateCapacityReservation

func (b *InMemoryBackend) CreateCapacityReservation(
	name string,
	targetDPUs int32,
	tags map[string]string,
) error

CreateCapacityReservation creates a new capacity reservation.

func (*InMemoryBackend) CreateDataCatalog

func (b *InMemoryBackend) CreateDataCatalog(
	name, catalogType, description, connectionType string,
	params, tags map[string]string,
) error

CreateDataCatalog creates a new data catalog.

func (*InMemoryBackend) CreateNamedQuery

func (b *InMemoryBackend) CreateNamedQuery(
	name, description, database, queryString, workGroup string,
) (string, error)

CreateNamedQuery creates a new named query and returns its ID.

func (*InMemoryBackend) CreateNotebook

func (b *InMemoryBackend) CreateNotebook(
	workGroup, name string,
	tags map[string]string,
) (string, error)

CreateNotebook creates a new Athena notebook and returns its ID.

func (*InMemoryBackend) CreatePreparedStatement

func (b *InMemoryBackend) CreatePreparedStatement(
	name, description, workGroup, queryStatement string,
) error

CreatePreparedStatement creates a new prepared statement in a workgroup.

func (*InMemoryBackend) CreatePresignedNotebookURL

func (b *InMemoryBackend) CreatePresignedNotebookURL(sessionID string) (string, string, float64, error)

CreatePresignedNotebookURL generates a presigned notebook URL plus the AuthToken/AuthTokenExpirationTime pair the real CreatePresignedNotebookUrl response carries alongside it.

func (*InMemoryBackend) CreateWorkGroup

func (b *InMemoryBackend) CreateWorkGroup(
	name, description, state string,
	cfg WorkGroupConfiguration,
	tags map[string]string,
) error

CreateWorkGroup creates a new workgroup.

func (*InMemoryBackend) DeleteCapacityReservation

func (b *InMemoryBackend) DeleteCapacityReservation(name string) error

DeleteCapacityReservation removes a capacity reservation. The reservation must be in CANCELLING or CANCELLED status.

func (*InMemoryBackend) DeleteDataCatalog

func (b *InMemoryBackend) DeleteDataCatalog(name string) error

DeleteDataCatalog removes a data catalog by name. The built-in AwsDataCatalog cannot be deleted.

func (*InMemoryBackend) DeleteNamedQuery

func (b *InMemoryBackend) DeleteNamedQuery(id string) error

DeleteNamedQuery removes a named query by ID.

func (*InMemoryBackend) DeleteNotebook

func (b *InMemoryBackend) DeleteNotebook(notebookID string) error

DeleteNotebook removes a notebook by its ID.

func (*InMemoryBackend) DeletePreparedStatement

func (b *InMemoryBackend) DeletePreparedStatement(name, workGroup string) error

DeletePreparedStatement removes a prepared statement by name and workgroup.

func (*InMemoryBackend) DeleteWorkGroup

func (b *InMemoryBackend) DeleteWorkGroup(name string) error

DeleteWorkGroup removes a workgroup by name. The "primary" workgroup cannot be deleted.

func (*InMemoryBackend) ExportNotebook

func (b *InMemoryBackend) ExportNotebook(notebookID string) (NotebookMetadata, string, error)

ExportNotebook returns the notebook metadata and content for the given notebook ID.

func (*InMemoryBackend) GetCalculationExecution

func (b *InMemoryBackend) GetCalculationExecution(id string) (*CalculationExecution, error)

GetCalculationExecution returns a calculation execution by ID.

func (*InMemoryBackend) GetCalculationExecutionCode

func (b *InMemoryBackend) GetCalculationExecutionCode(id string) (string, error)

GetCalculationExecutionCode returns just the code block of a calculation.

func (*InMemoryBackend) GetCalculationExecutionStatus

func (b *InMemoryBackend) GetCalculationExecutionStatus(id string) (CalculationStatus, CalculationStatistics, error)

GetCalculationExecutionStatus returns just the status of a calculation.

func (*InMemoryBackend) GetCapacityAssignmentConfiguration

func (b *InMemoryBackend) GetCapacityAssignmentConfiguration(name string) (*CapacityAssignmentConfiguration, error)

GetCapacityAssignmentConfiguration returns the assignment configuration for a reservation.

func (*InMemoryBackend) GetCapacityReservation

func (b *InMemoryBackend) GetCapacityReservation(name string) (*CapacityReservation, error)

GetCapacityReservation returns a capacity reservation.

func (*InMemoryBackend) GetDataCatalog

func (b *InMemoryBackend) GetDataCatalog(name string) (*DataCatalog, error)

GetDataCatalog retrieves a data catalog by name.

func (*InMemoryBackend) GetDatabase

func (b *InMemoryBackend) GetDatabase(catalog, name string) (*Database, error)

GetDatabase returns a database by catalog and name.

func (*InMemoryBackend) GetNamedQuery

func (b *InMemoryBackend) GetNamedQuery(id string) (*NamedQuery, error)

GetNamedQuery retrieves a named query by ID.

func (*InMemoryBackend) GetNotebookMetadata

func (b *InMemoryBackend) GetNotebookMetadata(notebookID string) (*NotebookMetadata, error)

GetNotebookMetadata returns the metadata for a notebook by ID.

func (*InMemoryBackend) GetPreparedStatement

func (b *InMemoryBackend) GetPreparedStatement(name, workGroup string) (*PreparedStatement, error)

GetPreparedStatement retrieves a prepared statement by name and workgroup.

func (*InMemoryBackend) GetQueryExecution

func (b *InMemoryBackend) GetQueryExecution(id string) (*QueryExecution, error)

GetQueryExecution retrieves a query execution by ID.

func (*InMemoryBackend) GetQueryResults

func (b *InMemoryBackend) GetQueryResults(id, nextToken string, maxResults int) (*sqlResultPage, error)

GetQueryResults returns a paginated result page for a query execution. nextToken is a decimal-encoded row offset; empty string means start from 0. maxResults = 0 means "use default page size (1000)".

func (*InMemoryBackend) GetQueryRuntimeStatistics

func (b *InMemoryBackend) GetQueryRuntimeStatistics(id string) (*QueryRuntimeStatistics, error)

GetQueryRuntimeStatistics returns runtime statistics for a query execution.

func (*InMemoryBackend) GetResourceDashboard

func (b *InMemoryBackend) GetResourceDashboard(resourceARN string) (string, error)

GetResourceDashboard returns the Live UI/Persistence UI dashboard URL for a resource (session) ARN, matching the real GetResourceDashboard response's single required "Url" field.

func (*InMemoryBackend) GetSession

func (b *InMemoryBackend) GetSession(id string) (*Session, error)

GetSession returns the session matching the given ID.

func (*InMemoryBackend) GetSessionEndpoint

func (b *InMemoryBackend) GetSessionEndpoint(id string) (string, string, float64, error)

GetSessionEndpoint returns a presigned endpoint URL for the given session, plus the AuthToken/AuthTokenExpirationTime pair the real GetSessionEndpoint response carries alongside it.

func (*InMemoryBackend) GetSessionStatus

func (b *InMemoryBackend) GetSessionStatus(id string) (SessionStatus, error)

GetSessionStatus returns just the status for the session.

func (*InMemoryBackend) GetTableMetadata

func (b *InMemoryBackend) GetTableMetadata(catalog, database, table string) (*TableMetadata, error)

GetTableMetadata returns the metadata for a single table.

func (*InMemoryBackend) GetWorkGroup

func (b *InMemoryBackend) GetWorkGroup(name string) (*WorkGroup, error)

GetWorkGroup retrieves a workgroup by name.

func (*InMemoryBackend) ImportNotebook

func (b *InMemoryBackend) ImportNotebook(workGroup, name, payload, notebookType string) (string, error)

ImportNotebook creates a new notebook from inline payload.

func (*InMemoryBackend) InsertRows

func (b *InMemoryBackend) InsertRows(catalog, database, table string, rows []map[string]any)

InsertRows loads test data into a table for SQL execution. Rows are maps of column-name → value. All values are stored as-is and converted to strings when returned by GetQueryResults.

func (*InMemoryBackend) ListApplicationDPUSizes

func (b *InMemoryBackend) ListApplicationDPUSizes() []ApplicationDPUSizes

ListApplicationDPUSizes returns the available DPU sizes for Spark applications.

func (*InMemoryBackend) ListCalculationExecutions

func (b *InMemoryBackend) ListCalculationExecutions(sessionID, stateFilter string) ([]CalculationSummary, error)

ListCalculationExecutions lists calculations within a session.

func (*InMemoryBackend) ListCapacityReservations

func (b *InMemoryBackend) ListCapacityReservations() ([]CapacityReservation, error)

ListCapacityReservations returns all capacity reservations.

func (*InMemoryBackend) ListDataCatalogs

func (b *InMemoryBackend) ListDataCatalogs(
	nextToken string,
	maxResults int,
) ([]*DataCatalogSummary, string, error)

ListDataCatalogs returns summaries of all data catalogs with optional NextToken/MaxResults pagination.

func (*InMemoryBackend) ListDatabases

func (b *InMemoryBackend) ListDatabases(catalog string) ([]Database, error)

ListDatabases returns all databases for a catalog.

func (*InMemoryBackend) ListEngineVersions

func (b *InMemoryBackend) ListEngineVersions() []EngineVersionDescriptor

ListEngineVersions returns the engines available to a workgroup.

func (*InMemoryBackend) ListExecutors

func (b *InMemoryBackend) ListExecutors(sessionID, stateFilter string) ([]Executor, error)

ListExecutors returns executors associated with a session.

func (*InMemoryBackend) ListNamedQueries

func (b *InMemoryBackend) ListNamedQueries(
	workGroup, nextToken string,
	maxResults int,
) ([]string, string, error)

ListNamedQueries returns named query IDs, optionally filtered by workgroup, with pagination.

func (*InMemoryBackend) ListNotebookMetadata

func (b *InMemoryBackend) ListNotebookMetadata(workGroup, namePrefix string) ([]NotebookMetadata, error)

ListNotebookMetadata lists all notebooks (optionally filtered by workgroup and name).

func (*InMemoryBackend) ListNotebookSessions

func (b *InMemoryBackend) ListNotebookSessions(notebookID string) ([]SessionSummary, error)

ListNotebookSessions returns sessions associated with a notebook.

func (*InMemoryBackend) ListPreparedStatements

func (b *InMemoryBackend) ListPreparedStatements(
	workGroup, nextToken string,
	maxResults int,
) ([]PreparedStatementSummary, string, error)

ListPreparedStatements returns summary views of prepared statements in a workgroup, sorted by name, with optional NextToken/MaxResults pagination.

func (*InMemoryBackend) ListQueryExecutions

func (b *InMemoryBackend) ListQueryExecutions(workGroup string) ([]string, error)

ListQueryExecutions returns query execution IDs, optionally filtered by workgroup.

func (*InMemoryBackend) ListSessions

func (b *InMemoryBackend) ListSessions(workGroup, stateFilter string) ([]SessionSummary, error)

ListSessions returns sessions for a workgroup, optionally filtered by state.

func (*InMemoryBackend) ListTableMetadata

func (b *InMemoryBackend) ListTableMetadata(catalog, database, expr string) ([]TableMetadata, error)

ListTableMetadata returns all tables for a database, optionally filtered by name prefix.

func (*InMemoryBackend) ListTagsForResource

func (b *InMemoryBackend) ListTagsForResource(arn string) ([]Tag, error)

ListTagsForResource returns all tags for a resource identified by ARN.

func (*InMemoryBackend) ListWorkGroups

func (b *InMemoryBackend) ListWorkGroups(
	nextToken string,
	maxResults int,
) ([]*WorkGroupSummary, string, error)

ListWorkGroups returns summaries of all workgroups with optional NextToken/MaxResults pagination.

func (*InMemoryBackend) PutCapacityAssignmentConfiguration

func (b *InMemoryBackend) PutCapacityAssignmentConfiguration(
	name string, assignments []CapacityAssignment,
) error

PutCapacityAssignmentConfiguration sets the assignment configuration on a reservation.

func (*InMemoryBackend) Restore

func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error

Restore loads backend state from a JSON snapshot. It implements persistence.Persistable.

func (*InMemoryBackend) Snapshot

func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte

Snapshot serialises the backend state to JSON. It implements persistence.Persistable.

func (*InMemoryBackend) StartCalculationExecution

func (b *InMemoryBackend) StartCalculationExecution(
	sessionID, description, codeBlock string,
) (string, string, error)

StartCalculationExecution starts a Spark calculation in the given session.

func (*InMemoryBackend) StartQueryExecution

func (b *InMemoryBackend) StartQueryExecution(
	query, workGroup string,
	ctx QueryExecutionContext,
	rc ResultConfiguration,
	execParams []string,
	reuseCfg *ResultReuseConfiguration,
) (string, error)

StartQueryExecution records a new query execution and returns its ID.

func (*InMemoryBackend) StartSession

func (b *InMemoryBackend) StartSession(workGroup, description, notebookVersion string,
	engineCfg EngineConfiguration, sessionCfg SessionConfiguration, notebookID string,
) (string, string, error)

StartSession creates a new session in the specified workgroup.

func (*InMemoryBackend) StopCalculationExecution

func (b *InMemoryBackend) StopCalculationExecution(id string) (string, error)

StopCalculationExecution cancels a running calculation.

func (*InMemoryBackend) StopQueryExecution

func (b *InMemoryBackend) StopQueryExecution(id string) error

StopQueryExecution marks a query execution as cancelled.

func (*InMemoryBackend) TagResource

func (b *InMemoryBackend) TagResource(arn string, tags map[string]string) error

TagResource adds tags to a resource identified by ARN.

func (*InMemoryBackend) TerminateSession

func (b *InMemoryBackend) TerminateSession(id string) (string, error)

TerminateSession terminates an existing session.

func (*InMemoryBackend) UntagResource

func (b *InMemoryBackend) UntagResource(arn string, keys []string) error

UntagResource removes tags from a resource identified by ARN.

func (*InMemoryBackend) UpdateCapacityReservation

func (b *InMemoryBackend) UpdateCapacityReservation(name string, targetDPUs int32) error

UpdateCapacityReservation changes the target DPUs of a capacity reservation.

func (*InMemoryBackend) UpdateDataCatalog

func (b *InMemoryBackend) UpdateDataCatalog(
	name, catalogType, description, connectionType string,
	params map[string]string,
) error

UpdateDataCatalog updates an existing data catalog.

func (*InMemoryBackend) UpdateNamedQuery

func (b *InMemoryBackend) UpdateNamedQuery(id, name, description, queryString string) error

UpdateNamedQuery updates an existing named query's name, description, or query string.

func (*InMemoryBackend) UpdateNotebook

func (b *InMemoryBackend) UpdateNotebook(notebookID, payload, notebookType, sessionID string) error

UpdateNotebook replaces the payload of an existing notebook.

func (*InMemoryBackend) UpdateNotebookMetadata

func (b *InMemoryBackend) UpdateNotebookMetadata(notebookID, newName string) error

UpdateNotebookMetadata renames a notebook.

func (*InMemoryBackend) UpdatePreparedStatement

func (b *InMemoryBackend) UpdatePreparedStatement(name, workGroup, queryStatement, description string) error

UpdatePreparedStatement updates an existing prepared statement.

func (*InMemoryBackend) UpdateWorkGroup

func (b *InMemoryBackend) UpdateWorkGroup(
	name, description, state string,
	cfg *WorkGroupConfiguration,
) error

UpdateWorkGroup updates an existing workgroup.

type Janitor

type Janitor struct {
	Backend      *InMemoryBackend
	Interval     time.Duration
	ExecutionTTL time.Duration
	// TaskTimeout bounds each individual janitor task. When non-zero, each task
	// runs with a child context that expires after this duration, preventing a
	// stalled operation from blocking the janitor loop indefinitely.
	TaskTimeout time.Duration
}

Janitor is the Athena background worker that evicts completed query executions, their cached result sets, and stale sessions/calculations after a configurable TTL to prevent unbounded growth of in-memory state.

func NewJanitor

func NewJanitor(backend *InMemoryBackend, interval, executionTTL time.Duration) *Janitor

NewJanitor creates a new Athena Janitor for the given backend. Zero values for interval or executionTTL fall back to defaults.

func (*Janitor) Run

func (j *Janitor) Run(ctx context.Context)

Run runs the janitor loop until ctx is cancelled.

func (*Janitor) SweepOnce

func (j *Janitor) SweepOnce(ctx context.Context)

SweepOnce runs a single sweep pass. Exposed for testing.

type NamedQuery

type NamedQuery struct {
	NamedQueryID string `json:"NamedQueryId"`
	Name         string `json:"Name"`
	Description  string `json:"Description,omitempty"`
	Database     string `json:"Database"`
	QueryString  string `json:"QueryString"`
	WorkGroup    string `json:"WorkGroup,omitempty"`
}

NamedQuery represents a saved Athena query.

type Notebook

type Notebook struct {
	NotebookID       string  `json:"NotebookId"`
	Name             string  `json:"Name"`
	WorkGroup        string  `json:"WorkGroup"`
	Type             string  `json:"Type"`
	Content          string  `json:"Content"`
	CreationTime     float64 `json:"CreationTime,omitempty"`
	LastModifiedTime float64 `json:"LastModifiedTime,omitempty"`
}

Notebook represents an Athena notebook with its content.

type NotebookMetadata

type NotebookMetadata struct {
	NotebookID       string  `json:"NotebookId"`
	Name             string  `json:"Name"`
	WorkGroup        string  `json:"WorkGroup"`
	Type             string  `json:"Type"`
	CreationTime     float64 `json:"CreationTime,omitempty"`
	LastModifiedTime float64 `json:"LastModifiedTime,omitempty"`
}

NotebookMetadata holds metadata for an Athena notebook.

type PreparedStatement

type PreparedStatement struct {
	StatementName    string  `json:"StatementName"`
	WorkGroupName    string  `json:"WorkGroupName"`
	QueryStatement   string  `json:"QueryStatement"`
	Description      string  `json:"Description,omitempty"`
	LastModifiedTime float64 `json:"LastModifiedTime,omitempty"`
}

PreparedStatement represents an Athena prepared statement.

type PreparedStatementSummary

type PreparedStatementSummary struct {
	StatementName    string  `json:"StatementName"`
	LastModifiedTime float64 `json:"LastModifiedTime,omitempty"`
}

PreparedStatementSummary is a reduced view returned by ListPreparedStatements.

type Provider

type Provider struct{}

Provider implements service.Provider for the Athena service.

func (*Provider) Init

Init initializes the Athena backend and handler.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the logical name of the provider.

type QueryExecution

type QueryExecution struct {
	ResultConfiguration      ResultConfiguration       `json:"ResultConfiguration,omitzero"`
	QueryExecutionContext    QueryExecutionContext     `json:"QueryExecutionContext,omitzero"`
	ResultReuseConfiguration *ResultReuseConfiguration `json:"ResultReuseConfiguration,omitempty"`
	EngineVersion            *EngineVersion            `json:"EngineVersion,omitempty"`
	QueryExecutionID         string                    `json:"QueryExecutionId"`
	Query                    string                    `json:"Query"`
	WorkGroup                string                    `json:"WorkGroup,omitempty"`
	StatementType            string                    `json:"StatementType,omitempty"`
	ExecutionParameters      []string                  `json:"ExecutionParameters,omitempty"`
	Status                   QueryExecutionStatus      `json:"Status"`
	Statistics               QueryExecutionStatistics  `json:"Statistics,omitzero"`
}

QueryExecution represents an Athena query execution.

type QueryExecutionContext

type QueryExecutionContext struct {
	Database string `json:"Database,omitempty"`
	Catalog  string `json:"Catalog,omitempty"`
}

QueryExecutionContext holds the database and catalog for a query execution.

type QueryExecutionError

type QueryExecutionError struct {
	ErrorMessage  string `json:"ErrorMessage,omitempty"`
	ErrorCategory int32  `json:"ErrorCategory,omitempty"`
	ErrorType     int32  `json:"ErrorType,omitempty"`
	Retryable     bool   `json:"Retryable,omitempty"`
}

QueryExecutionError describes why a query execution reached the FAILED state, mirroring the AthenaError shape AWS returns inside QueryExecutionStatus (the JSON field is still "AthenaError").

type QueryExecutionStatistics

type QueryExecutionStatistics struct {
	DataManifestLocation             string  `json:"DataManifestLocation,omitempty"`
	DpuCount                         float64 `json:"DpuCount,omitempty"`
	EngineExecutionTimeInMillis      int64   `json:"EngineExecutionTimeInMillis,omitempty"`
	DataScannedInBytes               int64   `json:"DataScannedInBytes,omitempty"`
	QueryPlanningTimeInMillis        int64   `json:"QueryPlanningTimeInMillis,omitempty"`
	QueryQueueTimeInMillis           int64   `json:"QueryQueueTimeInMillis,omitempty"`
	ServicePreProcessingTimeInMillis int64   `json:"ServicePreProcessingTimeInMillis,omitempty"`
	ServiceProcessingTimeInMillis    int64   `json:"ServiceProcessingTimeInMillis,omitempty"`
	TotalExecutionTimeInMillis       int64   `json:"TotalExecutionTimeInMillis,omitempty"`
	ReusedPreviousResult             bool    `json:"ReusedPreviousResult,omitempty"`
}

QueryExecutionStatistics holds statistics for a query execution.

type QueryExecutionStatus

type QueryExecutionStatus struct {
	AthenaError        *QueryExecutionError `json:"AthenaError,omitempty"`
	State              string               `json:"State"`
	StateChangeReason  string               `json:"StateChangeReason,omitempty"`
	SubmissionDateTime float64              `json:"SubmissionDateTime,omitempty"`
	CompletionDateTime float64              `json:"CompletionDateTime,omitempty"`
}

QueryExecutionStatus holds the status of a query execution.

type QueryRuntimeStatistics

type QueryRuntimeStatistics struct {
	OutputStage QueryStage                     `json:"OutputStage,omitzero"`
	Timeline    QueryRuntimeStatisticsTimeline `json:"Timeline,omitzero"`
	Rows        QueryRuntimeStatisticsRows     `json:"Rows,omitzero"`
}

QueryRuntimeStatistics aggregates runtime stats for a query execution.

type QueryRuntimeStatisticsRows

type QueryRuntimeStatisticsRows struct {
	InputRows   int64 `json:"InputRows,omitempty"`
	InputBytes  int64 `json:"InputBytes,omitempty"`
	OutputRows  int64 `json:"OutputRows,omitempty"`
	OutputBytes int64 `json:"OutputBytes,omitempty"`
}

QueryRuntimeStatisticsRows is the rows portion.

type QueryRuntimeStatisticsTimeline

type QueryRuntimeStatisticsTimeline struct {
	QueryQueueTimeInMillis        int64 `json:"QueryQueueTimeInMillis,omitempty"`
	QueryPlanningTimeInMillis     int64 `json:"QueryPlanningTimeInMillis,omitempty"`
	EngineExecutionTimeInMillis   int64 `json:"EngineExecutionTimeInMillis,omitempty"`
	ServiceProcessingTimeInMillis int64 `json:"ServiceProcessingTimeInMillis,omitempty"`
	TotalExecutionTimeInMillis    int64 `json:"TotalExecutionTimeInMillis,omitempty"`
}

QueryRuntimeStatisticsTimeline is the timeline portion.

type QueryStage

type QueryStage struct {
	State         string `json:"State,omitempty"`
	StageID       int64  `json:"StageId,omitempty"`
	OutputBytes   int64  `json:"OutputBytes,omitempty"`
	OutputRows    int64  `json:"OutputRows,omitempty"`
	InputBytes    int64  `json:"InputBytes,omitempty"`
	InputRows     int64  `json:"InputRows,omitempty"`
	ExecutionTime int64  `json:"ExecutionTime,omitempty"`
}

QueryStage is a single stage in the runtime statistics tree.

type ResultConfiguration

type ResultConfiguration struct {
	// ACLConfiguration is tagged "AclConfiguration" (not "ACLConfiguration") to
	// match the real Athena wire shape: aws-sdk-go-v2's generated deserializer
	// switches on the exact-case JSON key "AclConfiguration", so a mismatched
	// tag here would make the SDK silently drop the field.
	ACLConfiguration        *ACLConfiguration       `json:"AclConfiguration,omitempty"`
	EncryptionConfiguration EncryptionConfiguration `json:"EncryptionConfiguration,omitzero"`
	ExpectedBucketOwner     string                  `json:"ExpectedBucketOwner,omitempty"`
	OutputLocation          string                  `json:"OutputLocation,omitempty"`
}

ResultConfiguration holds the configuration for where query results are stored.

type ResultReuseByAgeConfiguration

type ResultReuseByAgeConfiguration struct {
	Enabled         bool  `json:"Enabled"`
	MaxAgeInMinutes int32 `json:"MaxAgeInMinutes,omitempty"`
}

ResultReuseByAgeConfiguration controls result reuse by result age.

type ResultReuseConfiguration

type ResultReuseConfiguration struct {
	ResultReuseByAgeConfiguration *ResultReuseByAgeConfiguration `json:"ResultReuseByAgeConfiguration,omitempty"`
}

ResultReuseConfiguration controls whether previous query results can be reused.

type Session

type Session struct {
	EngineConfiguration  EngineConfiguration  `json:"EngineConfiguration,omitzero"`
	SessionConfiguration SessionConfiguration `json:"SessionConfiguration,omitzero"`
	SessionID            string               `json:"SessionId"`
	Description          string               `json:"Description,omitempty"`
	WorkGroup            string               `json:"WorkGroup"`
	NotebookVersion      string               `json:"NotebookVersion,omitempty"`
	NotebookID           string               `json:"NotebookId,omitempty"`
	Status               SessionStatus        `json:"Status"`
	Statistics           SessionStatistics    `json:"Statistics,omitzero"`
}

Session represents an interactive notebook session.

type SessionConfiguration

type SessionConfiguration struct {
	EncryptionConfiguration EncryptionConfiguration `json:"EncryptionConfiguration,omitzero"`
	WorkingDirectory        string                  `json:"WorkingDirectory,omitempty"`
	ExecutionRole           string                  `json:"ExecutionRole,omitempty"`
	IdleTimeoutSeconds      int64                   `json:"IdleTimeoutSeconds,omitempty"`
}

SessionConfiguration is the configuration for a session.

type SessionStatistics

type SessionStatistics struct {
	DpuExecutionInMillis int64 `json:"DpuExecutionInMillis,omitempty"`
}

SessionStatistics holds session-level statistics.

type SessionStatus

type SessionStatus struct {
	StateChangeReason    string  `json:"StateChangeReason,omitempty"`
	State                string  `json:"State"`
	StartDateTime        float64 `json:"StartDateTime,omitempty"`
	LastModifiedDateTime float64 `json:"LastModifiedDateTime,omitempty"`
	EndDateTime          float64 `json:"EndDateTime,omitempty"`
	IdleSinceDateTime    float64 `json:"IdleSinceDateTime,omitempty"`
}

SessionStatus tracks the lifecycle of a session.

type SessionSummary

type SessionSummary struct {
	SessionID       string        `json:"SessionId"`
	Description     string        `json:"Description,omitempty"`
	NotebookVersion string        `json:"NotebookVersion,omitempty"`
	Status          SessionStatus `json:"Status,omitzero"`
}

SessionSummary is the list view of a session.

type Settings

type Settings struct {
	JanitorInterval time.Duration `json:"janitor_interval" env:"ATHENA_JANITOR_INTERVAL" default:"1m"  help:"Janitor tick interval."` //nolint:lll // Kong struct tag makes this line long
	ExecutionTTL    time.Duration ``                                                                                                  //nolint:lll // Kong struct tag makes this line long
	/* 134-byte string literal not displayed */
}

Settings holds service-level configuration for the Athena backend. Fields are picked up by the Kong CLI parser when this struct is embedded in the root CLI command.

type StorageBackend

type StorageBackend interface {
	// WorkGroups
	CreateWorkGroup(
		name, description, state string,
		cfg WorkGroupConfiguration,
		tags map[string]string,
	) error
	GetWorkGroup(name string) (*WorkGroup, error)
	ListWorkGroups(nextToken string, maxResults int) ([]*WorkGroupSummary, string, error)
	UpdateWorkGroup(name, description, state string, cfg *WorkGroupConfiguration) error
	DeleteWorkGroup(name string) error

	// Named Queries
	CreateNamedQuery(name, description, database, queryString, workGroup string) (string, error)
	GetNamedQuery(id string) (*NamedQuery, error)
	ListNamedQueries(workGroup, nextToken string, maxResults int) ([]string, string, error)
	BatchGetNamedQuery(ids []string) ([]NamedQuery, []UnprocessedNamedQueryID)
	DeleteNamedQuery(id string) error

	// Data Catalogs
	CreateDataCatalog(
		name, catalogType, description, connectionType string,
		params, tags map[string]string,
	) error
	GetDataCatalog(name string) (*DataCatalog, error)
	ListDataCatalogs(nextToken string, maxResults int) ([]*DataCatalogSummary, string, error)
	UpdateDataCatalog(
		name, catalogType, description, connectionType string,
		params map[string]string,
	) error
	DeleteDataCatalog(name string) error

	// Query Executions
	StartQueryExecution(
		query, workGroup string,
		ctx QueryExecutionContext,
		rc ResultConfiguration,
		execParams []string,
		reuseCfg *ResultReuseConfiguration,
	) (string, error)
	GetQueryExecution(id string) (*QueryExecution, error)
	GetQueryResults(id, nextToken string, maxResults int) (*sqlResultPage, error)
	ListQueryExecutions(workGroup string) ([]string, error)
	StopQueryExecution(id string) error
	BatchGetQueryExecution(ids []string) ([]QueryExecution, []UnprocessedQueryExecutionID)

	// Tags
	TagResource(arn string, tags map[string]string) error
	UntagResource(arn string, keys []string) error
	ListTagsForResource(arn string) ([]Tag, error)

	// Prepared Statements
	BatchGetPreparedStatement(
		workGroup string,
		names []string,
	) ([]PreparedStatement, []UnprocessedPreparedStatementName)
	CreatePreparedStatement(name, description, workGroup, queryStatement string) error
	DeletePreparedStatement(name, workGroup string) error
	GetPreparedStatement(name, workGroup string) (*PreparedStatement, error)
	ListPreparedStatements(
		workGroup, nextToken string,
		maxResults int,
	) ([]PreparedStatementSummary, string, error)

	// Capacity Reservations
	CancelCapacityReservation(name string) error
	CreateCapacityReservation(name string, targetDPUs int32, tags map[string]string) error
	DeleteCapacityReservation(name string) error

	// Notebooks
	CreateNotebook(workGroup, name string, tags map[string]string) (string, error)
	CreatePresignedNotebookURL(sessionID string) (url, authToken string, authTokenExpiration float64, err error)
	DeleteNotebook(notebookID string) error
	ExportNotebook(notebookID string) (NotebookMetadata, string, error)
	GetNotebookMetadata(notebookID string) (*NotebookMetadata, error)
	ListNotebookMetadata(workGroup, namePrefix string) ([]NotebookMetadata, error)
	ImportNotebook(workGroup, name, payload, notebookType string) (string, error)
	UpdateNotebook(notebookID, payload, notebookType, sessionID string) error
	UpdateNotebookMetadata(notebookID, newName string) error

	// Sessions
	StartSession(
		workGroup, description, notebookVersion string,
		engineCfg EngineConfiguration,
		sessionCfg SessionConfiguration,
		notebookID string,
	) (string, string, error)
	GetSession(id string) (*Session, error)
	GetSessionStatus(id string) (SessionStatus, error)
	GetSessionEndpoint(id string) (url, authToken string, authTokenExpiration float64, err error)
	TerminateSession(id string) (string, error)
	ListSessions(workGroup, stateFilter string) ([]SessionSummary, error)
	ListNotebookSessions(notebookID string) ([]SessionSummary, error)

	// Calculations
	StartCalculationExecution(sessionID, description, codeBlock string) (string, string, error)
	GetCalculationExecution(id string) (*CalculationExecution, error)
	GetCalculationExecutionStatus(id string) (CalculationStatus, CalculationStatistics, error)
	GetCalculationExecutionCode(id string) (string, error)
	StopCalculationExecution(id string) (string, error)
	ListCalculationExecutions(sessionID, stateFilter string) ([]CalculationSummary, error)

	// Capacity reservations (extended)
	GetCapacityReservation(name string) (*CapacityReservation, error)
	ListCapacityReservations() ([]CapacityReservation, error)
	UpdateCapacityReservation(name string, targetDPUs int32) error
	PutCapacityAssignmentConfiguration(name string, assignments []CapacityAssignment) error
	GetCapacityAssignmentConfiguration(name string) (*CapacityAssignmentConfiguration, error)

	// Database / table metadata
	GetDatabase(catalog, name string) (*Database, error)
	ListDatabases(catalog string) ([]Database, error)
	GetTableMetadata(catalog, database, table string) (*TableMetadata, error)
	ListTableMetadata(catalog, database, expr string) ([]TableMetadata, error)

	// Misc updates / runtime stats
	UpdateNamedQuery(id, name, description, queryString string) error
	UpdatePreparedStatement(name, workGroup, queryStatement, description string) error
	GetQueryRuntimeStatistics(id string) (*QueryRuntimeStatistics, error)
	GetResourceDashboard(resourceARN string) (string, error)

	// Engine version / executor / DPU listings
	ListEngineVersions() []EngineVersionDescriptor
	ListApplicationDPUSizes() []ApplicationDPUSizes
	ListExecutors(sessionID, stateFilter string) ([]Executor, error)
}

StorageBackend is the interface for the Athena in-memory store.

type TableMetadata

type TableMetadata struct {
	Parameters map[string]string `json:"Parameters,omitempty"`
	Name       string            `json:"Name"`
	TableType  string            `json:"TableType,omitempty"`
	// Catalog and Database identify which data catalog and database this
	// table belongs to. Together with Name they form the composite key
	// store.Table's keyFn derives (see tableMetadataKeyFn in
	// store_setup.go); Database alone is the tablesByDatabase secondary
	// index's group key. Tagged json:"-" for the same reason as
	// Database.Catalog above.
	Catalog        string   `json:"-"`
	Database       string   `json:"-"`
	Columns        []Column `json:"Columns,omitempty"`
	PartitionKeys  []Column `json:"PartitionKeys,omitempty"`
	CreateTime     float64  `json:"CreateTime,omitempty"`
	LastAccessTime float64  `json:"LastAccessTime,omitempty"`
}

TableMetadata describes a table.

type Tag

type Tag struct {
	Key   string `json:"Key"`
	Value string `json:"Value"`
}

Tag is a key-value pair.

type UnprocessedNamedQueryID

type UnprocessedNamedQueryID struct {
	NamedQueryID string `json:"NamedQueryId"`
	ErrorCode    string `json:"ErrorCode,omitempty"`
	ErrorMessage string `json:"ErrorMessage,omitempty"`
}

UnprocessedNamedQueryID describes a named query that could not be retrieved.

type UnprocessedPreparedStatementName

type UnprocessedPreparedStatementName struct {
	StatementName string `json:"StatementName"`
	ErrorMessage  string `json:"ErrorMessage"`
}

UnprocessedPreparedStatementName describes a prepared statement that could not be retrieved.

type UnprocessedQueryExecutionID

type UnprocessedQueryExecutionID struct {
	QueryExecutionID string `json:"QueryExecutionId"`
	ErrorCode        string `json:"ErrorCode,omitempty"`
	ErrorMessage     string `json:"ErrorMessage,omitempty"`
}

UnprocessedQueryExecutionID describes a query execution that could not be retrieved.

type WorkGroup

type WorkGroup struct {
	Name          string                 `json:"Name"`
	Description   string                 `json:"Description,omitempty"`
	State         string                 `json:"State"`
	Tags          map[string]string      `json:"Tags,omitempty"`
	Configuration WorkGroupConfiguration `json:"Configuration,omitzero"`
	CreationTime  float64                `json:"CreationTime,omitempty"`
}

WorkGroup represents an Athena workgroup.

type WorkGroupConfiguration

type WorkGroupConfiguration struct {
	CustomerContentEncryptionConfiguration *CustomerEncCfg     `json:"CustomerContentEncryptionConfiguration,omitempty"`
	ResultConfiguration                    ResultConfiguration `json:"ResultConfiguration,omitzero"`
	EngineVersion                          EngineVersion       `json:"EngineVersion,omitzero"`
	AdditionalConfiguration                string              `json:"AdditionalConfiguration,omitempty"`
	ExecutionRole                          string              `json:"ExecutionRole,omitempty"`
	BytesScannedCutoffPerQuery             int64               `json:"BytesScannedCutoffPerQuery,omitempty"`
	EnableMinEnc                           bool                `json:"EnableMinimumEncryptionConfiguration,omitempty"`
	EnforceWGCfg                           bool                `json:"EnforceWorkGroupConfiguration,omitempty"`
	PublishCWMetrics                       bool                `json:"PublishCloudWatchMetricsEnabled,omitempty"`
	RequesterPays                          bool                `json:"RequesterPaysEnabled,omitempty"`
}

WorkGroupConfiguration holds configuration for a workgroup.

type WorkGroupSummary

type WorkGroupSummary struct {
	EngineVersion *EngineVersion `json:"EngineVersion,omitempty"`
	Name          string         `json:"Name"`
	Description   string         `json:"Description,omitempty"`
	State         string         `json:"State"`
	CreationTime  float64        `json:"CreationTime,omitempty"`
}

WorkGroupSummary is a reduced view of a WorkGroup for list responses.

Jump to

Keyboard shortcuts

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