Help us shape the future of Go! Take the 2026 Go Developer Survey

bcmdataexports

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 31 Imported by: 0

README

Bcmdataexports

Parity grade: B · SDK aws-sdk-go-v2/service/bcmdataexports@v1.25.4 · last audited 2026-10-18 (4ae40e79e)

Coverage

Metric Value
PARITY entries audited 12 (12 ok)
Feature families 3 (3 ok)
Known gaps 6
Deferred items 0
Resource leaks clean
Known gaps
  • tables: only COST_AND_USAGE_REPORT, FOCUS_1_0_AWS, CARBON_EMISSIONS and COST_OPTIMIZATION_RECOMMENDATIONS exist; FOCUS_1_2_AWS and other real tables are absent
  • columns: COST_AND_USAGE_REPORT carries about 40 of the real CUR 2.0 columns and FOCUS_1_0_AWS the 43 FOCUS 1.0 columns plus 5 x_ extensions; the exact x_ set is unverified
  • CARBON_EMISSIONS and COST_OPTIMIZATION_RECOMMENDATIONS: schemas only, exports contain headers and no rows (no emissions or recommendation data source)
  • manifest: the metadata manifest layout is an emulator shape, not verified against the real service
  • error bodies: ResourceNotFoundException carries ResourceId/ResourceType and ValidationException carries Reason/Fields where the field is known; ServiceQuotaExceeded ResourceId/ResourceType/QuotaCode/ServiceCode and Throttling QuotaCode/ServiceCode are not set; query-parser validation errors report Reason other without Fields
  • MaxResults bounds: 1-100 assumed

More

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAccessDenied         = errors.New("access denied")
	ErrInternalServer       = errors.New("internal server error")
	ErrResourceNotFound     = errors.New("resource not found")
	ErrServiceQuotaExceeded = errors.New("service quota exceeded")
	ErrThrottling           = errors.New("throttled")
	ErrValidation           = errors.New("validation failed")
)

Sentinels, one per exception in the pinned SDK's error set.

Functions

func GetTable

func GetTable(name string, props map[string]string) (getTableResp, error)

GetTable returns a table schema under the given properties.

func ListTables

func ListTables(token string, maxResults *int32) (page.Page[tableWire], error)

ListTables lists every exportable table.

Types

type Execution

type Execution struct {
	CreatedAt     time.Time `json:"createdAt"`
	LastUpdatedAt time.Time `json:"lastUpdatedAt"`
	CompletedAt   time.Time `json:"completedAt"`
	Export        Export    `json:"export"`
	Key           string    `json:"key"`
	ID            string    `json:"id"`
	ExportARN     string    `json:"exportArn"`
	StatusCode    string    `json:"statusCode"`
	StatusReason  string    `json:"statusReason"`
}

Execution is one run of an export; Export is the definition it ran with.

type Export

type Export struct {
	CreatedAt       time.Time                    `json:"createdAt"`
	LastUpdatedAt   time.Time                    `json:"lastUpdatedAt"`
	LastRefreshedAt time.Time                    `json:"lastRefreshedAt"`
	TableConfigs    map[string]map[string]string `json:"tableConfigs"`
	Tags            map[string]string            `json:"tags"`
	ARN             string                       `json:"arn"`
	Name            string                       `json:"name"`
	Description     string                       `json:"description"`
	Query           string                       `json:"query"`
	S3Bucket        string                       `json:"s3Bucket"`
	S3Prefix        string                       `json:"s3Prefix"`
	S3Region        string                       `json:"s3Region"`
	S3BucketOwner   string                       `json:"s3BucketOwner"`
	OutputType      string                       `json:"outputType"`
	Format          string                       `json:"format"`
	Compression     string                       `json:"compression"`
	Overwrite       string                       `json:"overwrite"`
	Frequency       string                       `json:"frequency"`
	StatusCode      string                       `json:"statusCode"`
	StatusReason    string                       `json:"statusReason"`
}

Export is a stored data export and its health.

type Handler

type Handler struct {
	Backend *InMemoryBackend
}

Handler serves the Data Exports awsjson1.1 API.

func NewHandler

func NewHandler(backend *InMemoryBackend) *Handler

NewHandler wraps a backend.

func (*Handler) ChaosOperations

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

ChaosOperations lists the fault-injectable operations.

func (*Handler) ChaosRegions

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

ChaosRegions lists the regions this handler serves; Data Exports is homed in us-east-1.

func (*Handler) ChaosServiceName

