personalize

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 20 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Personalize

Parity grade: A · SDK aws-sdk-go-v2/service/personalize@v1.47.11 · last audited 2026-07-23 (12cf224d)

Coverage

Metric Value
Operations audited 73 (73 ok)
Feature families 2 (2 ok)
Known gaps 2
Deferred items 2
Resource leaks clean
Known gaps
    • SolutionVersion does not model datasetGroupArn/eventType/performAutoML/ performHPO/performIncrementalUpdate/recipeArn/failureReason -- real AWS copies these from the parent Solution onto each trained version (verified against types.SolutionVersion). Discovered field-diffing this pass; additive-only, low-traffic fields, deferred rather than fixed alongside the FK-validation/config-round-trip work (needs a bd issue).
    • Solution.latestSolutionVersion (types.SolutionVersionSummary of the most recently created version) is not modeled on DescribeSolution -- would require a cross-table lookup (scan solutionVersions for the given solutionArn, pick the max by CreationDateTime) that the current describeSolution/solutionToMap pure-function shape doesn't have backend access to do; deferred rather than plumbed through piecemeal this pass (needs a bd issue).
Deferred
    • SolutionVersion/Solution.latestSolutionVersion missing fields (see gaps)
    • itemExplorationConfig/trainingDataConfig/AutoMLConfig/AutoTrainingConfig/ HPOConfig/EventsConfig sub-objects inside CampaignConfig/ RecommenderConfig/SolutionConfig are round-tripped opaquely (whatever the caller sends comes back unmodified on Describe/List) rather than deeply typed/interpreted server-side -- matches the DataSource/JobOutput/ MetricsOutputConfig pattern used elsewhere in this backend for deeply nested optional AWS structures. This is sufficient for wire-shape parity (an emulator has no training loop to actually interpret HPO/AutoML hyperparameters against) but is noted here since it is a deliberate modeling simplification, not an oversight.

More

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound is returned when a requested resource is absent.
	ErrNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound)
	// ErrAlreadyExists is returned when a resource name already exists.
	ErrAlreadyExists = awserr.New("ResourceAlreadyExistsException", awserr.ErrAlreadyExists)
	// ErrValidation is returned when a request is invalid.
	ErrValidation = awserr.New("InvalidInputException", awserr.ErrInvalidParameter)
	// ErrInUse is returned when a resource cannot be deleted because it is in use.
	ErrInUse = awserr.New("ResourceInUseException", awserr.ErrConflict)
)
View Source
var ErrNilAppContext = errors.New("personalize: nil AppContext")

ErrNilAppContext is returned when Provider.Init is called with a nil AppContext.

Functions

This section is empty.

Types

type BatchInferenceJob

type BatchInferenceJob struct {
	CreationDateTime     time.Time
	LastUpdatedDateTime  time.Time
	JobInput             map[string]any
	JobOutput            map[string]any
	BatchInferenceJobArn string
	SolutionVersionArn   string
	JobName              string
	RoleArn              string
	Status               string
}

BatchInferenceJob stores an async batch inference job.

type BatchSegmentJob

type BatchSegmentJob struct {
	CreationDateTime    time.Time
	LastUpdatedDateTime time.Time
	JobInput            map[string]any
	JobOutput           map[string]any
	BatchSegmentJobArn  string
	SolutionVersionArn  string
	JobName             string
	RoleArn             string
	Status              string
}

BatchSegmentJob stores an async batch segment job.

type Campaign

type Campaign struct {
	CreationDateTime     time.Time
	LastUpdatedDateTime  time.Time
	CampaignConfig       map[string]any
	LatestCampaignUpdate map[string]any
	CampaignArn          string
	SolutionVersionArn   string
	Name                 string
	Status               string
	MinProvisionedTPS    int32
}

Campaign stores an Amazon Personalize campaign.

type DataDeletionJob

type DataDeletionJob struct {
	CreationDateTime    time.Time
	LastUpdatedDateTime time.Time
	DataSource          map[string]any
	DataDeletionJobArn  string
	DatasetGroupArn     string
	JobName             string
	RoleArn             string
	Status              string
	NumDeleted          int32
}

DataDeletionJob stores an async data deletion job.

type Dataset

