bedrock

package
v1.1.1 Latest Latest
Warning

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

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

README

Bedrock

Parity grade: A · SDK aws-sdk-go-v2/service/bedrock@v1.56.0 · last audited 2026-07-12 (01dbe288)

Coverage

Metric Value
Operations audited 58 (57 ok, 1 partial)
Feature families 5 (3 ok, 2 gap)
Known gaps 6
Deferred items 4
Resource leaks clean
Known gaps
  • UseCaseForModelAccess (Get/Put): wrong path, wrong method, and wrong body shape (real op takes raw bytes, not JSON). Needs a small redesign, not a route fix. (bd: file follow-up)
  • EnforcedGuardrailConfiguration (List/Put/Delete): wrong path and a completely different resource model than real AWS (ConfigId-keyed vs this impl's guardrailId+version pairs); DeleteEnforcedGuardrailConfiguration real shape takes a path-param configId, this impl takes a query-param guardrailId. Needs a small redesign, not a route fix. (bd: file follow-up)
  • UpdateMarketplaceModelEndpoint: request body (endpointConfig) is accepted but never parsed/applied — the op only bumps updatedAt. Pre-existing, not touched this pass beyond the route/method fix. (bd: file follow-up)
  • ListEvaluationJobs has no pagination (nextToken/maxResults) even though every sibling List op (CustomModels, ModelCustomizationJobs, etc.) supports nextToken via paginateBedrockSlice. Functionally returns MORE data than real AWS would in one page, not less — low risk, but worth aligning. (bd: file follow-up)
  • Most List ops (CustomModels, ModelCustomizationJobs, InferenceProfiles, MarketplaceModelEndpoints, Guardrails' non-identifier filters) only support nextToken pagination, not nameContains/statusEquals-style filters. Same shape as AWS's minimum viable page-through, but filter params are silently ignored rather than honored. ListModelInvocationJobs was the one exception fixed this pass because its backend already had full filter support sitting unused.
  • ARP (AutomatedReasoningPolicy) family was spot-checked, not line-by-line re-verified against serializers.go this pass — scope was the 12 named priority families. Deferred to next audit.
Deferred
  • AutomatedReasoningPolicy (full wire re-verification)
  • PromptRouter
  • ImportedModel
  • FoundationModelAgreement / FoundationModelAvailability (routing looks consistent, response shapes not deeply verified)

More

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound is returned when a requested resource does not exist.
	ErrNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound)
	// ErrAlreadyExists is returned when a resource already exists.
	ErrAlreadyExists = awserr.New("ConflictException", awserr.ErrAlreadyExists)
	// ErrValidation is returned when request validation fails.
	ErrValidation = awserr.New("ValidationException", awserr.ErrInvalidParameter)
)

Functions

This section is empty.

Types

type Agent