func (h *Handler) ChaosServiceName() string

ChaosServiceName returns the lowercase service name for fault rules.

func (*Handler) ExtractOperation

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

ExtractOperation returns the operation name from X-Amz-Target.

func (*Handler) ExtractResource

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

ExtractResource returns the operation name; the API has no single resource key.

func (*Handler) GetSupportedOperations

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

GetSupportedOperations lists every routed operation.

func (*Handler) Handler

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

Handler returns the echo handler.

func (*Handler) MatchPriority

func (h *Handler) MatchPriority() int

MatchPriority returns the routing priority.

func (*Handler) Name

func (h *Handler) Name() string

Name returns the service name.

func (*Handler) Reset

func (h *Handler) Reset()

Reset clears all state.

func (*Handler) Restore

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

Restore implements persistence.Persistable.

func (*Handler) RouteMatcher

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

RouteMatcher matches the AWSBillingAndCostManagementDataExports X-Amz-Target prefix.

func (*Handler) Snapshot

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

Snapshot implements persistence.Persistable.

func (*Handler) StartWorker

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

StartWorker advances export executions until ctx is cancelled.

type InMemoryBackend

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

InMemoryBackend is the Data Exports state; one coarse lock guards the tables and wired sinks.

func NewInMemoryBackend

func NewInMemoryBackend(accountID, region string) *InMemoryBackend

NewInMemoryBackend creates an empty backend.

func (*InMemoryBackend) CreateExport

func (b *InMemoryBackend) CreateExport(w *exportWire, tagList []tags.KV) (string, error)

CreateExport creates an export and queues its first execution.

func (*InMemoryBackend) DeleteExport

func (b *InMemoryBackend) DeleteExport(exportArn string) (string, error)

DeleteExport removes an export and its executions.

func (*InMemoryBackend) GetExecution

func (b *InMemoryBackend) GetExecution(exportArn, id string) (getExecResp, error)

GetExecution returns one execution and the definition it ran with.

func (*InMemoryBackend) GetExport

func (b *InMemoryBackend) GetExport(exportArn string) (exportWire, exportStatusWire, error)

GetExport returns an export and its status.

func (*InMemoryBackend) ListExecutions

func (b *InMemoryBackend) ListExecutions(exportArn, token string, maxResults *int32) (page.Page[execRefWire], error)

ListExecutions lists an export's executions, newest first.

func (*InMemoryBackend) ListExports

func (b *InMemoryBackend) ListExports(token string, maxResults *int32) (page.Page[exportRefWire], error)

ListExports lists exports ordered by name.

func (*InMemoryBackend) ListTagsForResource

func (b *InMemoryBackend) ListTagsForResource(
	resourceArn, token string,
	maxResults *int32,
) (page.Page[tags.KV], error)

ListTagsForResource returns an export's tags.

func (*InMemoryBackend) ProcessExecutions

func (b *InMemoryBackend) ProcessExecutions(ctx context.Context)

ProcessExecutions advances every in-flight execution one lifecycle step; delivery writes the result to S3.

func (*InMemoryBackend) Region

func (b *InMemoryBackend) Region() string

Region returns the home region.

func (*InMemoryBackend) Reset

func (b *InMemoryBackend) Reset()

Reset clears all state.

func (*InMemoryBackend) Restore

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

Restore loads a snapshot; an incompatible version is discarded.

func (*InMemoryBackend) SetCostSource

func (b *InMemoryBackend) SetCostSource(c billingexport.CostSource)

SetCostSource wires the cost data the cost tables are derived from.

func (*InMemoryBackend) SetObjectStore

func (b *InMemoryBackend) SetObjectStore(s billingexport.ObjectStore)

SetObjectStore wires the S3 exports are delivered to.

func (*InMemoryBackend) Snapshot

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

Snapshot serialises the backend state.

func (*InMemoryBackend) TagResource

func (b *InMemoryBackend) TagResource(resourceArn string, list []tags.KV) error

TagResource adds or replaces tags on an export.

func (*InMemoryBackend) UntagResource

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

UntagResource removes tags by key.

func (*InMemoryBackend) UpdateExport

func (b *InMemoryBackend) UpdateExport(exportArn string, w *exportWire) (string, error)

UpdateExport replaces an export definition and queues a new execution.

type Provider

type Provider struct{}

Provider implements service.Provider for AWS Billing and Cost Management Data Exports.

func (*Provider) Init

Init builds the backend and handler.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the provider name.

Jump to

Keyboard shortcuts

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