type Dataset struct {
	CreationDateTime    time.Time
	LastUpdatedDateTime time.Time
	DatasetArn          string
	DatasetGroupArn     string
	SchemaArn           string
	Name                string
	DatasetType         string
	Status              string
}

Dataset stores an Amazon Personalize dataset.

type DatasetExportJob

type DatasetExportJob struct {
	CreationDateTime    time.Time
	LastUpdatedDateTime time.Time
	JobOutput           map[string]any
	DatasetExportJobArn string
	DatasetArn          string
	JobName             string
	RoleArn             string
	Status              string
}

DatasetExportJob stores an async dataset export job.

type DatasetGroup

type DatasetGroup struct {
	CreationDateTime    time.Time
	LastUpdatedDateTime time.Time
	DatasetGroupArn     string
	Name                string
	Domain              string
	KmsKeyArn           string
	RoleArn             string
	FailureReason       string
	Status              string
}

DatasetGroup stores an Amazon Personalize dataset group.

type DatasetImportJob

type DatasetImportJob struct {
	CreationDateTime    time.Time
	LastUpdatedDateTime time.Time
	DataSource          map[string]any
	DatasetImportJobArn string
	DatasetArn          string
	JobName             string
	RoleArn             string
	Status              string
}

DatasetImportJob stores an async dataset import job.

type EventTracker

type EventTracker struct {
	CreationDateTime    time.Time
	LastUpdatedDateTime time.Time
	EventTrackerArn     string
	DatasetGroupArn     string
	Name                string
	TrackingID          string
	Status              string
}

EventTracker stores an Amazon Personalize event tracker.

type Filter

type Filter struct {
	CreationDateTime    time.Time
	LastUpdatedDateTime time.Time
	FilterArn           string
	DatasetGroupArn     string
	Name                string
	FilterExpression    string
	Status              string
}

Filter stores an Amazon Personalize filter.

type Handler

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

Handler serves Amazon Personalize JSON operations.

func NewHandler

func NewHandler(backend *InMemoryBackend) *Handler

NewHandler creates a Personalize handler backed by in-memory state.

func (*Handler) ChaosOperations

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

ChaosOperations returns fault-injectable operations.

func (*Handler) ChaosRegions

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

ChaosRegions returns configured service region.

func (*Handler) ChaosServiceName

func (h *Handler) ChaosServiceName() string

ChaosServiceName returns service key for fault matching.

func (*Handler) ExtractOperation

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

ExtractOperation returns the operation name from the request target.

func (*Handler) ExtractResource

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

ExtractResource returns an empty string (no generic resource identifier).

func (*Handler) GetSupportedOperations

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

GetSupportedOperations returns all implemented operation names.

func (*Handler) Handler

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

Handler returns the Echo HTTP handler.

func (*Handler) MatchPriority

func (h *Handler) MatchPriority() int

MatchPriority returns header matching priority.

func (*Handler) Name

func (h *Handler) Name() string

Name returns service name.

func (*Handler) Reset

func (h *Handler) Reset()

Reset clears all backend state for the /_gopherstack/reset test hook.

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 matches Personalize and Personalize Runtime X-Amz-Target headers.

func (*Handler) Snapshot

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

Snapshot implements persistence.Persistable by delegating to the backend. Before this, Handler had no Snapshot/Restore of its own and InMemoryBackend had no persistence at all -- Personalize was entirely excluded from Gopherstack's persistence.Manager (it type-asserts each service's Registerable to persistence.Persistable). This is the Phase 3.3 dead-wiring fix: Personalize now round-trips full state like every other converted service.

type InMemoryBackend

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

InMemoryBackend stores Amazon Personalize state.

func NewInMemoryBackend

func NewInMemoryBackend(accountID, region string) *InMemoryBackend

NewInMemoryBackend returns a stateful Amazon Personalize backend.

func (*InMemoryBackend) CreateBatchInferenceJob

func (b *InMemoryBackend) CreateBatchInferenceJob(
	jobName, solutionVersionArn, roleArn string,
	jobInput, jobOutput map[string]any,
	tags map[string]string,
) (*BatchInferenceJob, error)

CreateBatchInferenceJob creates a new batch inference job.

func (*InMemoryBackend) CreateBatchSegmentJob