type Agent struct {
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`

	Tags                   map[string]string `json:"tags,omitempty"`
	GuardrailConfiguration map[string]any    `json:"guardrailConfiguration,omitempty"`
	MemoryConfiguration    map[string]any    `json:"memoryConfiguration,omitempty"`
	AgentStatus            string            `json:"agentStatus"`
	AgentName              string            `json:"agentName"`
	AgentArn               string            `json:"agentArn"`
	AgentVersion           string            `json:"agentVersion"`
	AgentCollaboration     string            `json:"agentCollaboration,omitempty"`
	Description            string            `json:"description,omitempty"`
	FoundationModel        string            `json:"foundationModel,omitempty"`
	Instruction            string            `json:"instruction,omitempty"`
	RoleArn                string            `json:"agentResourceRoleArn,omitempty"`
	AgentID                string            `json:"agentId"`
	FailureReasons         []string          `json:"failureReasons,omitempty"`
	// contains filtered or unexported fields
}

Agent represents an Amazon Bedrock Agent.

type AgentActionGroup

type AgentActionGroup struct {
	CreatedAt           time.Time      `json:"createdAt"`
	UpdatedAt           time.Time      `json:"updatedAt"`
	ActionGroupExecutor map[string]any `json:"actionGroupExecutor,omitempty"`
	APISchema           map[string]any `json:"apiSchema,omitempty"`
	FunctionSchema      map[string]any `json:"functionSchema,omitempty"`
	ActionGroupID       string         `json:"actionGroupId"`
	ActionGroupName     string         `json:"actionGroupName"`
	AgentID             string         `json:"agentId"`
	AgentVersion        string         `json:"agentVersion"`
	ActionGroupState    string         `json:"actionGroupState"`
	Description         string         `json:"description,omitempty"`
}

AgentActionGroup represents an action group for a Bedrock Agent.

type AgentAlias

type AgentAlias struct {
	CreatedAt               time.Time                `json:"createdAt"`
	UpdatedAt               time.Time                `json:"updatedAt"`
	AgentAliasID            string                   `json:"agentAliasId"`
	AgentAliasArn           string                   `json:"agentAliasArn"`
	AgentAliasName          string                   `json:"agentAliasName"`
	AgentID                 string                   `json:"agentId"`
	AliasStatus             string                   `json:"agentAliasStatus"`
	RoutingConfiguration    []AgentAliasRouting      `json:"routingConfiguration"`
	AgentAliasHistoryEvents []AgentAliasHistoryEvent `json:"agentAliasHistoryEvents,omitempty"`
}

AgentAlias represents an alias for a Bedrock Agent.

type AgentAliasHistoryEvent

type AgentAliasHistoryEvent struct {
	StartDate            time.Time           `json:"startDate"`
	EndDate              *time.Time          `json:"endDate,omitempty"`
	RoutingConfiguration []AgentAliasRouting `json:"routingConfiguration"`
}

AgentAliasHistoryEvent records an alias routing interval.

type AgentAliasRouting

type AgentAliasRouting struct {
	AgentVersion string `json:"agentVersion"`
}

AgentAliasRouting identifies the version receiving alias traffic.

type AgentCollaborator

type AgentCollaborator struct {
	CreatedAt         time.Time `json:"createdAt"`
	CollaboratorID    string    `json:"collaboratorId"`
	AgentID           string    `json:"agentId"`
	AgentVersion      string    `json:"agentVersion"`
	CollaboratorArn   string    `json:"collaboratorArn"`
	RelayConversation string    `json:"relayConversationHistory"`
}

AgentCollaborator represents an agent collaboration association.

type AgentConfiguration

type AgentConfiguration struct {
	Tags                   map[string]string
	GuardrailConfiguration map[string]any
	MemoryConfiguration    map[string]any
	AgentName              string
	AgentCollaboration     string
	Description            string
	FoundationModel        string
	Instruction            string
	RoleArn                string
}

AgentConfiguration stores optional settings accepted by agent create and update requests.

type AgentKnowledgeBaseAssociation

type AgentKnowledgeBaseAssociation struct {
	AgentID         string `json:"agentId"`
	AgentVersion    string `json:"agentVersion"`
	KnowledgeBaseID string `json:"knowledgeBaseId"`
	Description     string `json:"description,omitempty"`
	KBState         string `json:"knowledgeBaseState"`
}

AgentKnowledgeBaseAssociation represents an association between agent and knowledge base.

type AgentVersion

type AgentVersion struct {
	CreatedAt    time.Time `json:"createdAt"`
	AgentID      string    `json:"agentId"`
	AgentVersion string    `json:"agentVersion"`
	AgentStatus  string    `json:"agentStatus"`
}

AgentVersion represents a numbered version of an Agent.

type AgentsHandler

type AgentsHandler struct {
	Backend *InMemoryBackend
}

AgentsHandler handles Bedrock Agents API requests. The Bedrock Agents API lives at bedrock-agent.amazonaws.com (separate from the core bedrock API), so it is registered as its own Registerable.

func NewAgentsHandler

func NewAgentsHandler(backend *InMemoryBackend) *AgentsHandler

NewAgentsHandler creates a new Bedrock Agents handler.

func (*AgentsHandler) ChaosOperations

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

ChaosOperations returns all supported operations.

func (*AgentsHandler) ChaosRegions

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

ChaosRegions returns the supported regions.

func (*AgentsHandler) ChaosServiceName

func (h *AgentsHandler) ChaosServiceName() string

ChaosServiceName returns the chaos service name.

func (*AgentsHandler) ExtractOperation

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

ExtractOperation extracts the operation name from the request.

func (*AgentsHandler) ExtractResource

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

ExtractResource extracts a resource identifier from the request.

func (*AgentsHandler) GetSupportedOperations

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

GetSupportedOperations returns supported operations.

func (*AgentsHandler) Handler

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

Handler returns the Echo handler function.

func (*AgentsHandler) MatchPriority

func (h *AgentsHandler) MatchPriority() int

MatchPriority returns the routing priority.

func (*AgentsHandler) Name

func (h *AgentsHandler) Name() string

Name returns the service name.

func (*AgentsHandler) Reset

func (h *AgentsHandler) Reset()

Reset clears all agent/kb state.

registry.ResetAll empties every store.Table registered on this backend instance -- including the non-agent-domain (guardrails/models/...) tables registerAllTables also registers -- but AgentsHandler's own backend instance (see AgentsProvider.Init in provider.go) never receives core Bedrock mutations (RouteMatcher only matches /agents/ and /knowledgebases/ paths), so those tables are always already empty here; resetting them is a no-op, not a behavior change.

func (*AgentsHandler) Restore

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

Restore implements persistence.Persistable by delegating to the backend.

func (*AgentsHandler) RouteMatcher

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

RouteMatcher returns a function matching Bedrock Agents requests.

func (*AgentsHandler) Snapshot

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

Snapshot implements persistence.Persistable by delegating to the backend. AgentsHandler wraps its own, separate InMemoryBackend instance from Handler (see provider.go's Provider vs AgentsProvider), so it needs its own delegation rather than sharing Handler's.

type AgentsProvider

type AgentsProvider struct{}

AgentsProvider implements service.Provider for Amazon Bedrock Agents.

func (*AgentsProvider) Init

Init initializes the Bedrock Agents backend and handler.

func (*AgentsProvider) Name

func (p *AgentsProvider) Name() string

Name returns the provider name.

type AutomatedReasoningPolicy

type AutomatedReasoningPolicy struct {
	CreatedAt   time.Time `json:"createdAt"`
	UpdatedAt   time.Time `json:"updatedAt"`
	PolicyArn   string    `json:"policyArn"`
	Name        string    `json:"name"`
	Description string    `json:"description,omitempty"`
	Status      string    `json:"status"`
	Tags        []Tag     `json:"tags,omitempty"`
}

AutomatedReasoningPolicy represents an Automated Reasoning policy.

type AutomatedReasoningPolicyBuildWorkflow

type AutomatedReasoningPolicyBuildWorkflow struct {
	BuildWorkflowID string `json:"buildWorkflowId"`
	PolicyArn       string `json:"policyArn"`
	Status          string `json:"status"`
}

AutomatedReasoningPolicyBuildWorkflow represents a build workflow for a policy.

type AutomatedReasoningPolicyTestCase

type AutomatedReasoningPolicyTestCase struct {
	TestCaseID string `json:"testCaseId"`
	PolicyArn  string `json:"policyArn"`
}

AutomatedReasoningPolicyTestCase represents a test case for a policy.

type AutomatedReasoningPolicyVersion

type AutomatedReasoningPolicyVersion struct {
	CreatedAt      time.Time `json:"createdAt"`
	PolicyArn      string    `json:"policyArn"`
	Name           string    `json:"name"`
	DefinitionHash string    `json:"definitionHash"`
	Version        string    `json:"version"`
}

AutomatedReasoningPolicyVersion represents a version of a policy.

type BatchDeleteEvaluationJobError

type BatchDeleteEvaluationJobError struct {
	JobARN  string `json:"jobIdentifier"`
	Code    string `json:"code"`
	Message string `json:"message"`
}

BatchDeleteEvaluationJobError describes a single job deletion failure.

type BatchDeleteEvaluationJobItem

type BatchDeleteEvaluationJobItem struct {
	JobARN string `json:"jobIdentifier"`
	Status string `json:"jobStatus"`
}

BatchDeleteEvaluationJobItem describes a successfully scheduled deletion.

type CreateEvaluationJobInput

type CreateEvaluationJobInput struct {
	JobName         string
	JobDescription  string
	RoleArn         string
	Tags            []Tag
	EvaluatorConfig *EvaluationModelConfig
	InferenceConfig *EvaluationInferenceConfig
	EvalConfig      []EvaluationTaskConfig
}

CreateEvaluationJobInput holds all parameters for CreateEvaluationJob.

type CreateModelInvocationJobInput

type CreateModelInvocationJobInput struct {
	RoleArn          string         `json:"roleArn"`
	ModelID          string         `json:"modelId"`
	InputDataConfig  map[string]any `json:"inputDataConfig,omitempty"`
	OutputDataConfig map[string]any `json:"outputDataConfig,omitempty"`
	ClientToken      string         `json:"clientRequestToken,omitempty"`
}

CreateModelInvocationJobInput holds the full set of fields for CreateModelInvocationJob.

type CustomModel

type CustomModel struct {
	CreationTime time.Time `json:"creationTime"`
	ModelArn     string    `json:"modelArn"`
	ModelName    string    `json:"modelName"`
	Tags         []Tag     `json:"tags,omitempty"`
}

CustomModel represents a custom model.

type CustomModelDeployment

type CustomModelDeployment struct {
	CreationTime             time.Time `json:"creationTime"`
	LastModifiedTime         time.Time `json:"lastModifiedTime"`
	CustomModelDeploymentArn string    `json:"customModelDeploymentArn"`
	ModelDeploymentName      string    `json:"modelDeploymentName"`
	ModelArn                 string    `json:"modelArn"`
	Status                   string    `json:"status"`
	Tags                     []Tag     `json:"tags,omitempty"`
}

CustomModelDeployment represents a custom model deployment.

type DataSource

type DataSource struct {
	CreatedAt               time.Time      `json:"createdAt"`
	UpdatedAt               time.Time      `json:"updatedAt"`
	DataSourceConfiguration map[string]any `json:"dataSourceConfiguration,omitempty"`
	VectorIngestionConfig   map[string]any `json:"vectorIngestionConfiguration,omitempty"`
	DataSourceID            string         `json:"dataSourceId"`
	DataSourceStatus        string         `json:"dataSourceStatus"`
	KnowledgeBaseID         string         `json:"knowledgeBaseId"`
	Name                    string         `json:"name"`
	Description             string         `json:"description,omitempty"`
	DataDeletionPolicy      string         `json:"dataDeletionPolicy,omitempty"`
}

DataSource represents a data source for a Knowledge Base.

type EnforcedGuardrailConfig

type EnforcedGuardrailConfig struct {
	GuardrailID      string `json:"guardrailId"`
	GuardrailVersion string `json:"guardrailVersion"`
}

EnforcedGuardrailConfig represents an enforced guardrail configuration entry.

type EvaluationDataset

type EvaluationDataset struct {
	Location *EvaluationDatasetLocation `json:"datasetLocation,omitempty"`
	Name     string                     `json:"name,omitempty"`
}

EvaluationDataset references an evaluation dataset.

type EvaluationDatasetLocation

type EvaluationDatasetLocation struct {
	S3URI string `json:"s3Uri,omitempty"`
}

EvaluationDatasetLocation specifies where the evaluation dataset is stored.

type EvaluationInferenceConfig

type EvaluationInferenceConfig struct {
	RAG    *EvaluationRAGConfig             `json:"ragConfig,omitempty"`
	Models []EvaluationInferenceModelConfig `json:"models,omitempty"`
}

EvaluationInferenceConfig holds inference-side configuration (model or RAG).

type EvaluationInferenceModelConfig

type EvaluationInferenceModelConfig struct {
	ModelIdentifier string `json:"modelIdentifier"`
}

EvaluationInferenceModelConfig points to a model for generating responses.

type EvaluationJob

type EvaluationJob struct {
	CreationTime     time.Time                  `json:"creationTime"`
	LastModifiedTime time.Time                  `json:"lastModifiedTime"`
	JobArn           string                     `json:"jobArn"`
	JobName          string                     `json:"jobName"`
	JobDescription   string                     `json:"jobDescription,omitempty"`
	RoleArn          string                     `json:"roleArn,omitempty"`
	Status           string                     `json:"status"`
	Tags             []Tag                      `json:"tags,omitempty"`
	EvaluatorConfig  *EvaluationModelConfig     `json:"evaluatorConfig,omitempty"`
	InferenceConfig  *EvaluationInferenceConfig `json:"inferenceConfig,omitempty"`
	EvaluationConfig []EvaluationTaskConfig     `json:"evaluationConfig,omitempty"`
}

EvaluationJob represents a model evaluation job.

type EvaluationMetricConfig

type EvaluationMetricConfig struct {
	MetricName string `json:"metricName"`
}

EvaluationMetricConfig configures a single metric for evaluation.

type EvaluationModelConfig

type EvaluationModelConfig struct {
	ModelIdentifier string `json:"modelIdentifier"`
}

EvaluationModelConfig specifies the evaluator model for an evaluation job.

type EvaluationRAGConfig

type EvaluationRAGConfig struct {
	KnowledgeBaseID string `json:"knowledgeBaseId,omitempty"`
}

EvaluationRAGConfig holds RAG-specific inference configuration.

type EvaluationTaskConfig

type EvaluationTaskConfig struct {
	TaskType    string                   `json:"taskType"`
	Dataset     *EvaluationDataset       `json:"dataset,omitempty"`
	MetricNames []EvaluationMetricConfig `json:"metricNames,omitempty"`
}

EvaluationTaskConfig configures a single evaluation task.

type Flow

type Flow struct {
	CreatedAt   time.Time         `json:"createdAt"`
	UpdatedAt   time.Time         `json:"updatedAt"`
	Tags        map[string]string `json:"tags,omitempty"`
	FlowID      string            `json:"flowId"`
	FlowArn     string            `json:"flowArn"`
	Name        string            `json:"name"`
	Description string            `json:"description,omitempty"`
	Status      string            `json:"status"`
}

Flow represents an Amazon Bedrock Flow.

type FlowAlias

type FlowAlias struct {
	CreatedAt    time.Time `json:"createdAt"`
	UpdatedAt    time.Time `json:"updatedAt"`
	FlowAliasID  string    `json:"flowAliasId"`
	FlowAliasArn string    `json:"flowAliasArn"`
	FlowID       string    `json:"flowId"`
	Name         string    `json:"name"`
	Description  string    `json:"description,omitempty"`
}

FlowAlias represents an alias for a Bedrock Flow.

type FlowVersion

type FlowVersion struct {
	CreatedAt time.Time `json:"createdAt"`
	FlowID    string    `json:"flowId"`
	Version   string    `json:"version"`
	Status    string    `json:"status"`
}

FlowVersion represents a snapshot version of a Flow.

type FoundationModelAgreement

type FoundationModelAgreement struct {
	ModelID string `json:"modelId"`
}

FoundationModelAgreement represents an agreement for foundation model access.

type FoundationModelLifecycle

type FoundationModelLifecycle struct {
	Status string `json:"status"`
}

FoundationModelLifecycle holds the lifecycle status of a foundation model.

type FoundationModelSummary

type FoundationModelSummary struct {
	ModelLifecycle             *FoundationModelLifecycle `json:"modelLifecycle,omitempty"`
	ModelArn                   string                    `json:"modelArn"`
	ModelID                    string                    `json:"modelId"`
	ModelName                  string                    `json:"modelName"`
	ProviderName               string                    `json:"providerName"`
	InputModalities            []string                  `json:"inputModalities,omitempty"`
	OutputModalities           []string                  `json:"outputModalities,omitempty"`
	InferenceTypesSupported    []string                  `json:"inferenceTypesSupported,omitempty"`
	CustomizationsSupported    []string                  `json:"customizationsSupported,omitempty"`
	ResponseStreamingSupported bool                      `json:"responseStreamingSupported"`
}

FoundationModelSummary represents a foundation model.

type Guardrail

type Guardrail struct {
	CreatedAt               time.Time          `json:"createdAt"`
	UpdatedAt               time.Time          `json:"updatedAt"`
	Policies                *GuardrailPolicies `json:"policies,omitempty"`
	GuardrailID             string             `json:"guardrailId"`
	GuardrailArn            string             `json:"guardrailArn"`
	Name                    string             `json:"name"`
	Description             string             `json:"description,omitempty"`
	Status                  string             `json:"status"`
	Version                 string             `json:"version"`
	BlockedInputMessaging   string             `json:"blockedInputMessaging,omitempty"`
	BlockedOutputsMessaging string             `json:"blockedOutputsMessaging,omitempty"`
	Tags                    []Tag              `json:"tags,omitempty"`
	// contains filtered or unexported fields
}

Guardrail represents an Amazon Bedrock guardrail.

type GuardrailContentFilter

type GuardrailContentFilter struct {
	Type           string `json:"type"`
	InputStrength  string `json:"inputStrength"`
	OutputStrength string `json:"outputStrength"`
}

GuardrailContentFilter defines a single content filter rule within a guardrail.

type GuardrailContentPolicyConfig

type GuardrailContentPolicyConfig struct {
	FiltersConfig []GuardrailContentFilter `json:"filtersConfig"`
}

GuardrailContentPolicyConfig configures content filtering for a guardrail.

type GuardrailContextualGroundingFilter

type GuardrailContextualGroundingFilter struct {
	Type      string  `json:"type"`
	Threshold float64 `json:"threshold"`
}

GuardrailContextualGroundingFilter is a single contextual grounding rule.

type GuardrailContextualGroundingPolicyConfig

type GuardrailContextualGroundingPolicyConfig struct {
	FiltersConfig []GuardrailContextualGroundingFilter `json:"filtersConfig"`
}

GuardrailContextualGroundingPolicyConfig configures contextual grounding checks.

type GuardrailManagedWordList

type GuardrailManagedWordList struct {
	Type string `json:"type"`
}

GuardrailManagedWordList references a managed word list by type.

type GuardrailPIIEntity

type GuardrailPIIEntity struct {
	Type   string `json:"type"`
	Action string `json:"action"`
}

GuardrailPIIEntity describes a PII entity type and the action to take.

type GuardrailPolicies

type GuardrailPolicies struct {
	ContentPolicy              *GuardrailContentPolicyConfig              `json:"contentPolicyConfig,omitempty"`
	TopicPolicy                *GuardrailTopicPolicyConfig                `json:"topicPolicyConfig,omitempty"`
	WordPolicy                 *GuardrailWordPolicyConfig                 `json:"wordPolicyConfig,omitempty"`
	SensitiveInformationPolicy *GuardrailSensitiveInformationPolicyConfig `json:"sensitiveInformationPolicyConfig,omitempty"` //nolint:lll // AWS API field name is long.
	ContextualGroundingPolicy  *GuardrailContextualGroundingPolicyConfig  `json:"contextualGroundingPolicyConfig,omitempty"`  //nolint:lll // AWS API field name is long.
}

GuardrailPolicies groups all optional policy configurations for a guardrail.

type GuardrailRegexConfig

type GuardrailRegexConfig struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	Pattern     string `json:"pattern"`
	Action      string `json:"action"`
}

GuardrailRegexConfig defines a custom regex-based filter.

type GuardrailSensitiveInformationPolicyConfig

type GuardrailSensitiveInformationPolicyConfig struct {
	PiiEntitiesConfig []GuardrailPIIEntity   `json:"piiEntitiesConfig,omitempty"`
	RegexesConfig     []GuardrailRegexConfig `json:"regexesConfig,omitempty"`
}

GuardrailSensitiveInformationPolicyConfig configures PII and regex-based filters.

type GuardrailSummary

type GuardrailSummary struct {
	CreatedAt   time.Time `json:"createdAt"`
	UpdatedAt   time.Time `json:"updatedAt"`
	GuardrailID string    `json:"id"`
	Arn         string    `json:"arn"`
	Name        string    `json:"name"`
	Description string    `json:"description,omitempty"`
	Status      string    `json:"status"`
	Version     string    `json:"version"`
}

GuardrailSummary is used in list operations.

type GuardrailTopic

type GuardrailTopic struct {
	Name       string   `json:"name"`
	Definition string   `json:"definition"`
	Type       string   `json:"type"`
	Examples   []string `json:"examples,omitempty"`
}

GuardrailTopic defines a topic that the guardrail denies.

type GuardrailTopicPolicyConfig

type GuardrailTopicPolicyConfig struct {
	TopicsConfig []GuardrailTopic `json:"topicsConfig"`
}

GuardrailTopicPolicyConfig configures topic-level denial policies.

type GuardrailVersion

type GuardrailVersion struct {
	CreatedAt               time.Time          `json:"createdAt"`
	Policies                *GuardrailPolicies `json:"policies,omitempty"`
	GuardrailID             string             `json:"guardrailId"`
	GuardrailArn            string             `json:"guardrailArn"`
	Version                 string             `json:"version"`
	Name                    string             `json:"name"`
	Description             string             `json:"description,omitempty"`
	BlockedInputMessaging   string             `json:"blockedInputMessaging,omitempty"`
	BlockedOutputsMessaging string             `json:"blockedOutputsMessaging,omitempty"`
	Tags                    []Tag              `json:"tags,omitempty"`
}

GuardrailVersion represents a numbered, immutable snapshot of a guardrail taken at the time CreateGuardrailVersion was called. AWS freezes the guardrail's full configuration into each numbered version, so GetGuardrail(id, version) must be able to serve this snapshot independently of the (still-editable) DRAFT.

type GuardrailWordConfig

type GuardrailWordConfig struct {
	Text string `json:"text"`
}

GuardrailWordConfig defines a single custom word to block.

type GuardrailWordPolicyConfig

type GuardrailWordPolicyConfig struct {
	WordsConfig            []GuardrailWordConfig      `json:"wordsConfig,omitempty"`
	ManagedWordListsConfig []GuardrailManagedWordList `json:"managedWordListsConfig,omitempty"`
}

GuardrailWordPolicyConfig configures word-level blocking for a guardrail.

type Handler

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

Handler is the Echo HTTP handler for Amazon Bedrock operations.

func NewHandler

func NewHandler(backend *InMemoryBackend) *Handler

NewHandler creates a new Bedrock handler backed by backend. backend must not be nil.

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 handler 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 returns the operation name from the request.

func (*Handler) ExtractResource

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

ExtractResource extracts a resource identifier from the request path.

func (*Handler) GetSupportedOperations

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

GetSupportedOperations returns the list of supported operations.

func (*Handler) Handler

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

Handler returns the Echo handler function for Bedrock requests.

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) 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 Bedrock requests.

func (*Handler) Shutdown

func (h *Handler) Shutdown(ctx context.Context)

Shutdown stops the background janitor.

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 for status advancement.

type InMemoryBackend

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

InMemoryBackend stores Amazon Bedrock state in memory.

func NewInMemoryBackend

func NewInMemoryBackend(accountID, region string) *InMemoryBackend

NewInMemoryBackend creates a new InMemoryBackend pre-seeded with foundation models.

func (*InMemoryBackend) AdvanceCopyImportJobStatuses

func (b *InMemoryBackend) AdvanceCopyImportJobStatuses(minAge time.Duration) int

AdvanceCopyImportJobStatuses moves InProgress copy/import jobs to Completed after the min age elapses.

func (*InMemoryBackend) AdvanceCustomizationJobStatuses

func (b *InMemoryBackend) AdvanceCustomizationJobStatuses(minAge time.Duration) int

AdvanceCustomizationJobStatuses moves InProgress customization jobs to Completed. Called by the janitor after the simulated training delay has elapsed.

func (*InMemoryBackend) AdvanceProvisionedModelThroughputStatuses

func (b *InMemoryBackend) AdvanceProvisionedModelThroughputStatuses() int

AdvanceProvisionedModelThroughputStatuses transitions PMTs from Creating → InService. Called by the janitor after the creation delay has elapsed.

func (*InMemoryBackend) AssociateAgentCollaborator

func (b *InMemoryBackend) AssociateAgentCollaborator(
	agentID, agentVersion, collaboratorArn, relayConversation string,
) (*AgentCollaborator, error)

AssociateAgentCollaborator associates a collaborator agent with an agent.

func (*InMemoryBackend) AssociateAgentKnowledgeBase

func (b *InMemoryBackend) AssociateAgentKnowledgeBase(
	agentID, kbID, description string,
) (*AgentKnowledgeBaseAssociation, error)

AssociateAgentKnowledgeBase links a knowledge base to an agent.

func (*InMemoryBackend) BatchDeleteEvaluationJob

func (b *InMemoryBackend) BatchDeleteEvaluationJob(jobARNs []string) (
	[]BatchDeleteEvaluationJobError, []BatchDeleteEvaluationJobItem, error,
)

BatchDeleteEvaluationJob deletes multiple evaluation jobs.

func (*InMemoryBackend) CancelAutomatedReasoningPolicyBuildWorkflow

func (b *InMemoryBackend) CancelAutomatedReasoningPolicyBuildWorkflow(
	policyARN, workflowID string,
) error

CancelAutomatedReasoningPolicyBuildWorkflow cancels a running build workflow.

func (*InMemoryBackend) CreateAgent

func (b *InMemoryBackend) CreateAgent(
	agentName, foundationModel, instruction, roleArn string,
	tags map[string]string,
) (*Agent, error)

CreateAgent creates a new Bedrock Agent.

func (*InMemoryBackend) CreateAgentActionGroup

func (b *InMemoryBackend) CreateAgentActionGroup(
	agentID, actionGroupName, description string,
	executor map[string]any,
) (*AgentActionGroup, error)

CreateAgentActionGroup creates an action group for an agent.

func (*InMemoryBackend) CreateAgentActionGroupWithSchemas

func (b *InMemoryBackend) CreateAgentActionGroupWithSchemas(
	agentID, actionGroupName, description string,
	executor, apiSchema, functionSchema map[string]any,
) (*AgentActionGroup, error)

CreateAgentActionGroupWithSchemas creates an action group preserving either supported schema.

func (*InMemoryBackend) CreateAgentAlias

func (b *InMemoryBackend) CreateAgentAlias(
	agentID, aliasName, agentVersion string,
) (*AgentAlias, error)

CreateAgentAlias creates an alias for an agent.

func (*InMemoryBackend) CreateAgentVersion

func (b *InMemoryBackend) CreateAgentVersion(agentID string) (*AgentVersion, error)

CreateAgentVersion creates a numbered version snapshot of an Agent.

func (*InMemoryBackend) CreateAgentWithConfiguration

func (b *InMemoryBackend) CreateAgentWithConfiguration(config AgentConfiguration) (*Agent, error)

CreateAgentWithConfiguration creates an agent retaining extended AWS configuration.

func (*InMemoryBackend) CreateAutomatedReasoningPolicy

func (b *InMemoryBackend) CreateAutomatedReasoningPolicy(
	name, description string,
	tags []Tag,
) (*AutomatedReasoningPolicy, error)

CreateAutomatedReasoningPolicy creates a new Automated Reasoning policy.

func (*InMemoryBackend) CreateAutomatedReasoningPolicyTestCase

func (b *InMemoryBackend) CreateAutomatedReasoningPolicyTestCase(
	policyARN string,
) (*AutomatedReasoningPolicyTestCase, error)

CreateAutomatedReasoningPolicyTestCase creates a test case for an Automated Reasoning policy.

func (*InMemoryBackend) CreateAutomatedReasoningPolicyVersion

func (b *InMemoryBackend) CreateAutomatedReasoningPolicyVersion(
	policyARN, definitionHash string,
) (*AutomatedReasoningPolicyVersion, error)

CreateAutomatedReasoningPolicyVersion creates a new version of an Automated Reasoning policy.

func (*InMemoryBackend) CreateCustomModel

func (b *InMemoryBackend) CreateCustomModel(modelName string, tags []Tag) (*CustomModel, error)

CreateCustomModel creates a new custom model.

func (*InMemoryBackend) CreateCustomModelDeployment

func (b *InMemoryBackend) CreateCustomModelDeployment(
	modelARN, deploymentName string,
	tags []Tag,
) (*CustomModelDeployment, error)

CreateCustomModelDeployment creates a new deployment for a custom model.

func (*InMemoryBackend) CreateDataSource

func (b *InMemoryBackend) CreateDataSource(
	kbID, name, description string,
	dsConfig map[string]any,
) (*DataSource, error)

CreateDataSource creates a data source for a knowledge base.

func (*InMemoryBackend) CreateDataSourceWithConfiguration

func (b *InMemoryBackend) CreateDataSourceWithConfiguration(
	kbID, name, description, deletionPolicy string,
	dsConfig, vectorConfig map[string]any,
) (*DataSource, error)

CreateDataSourceWithConfiguration creates a data source with vector ingestion settings.

func (*InMemoryBackend) CreateEvaluationJob

func (b *InMemoryBackend) CreateEvaluationJob(
	name string,
	tags []Tag,
	opts ...*CreateEvaluationJobInput,
) (*EvaluationJob, error)

CreateEvaluationJob creates a new evaluation job.

func (*InMemoryBackend) CreateFlow

func (b *InMemoryBackend) CreateFlow(
	name, description string,
	tags map[string]string,
) (*Flow, error)

CreateFlow creates a new Bedrock Flow.

func (*InMemoryBackend) CreateFlowAlias

func (b *InMemoryBackend) CreateFlowAlias(
	flowID, name, description string,
) (*FlowAlias, error)

CreateFlowAlias creates an alias for a Flow.

func (*InMemoryBackend) CreateFlowVersion

func (b *InMemoryBackend) CreateFlowVersion(flowID string) (*FlowVersion, error)

CreateFlowVersion creates a numbered snapshot version of a Flow.

func (*InMemoryBackend) CreateFoundationModelAgreement

func (b *InMemoryBackend) CreateFoundationModelAgreement(
	modelID string,
) (*FoundationModelAgreement, error)

CreateFoundationModelAgreement creates a foundation model access agreement.

func (*InMemoryBackend) CreateGuardrail

func (b *InMemoryBackend) CreateGuardrail(
	name, description, blockedInput, blockedOutput string,
	tags []Tag,
	policies ...*GuardrailPolicies,
) (*Guardrail, error)

CreateGuardrail creates a new guardrail. The optional policies argument configures content, topic, word, sensitive-information, and contextual-grounding policies.

func (*InMemoryBackend) CreateGuardrailVersion

func (b *InMemoryBackend) CreateGuardrailVersion(
	idOrARN, description string,
) (*GuardrailVersion, error)

CreateGuardrailVersion creates a new numbered version snapshot of a guardrail. Each guardrail maintains its own monotonically increasing version counter.

func (*InMemoryBackend) CreateInferenceProfile

func (b *InMemoryBackend) CreateInferenceProfile(
	name, description string,
	tags []Tag,
) (*InferenceProfile, error)

CreateInferenceProfile creates a new inference profile.

func (*InMemoryBackend) CreateKnowledgeBase

func (b *InMemoryBackend) CreateKnowledgeBase(
	name, description, roleArn string,
	kbConfig, storageConfig map[string]any,
	tags map[string]string,
) (*KnowledgeBase, error)

CreateKnowledgeBase creates a new knowledge base.

func (*InMemoryBackend) CreateMarketplaceModelEndpoint

func (b *InMemoryBackend) CreateMarketplaceModelEndpoint(
	endpointName, modelSourceID string,
	tags []Tag,
) (*MarketplaceModelEndpoint, error)

CreateMarketplaceModelEndpoint creates a new marketplace model endpoint.

func (*InMemoryBackend) CreateModelCopyJob

func (b *InMemoryBackend) CreateModelCopyJob(
	sourceModelARN string,
	tags []Tag,
) (*ModelCopyJob, error)

CreateModelCopyJob creates a new model copy job.

func (*InMemoryBackend) CreateModelCustomizationJob

func (b *InMemoryBackend) CreateModelCustomizationJob(
	jobName, baseModelID, customizationType string,
	tags []Tag,
) (*ModelCustomizationJob, error)

CreateModelCustomizationJob creates a new model customization job.

func (*InMemoryBackend) CreateModelImportJob

func (b *InMemoryBackend) CreateModelImportJob(
	jobName string,
	tags []Tag,
) (*ModelImportJob, error)

CreateModelImportJob creates a new model import job.

func (*InMemoryBackend) CreateModelInvocationJob

func (b *InMemoryBackend) CreateModelInvocationJob(
	name string,
	tags []Tag,
	opts ...*CreateModelInvocationJobInput,
) (*ModelInvocationJob, error)

CreateModelInvocationJob creates a new batch model invocation job. AWS initial status is "Submitted" (not InProgress).

func (*InMemoryBackend) CreatePrompt

func (b *InMemoryBackend) CreatePrompt(
	name, description string,
	tags map[string]string,
) (*Prompt, error)

CreatePrompt creates a new Bedrock Prompt.

func (*InMemoryBackend) CreatePromptRouter

func (b *InMemoryBackend) CreatePromptRouter(name string, tags []Tag) (*PromptRouter, error)

CreatePromptRouter creates a new prompt router.

func (*InMemoryBackend) CreatePromptVersion

func (b *InMemoryBackend) CreatePromptVersion(promptID string) (*PromptVersion, error)

CreatePromptVersion creates a numbered snapshot version of a Prompt.

func (*InMemoryBackend) CreateProvisionedModelThroughput

func (b *InMemoryBackend) CreateProvisionedModelThroughput(
	name, modelID string,
	modelUnits int32,
	commitmentDuration string,
	tags []Tag,
) (*ProvisionedModelThroughput, error)

CreateProvisionedModelThroughput creates a new provisioned model throughput.

func (*InMemoryBackend) DeleteAgent

func (b *InMemoryBackend) DeleteAgent(agentID string) error

DeleteAgent deletes a Bedrock Agent. AWS rejects deletion when the agent has active aliases (ConflictException).

func (*InMemoryBackend) DeleteAgentActionGroup

func (b *InMemoryBackend) DeleteAgentActionGroup(agentID, actionGroupID string) error

DeleteAgentActionGroup deletes an action group.

func (*InMemoryBackend) DeleteAgentAlias

func (b *InMemoryBackend) DeleteAgentAlias(agentID, aliasID string) error

DeleteAgentAlias deletes an agent alias.

func (*InMemoryBackend) DeleteAgentMemory

func (b *InMemoryBackend) DeleteAgentMemory(agentID, sessionID string) error

DeleteAgentMemory deletes memory entries for an agent session.

func (*InMemoryBackend) DeleteAgentVersion

func (b *InMemoryBackend) DeleteAgentVersion(agentID, version string) error

DeleteAgentVersion deletes a specific Agent version.

func (*InMemoryBackend) DeleteAutomatedReasoningPolicy

func (b *InMemoryBackend) DeleteAutomatedReasoningPolicy(policyARN string) error

DeleteAutomatedReasoningPolicy removes a policy and its related resources.

func (*InMemoryBackend) DeleteAutomatedReasoningPolicyBuildWorkflow

func (b *InMemoryBackend) DeleteAutomatedReasoningPolicyBuildWorkflow(policyARN, workflowID string) error

DeleteAutomatedReasoningPolicyBuildWorkflow removes a build workflow.

func (*InMemoryBackend) DeleteAutomatedReasoningPolicyTestCase

func (b *InMemoryBackend) DeleteAutomatedReasoningPolicyTestCase(policyARN, testCaseID string) error

DeleteAutomatedReasoningPolicyTestCase removes a test case.

func (*InMemoryBackend) DeleteCustomModel

func (b *InMemoryBackend) DeleteCustomModel(idOrARN string) error

DeleteCustomModel removes a custom model by ARN or name.

func (*InMemoryBackend) DeleteCustomModelDeployment

func (b *InMemoryBackend) DeleteCustomModelDeployment(deployARN string) error

DeleteCustomModelDeployment removes a deployment.

func (*InMemoryBackend) DeleteDataSource

func (b *InMemoryBackend) DeleteDataSource(kbID, dsID string) error

DeleteDataSource deletes a data source.

func (*InMemoryBackend) DeleteEnforcedGuardrailConfiguration

func (b *InMemoryBackend) DeleteEnforcedGuardrailConfiguration(guardrailID string) error

DeleteEnforcedGuardrailConfiguration removes an enforced guardrail config.

func (*InMemoryBackend) DeleteFlow

func (b *InMemoryBackend) DeleteFlow(flowID string) error

DeleteFlow deletes a Flow.

func (*InMemoryBackend) DeleteFlowAlias

func (b *InMemoryBackend) DeleteFlowAlias(flowID, aliasID string) error

DeleteFlowAlias deletes a Flow alias.

func (*InMemoryBackend) DeleteFlowVersion

func (b *InMemoryBackend) DeleteFlowVersion(flowID, version string) error

DeleteFlowVersion deletes a specific Flow version.

func (*InMemoryBackend) DeleteFoundationModelAgreement

func (b *InMemoryBackend) DeleteFoundationModelAgreement(modelID string) error

DeleteFoundationModelAgreement removes an agreement by model ID.

func (*InMemoryBackend) DeleteGuardrail

func (b *InMemoryBackend) DeleteGuardrail(idOrARN, version string) error

DeleteGuardrail removes a guardrail by ID or ARN. If version is empty, the DRAFT and every numbered version are deleted. If version is a specific numbered version, only that version's snapshot is deleted and the DRAFT (and other versions) are untouched.

func (*InMemoryBackend) DeleteImportedModel

func (b *InMemoryBackend) DeleteImportedModel(modelARN string) error

DeleteImportedModel removes the import job whose importedModelArn matches.

func (*InMemoryBackend) DeleteInferenceProfile

func (b *InMemoryBackend) DeleteInferenceProfile(idOrARN string) error

DeleteInferenceProfile removes an inference profile by ARN or name.

func (*InMemoryBackend) DeleteKnowledgeBase

func (b *InMemoryBackend) DeleteKnowledgeBase(kbID string) error

DeleteKnowledgeBase deletes a knowledge base.

func (*InMemoryBackend) DeleteKnowledgeBaseDocuments

func (b *InMemoryBackend) DeleteKnowledgeBaseDocuments(
	kbID, dsID string,
	documentIDs []string,
) error

DeleteKnowledgeBaseDocuments removes documents from a KB data source.

func (*InMemoryBackend) DeleteMarketplaceModelEndpoint

func (b *InMemoryBackend) DeleteMarketplaceModelEndpoint(idOrARN string) error

DeleteMarketplaceModelEndpoint removes a marketplace endpoint by ARN or name.

func (*InMemoryBackend) DeleteModelInvocationLoggingConfiguration

func (b *InMemoryBackend) DeleteModelInvocationLoggingConfiguration()

DeleteModelInvocationLoggingConfiguration removes the logging configuration.

func (*InMemoryBackend) DeletePrompt

func (b *InMemoryBackend) DeletePrompt(promptID string) error

DeletePrompt deletes a Prompt.

func (*InMemoryBackend) DeletePromptRouter

func (b *InMemoryBackend) DeletePromptRouter(routerARN string) error

DeletePromptRouter removes a prompt router.

func (*InMemoryBackend) DeletePromptVersion

func (b *InMemoryBackend) DeletePromptVersion(promptID, version string) error

DeletePromptVersion deletes a specific Prompt version.

func (*InMemoryBackend) DeleteProvisionedModelThroughput

func (b *InMemoryBackend) DeleteProvisionedModelThroughput(idOrARN string) error

DeleteProvisionedModelThroughput removes a provisioned model throughput by ID or ARN.

func (*InMemoryBackend) DeregisterMarketplaceModelEndpoint

func (b *InMemoryBackend) DeregisterMarketplaceModelEndpoint(idOrARN string) error

DeregisterMarketplaceModelEndpoint transitions endpoint status to Deregistered.

func (*InMemoryBackend) DisassociateAgentCollaborator

func (b *InMemoryBackend) DisassociateAgentCollaborator(agentID, collaboratorID string) error

DisassociateAgentCollaborator removes a collaborator from an agent.

func (*InMemoryBackend) DisassociateAgentKnowledgeBase

func (b *InMemoryBackend) DisassociateAgentKnowledgeBase(agentID, kbID string) error

DisassociateAgentKnowledgeBase removes a knowledge base association from an agent.

func (*InMemoryBackend) ExportAutomatedReasoningPolicyVersion

func (b *InMemoryBackend) ExportAutomatedReasoningPolicyVersion(policyARN, version string) (map[string]any, error)

ExportAutomatedReasoningPolicyVersion exports a policy version definition.

func (*InMemoryBackend) GetAgent

func (b *InMemoryBackend) GetAgent(agentID string) (*Agent, error)

GetAgent returns a Bedrock Agent by ID.

func (*InMemoryBackend) GetAgentActionGroup

func (b *InMemoryBackend) GetAgentActionGroup(
	agentID, actionGroupID string,
) (*AgentActionGroup, error)

GetAgentActionGroup returns an action group by ID.

func (*InMemoryBackend) GetAgentAlias

func (b *InMemoryBackend) GetAgentAlias(agentID, aliasID string) (*AgentAlias, error)

GetAgentAlias returns an alias by ID.

func (*InMemoryBackend) GetAgentCollaborator

func (b *InMemoryBackend) GetAgentCollaborator(
	agentID, collaboratorID string,
) (*AgentCollaborator, error)

GetAgentCollaborator returns an agent collaborator by ID.

func (*InMemoryBackend) GetAgentKnowledgeBase

func (b *InMemoryBackend) GetAgentKnowledgeBase(
	agentID, kbID string,
) (*AgentKnowledgeBaseAssociation, error)

GetAgentKnowledgeBase returns an agent knowledge base association.

func (*InMemoryBackend) GetAgentMemory

func (b *InMemoryBackend) GetAgentMemory(agentID, sessionID string) []any

GetAgentMemory returns memory entries for an agent session (stub).

func (*InMemoryBackend) GetAgentVersion

func (b *InMemoryBackend) GetAgentVersion(agentID, version string) (*AgentVersion, error)

GetAgentVersion returns a specific Agent version.

func (*InMemoryBackend) GetAutomatedReasoningPolicy

func (b *InMemoryBackend) GetAutomatedReasoningPolicy(policyARN string) (*AutomatedReasoningPolicy, error)

GetAutomatedReasoningPolicy returns a single ARP by ARN.

func (*InMemoryBackend) GetAutomatedReasoningPolicyAnnotations

func (b *InMemoryBackend) GetAutomatedReasoningPolicyAnnotations(policyARN string) (map[string]any, error)

GetAutomatedReasoningPolicyAnnotations returns a placeholder annotations response.

func (*InMemoryBackend) GetAutomatedReasoningPolicyBuildWorkflow

func (b *InMemoryBackend) GetAutomatedReasoningPolicyBuildWorkflow(
	policyARN, workflowID string,
) (*AutomatedReasoningPolicyBuildWorkflow, error)

GetAutomatedReasoningPolicyBuildWorkflow returns a workflow by policy ARN and workflow ID.

func (*InMemoryBackend) GetAutomatedReasoningPolicyBuildWorkflowResultAssets

func (b *InMemoryBackend) GetAutomatedReasoningPolicyBuildWorkflowResultAssets(
	policyARN, workflowID string,
) (map[string]any, error)

GetAutomatedReasoningPolicyBuildWorkflowResultAssets returns result asset URLs for a workflow.

func (*InMemoryBackend) GetAutomatedReasoningPolicyNextScenario

func (b *InMemoryBackend) GetAutomatedReasoningPolicyNextScenario(policyARN string) (map[string]any, error)

GetAutomatedReasoningPolicyNextScenario returns the next scenario for active-learning.

func (*InMemoryBackend) GetAutomatedReasoningPolicyTestCase

func (b *InMemoryBackend) GetAutomatedReasoningPolicyTestCase(
	policyARN, testCaseID string,
) (*AutomatedReasoningPolicyTestCase, error)

GetAutomatedReasoningPolicyTestCase returns a test case by ID.

func (*InMemoryBackend) GetAutomatedReasoningPolicyTestResult

func (b *InMemoryBackend) GetAutomatedReasoningPolicyTestResult(policyARN, testCaseID string) (map[string]any, error)

GetAutomatedReasoningPolicyTestResult returns the result for a test case execution.

func (*InMemoryBackend) GetCustomModel

func (b *InMemoryBackend) GetCustomModel(idOrARN string) (*CustomModel, error)

GetCustomModel returns a custom model by ARN or name.

func (*InMemoryBackend) GetCustomModelDeployment

func (b *InMemoryBackend) GetCustomModelDeployment(deployARN string) (*CustomModelDeployment, error)

GetCustomModelDeployment returns a deployment by ARN.

func (*InMemoryBackend) GetDataSource

func (b *InMemoryBackend) GetDataSource(kbID, dsID string) (*DataSource, error)

GetDataSource returns a data source by ID.

func (*InMemoryBackend) GetEvaluationJob

func (b *InMemoryBackend) GetEvaluationJob(jobARN string) (*EvaluationJob, error)

GetEvaluationJob returns a single evaluation job by ARN.

func (*InMemoryBackend) GetFlow

func (b *InMemoryBackend) GetFlow(flowID string) (*Flow, error)

GetFlow returns a Flow by ID.

func (*InMemoryBackend) GetFlowAlias

func (b *InMemoryBackend) GetFlowAlias(flowID, aliasID string) (*FlowAlias, error)

GetFlowAlias returns a Flow alias by ID.

func (*InMemoryBackend) GetFlowVersion

func (b *InMemoryBackend) GetFlowVersion(flowID, version string) (*FlowVersion, error)

GetFlowVersion returns a specific Flow version.

func (*InMemoryBackend) GetFoundationModel

func (b *InMemoryBackend) GetFoundationModel(modelID string) (*FoundationModelSummary, error)

GetFoundationModel returns a single foundation model by model ID or full ARN.

func (*InMemoryBackend) GetGuardrail

func (b *InMemoryBackend) GetGuardrail(idOrARN string) (*Guardrail, error)

func (*InMemoryBackend) GetGuardrailVersion

func (b *InMemoryBackend) GetGuardrailVersion(idOrARN, version string) (*Guardrail, error)

GetGuardrailVersion returns guardrail details for a specific version. An empty or "DRAFT" version returns the current (mutable) draft. A numbered version returns the immutable snapshot captured when that version was published via CreateGuardrailVersion.

func (*InMemoryBackend) GetImportedModel

func (b *InMemoryBackend) GetImportedModel(modelARN string) (*ModelImportJob, error)

GetImportedModel returns the import job whose importedModelArn matches.

func (*InMemoryBackend) GetInferenceProfile

func (b *InMemoryBackend) GetInferenceProfile(idOrARN string) (*InferenceProfile, error)

GetInferenceProfile returns an inference profile by ARN or name.

func (*InMemoryBackend) GetIngestionJob

func (b *InMemoryBackend) GetIngestionJob(kbID, dsID, jobID string) (*IngestionJob, error)

GetIngestionJob returns an ingestion job by ID.

func (*InMemoryBackend) GetKnowledgeBase

func (b *InMemoryBackend) GetKnowledgeBase(kbID string) (*KnowledgeBase, error)

GetKnowledgeBase returns a knowledge base by ID.

func (*InMemoryBackend) GetKnowledgeBaseDocuments

func (b *InMemoryBackend) GetKnowledgeBaseDocuments(
	kbID, dsID string,
	documentIDs []string,
) ([]*KnowledgeBaseDocument, error)

GetKnowledgeBaseDocuments returns selected documents for a KB data source.

func (*InMemoryBackend) GetMarketplaceModelEndpoint

func (b *InMemoryBackend) GetMarketplaceModelEndpoint(
	idOrARN string,
) (*MarketplaceModelEndpoint, error)

GetMarketplaceModelEndpoint returns a marketplace endpoint by ARN or name.

func (*InMemoryBackend) GetModelCopyJob

func (b *InMemoryBackend) GetModelCopyJob(jobARN string) (*ModelCopyJob, error)

GetModelCopyJob returns a model copy job by ARN.

func (*InMemoryBackend) GetModelCustomizationJob

func (b *InMemoryBackend) GetModelCustomizationJob(idOrARN string) (*ModelCustomizationJob, error)

GetModelCustomizationJob returns a model customization job by ARN or name.

func (*InMemoryBackend) GetModelImportJob

func (b *InMemoryBackend) GetModelImportJob(jobARN string) (*ModelImportJob, error)

GetModelImportJob returns a model import job by ARN.

func (*InMemoryBackend) GetModelInvocationJob

func (b *InMemoryBackend) GetModelInvocationJob(jobARN string) (*ModelInvocationJob, error)

GetModelInvocationJob returns a single invocation job by ARN.

func (*InMemoryBackend) GetModelInvocationLoggingConfiguration

func (b *InMemoryBackend) GetModelInvocationLoggingConfiguration() *ModelInvocationLoggingConfiguration

GetModelInvocationLoggingConfiguration returns the current logging configuration.

func (*InMemoryBackend) GetPrompt

func (b *InMemoryBackend) GetPrompt(promptID string) (*Prompt, error)

GetPrompt returns a Prompt by ID.

func (*InMemoryBackend) GetPromptRouter

func (b *InMemoryBackend) GetPromptRouter(routerARN string) (*PromptRouter, error)

GetPromptRouter returns a single prompt router by ARN.

func (*InMemoryBackend) GetPromptVersion

func (b *InMemoryBackend) GetPromptVersion(promptID, version string) (*PromptVersion, error)

GetPromptVersion returns a specific Prompt version.

func (*InMemoryBackend) GetProvisionedModelThroughput

func (b *InMemoryBackend) GetProvisionedModelThroughput(
	idOrARN string,
) (*ProvisionedModelThroughput, error)

func (*InMemoryBackend) GetUseCaseForModelAccess

func (b *InMemoryBackend) GetUseCaseForModelAccess() map[string]any

GetUseCaseForModelAccess returns the current use case configuration.

func (*InMemoryBackend) IngestKnowledgeBaseDocuments

func (b *InMemoryBackend) IngestKnowledgeBaseDocuments(
	kbID, dsID string,
	documentIDs []string,
) ([]*KnowledgeBaseDocument, error)

IngestKnowledgeBaseDocuments adds documents to a KB data source.

func (*InMemoryBackend) ListAgentActionGroups

func (b *InMemoryBackend) ListAgentActionGroups(
	agentID string,
	maxResults int,
	nextToken string,
) ([]*AgentActionGroup, string)

ListAgentActionGroups lists action groups for an agent.

func (*InMemoryBackend) ListAgentAliases

func (b *InMemoryBackend) ListAgentAliases(
	agentID string,
	maxResults int,
	nextToken string,
) ([]*AgentAlias, string)

ListAgentAliases lists aliases for an agent.

func (*InMemoryBackend) ListAgentCollaborators

func (b *InMemoryBackend) ListAgentCollaborators(
	agentID string,
	maxResults int,
	nextToken string,
) ([]*AgentCollaborator, string)

ListAgentCollaborators lists collaborators for an agent.

func (*InMemoryBackend) ListAgentKnowledgeBases

func (b *InMemoryBackend) ListAgentKnowledgeBases(
	agentID string,
	maxResults int,
	nextToken string,
) ([]*AgentKnowledgeBaseAssociation, string)

ListAgentKnowledgeBases returns all knowledge base associations for an agent.

func (*InMemoryBackend) ListAgentResourceTags

func (b *InMemoryBackend) ListAgentResourceTags(resourceArn string) map[string]string

ListAgentResourceTags returns tags for an agent-domain resource identified by its ARN.

func (*InMemoryBackend) ListAgentVersions

func (b *InMemoryBackend) ListAgentVersions(
	agentID string,
	maxResults int,
	nextToken string,
) ([]*AgentVersion, string)

ListAgentVersions lists all versions for an Agent.

func (*InMemoryBackend) ListAgents

func (b *InMemoryBackend) ListAgents(maxResults int, nextToken string) ([]*Agent, string)

ListAgents returns all agents with pagination.

func (*InMemoryBackend) ListAutomatedReasoningPolicies

func (b *InMemoryBackend) ListAutomatedReasoningPolicies() []*AutomatedReasoningPolicy

ListAutomatedReasoningPolicies returns all policies.

func (*InMemoryBackend) ListAutomatedReasoningPolicyBuildWorkflows

func (b *InMemoryBackend) ListAutomatedReasoningPolicyBuildWorkflows(
	policyARN string,
) []*AutomatedReasoningPolicyBuildWorkflow

ListAutomatedReasoningPolicyBuildWorkflows returns all workflows for a policy.

func (*InMemoryBackend) ListAutomatedReasoningPolicyTestCases

func (b *InMemoryBackend) ListAutomatedReasoningPolicyTestCases(policyARN string) []*AutomatedReasoningPolicyTestCase

ListAutomatedReasoningPolicyTestCases returns all test cases for a policy.

func (*InMemoryBackend) ListAutomatedReasoningPolicyTestResults

func (b *InMemoryBackend) ListAutomatedReasoningPolicyTestResults(policyARN string) []map[string]any

ListAutomatedReasoningPolicyTestResults returns test results for a policy.

func (*InMemoryBackend) ListCustomModelDeployments

func (b *InMemoryBackend) ListCustomModelDeployments() []*CustomModelDeployment

ListCustomModelDeployments returns all deployments.

func (*InMemoryBackend) ListCustomModels

func (b *InMemoryBackend) ListCustomModels(nextToken string) ([]*CustomModel, string)

ListCustomModels returns all custom models with optional pagination.

func (*InMemoryBackend) ListDataSources

func (b *InMemoryBackend) ListDataSources(
	kbID string,
	maxResults int,
	nextToken string,
) ([]*DataSource, string)

ListDataSources lists data sources for a knowledge base.

func (*InMemoryBackend) ListEnforcedGuardrailsConfiguration

func (b *InMemoryBackend) ListEnforcedGuardrailsConfiguration() []*EnforcedGuardrailConfig

ListEnforcedGuardrailsConfiguration returns all enforced guardrail configs.

func (*InMemoryBackend) ListEvaluationJobs

func (b *InMemoryBackend) ListEvaluationJobs() []*EvaluationJob

ListEvaluationJobs returns all evaluation jobs.

func (*InMemoryBackend) ListFlowAliases

func (b *InMemoryBackend) ListFlowAliases(
	flowID string,
	maxResults int,
	nextToken string,
) ([]*FlowAlias, string)

ListFlowAliases lists aliases for a Flow.

func (*InMemoryBackend) ListFlowVersions

func (b *InMemoryBackend) ListFlowVersions(
	flowID string,
	maxResults int,
	nextToken string,
) ([]*FlowVersion, string)

ListFlowVersions lists all versions for a Flow.

func (*InMemoryBackend) ListFlows

func (b *InMemoryBackend) ListFlows(maxResults int, nextToken string) ([]*Flow, string)

ListFlows returns all flows with pagination.

func (*InMemoryBackend) ListFoundationModelAgreementOffers

func (b *InMemoryBackend) ListFoundationModelAgreementOffers() []*FoundationModelAgreement

ListFoundationModelAgreementOffers returns all foundation model agreements.

func (*InMemoryBackend) ListFoundationModels

func (b *InMemoryBackend) ListFoundationModels(
	nextToken string,
) ([]*FoundationModelSummary, string)

ListFoundationModels returns seeded foundation models with optional pagination.

func (*InMemoryBackend) ListGuardrails

func (b *InMemoryBackend) ListGuardrails(
	nextToken, guardrailIdentifier string,
) ([]*GuardrailSummary, string)

ListGuardrails returns guardrails with optional pagination. If guardrailIdentifier is non-empty, results are filtered to guardrails whose ID, ARN, or name equals the identifier (case-sensitive).

func (*InMemoryBackend) ListImportedModels

func (b *InMemoryBackend) ListImportedModels() []*ModelImportJob

ListImportedModels returns the import jobs that have completed and have an imported model ARN.

func (*InMemoryBackend) ListInferenceProfiles

func (b *InMemoryBackend) ListInferenceProfiles(nextToken string) ([]*InferenceProfile, string)

ListInferenceProfiles returns all inference profiles with optional pagination.

func (*InMemoryBackend) ListIngestionJobs

func (b *InMemoryBackend) ListIngestionJobs(
	kbID, dsID string,
	maxResults int,
	nextToken string,
) ([]*IngestionJob, string)

ListIngestionJobs lists ingestion jobs for a data source.

func (*InMemoryBackend) ListKnowledgeBaseDocuments

func (b *InMemoryBackend) ListKnowledgeBaseDocuments(
	kbID, dsID string,
	maxResults int,
	nextToken string,
) ([]*KnowledgeBaseDocument, string)

ListKnowledgeBaseDocuments returns documents for a KB data source.

func (*InMemoryBackend) ListKnowledgeBases

func (b *InMemoryBackend) ListKnowledgeBases(
	maxResults int,
	nextToken string,
) ([]*KnowledgeBase, string)

ListKnowledgeBases returns all knowledge bases with pagination.

func (*InMemoryBackend) ListMarketplaceModelEndpoints

func (b *InMemoryBackend) ListMarketplaceModelEndpoints(
	nextToken string,
) ([]*MarketplaceModelEndpoint, string)

ListMarketplaceModelEndpoints returns all marketplace endpoints with optional pagination.

func (*InMemoryBackend) ListModelCopyJobs

func (b *InMemoryBackend) ListModelCopyJobs() []*ModelCopyJob

ListModelCopyJobs returns all model copy jobs sorted by creation time.

func (*InMemoryBackend) ListModelCustomizationJobs

func (b *InMemoryBackend) ListModelCustomizationJobs(
	nextToken string,
) ([]*ModelCustomizationJob, string)

ListModelCustomizationJobs returns all customization jobs with optional pagination.

func (*InMemoryBackend) ListModelImportJobs

func (b *InMemoryBackend) ListModelImportJobs() []*ModelImportJob

ListModelImportJobs returns all model import jobs sorted by creation time.

func (*InMemoryBackend) ListModelInvocationJobs

func (b *InMemoryBackend) ListModelInvocationJobs(
	in *ListModelInvocationJobsInput,
) ([]*ModelInvocationJob, string)

ListModelInvocationJobs returns invocation jobs with optional filters and pagination.

func (*InMemoryBackend) ListPromptRouters

func (b *InMemoryBackend) ListPromptRouters() []*PromptRouter

ListPromptRouters returns all prompt routers.

func (*InMemoryBackend) ListPromptVersions

func (b *InMemoryBackend) ListPromptVersions(
	promptID string,
	maxResults int,
	nextToken string,
) ([]*PromptVersion, string)

ListPromptVersions lists all versions for a Prompt.

func (*InMemoryBackend) ListPrompts

func (b *InMemoryBackend) ListPrompts(maxResults int, nextToken string) ([]*Prompt, string)

ListPrompts returns all prompts with pagination.

func (*InMemoryBackend) ListProvisionedModelThroughputs

func (b *InMemoryBackend) ListProvisionedModelThroughputs(
	nextToken string,
) ([]*ProvisionedModelThroughput, string)

ListProvisionedModelThroughputs returns provisioned model throughputs with optional pagination.

func (*InMemoryBackend) ListTagsForResource

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

ListTagsForResource returns tags for a resource identified by ARN.

func (*InMemoryBackend) PrepareAgent

func (b *InMemoryBackend) PrepareAgent(agentID string) (*Agent, error)

PrepareAgent starts preparation; subsequent reads advance the terminal state.

func (*InMemoryBackend) PrepareFlow

func (b *InMemoryBackend) PrepareFlow(flowID string) (*Flow, error)

PrepareFlow transitions a Flow to PREPARED status.

func (*InMemoryBackend) PutEnforcedGuardrailConfiguration

func (b *InMemoryBackend) PutEnforcedGuardrailConfiguration(guardrailID, version string)

PutEnforcedGuardrailConfiguration stores or updates an enforced guardrail config.

func (*InMemoryBackend) PutModelInvocationLoggingConfiguration

func (b *InMemoryBackend) PutModelInvocationLoggingConfiguration(
	cfg *ModelInvocationLoggingConfiguration,
)

PutModelInvocationLoggingConfiguration sets the logging configuration.

func (*InMemoryBackend) PutUseCaseForModelAccess

func (b *InMemoryBackend) PutUseCaseForModelAccess(useCaseType, description string)

PutUseCaseForModelAccess stores the use case configuration.

func (*InMemoryBackend) Region

func (b *InMemoryBackend) Region() string

Region returns the AWS region this backend is configured for.

func (*InMemoryBackend) RegisterMarketplaceModelEndpoint

func (b *InMemoryBackend) RegisterMarketplaceModelEndpoint(idOrARN string) error

RegisterMarketplaceModelEndpoint transitions endpoint status to Active.

func (*InMemoryBackend) Reset

func (b *InMemoryBackend) Reset()

Reset clears all state, returning the backend to its initial seeded state. The accountID, region, and seeded foundation models are preserved.

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) RunJanitor

func (b *InMemoryBackend) RunJanitor(ctx context.Context, interval time.Duration)

RunJanitor periodically advances time-based state machines for provisioned resources.

func (*InMemoryBackend) Snapshot

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

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

func (*InMemoryBackend) StartAutomatedReasoningPolicyBuildWorkflow

func (b *InMemoryBackend) StartAutomatedReasoningPolicyBuildWorkflow(
	policyARN string,
) (*AutomatedReasoningPolicyBuildWorkflow, error)

StartAutomatedReasoningPolicyBuildWorkflow creates a new build workflow for a policy.

func (*InMemoryBackend) StartAutomatedReasoningPolicyTestWorkflow

func (b *InMemoryBackend) StartAutomatedReasoningPolicyTestWorkflow(
	policyARN, testCaseID string,
) (map[string]any, error)

StartAutomatedReasoningPolicyTestWorkflow starts a test workflow for a test case.

func (*InMemoryBackend) StartIngestionJob

func (b *InMemoryBackend) StartIngestionJob(kbID, dsID, description string) (*IngestionJob, error)

StartIngestionJob starts an ingestion job for a data source. AWS rejects starting a new job if one is already in STARTING state for the same data source (ConflictException).

func (*InMemoryBackend) StopEvaluationJob

func (b *InMemoryBackend) StopEvaluationJob(jobARN string) error

StopEvaluationJob marks an evaluation job as stopped.

func (*InMemoryBackend) StopIngestionJob

func (b *InMemoryBackend) StopIngestionJob(kbID, dsID, jobID string) (*IngestionJob, error)

StopIngestionJob stops a running ingestion job. AWS only allows stopping jobs in STARTING state; other states return ValidationException.

func (*InMemoryBackend) StopModelCustomizationJob

func (b *InMemoryBackend) StopModelCustomizationJob(idOrARN string) error

StopModelCustomizationJob stops a running customization job.

func (*InMemoryBackend) StopModelInvocationJob

func (b *InMemoryBackend) StopModelInvocationJob(jobARN string) error

StopModelInvocationJob marks an invocation job as stopped.

func (*InMemoryBackend) TagAgentResource

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

TagAgentResource adds tags to an agent-domain resource identified by its ARN.

func (*InMemoryBackend) TagResource

func (b *InMemoryBackend) TagResource(resourceARN string, tags []Tag) error

TagResource adds or updates tags on a resource identified by ARN.

func (*InMemoryBackend) UntagAgentResource

func (b *InMemoryBackend) UntagAgentResource(resourceArn string, tagKeys []string) error

UntagAgentResource removes tags from an agent-domain resource identified by its ARN.

func (*InMemoryBackend) UntagResource

func (b *InMemoryBackend) UntagResource(resourceARN string, tagKeys []string) error

UntagResource removes tags from a resource identified by ARN.

func (*InMemoryBackend) UpdateAgent

func (b *InMemoryBackend) UpdateAgent(
	agentID, foundationModel, instruction, roleArn string,
) (*Agent, error)

UpdateAgent updates a Bedrock Agent.

func (*InMemoryBackend) UpdateAgentActionGroup

func (b *InMemoryBackend) UpdateAgentActionGroup(
	agentID, actionGroupID, description string,
	executor map[string]any,
) (*AgentActionGroup, error)

UpdateAgentActionGroup updates an action group.

func (*InMemoryBackend) UpdateAgentActionGroupWithSchemas

func (b *InMemoryBackend) UpdateAgentActionGroupWithSchemas(
	agentID, actionGroupID, description string,
	executor, apiSchema, functionSchema map[string]any,
) (*AgentActionGroup, error)

UpdateAgentActionGroupWithSchemas updates an action group and any submitted schemas.

func (*InMemoryBackend) UpdateAgentAlias

func (b *InMemoryBackend) UpdateAgentAlias(
	agentID, aliasID, aliasName, agentVersion string,
) (*AgentAlias, error)

UpdateAgentAlias updates an agent alias.

func (*InMemoryBackend) UpdateAgentCollaborator

func (b *InMemoryBackend) UpdateAgentCollaborator(
	agentID, collaboratorID, relayConversation string,
) (*AgentCollaborator, error)

UpdateAgentCollaborator updates an agent collaborator.

func (*InMemoryBackend) UpdateAgentKnowledgeBase

func (b *InMemoryBackend) UpdateAgentKnowledgeBase(
	agentID, kbID, description, state string,
) (*AgentKnowledgeBaseAssociation, error)

UpdateAgentKnowledgeBase updates an existing association.

func (*InMemoryBackend) UpdateAgentWithConfiguration

func (b *InMemoryBackend) UpdateAgentWithConfiguration(agentID string, config AgentConfiguration) (*Agent, error)

UpdateAgentWithConfiguration updates extended AWS agent configuration.

func (*InMemoryBackend) UpdateAutomatedReasoningPolicy

func (b *InMemoryBackend) UpdateAutomatedReasoningPolicy(
	policyARN, description string,
) (*AutomatedReasoningPolicy, error)

UpdateAutomatedReasoningPolicy updates description (and other mutable fields) of a policy.

func (*InMemoryBackend) UpdateAutomatedReasoningPolicyAnnotations

func (b *InMemoryBackend) UpdateAutomatedReasoningPolicyAnnotations(policyARN string) error

UpdateAutomatedReasoningPolicyAnnotations stores annotations for a policy.

func (*InMemoryBackend) UpdateAutomatedReasoningPolicyTestCase

func (b *InMemoryBackend) UpdateAutomatedReasoningPolicyTestCase(
	policyARN, testCaseID string,
) (*AutomatedReasoningPolicyTestCase, error)

UpdateAutomatedReasoningPolicyTestCase updates a test case (idempotent touch).

func (*InMemoryBackend) UpdateCustomModelDeployment

func (b *InMemoryBackend) UpdateCustomModelDeployment(deployARN string) (*CustomModelDeployment, error)

UpdateCustomModelDeployment updates mutable fields of a deployment.

func (*InMemoryBackend) UpdateDataSource

func (b *InMemoryBackend) UpdateDataSource(
	kbID, dsID, name, description string,
) (*DataSource, error)

UpdateDataSource updates a data source.

func (*InMemoryBackend) UpdateDataSourceWithConfiguration

func (b *InMemoryBackend) UpdateDataSourceWithConfiguration(
	kbID, dsID, name, description, deletionPolicy string,
	dsConfig, vectorConfig map[string]any,
) (*DataSource, error)

UpdateDataSourceWithConfiguration updates data source ingestion and connector settings.

func (*InMemoryBackend) UpdateFlow

func (b *InMemoryBackend) UpdateFlow(flowID, name, description string) (*Flow, error)

UpdateFlow updates a Flow.

func (*InMemoryBackend) UpdateFlowAlias

func (b *InMemoryBackend) UpdateFlowAlias(
	flowID, aliasID, name, description string,
) (*FlowAlias, error)

UpdateFlowAlias updates a Flow alias.

func (*InMemoryBackend) UpdateGuardrail

func (b *InMemoryBackend) UpdateGuardrail(
	idOrARN, name, description, blockedInput, blockedOutput string,
	policies ...*GuardrailPolicies,
) (*Guardrail, error)

UpdateGuardrail updates a guardrail's name, description, messaging, and policies. UpdateGuardrail always mutates the DRAFT version; numbered versions created via CreateGuardrailVersion are immutable snapshots and are unaffected (AWS imposes no restriction on editing DRAFT after versions have been published). The optional policies argument replaces all existing policy configs when provided.

func (*InMemoryBackend) UpdateKnowledgeBase

func (b *InMemoryBackend) UpdateKnowledgeBase(
	kbID, name, description, roleArn string,
) (*KnowledgeBase, error)

UpdateKnowledgeBase updates a knowledge base.

func (*InMemoryBackend) UpdateKnowledgeBaseDocuments

func (b *InMemoryBackend) UpdateKnowledgeBaseDocuments(
	kbID, dsID string,
	documentIDs []string,
) ([]*KnowledgeBaseDocument, error)

UpdateKnowledgeBaseDocuments upserts document records in a KB data source.

func (*InMemoryBackend) UpdateMarketplaceModelEndpoint

func (b *InMemoryBackend) UpdateMarketplaceModelEndpoint(
	idOrARN string,
) (*MarketplaceModelEndpoint, error)

UpdateMarketplaceModelEndpoint updates a marketplace endpoint status.

func (*InMemoryBackend) UpdatePrompt

func (b *InMemoryBackend) UpdatePrompt(promptID, name, description string) (*Prompt, error)

UpdatePrompt updates a Prompt.

func (*InMemoryBackend) UpdateProvisionedModelThroughput

func (b *InMemoryBackend) UpdateProvisionedModelThroughput(
	idOrARN, desiredModelID, newName string,
) (*ProvisionedModelThroughput, error)

UpdateProvisionedModelThroughput updates a provisioned model throughput's desired model association and/or name. AWS does not allow changing modelUnits via Update — the unit count is fixed at creation (UpdateProvisionedModelThroughputInput only has desiredModelId and desiredProvisionedModelName).

func (*InMemoryBackend) ValidateFlowDefinition

func (b *InMemoryBackend) ValidateFlowDefinition() ([]any, error)

ValidateFlowDefinition validates a flow definition (stub — always succeeds).

type InferenceProfile

type InferenceProfile struct {
	CreatedAt            time.Time `json:"createdAt"`
	UpdatedAt            time.Time `json:"updatedAt"`
	InferenceProfileArn  string    `json:"inferenceProfileArn"`
	InferenceProfileID   string    `json:"inferenceProfileId"`
	InferenceProfileName string    `json:"inferenceProfileName"`
	Status               string    `json:"status"`
	Type                 string    `json:"type"`
	Description          string    `json:"description,omitempty"`
	Tags                 []Tag     `json:"tags,omitempty"`
}

InferenceProfile represents an inference profile resource.

type IngestionJob

type IngestionJob struct {
	StartedAt time.Time `json:"startedAt"`
	UpdatedAt time.Time `json:"updatedAt"`

	IngestionJobID  string `json:"ingestionJobId"`
	KnowledgeBaseID string `json:"knowledgeBaseId"`
	DataSourceID    string `json:"dataSourceId"`
	Status          string `json:"status"`
	Description     string `json:"description,omitempty"`
	// contains filtered or unexported fields
}

IngestionJob represents a data source ingestion job.

type KnowledgeBase

type KnowledgeBase struct {
	CreatedAt                  time.Time         `json:"createdAt"`
	UpdatedAt                  time.Time         `json:"updatedAt"`
	KnowledgeBaseConfiguration map[string]any    `json:"knowledgeBaseConfiguration,omitempty"`
	StorageConfiguration       map[string]any    `json:"storageConfiguration,omitempty"`
	Tags                       map[string]string `json:"tags,omitempty"`
	KnowledgeBaseID            string            `json:"knowledgeBaseId"`
	KnowledgeBaseArn           string            `json:"knowledgeBaseArn"`
	Name                       string            `json:"name"`
	Description                string            `json:"description,omitempty"`
	Status                     string            `json:"status"`
	RoleArn                    string            `json:"roleArn,omitempty"`
}

KnowledgeBase represents an Amazon Bedrock Knowledge Base.

type KnowledgeBaseDocument

type KnowledgeBaseDocument struct {
	KnowledgeBaseID string `json:"knowledgeBaseId"`
	DataSourceID    string `json:"dataSourceId"`
	DocumentID      string `json:"documentId"`
	Status          string `json:"status"`
}

KnowledgeBaseDocument represents a document in a KB data source.

type ListModelInvocationJobsInput

type ListModelInvocationJobsInput struct {
	StatusEquals     string
	NameContains     string
	SubmitTimeAfter  *time.Time
	SubmitTimeBefore *time.Time
	SortBy           string // CreationTime (default)
	SortOrder        string // Ascending (default) | Descending
	NextToken        string
}

ListModelInvocationJobsInput holds filter/pagination params for ListModelInvocationJobs.

type MarketplaceModelEndpoint

type MarketplaceModelEndpoint struct {
	CreatedAt     time.Time `json:"createdAt"`
	UpdatedAt     time.Time `json:"updatedAt"`
	EndpointArn   string    `json:"endpointArn"`
	EndpointName  string    `json:"endpointName"`
	ModelSourceID string    `json:"modelSourceIdentifier"`
	Status        string    `json:"status"`
	Tags          []Tag     `json:"tags,omitempty"`
}

MarketplaceModelEndpoint represents a marketplace model endpoint.

type ModelCopyJob

type ModelCopyJob struct {
	CreationTime     time.Time `json:"creationTime"`
	LastModifiedTime time.Time `json:"lastModifiedTime"`
	JobArn           string    `json:"jobArn"`
	SourceModelArn   string    `json:"sourceModelArn"`
	TargetModelArn   string    `json:"targetModelArn"`
	Status           string    `json:"status"`
	FailureMessage   string    `json:"failureMessage,omitempty"`
	Tags             []Tag     `json:"tags,omitempty"`
}

ModelCopyJob represents a model copy job.

type ModelCustomizationJob

type ModelCustomizationJob struct {
	CreationTime      time.Time `json:"creationTime"`
	LastModifiedTime  time.Time `json:"lastModifiedTime"`
	EndTime           time.Time `json:"endTime"`
	JobArn            string    `json:"jobArn"`
	JobName           string    `json:"jobName"`
	BaseModelArn      string    `json:"baseModelArn"`
	OutputModelArn    string    `json:"outputModelArn"`
	Status            string    `json:"status"`
	CustomizationType string    `json:"customizationType,omitempty"`
	Tags              []Tag     `json:"tags,omitempty"`
}

ModelCustomizationJob represents a model customization job.

type ModelImportJob

type ModelImportJob struct {
	CreationTime     time.Time  `json:"creationTime"`
	LastModifiedTime time.Time  `json:"lastModifiedTime"`
	EndTime          *time.Time `json:"endTime,omitempty"`
	JobArn           string     `json:"jobArn"`
	JobName          string     `json:"jobName"`
	ImportedModelArn string     `json:"importedModelArn"`
	Status           string     `json:"status"`
	Tags             []Tag      `json:"tags,omitempty"`
}

ModelImportJob represents a model import job.

type ModelInvocationJob

type ModelInvocationJob struct {
	LastModifiedTime time.Time      `json:"lastModifiedTime"`
	CreationTime     time.Time      `json:"creationTime"`
	InputDataConfig  map[string]any `json:"inputDataConfig,omitempty"`
	EndTime          *time.Time     `json:"endTime,omitempty"`
	OutputDataConfig map[string]any `json:"outputDataConfig,omitempty"`
	JobArn           string         `json:"jobArn"`
	ModelID          string         `json:"modelId,omitempty"`
	Status           string         `json:"status"`
	RoleArn          string         `json:"roleArn,omitempty"`
	JobName          string         `json:"jobName"`
	FailureMessage   string         `json:"failureMessage,omitempty"`
	ClientToken      string         `json:"clientRequestToken,omitempty"`
	Tags             []Tag          `json:"tags,omitempty"`
}

ModelInvocationJob represents a batch model invocation job.

type ModelInvocationLoggingConfiguration

type ModelInvocationLoggingConfiguration struct {
	S3BucketName   string `json:"s3BucketName,omitempty"`
	LoggingEnabled bool   `json:"loggingEnabled"`
}

ModelInvocationLoggingConfiguration represents the logging configuration.

type Prompt

type Prompt struct {
	CreatedAt   time.Time         `json:"createdAt"`
	UpdatedAt   time.Time         `json:"updatedAt"`
	Tags        map[string]string `json:"tags,omitempty"`
	PromptID    string            `json:"promptId"`
	PromptArn   string            `json:"promptArn"`
	Name        string            `json:"name"`
	Description string            `json:"description,omitempty"`
}

Prompt represents an Amazon Bedrock Prompt.

type PromptRouter

type PromptRouter struct {
	CreatedAt        time.Time `json:"createdAt"`
	UpdatedAt        time.Time `json:"updatedAt"`
	PromptRouterArn  string    `json:"promptRouterArn"`
	PromptRouterName string    `json:"promptRouterName"`
	Status           string    `json:"status"`
	Tags             []Tag     `json:"tags,omitempty"`
}

PromptRouter represents a prompt router resource.

type PromptVersion

type PromptVersion struct {
	CreatedAt time.Time `json:"createdAt"`
	PromptID  string    `json:"promptId"`
	Version   string    `json:"version"`
	Name      string    `json:"name,omitempty"`
}

PromptVersion represents a numbered version of a Prompt.

type Provider

type Provider struct{}

Provider implements service.Provider for Amazon Bedrock.

func (*Provider) Init

Init initializes the Bedrock backend and handler.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the provider name.

type ProvisionedModelThroughput

type ProvisionedModelThroughput struct {
	CreationTime         time.Time `json:"creationTime"`
	LastModifiedTime     time.Time `json:"lastModifiedTime"`
	ProvisionedModelArn  string    `json:"provisionedModelArn"`
	ProvisionedModelName string    `json:"provisionedModelName"`
	ModelArn             string    `json:"modelArn"`
	DesiredModelArn      string    `json:"desiredModelArn"`
	FoundationModelArn   string    `json:"foundationModelArn"`
	Status               string    `json:"status"`
	CommitmentDuration   string    `json:"commitmentDuration,omitempty"`
	Tags                 []Tag     `json:"tags,omitempty"`
	ModelUnits           int32     `json:"modelUnits"`
	DesiredModelUnits    int32     `json:"desiredModelUnits"`
}

ProvisionedModelThroughput represents a provisioned model throughput resource.

type Tag

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

Tag represents a key-value tag on a Bedrock resource.

Source Files

Jump to

Keyboard shortcuts

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