func (b *InMemoryBackend) CreateBatchSegmentJob(
	jobName, solutionVersionArn, roleArn string,
	jobInput, jobOutput map[string]any,
	tags map[string]string,
) (*BatchSegmentJob, error)

CreateBatchSegmentJob creates a new batch segment job.

func (*InMemoryBackend) CreateCampaign

func (b *InMemoryBackend) CreateCampaign(
	name, solutionVersionArn string,
	minProvisionedTPS int32,
	campaignConfig map[string]any,
	tags map[string]string,
) (*Campaign, error)

CreateCampaign creates a new campaign.

func (*InMemoryBackend) CreateDataDeletionJob

func (b *InMemoryBackend) CreateDataDeletionJob(
	jobName, datasetGroupArn, roleArn string,
	dataSource map[string]any,
	tags map[string]string,
) (*DataDeletionJob, error)

CreateDataDeletionJob creates a new data deletion job.

func (*InMemoryBackend) CreateDataset

func (b *InMemoryBackend) CreateDataset(
	name, datasetGroupArn, datasetType, schemaArn string,
	tags map[string]string,
) (*Dataset, error)

CreateDataset creates a new dataset.

func (*InMemoryBackend) CreateDatasetExportJob

func (b *InMemoryBackend) CreateDatasetExportJob(
	jobName, datasetArn, roleArn string,
	jobOutput map[string]any,
	tags map[string]string,
) (*DatasetExportJob, error)

CreateDatasetExportJob creates a new dataset export job.

func (*InMemoryBackend) CreateDatasetGroup

func (b *InMemoryBackend) CreateDatasetGroup(
	name, domain, kmsKeyArn, roleArn string,
	tags map[string]string,
) (*DatasetGroup, error)

CreateDatasetGroup creates a new dataset group.

func (*InMemoryBackend) CreateDatasetImportJob

func (b *InMemoryBackend) CreateDatasetImportJob(
	jobName, datasetArn, roleArn string,
	dataSource map[string]any,
	tags map[string]string,
) (*DatasetImportJob, error)

CreateDatasetImportJob creates a new dataset import job.

func (*InMemoryBackend) CreateEventTracker

func (b *InMemoryBackend) CreateEventTracker(
	name, datasetGroupArn string,
	tags map[string]string,
) (*EventTracker, error)

CreateEventTracker creates a new event tracker.

func (*InMemoryBackend) CreateFilter

func (b *InMemoryBackend) CreateFilter(
	name, datasetGroupArn, filterExpression string,
	tags map[string]string,
) (*Filter, error)

CreateFilter creates a new filter.

func (*InMemoryBackend) CreateMetricAttribution

func (b *InMemoryBackend) CreateMetricAttribution(
	name, datasetGroupArn string,
	metrics []MetricAttribute,
	metricsOutputConfig map[string]any,
	tags map[string]string,
) (*MetricAttribution, error)

CreateMetricAttribution creates a new metric attribution. metrics is a required field on the real CreateMetricAttribution API (a list of the event-type/expression pairs to track), not an optional passthrough.

func (*InMemoryBackend) CreateRecommender

func (b *InMemoryBackend) CreateRecommender(
	name, datasetGroupArn, recipeArn string,
	minRPS int32,
	recommenderConfig map[string]any,
	tags map[string]string,
) (*Recommender, error)

CreateRecommender creates a new recommender.

func (*InMemoryBackend) CreateSchema

func (b *InMemoryBackend) CreateSchema(name, schema, domain string) (*Schema, error)

CreateSchema creates a new schema.

func (*InMemoryBackend) CreateSolution

func (b *InMemoryBackend) CreateSolution(
	name, datasetGroupArn, recipeArn, eventType string,
	performAutoML, performHPO, performAutoTraining, performIncrementalUpdate bool,
	solutionConfig map[string]any,
	tags map[string]string,
) (*Solution, error)

CreateSolution creates a new solution. performAutoTraining defaults to true in the real API when the caller omits it, so it is passed as an already caller-resolved bool rather than re-defaulted here.

func (*InMemoryBackend) CreateSolutionVersion

func (b *InMemoryBackend) CreateSolutionVersion(
	solutionArn, trainingMode string,
	tags map[string]string,
) (*SolutionVersion, error)

CreateSolutionVersion creates a new solution version.

func (*InMemoryBackend) DeleteCampaign

func (b *InMemoryBackend) DeleteCampaign(nameOrArn string) error

DeleteCampaign removes a campaign.

func (*InMemoryBackend) DeleteDataset

func (b *InMemoryBackend) DeleteDataset(nameOrArn string) error

DeleteDataset removes a dataset.

func (*InMemoryBackend) DeleteDatasetGroup

func (b *InMemoryBackend) DeleteDatasetGroup(nameOrArn string) error

DeleteDatasetGroup removes a dataset group.

func (*InMemoryBackend) DeleteEventTracker

func (b *InMemoryBackend) DeleteEventTracker(nameOrArn string) error

DeleteEventTracker removes an event tracker.

func (*InMemoryBackend) DeleteFilter

func (b *InMemoryBackend) DeleteFilter(nameOrArn string) error

DeleteFilter removes a filter.

func (*InMemoryBackend) DeleteMetricAttribution

func (b *InMemoryBackend) DeleteMetricAttribution(nameOrArn string) error

DeleteMetricAttribution removes a metric attribution.

func (*InMemoryBackend) DeleteRecommender

func (b *InMemoryBackend) DeleteRecommender(nameOrArn string) error

DeleteRecommender removes a recommender.

func (*InMemoryBackend) DeleteSchema

func (b *InMemoryBackend) DeleteSchema(nameOrArn string) error

DeleteSchema removes a schema.

func (*InMemoryBackend) DeleteSolution

func (b *InMemoryBackend) DeleteSolution(nameOrArn string) error

DeleteSolution removes a solution.

func (*InMemoryBackend) DescribeBatchInferenceJob

func (b *InMemoryBackend) DescribeBatchInferenceJob(jobArn string) (*BatchInferenceJob, error)

DescribeBatchInferenceJob returns a batch inference job by ARN.

func (*InMemoryBackend) DescribeBatchSegmentJob

func (b *InMemoryBackend) DescribeBatchSegmentJob(jobArn string) (*BatchSegmentJob, error)

DescribeBatchSegmentJob returns a batch segment job by ARN.

func (*InMemoryBackend) DescribeCampaign

func (b *InMemoryBackend) DescribeCampaign(nameOrArn string) (*Campaign, error)

DescribeCampaign returns a campaign by name or ARN.

func (*InMemoryBackend) DescribeDataDeletionJob

func (b *InMemoryBackend) DescribeDataDeletionJob(jobArn string) (*DataDeletionJob, error)

DescribeDataDeletionJob returns a data deletion job by ARN.

func (*InMemoryBackend) DescribeDataset

func (b *InMemoryBackend) DescribeDataset(nameOrArn string) (*Dataset, error)

DescribeDataset returns a dataset by name or ARN.

func (*InMemoryBackend) DescribeDatasetExportJob

func (b *InMemoryBackend) DescribeDatasetExportJob(jobArn string) (*DatasetExportJob, error)

DescribeDatasetExportJob returns a dataset export job by ARN.

func (*InMemoryBackend) DescribeDatasetGroup

func (b *InMemoryBackend) DescribeDatasetGroup(nameOrArn string) (*DatasetGroup, error)

DescribeDatasetGroup returns a dataset group by name or ARN.

func (*InMemoryBackend) DescribeDatasetImportJob

func (b *InMemoryBackend) DescribeDatasetImportJob(jobArn string) (*DatasetImportJob, error)

DescribeDatasetImportJob returns a dataset import job by ARN.

func (*InMemoryBackend) DescribeEventTracker

func (b *InMemoryBackend) DescribeEventTracker(nameOrArn string) (*EventTracker, error)

DescribeEventTracker returns an event tracker by name or ARN.

func (*InMemoryBackend) DescribeFilter

func (b *InMemoryBackend) DescribeFilter(nameOrArn string) (*Filter, error)

DescribeFilter returns a filter by name or ARN.

func (*InMemoryBackend) DescribeMetricAttribution

func (b *InMemoryBackend) DescribeMetricAttribution(nameOrArn string) (*MetricAttribution, error)

DescribeMetricAttribution returns a metric attribution by name or ARN.

func (*InMemoryBackend) DescribeRecommender

func (b *InMemoryBackend) DescribeRecommender(nameOrArn string) (*Recommender, error)

DescribeRecommender returns a recommender by name or ARN.

func (*InMemoryBackend) DescribeSchema

func (b *InMemoryBackend) DescribeSchema(nameOrArn string) (*Schema, error)

DescribeSchema returns a schema by name or ARN.

func (*InMemoryBackend) DescribeSolution

func (b *InMemoryBackend) DescribeSolution(nameOrArn string) (*Solution, error)

DescribeSolution returns a solution by name or ARN.

func (*InMemoryBackend) DescribeSolutionVersion

func (b *InMemoryBackend) DescribeSolutionVersion(svArn string) (*SolutionVersion, error)

DescribeSolutionVersion returns a solution version by ARN.

func (*InMemoryBackend) GetFeatureTransformation

func (b *InMemoryBackend) GetFeatureTransformation(arnOrName string) (*storedFeatureTransformation, error)

GetFeatureTransformation looks up a feature transformation by ARN or name.

func (*InMemoryBackend) GetSolutionMetrics

func (b *InMemoryBackend) GetSolutionMetrics(svArn string) (map[string]any, error)

GetSolutionMetrics returns deterministic accuracy metrics for a solution version. Values are derived from the ARN hash so each solution version gets distinct (but stable) metrics.

func (*InMemoryBackend) ListBatchInferenceJobs

func (b *InMemoryBackend) ListBatchInferenceJobs(
	solutionVersionArn string,
	maxResults int,
	nextToken string,
) ([]*BatchInferenceJob, string)

ListBatchInferenceJobs returns batch inference jobs, optionally filtered by solution version ARN.

func (*InMemoryBackend) ListBatchSegmentJobs

func (b *InMemoryBackend) ListBatchSegmentJobs(
	solutionVersionArn string,
	maxResults int,
	nextToken string,
) ([]*BatchSegmentJob, string)

ListBatchSegmentJobs returns batch segment jobs, optionally filtered by solution version ARN.

func (*InMemoryBackend) ListCampaigns

func (b *InMemoryBackend) ListCampaigns(solutionArn string, maxResults int, nextToken string) ([]*Campaign, string)

ListCampaigns returns campaigns, optionally filtered by solution ARN.

func (*InMemoryBackend) ListDataDeletionJobs

func (b *InMemoryBackend) ListDataDeletionJobs(
	datasetGroupArn string,
	maxResults int,
	nextToken string,
) ([]*DataDeletionJob, string)

ListDataDeletionJobs returns data deletion jobs, optionally filtered by dataset group ARN.

func (*InMemoryBackend) ListDatasetExportJobs

func (b *InMemoryBackend) ListDatasetExportJobs(
	datasetArn string,
	maxResults int,
	nextToken string,
) ([]*DatasetExportJob, string)

ListDatasetExportJobs returns export jobs, optionally filtered by dataset ARN.

func (*InMemoryBackend) ListDatasetGroups

func (b *InMemoryBackend) ListDatasetGroups(maxResults int, nextToken string) ([]*DatasetGroup, string)

ListDatasetGroups returns all dataset groups.

func (*InMemoryBackend) ListDatasetImportJobs

func (b *InMemoryBackend) ListDatasetImportJobs(
	datasetArn string,
	maxResults int,
	nextToken string,
) ([]*DatasetImportJob, string)

ListDatasetImportJobs returns import jobs, optionally filtered by dataset ARN.

func (*InMemoryBackend) ListDatasets

func (b *InMemoryBackend) ListDatasets(datasetGroupArn string, maxResults int, nextToken string) ([]*Dataset, string)

ListDatasets returns datasets, optionally filtered by dataset group ARN.

func (*InMemoryBackend) ListEventTrackers

func (b *InMemoryBackend) ListEventTrackers(
	datasetGroupArn string,
	maxResults int,
	nextToken string,
) ([]*EventTracker, string)

ListEventTrackers returns event trackers, optionally filtered by dataset group ARN.

func (*InMemoryBackend) ListFilters

func (b *InMemoryBackend) ListFilters(datasetGroupArn string, maxResults int, nextToken string) ([]*Filter, string)

ListFilters returns filters, optionally filtered by dataset group ARN.

func (*InMemoryBackend) ListMetricAttributionMetrics

func (b *InMemoryBackend) ListMetricAttributionMetrics(
	metricAttributionArn string,
	maxResults int,
	nextToken string,
) ([]MetricAttribute, string, error)

ListMetricAttributionMetrics returns the metric attribution's own tracked metrics (as configured via CreateMetricAttribution/UpdateMetricAttribution) with pagination, rather than a fabricated static list.

func (*InMemoryBackend) ListMetricAttributions

func (b *InMemoryBackend) ListMetricAttributions(
	datasetGroupArn string,
	maxResults int,
	nextToken string,
) ([]*MetricAttribution, string)

ListMetricAttributions returns metric attributions, optionally filtered by dataset group ARN.

func (*InMemoryBackend) ListRecommenders

func (b *InMemoryBackend) ListRecommenders(
	datasetGroupArn string,
	maxResults int,
	nextToken string,
) ([]*Recommender, string)

ListRecommenders returns recommenders, optionally filtered by dataset group ARN.

func (*InMemoryBackend) ListSchemas

func (b *InMemoryBackend) ListSchemas(maxResults int, nextToken string) ([]*Schema, string)

ListSchemas returns all schemas.

func (*InMemoryBackend) ListSolutionVersions

func (b *InMemoryBackend) ListSolutionVersions(
	solutionArn string,
	maxResults int,
	nextToken string,
) ([]*SolutionVersion, string)

ListSolutionVersions returns solution versions for a given solution ARN.

func (*InMemoryBackend) ListSolutions

func (b *InMemoryBackend) ListSolutions(
	datasetGroupArn string,
	maxResults int,
	nextToken string,
) ([]*Solution, string)

ListSolutions returns solutions, optionally filtered by dataset group ARN.

func (*InMemoryBackend) ListTagsForResource

func (b *InMemoryBackend) ListTagsForResource(resourceArn string) (map[string]string, error)

ListTagsForResource returns tags for a resource.

func (*InMemoryBackend) Region

func (b *InMemoryBackend) Region() string

Region returns the configured region.

func (*InMemoryBackend) Reset

func (b *InMemoryBackend) Reset()

Reset clears all in-memory Personalize state for the /_gopherstack/reset test hook so suites start from a clean slate.

func (*InMemoryBackend) Restore

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

Restore deserializes state from JSON. It implements persistence.Persistable.

func (*InMemoryBackend) Snapshot

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

Snapshot serializes current state to JSON. It implements persistence.Persistable.

func (*InMemoryBackend) StartRecommender

func (b *InMemoryBackend) StartRecommender(recommenderArn string) (*Recommender, error)

StartRecommender transitions a recommender to ACTIVE.

func (*InMemoryBackend) StopRecommender

func (b *InMemoryBackend) StopRecommender(recommenderArn string) (*Recommender, error)

StopRecommender transitions a recommender to INACTIVE.

func (*InMemoryBackend) StopSolutionVersionCreation

func (b *InMemoryBackend) StopSolutionVersionCreation(svArn string) error

StopSolutionVersionCreation transitions a solution version to CREATE STOPPED.

func (*InMemoryBackend) TagResource

func (b *InMemoryBackend) TagResource(resourceArn string, newTags map[string]string) error

TagResource adds tags to a resource identified by ARN.

func (*InMemoryBackend) UntagResource

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

UntagResource removes tags from a resource.

func (*InMemoryBackend) UpdateCampaign

func (b *InMemoryBackend) UpdateCampaign(
	nameOrArn, solutionVersionArn string,
	minProvisionedTPS int32,
	campaignConfig map[string]any,
) (*Campaign, error)

UpdateCampaign updates a campaign's solution version, TPS, or config. Every successful call records a types.CampaignUpdateSummary-shaped snapshot on LatestCampaignUpdate -- the real API only populates that field once the campaign has had at least one update.

func (*InMemoryBackend) UpdateDataset

func (b *InMemoryBackend) UpdateDataset(nameOrArn, schemaArn string) (*Dataset, error)

UpdateDataset updates a dataset's schema.

func (*InMemoryBackend) UpdateMetricAttribution

func (b *InMemoryBackend) UpdateMetricAttribution(
	nameOrArn string,
	addMetrics []MetricAttribute,
	removeMetrics []string,
	metricsOutputConfig map[string]any,
) (*MetricAttribution, error)

UpdateMetricAttribution updates a metric attribution's tracked metrics and/or output config. The real UpdateMetricAttribution API has no single "metrics" replacement field -- it mutates the existing metric list via addMetrics/removeMetrics (by metricName), matching AddMetrics/RemoveMetrics on the request.

func (*InMemoryBackend) UpdateRecommender

func (b *InMemoryBackend) UpdateRecommender(
	nameOrArn string,
	minRPS int32,
	recommenderConfig map[string]any,
) (*Recommender, error)

UpdateRecommender updates a recommender's configuration. recommenderConfig is required on the real UpdateRecommenderInput; every successful call records a types.RecommenderUpdateSummary-shaped snapshot on LatestRecommenderUpdate, matching real AWS which only populates that field once the recommender has had at least one update.

func (*InMemoryBackend) UpdateSolution

func (b *InMemoryBackend) UpdateSolution(
	nameOrArn string,
	performAutoTraining, performIncrementalUpdate *bool,
) (*Solution, error)

UpdateSolution updates a solution's automatic-training configuration. The real UpdateSolution API only mutates performAutoTraining and performIncrementalUpdate (performAutoML/performHPO are immutable, creation-only fields) -- nil means "not specified in the request", leaving the current value untouched, matching the optional *bool request members.

func (*InMemoryBackend) ValidateCampaign

func (b *InMemoryBackend) ValidateCampaign(campaignArn string) error

ValidateCampaign returns nil if campaignArn resolves to an existing campaign.

func (*InMemoryBackend) ValidateCampaignOrRecommender

func (b *InMemoryBackend) ValidateCampaignOrRecommender(campaignArn, recommenderArn string) error

ValidateCampaignOrRecommender returns nil if either campaignArn or recommenderArn resolves to an existing resource. Returns ErrNotFound if neither exists.

type MetricAttribute

type MetricAttribute struct {
	EventType  string
	Expression string
	MetricName string
}

MetricAttribute describes a single tracked metric within a metric attribution: an event type and the expression (SUM()/SAMPLECOUNT()) used to compute it.

type MetricAttribution

type MetricAttribution struct {
	CreationDateTime     time.Time
	LastUpdatedDateTime  time.Time
	MetricsOutputConfig  map[string]any
	MetricAttributionArn string
	DatasetGroupArn      string
	Name                 string
	Status               string
	Metrics              []MetricAttribute
}

MetricAttribution stores an Amazon Personalize metric attribution.

type Provider

type Provider struct{}

Provider implements service.Provider for the Personalize service.

func (*Provider) Init

Init initializes the Personalize backend and handler.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the logical name of the provider.

type Recommender

type Recommender struct {
	CreationDateTime                   time.Time
	LastUpdatedDateTime                time.Time
	RecommenderConfig                  map[string]any
	LatestRecommenderUpdate            map[string]any
	RecommenderArn                     string
	DatasetGroupArn                    string
	RecipeArn                          string
	Name                               string
	Status                             string
	MinRecommendationRequestsPerSecond int32
}

Recommender stores an Amazon Personalize recommender.

type Schema

type Schema struct {
	CreationDateTime    time.Time
	LastUpdatedDateTime time.Time
	SchemaArn           string
	Name                string
	Schema              string
	Domain              string
}

Schema stores an Amazon Personalize schema.

type Solution

type Solution struct {
	LastUpdatedDateTime      time.Time
	CreationDateTime         time.Time
	SolutionConfig           map[string]any
	AutoMLResult             map[string]any
	LatestSolutionUpdate     map[string]any
	DatasetGroupArn          string
	EventType                string
	Status                   string
	RecipeArn                string
	Name                     string
	SolutionArn              string
	PerformAutoML            bool
	PerformHPO               bool
	PerformAutoTraining      bool
	PerformIncrementalUpdate bool
}

Solution stores an Amazon Personalize solution.

type SolutionVersion

type SolutionVersion struct {
	CreationDateTime    time.Time
	LastUpdatedDateTime time.Time
	SolutionConfig      map[string]any
	SolutionVersionArn  string
	SolutionArn         string
	Status              string
	TrainingMode        string
	TrainingHours       float64
}

SolutionVersion stores a trained Amazon Personalize solution version.

Jump to

Keyboard shortcuts

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