bedrock

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: MIT Imports: 28 Imported by: 0

README

Bedrock

Parity grade: A · SDK aws-sdk-go-v2/service/bedrock@v1.66.4 · last audited 2026-09-19 (d9715a7fd)

Coverage

Metric Value
PARITY entries audited 80 (80 ok)
Feature families 10 (9 ok, 1 partial)
Known gaps 3
Deferred items 0
Resource leaks clean
Known gaps
  • EvaluationJob AutomatedEvaluationConfig.CustomMetricConfig and RAGConfig's knowledgeBaseConfig/precomputedRagSourceConfig are stored verbatim as json.RawMessage, not modeled field by field: they wrap further unions plus a recursive RetrievalFilter tree (types/types.go:196, 6165-6344), and the job store never runs an evaluation, so nothing interprets them (round trip: evaluation_job_unions_test.go). Revisit if the backend starts interpreting evaluation content.
  • List-summary members with no domain source, not fabricated (no per-phase job status, batch record processing or capability detection modeled): EvaluationSummary.ModelIdentifiers/RagIdentifiers/CustomMetricsEvaluatorModelIdentifiers/InferenceConfigSummary; ImportedModelSummary.InstructSupported/ModelArchitecture; ModelCopyJobSummary.SourceModelName; ModelCustomizationJobSummary.StatusDetails; ModelInvocationJobSummary.ErrorRecordCount/JobExpirationTime/ProcessedRecordCount/SuccessRecordCount/TotalRecordCount; CustomModelDeploymentSummary.FailureMessage.
  • ClientRequestToken is not honoured on CreateAutomatedReasoningPolicyVersion/TestCase, StartAutomatedReasoningPolicyBuild/TestWorkflow, UpdateAutomatedReasoningPolicyTestCase or UpdateMarketplaceModelEndpoint, and CreateModelInvocationJob/CreateEvaluationJob replays are bounded by a 5-minute in-memory token memo. Still dropped: CreateMarketplaceModelEndpoint.AcceptEula, CreateCustomModel RoleArn/ModelSourceConfig/CustomModelDataSource, CreateAutomatedReasoningPolicyTestCase body members, ListFoundationModelAgreementOffers.OfferType. KMS ids are reported as ARNs built from the account/region (key id -> key/ARN, alias/ -> alias ARN) without any key existence check or encryption.

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)
	// ErrResourceInUse is returned when a resource cannot be deleted because
	// dependent artifacts still reference it.
	ErrResourceInUse = awserr.New("ResourceInUseException", awserr.ErrConflict)
)

Functions

This section is empty.

Types

type ARPCreateOptions

type ARPCreateOptions struct {
	KmsKeyID         string
	PolicyDefinition json.RawMessage
}

ARPCreateOptions carries CreateAutomatedReasoningPolicy's optional policyDefinition and kmsKeyId.

type AccountDataRetention added in v1.2.0

type AccountDataRetention struct {
	UpdatedAt time.Time
	Mode      string
}

AccountDataRetention represents the account-wide Bedrock data retention setting (GetAccountDataRetention / PutAccountDataRetention).

type AccountEnforcedGuardrailConfig added in v1.2.0

type AccountEnforcedGuardrailConfig struct {
	CreatedAt        time.Time `json:"createdAt"`
	UpdatedAt        time.Time `json:"updatedAt"`
	ConfigID         string    `json:"configId"`
	GuardrailID      string    `json:"guardrailId"`
	GuardrailArn     string    `json:"guardrailArn"`
	GuardrailVersion string    `json:"guardrailVersion"`
	InputTags        string    `json:"inputTags"`
	Owner            string    `json:"owner"`
	CreatedBy        string    `json:"createdBy"`
	UpdatedBy        string    `json:"updatedBy"`
	IncludedModels   []string  `json:"includedModels,omitempty"`
	ExcludedModels   []string  `json:"excludedModels,omitempty"`
}

AccountEnforcedGuardrailConfig represents an account-level enforced guardrail configuration (real AWS ops: PutEnforcedGuardrailConfiguration / ListEnforcedGuardrailsConfiguration / DeleteEnforcedGuardrailConfiguration). ConfigID-keyed and wraps a GuardrailIdentifier+GuardrailVersion reference plus an InputTags honor/ignore flag and an optional model-scoped enforcement list, matching types.AccountEnforcedGuardrailOutputConfiguration in aws-sdk-go-v2.

type AdvancedPromptOptimizationInputConfig added in v1.2.0

type AdvancedPromptOptimizationInputConfig struct {
	S3URI string `json:"s3Uri"`
}

AdvancedPromptOptimizationInputConfig specifies the S3 location of the JSONL input file (prompt templates + evaluation samples) for an advanced prompt optimization job. Matches types.AdvancedPromptOptimizationInputConfig.

type AdvancedPromptOptimizationJob added in v1.2.0

type AdvancedPromptOptimizationJob struct {
	CreationTime        time.Time
	LastModifiedTime    time.Time
	JobArn              string
	JobName             string
	JobDescription      string
	JobStatus           string
	EncryptionKeyArn    string
	FailureMessage      string
	InputConfig         AdvancedPromptOptimizationInputConfig
	OutputConfig        AdvancedPromptOptimizationOutputConfig
	ModelConfigurations []ModelConfiguration
	Tags                []Tag
}

AdvancedPromptOptimizationJob represents a Bedrock advanced prompt optimization job.

Real AWS's GetAdvancedPromptOptimizationJobOutput does NOT return the optimized prompt text anywhere in its wire shape -- optimization results are written by the real service to the caller-supplied OutputConfig.S3Uri location, entirely outside the API response. This backend therefore never fabricates an "optimized prompt" result (doing so would require actual model inference this backend does not perform); it models only the job's real lifecycle/status fields, which is everything the real wire shape actually carries. See handler_advanced_prompt_optimization_jobs.go.

type AdvancedPromptOptimizationOutputConfig added in v1.2.0

type AdvancedPromptOptimizationOutputConfig struct {
	S3URI string `json:"s3Uri"`
}

AdvancedPromptOptimizationOutputConfig specifies the S3 location prefix where an advanced prompt optimization job writes its results. Matches types.AdvancedPromptOptimizationOutputConfig.

type AutomatedEvaluationConfig added in v1.5.0

type AutomatedEvaluationConfig struct {
	EvaluatorModelConfig *EvaluatorModelConfig           `json:"evaluatorModelConfig,omitempty"`
	DatasetMetricConfigs []EvaluationDatasetMetricConfig `json:"datasetMetricConfigs,omitempty"`
	CustomMetricConfig   json.RawMessage                 `json:"customMetricConfig,omitempty"`
}

AutomatedEvaluationConfig mirrors types.AutomatedEvaluationConfig (bedrock@v1.66.4 types/types.go:145-166). CustomMetricConfig is stored verbatim: it wraps its own further union (AutomatedEvaluationCustomMetricSource, types/types.go:196, plus a nested CustomMetricEvaluatorModelConfig) that gopherstack's inert evaluation-job store never interprets -- same rationale as AutomatedReasoningPolicy.PolicyDefinition above.

type AutomatedReasoningPolicy

type AutomatedReasoningPolicy struct {
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
	PolicyArn string    `json:"policyArn"`
	Name      string    `json:"name"`
	// PolicyDefinition is stored verbatim from UpdateAutomatedReasoningPolicy's
	// required policyDefinition body member (bedrock@v1.66.4
	// api_op_UpdateAutomatedReasoningPolicy.go:37-63). Kept as raw JSON rather
	// than the real nested rules/types/variables union -- inert, never
	// interpreted, but genuinely the caller's own content, not fabricated.
	PolicyDefinition json.RawMessage `json:"policyDefinition,omitempty"`
	Description      string          `json:"description,omitempty"`
	Status           string          `json:"status"`
	DefinitionHash   string          `json:"definitionHash,omitempty"`
	Version          string          `json:"version,omitempty"`
	KmsKeyArn        string          `json:"kmsKeyArn,omitempty"`
	Tags             []Tag           `json:"tags,omitempty"`
}

AutomatedReasoningPolicy represents an Automated Reasoning policy.

type AutomatedReasoningPolicyBuildWorkflow

type AutomatedReasoningPolicyBuildWorkflow struct {
	CreatedAt       time.Time `json:"createdAt"`
	UpdatedAt       time.Time `json:"updatedAt"`
	BuildWorkflowID string    `json:"buildWorkflowId"`
	PolicyArn       string    `json:"policyArn"`
	Status          string    `json:"status"`
	// BuildWorkflowType and SourceContent come from
	// StartAutomatedReasoningPolicyBuildWorkflow's real path/body
	// (bedrock@v1.66.4 serializers.go:8008: buildWorkflowType is a path
	// label, sourceContent is the entire JSON payload). SourceContent is
	// stored verbatim and never interpreted -- same rationale as
	// AutomatedReasoningPolicy.PolicyDefinition above.
	BuildWorkflowType string          `json:"buildWorkflowType,omitempty"`
	SourceContent     json.RawMessage `json:"sourceContent,omitempty"`
}

AutomatedReasoningPolicyBuildWorkflow represents a build workflow for a policy.

type AutomatedReasoningPolicyTestCase

type AutomatedReasoningPolicyTestCase struct {
	CreatedAt                        time.Time `json:"createdAt"`
	UpdatedAt                        time.Time `json:"updatedAt"`
	ConfidenceThreshold              *float64  `json:"confidenceThreshold,omitempty"`
	TestCaseID                       string    `json:"testCaseId"`
	PolicyArn                        string    `json:"policyArn"`
	GuardContent                     string    `json:"guardContent,omitempty"`
	QueryContent                     string    `json:"queryContent,omitempty"`
	ExpectedAggregatedFindingsResult string    `json:"expectedAggregatedFindingsResult,omitempty"`
}

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"`
	Tags           []Tag     `json:"tags,omitempty"`
}

AutomatedReasoningPolicyVersion represents a version of a policy.

type BatchDeleteAdvancedPromptOptimizationJobError added in v1.2.0

type BatchDeleteAdvancedPromptOptimizationJobError struct {
	JobIdentifier string `json:"jobIdentifier"`
	Code          string `json:"code"`
	Message       string `json:"message,omitempty"`
}

BatchDeleteAdvancedPromptOptimizationJobError describes a single job deletion failure. Matches types.BatchDeleteAdvancedPromptOptimizationJobError.

type BatchDeleteAdvancedPromptOptimizationJobItem added in v1.2.0

type BatchDeleteAdvancedPromptOptimizationJobItem struct {
	JobIdentifier string `json:"jobIdentifier"`
	JobStatus     string `json:"jobStatus"`
}

BatchDeleteAdvancedPromptOptimizationJobItem describes a successfully deleted job. Matches types.BatchDeleteAdvancedPromptOptimizationJobItem.

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 CloudWatchLoggingConfig added in v1.5.0

type CloudWatchLoggingConfig struct {
	LargeDataDeliveryS3Config *S3LoggingConfig `json:"largeDataDeliveryS3Config,omitempty"`
	LogGroupName              string           `json:"logGroupName"`
	RoleArn                   string           `json:"roleArn"`
}

CloudWatchLoggingConfig mirrors types.CloudWatchConfig. LogGroupName/RoleArn are required when CloudWatchConfig is present at all.

type CreateAdvancedPromptOptimizationJobInput added in v1.2.0

type CreateAdvancedPromptOptimizationJobInput struct {
	JobName             string
	JobDescription      string
	EncryptionKeyArn    string
	InputConfig         AdvancedPromptOptimizationInputConfig
	OutputConfig        AdvancedPromptOptimizationOutputConfig
	ModelConfigurations []ModelConfiguration
	Tags                []Tag
}

CreateAdvancedPromptOptimizationJobInput holds the full set of fields for CreateAdvancedPromptOptimizationJob.

type CreateEvaluationJobInput

type CreateEvaluationJobInput struct {
	InferenceConfig  *EvaluationInferenceConfig
	EvaluationConfig *EvaluationConfig
	JobName          string
	JobDescription   string
	RoleArn          string
	ApplicationType  string
	CustomerKeyID    string
	OutputDataConfig OutputDataConfig
	Tags             []Tag
}

CreateEvaluationJobInput holds all parameters for CreateEvaluationJob.

type CreateModelInvocationJobInput

type CreateModelInvocationJobInput struct {
	InputDataConfig  map[string]any `json:"inputDataConfig,omitempty"`
	OutputDataConfig map[string]any `json:"outputDataConfig,omitempty"`
	VpcConfig        map[string]any `json:"vpcConfig,omitempty"`
	RoleArn          string         `json:"roleArn"`
	ModelID          string         `json:"modelId"`
	ClientToken      string         `json:"clientRequestToken,omitempty"`
	InvocationType   string         `json:"modelInvocationType,omitempty"`
	TimeoutHours     int32          `json:"timeoutDurationInHours,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"`
	ModelStatus       string    `json:"modelStatus"`
	BaseModelArn      string    `json:"baseModelArn,omitempty"`
	BaseModelName     string    `json:"baseModelName,omitempty"`
	CustomizationType string    `json:"customizationType,omitempty"`
	JobArn            string    `json:"jobArn,omitempty"`
	JobName           string    `json:"jobName,omitempty"`
	ModelKmsKeyArn    string    `json:"modelKmsKeyArn,omitempty"`
	Tags              []Tag     `json:"tags,omitempty"`
}

CustomModel represents a custom model, either imported via CreateCustomModel (BaseModelArn empty: the wire input never supplies a base model, and gopherstack does not process model artifacts to derive one) or produced by a completed CreateModelCustomizationJob (BaseModelArn/BaseModelName/JobArn/ JobName populated from the job).

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"`
	Description              string    `json:"description,omitempty"`
	Status                   string    `json:"status"`
	Tags                     []Tag     `json:"tags,omitempty"`
}

CustomModelDeployment represents a custom model deployment.

type CustomizationJobOptions

type CustomizationJobOptions struct {
	HyperParameters     map[string]string
	CustomizationConfig map[string]any
	VpcConfig           map[string]any
	CustomModelKmsKeyID string
	CustomModelTags     []Tag
}

CustomizationJobOptions carries CreateModelCustomizationJob's optional members.

type EvaluationBedrockModel added in v1.5.0

type EvaluationBedrockModel struct {
	PerformanceConfig *EvaluationPerformanceConfig `json:"performanceConfig,omitempty"`
	ModelIdentifier   string                       `json:"modelIdentifier"`
	InferenceParams   string                       `json:"inferenceParams,omitempty"`
}

EvaluationBedrockModel mirrors types.EvaluationBedrockModel (bedrock@v1.66.4 types/types.go:2827-2842).

type EvaluationConfig added in v1.5.0

type EvaluationConfig struct {
	Automated *AutomatedEvaluationConfig `json:"automated,omitempty"`
	Human     *HumanEvaluationConfig     `json:"human,omitempty"`
}

EvaluationConfig models bedrock's evaluationConfig union (types.EvaluationConfig, bedrock@v1.66.4 types/types.go:2844-2852). smithy-go serializes/deserializes it as a single-key object naming the variant ("automated" or "human", serializers.go:10697-10719, deserializers.go:27131-27179); encoding/json's field-presence dispatch on the struct tags mirrors that mechanism directly rather than flattening the two variants into one shape.

func (*EvaluationConfig) EvaluatorModelIdentifiers

func (c *EvaluationConfig) EvaluatorModelIdentifiers() []string

EvaluatorModelIdentifiers reports ListEvaluationJobsOutput EvaluationSummary.EvaluatorModelIdentifiers -- the Bedrock evaluator model ARNs from an Automated job's EvaluatorModelConfig. Empty for Human jobs (no evaluator model concept applies there).

func (*EvaluationConfig) JobType added in v1.5.0

func (c *EvaluationConfig) JobType() string

JobType reports the real AWS EvaluationJobType ("Automated" or "Human", bedrock@v1.66.4 types/enums.go:548-551) implied by which EvaluationConfig variant was set on Create -- the same signal GetEvaluationJobOutput.JobType (api_op_GetEvaluationJob.go:72) is required to carry.

func (*EvaluationConfig) TaskTypes

func (c *EvaluationConfig) TaskTypes() []string

TaskTypes reports the real, required ListEvaluationJobsOutput EvaluationSummary.EvaluationTaskTypes -- the set of distinct TaskType values across whichever variant's DatasetMetricConfigs the caller supplied on Create (types/types.go's EvaluationSummary requires this; GetEvaluationJobOutput has no such field at all, so this is derived only for the List summary, never stored).

type EvaluationDataset

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

EvaluationDataset references an evaluation dataset (types.EvaluationDataset, bedrock@v1.66.4 types/types.go:2873-2890).

type EvaluationDatasetLocation

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

EvaluationDatasetLocation models bedrock's evaluationDatasetLocation union (types.EvaluationDatasetLocation, bedrock@v1.66.4 types/types.go:2892-2908); s3Uri is its sole real variant today.

type EvaluationDatasetMetricConfig added in v1.5.0

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

EvaluationDatasetMetricConfig mirrors types.EvaluationDatasetMetricConfig (bedrock@v1.66.4 types/types.go:2910-2951). MetricNames is a flat []string on the real wire, not a wrapped-object list.

type EvaluationInferenceConfig

type EvaluationInferenceConfig struct {
	Models     []EvaluationModelConfig `json:"models,omitempty"`
	RagConfigs []RAGConfig             `json:"ragConfigs,omitempty"`
}

EvaluationInferenceConfig models bedrock's inferenceConfig union (types.EvaluationInferenceConfig, bedrock@v1.66.4 types/types.go:2953-2966). smithy-go serializes/deserializes it as a single-key object naming the variant ("models" or "ragConfigs", serializers.go:10795-10817, deserializers.go:27352-27391).

type EvaluationJob

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

EvaluationJob represents a model evaluation job.

type EvaluationModelConfig

type EvaluationModelConfig struct {
	BedrockModel               *EvaluationBedrockModel               `json:"bedrockModel,omitempty"`
	PrecomputedInferenceSource *EvaluationPrecomputedInferenceSource `json:"precomputedInferenceSource,omitempty"`
}

EvaluationModelConfig models bedrock's evaluationModelConfig union (types.EvaluationModelConfig, bedrock@v1.66.4 types/types.go:3008-3034). smithy-go serializes/deserializes it as a single-key object naming the variant ("bedrockModel" or "precomputedInferenceSource", serializers.go:10841-10863); encoding/json's field-presence dispatch on the struct tags mirrors that mechanism directly.

type EvaluationPerformanceConfig added in v1.5.0

type EvaluationPerformanceConfig struct {
	Latency string `json:"latency,omitempty"`
}

EvaluationPerformanceConfig mirrors types.PerformanceConfiguration (bedrock@v1.66.4 types/types.go:5787-5794).

type EvaluationPrecomputedInferenceSource added in v1.5.0

type EvaluationPrecomputedInferenceSource struct {
	InferenceSourceIdentifier string `json:"inferenceSourceIdentifier,omitempty"`
}

EvaluationPrecomputedInferenceSource mirrors types.EvaluationPrecomputedInferenceSource (bedrock@v1.66.4 types/types.go:3064-3075).

type EvaluatorModel added in v1.5.0

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

EvaluatorModel mirrors types.BedrockEvaluatorModel (bedrock@v1.66.4 types/types.go:2448-2460).

type EvaluatorModelConfig added in v1.5.0

type EvaluatorModelConfig struct {
	BedrockEvaluatorModels []EvaluatorModel `json:"bedrockEvaluatorModels,omitempty"`
}

EvaluatorModelConfig models bedrock's evaluatorModelConfig union (types.EvaluatorModelConfig, bedrock@v1.66.4 types/types.go:3226-3235). Only one variant exists today ("bedrockEvaluatorModels").

type FoundationModelAgreement

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

FoundationModelAgreement represents an agreement for foundation model access.

type FoundationModelAgreementOffer added in v1.2.0

type FoundationModelAgreementOffer struct {
	OfferToken   string
	OfferID      string
	LegalTermURL string
}

FoundationModelAgreementOffer represents a single agreement offer for a foundation model, as returned by ListFoundationModelAgreementOffers. Mirrors (a lean subset of) types.Offer/types.TermDetails in aws-sdk-go-v2/service/bedrock.

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"`
	Extras                  *GuardrailExtras   `json:"extras,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 GuardrailAutomatedReasoning

type GuardrailAutomatedReasoning struct {
	ConfidenceThreshold *float64 `json:"confidenceThreshold,omitempty"`
	Policies            []string `json:"policies"`
}

GuardrailAutomatedReasoning is automatedReasoningPolicyConfig / the automatedReasoningPolicy output.

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 GuardrailExtras

type GuardrailExtras struct {
	AutomatedReasoning *GuardrailAutomatedReasoning `json:"automatedReasoning,omitempty"`
	// KmsKeyArn is the request's kmsKeyId resolved to an ARN.
	KmsKeyArn string `json:"kmsKeyArn,omitempty"`
	// CrossRegionProfileID is crossRegionConfig.guardrailProfileIdentifier as given.
	CrossRegionProfileID string `json:"crossRegionProfileId,omitempty"`
}

GuardrailExtras holds the optional guardrail members outside the content policies.

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 {
	CrossRegionProfileID string    `json:"crossRegionProfileId,omitempty"`
	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"`
	Extras                  *GuardrailExtras   `json:"extras,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) BackendFor

func (h *Handler) BackendFor(region string) *InMemoryBackend

BackendFor returns the backend serving region: the home backend, or the sibling built on first use.

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

func (h *Handler) EnableRegions()

EnableRegions makes h serve every other region through lazily built per-region siblings.

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

func (h *Handler) RegionBackends() []*InMemoryBackend

RegionBackends returns the home backend followed by every sibling built so far.

func (*Handler) RegionHandler

func (h *Handler) RegionHandler(region string) *Handler

RegionHandler returns the handler serving region: h itself for the home region, else its sibling.

func (*Handler) Reset

func (h *Handler) Reset()

Reset clears backend state and drops every region sibling, stopping its janitor.

func (*Handler) Restore

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

Restore implements persistence.Persistable; sibling janitors stop as the old siblings are dropped.

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 janitors of h and every sibling.

func (*Handler) Snapshot

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

Snapshot implements persistence.Persistable; other regions ride in an additive "regions" key.

func (*Handler) StartWorker

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

StartWorker starts the status-advancement janitor of h and every sibling.

type HumanEvaluationConfig added in v1.5.0

type HumanEvaluationConfig struct {
	HumanWorkflowConfig  *HumanWorkflowConfig            `json:"humanWorkflowConfig,omitempty"`
	DatasetMetricConfigs []EvaluationDatasetMetricConfig `json:"datasetMetricConfigs,omitempty"`
	CustomMetrics        []HumanEvaluationCustomMetric   `json:"customMetrics,omitempty"`
}

HumanEvaluationConfig mirrors types.HumanEvaluationConfig (bedrock@v1.66.4 types/types.go:4767-4782).

type HumanEvaluationCustomMetric added in v1.5.0

type HumanEvaluationCustomMetric struct {
	Name         string `json:"name,omitempty"`
	RatingMethod string `json:"ratingMethod,omitempty"`
	Description  string `json:"description,omitempty"`
}

HumanEvaluationCustomMetric mirrors types.HumanEvaluationCustomMetric (bedrock@v1.66.4 types/types.go:4786-4805).

type HumanWorkflowConfig added in v1.5.0

type HumanWorkflowConfig struct {
	FlowDefinitionArn string `json:"flowDefinitionArn,omitempty"`
	Instructions      string `json:"instructions,omitempty"`
}

HumanWorkflowConfig mirrors types.HumanWorkflowConfig (bedrock@v1.66.4 types/types.go:4809-4820).

type ImportJobOptions

type ImportJobOptions struct {
	VpcConfig             map[string]any
	ImportedModelKmsKeyID string
	ImportedModelTags     []Tag
}

ImportJobOptions carries CreateModelImportJob's optional encryption, networking and model tags.

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) AdvanceAdvancedPromptOptimizationJobStatuses added in v1.2.0

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

AdvanceAdvancedPromptOptimizationJobStatuses moves InProgress jobs to Completed once minAge has elapsed since creation. Called by the janitor, mirroring AdvanceCustomizationJobStatuses.

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) AdvanceCustomModelDeploymentStatuses added in v1.5.0

func (b *InMemoryBackend) AdvanceCustomModelDeploymentStatuses() int

AdvanceCustomModelDeploymentStatuses transitions deployments from Creating to Active. Called by the janitor (janitor.go), the same shape as AdvanceProvisionedModelThroughputStatuses -- CreateCustomModelDeployment stamped Status Creating and nothing else in this backend ever advanced it.

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) BatchDeleteAdvancedPromptOptimizationJob added in v1.2.0

func (b *InMemoryBackend) BatchDeleteAdvancedPromptOptimizationJob(jobIdentifiers []string) (
	[]BatchDeleteAdvancedPromptOptimizationJobItem, []BatchDeleteAdvancedPromptOptimizationJobError, error,
)

BatchDeleteAdvancedPromptOptimizationJob deletes multiple jobs by ARN or ID, returning a per-item result/error list mirroring BatchDeleteEvaluationJob's shape.

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) CreateAdvancedPromptOptimizationJob added in v1.2.0

func (b *InMemoryBackend) CreateAdvancedPromptOptimizationJob(
	in CreateAdvancedPromptOptimizationJobInput,
) (*AdvancedPromptOptimizationJob, error)

CreateAdvancedPromptOptimizationJob creates a new advanced prompt optimization job in status InProgress.

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,
	tags []Tag,
) (*AutomatedReasoningPolicyVersion, error)

CreateAutomatedReasoningPolicyVersion creates a new version of an Automated Reasoning policy.

func (*InMemoryBackend) CreateAutomatedReasoningPolicyWithOptions

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

CreateAutomatedReasoningPolicyWithOptions is CreateAutomatedReasoningPolicy with ARPCreateOptions.

func (*InMemoryBackend) CreateCustomModel

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

CreateCustomModel creates a new custom model with no base model: the wire input carries only a data source (S3/SageMaker model package), never a base model reference, and gopherstack doesn't process model artifacts to derive one. BaseModelArn/BaseModelName stay empty, so baseModelArnEquals/ foundationModelArnEquals never match imported models -- matches real AWS (bedrock@v1.66.4 api_op_CreateCustomModel.go: "The model appears in ListCustomModels with a customizationType of imported").

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

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

CreateCustomModelDeploymentWithDescription is CreateCustomModelDeployment with the optional description.

func (*InMemoryBackend) CreateCustomModelWithKey

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

CreateCustomModelWithKey is CreateCustomModel with the model's KMS key (ModelKmsKeyArn).

func (*InMemoryBackend) CreateEvaluationJob

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

CreateEvaluationJob creates a new evaluation job.

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

func (b *InMemoryBackend) CreateGuardrailWithExtras(
	name, description, blockedInput, blockedOutput string,
	tags []Tag,
	pol *GuardrailPolicies,
	extras *GuardrailExtras,
) (*Guardrail, error)

CreateGuardrailWithExtras is CreateGuardrail with the KMS key, cross-region profile and automated reasoning members.

func (*InMemoryBackend) CreateInferenceProfile

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

CreateInferenceProfile creates a new inference profile. modelSource is the required ModelSource member (api_op_CreateInferenceProfile.go:48), the CopyFrom ARN of the foundation model or system-defined inference profile this profile tracks (types.InferenceProfileModelSourceMemberCopyFrom, the union's only member).

func (*InMemoryBackend) CreateMarketplaceModelEndpoint

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

CreateMarketplaceModelEndpoint creates a new marketplace model endpoint. endpointConfig is optional (nil is stored as-is); when the caller supplies one it is round-tripped verbatim through Get/List/Update, matching real AWS's required EndpointConfig response field.

func (*InMemoryBackend) CreateModelCopyJob

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

CreateModelCopyJob creates a new model copy job. TargetModelArn is built from the caller's real targetModelName (bedrock@v1.66.4 serializers.go:1720-1750, "This member is required") -- it must never be a fabricated name of this backend's own choosing.

KNOWN GAP: CreateModelCopyJob's deserializer declares only AccessDeniedException, InternalServerException, ResourceNotFoundException, TooManyTagsException -- no ValidationException. The SDK defines no typed error for "required field missing" on this operation, so the ErrValidation returned below still deserializes untyped on a real client regardless of which declared code it were rewritten to; none fits. Recorded rather than fabricated a replacement code.

func (*InMemoryBackend) CreateModelCopyJobWithKey

func (b *InMemoryBackend) CreateModelCopyJobWithKey(
	sourceModelARN, targetModelName, modelKmsKeyID string,
	tags []Tag,
) (*ModelCopyJob, error)

CreateModelCopyJobWithKey is CreateModelCopyJob with the target model's KMS key (ModelKmsKeyId).

func (*InMemoryBackend) CreateModelCustomizationJob

func (b *InMemoryBackend) CreateModelCustomizationJob(
	jobName, customModelName, baseModelID, customizationType, roleArn string,
	outputDataConfig OutputDataConfig, trainingDataConfig TrainingDataConfig,
	validatorS3Uris []string,
	tags []Tag,
) (*ModelCustomizationJob, error)

CreateModelCustomizationJob creates a new model customization job. customModelName is the required name of the resulting output model (bedrock@v1.66.4 CreateModelCustomizationJobRequest: "customModelName" is required and distinct from jobName). It is validated and reserved now so AdvanceCustomizationJobStatuses can materialize the output CustomModel without discovering a name conflict after the job has already committed to running.

roleArn, outputDataConfig and trainingDataConfig are also required members (api_op_CreateModelCustomizationJob.go:66,75,80). outputDataConfig.S3Uri is itself required within OutputDataConfig; TrainingDataConfig's own leaves (S3Uri, InvocationLogsConfig) are not required by the SDK, only the TrainingDataConfig object itself, so no leaf-level check is made there.

func (*InMemoryBackend) CreateModelCustomizationJobWithOptions

func (b *InMemoryBackend) CreateModelCustomizationJobWithOptions(
	jobName, customModelName, baseModelID, customizationType, roleArn string,
	outputDataConfig OutputDataConfig, trainingDataConfig TrainingDataConfig,
	validatorS3Uris []string,
	tags []Tag,
	opts CustomizationJobOptions,
) (*ModelCustomizationJob, error)

CreateModelCustomizationJobWithOptions is CreateModelCustomizationJob with CustomizationJobOptions.

func (*InMemoryBackend) CreateModelImportJob

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

CreateModelImportJob creates a new model import job. importedModelName, roleArn, and modelDataSourceS3Uri mirror the real CreateModelImportJobInput's required ImportedModelName/RoleArn/ModelDataSource fields -- gopherstack previously accepted only jobName+tags, silently dropping all three.

func (*InMemoryBackend) CreateModelImportJobWithOptions

func (b *InMemoryBackend) CreateModelImportJobWithOptions(
	jobName, importedModelName, roleArn, modelDataSourceS3Uri string,
	tags []Tag,
	opts ImportJobOptions,
) (*ModelImportJob, error)

CreateModelImportJobWithOptions is CreateModelImportJob with ImportJobOptions.

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

func (b *InMemoryBackend) CreatePromptRouter(
	name, description, fallbackModelArn string,
	modelArns []string,
	routingResponseQualityDiff float64,
	tags []Tag,
) (*PromptRouter, error)

CreatePromptRouter creates a new prompt router. fallbackModelArn, modelArns, and routingResponseQualityDiff mirror the real CreatePromptRouterInput's required FallbackModel/Models/RoutingCriteria fields -- gopherstack previously accepted only promptRouterName+tags, silently dropping all three and leaving every Get/List response missing them (all four are required response fields on GetPromptRouterOutput/PromptRouterSummary).

func (*InMemoryBackend) CreatePromptRouterWithToken

func (b *InMemoryBackend) CreatePromptRouterWithToken(
	name, description, fallbackModelArn string,
	modelArns []string,
	routingResponseQualityDiff float64,
	tags []Tag,
	clientRequestToken string,
) (*PromptRouter, error)

CreatePromptRouterWithToken is CreatePromptRouter with an idempotency token: same token and parameters replay the original router, changed parameters conflict.

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

func (b *InMemoryBackend) DeleteAutomatedReasoningPolicy(policyARN string, force bool) error

DeleteAutomatedReasoningPolicy removes a policy and its related resources. When force is false, AWS validates that all artifacts (policy versions, test cases) have already been deleted before allowing the policy itself to be removed (bedrock@v1.66.4 api_op_DeleteAutomatedReasoningPolicy.go:36-41).

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

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

DeleteEnforcedGuardrailConfiguration removes an account-level enforced guardrail configuration by ConfigID.

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

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

DeletePromptRouter removes a prompt router.

func (*InMemoryBackend) DeleteProvisionedModelThroughput

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

DeleteProvisionedModelThroughput removes a provisioned model throughput by ID or ARN.

func (*InMemoryBackend) DeleteResourcePolicy added in v1.2.0

func (b *InMemoryBackend) DeleteResourcePolicy(resourceArn string) error

DeleteResourcePolicy removes the resource policy attached to resourceArn (core bedrock domain).

func (*InMemoryBackend) DeregisterMarketplaceModelEndpoint

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

DeregisterMarketplaceModelEndpoint transitions endpoint status to Deregistered.

func (*InMemoryBackend) ExportAutomatedReasoningPolicyVersion

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

ExportAutomatedReasoningPolicyVersion exports a policy version definition. arnParam may be a versioned ARN or the bare policy ARN (bedrock@v1.66.4 serializers.go:3603 — no separate {version} path segment; the version, if any, is embedded in the ARN).

func (*InMemoryBackend) GetAccountDataRetention added in v1.2.0

func (b *InMemoryBackend) GetAccountDataRetention() *AccountDataRetention

GetAccountDataRetention returns the account's current data retention mode. Real AWS's GetAccountDataRetentionOutput.Mode is a required field -- an account that has never called PutAccountDataRetention still gets a value back, defaulting to "default" (types.DataRetentionModeDefault).

func (*InMemoryBackend) GetAdvancedPromptOptimizationJob added in v1.2.0

func (b *InMemoryBackend) GetAdvancedPromptOptimizationJob(idOrARN string) (*AdvancedPromptOptimizationJob, error)

GetAdvancedPromptOptimizationJob returns a single job by ARN or ID.

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, buildWorkflowID string,
) (map[string]any, error)

GetAutomatedReasoningPolicyAnnotations returns annotations for a build workflow (bedrock@v1.66.4 serializers.go:3874 — build-workflow-scoped, not policy-scoped). annotationSetHash is required on the real output (api_op_GetAutomatedReasoningPolicyAnnotations.go:54) and doubles as the token UpdateAutomatedReasoningPolicyAnnotations's required lastUpdatedAnnotationSetHash checks against, so it is minted here on first read rather than left absent. buildWorkflowId/name/policyArn/updatedAt are also required (api_op_GetAutomatedReasoningPolicyAnnotations.go:62-80) and were previously dropped entirely; updatedAt is lazily minted alongside the hash for the same reason. Uses the write lock because that lazy mint mutates arpAnnotationSetHash/arpAnnotationsUpdatedAt.

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. Ignores the real, required AssetType filter (bedrock@v1.66.4 api_op_GetAutomatedReasoningPolicyBuildWorkflowResultAssets.go) deliberately rather than fixing it: this backend never generates result-asset content (build workflows here don't run a real document-ingestion/policy-generation pipeline), so buildWorkflowAssets is always omitted. Threading AssetType through to filter an always-absent union can't be observed by any test, real-client or otherwise (gopherstack-4sov). Revisit only if/when this backend starts producing real result-asset content.

buildWorkflowAssets (types.AutomatedReasoningPolicyBuildResultAssets, deserializers.go's awsRestjson1_deserializeDocumentAutomatedReasoningPolicyBuildResultAssets) is a union object keyed by asset kind (assetManifest/buildLog/...), not a list -- emitting it as [] previously fed a real client's deserializer a JSON array where it type-switches on a JSON object, an outright decode failure. BuildWorkflowAssets is optional on the output, so the honest empty state is to omit the key entirely, matching Go's nil zero value.

func (*InMemoryBackend) GetAutomatedReasoningPolicyNextScenario

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

GetAutomatedReasoningPolicyNextScenario returns the next scenario for active-learning (bedrock@v1.66.4 serializers.go:4122 — real segment is "scenarios", build-workflow-scoped).

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, buildWorkflowID, testCaseID string,
) (map[string]any, error)

GetAutomatedReasoningPolicyTestResult returns the result for a test case execution (bedrock@v1.66.4 serializers.go:4282 — build-workflow-scoped). The required top-level member is "testResult" (deserializers.go: awsRestjson1_deserializeOpDocumentGetAutomatedReasoningPolicyTestResultOutput) -- previously returned a flat, differently-keyed object with no "testResult" wrapper at all, so a real client's required TestResult decoded nil.

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

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

GetEvaluationJob returns a single evaluation job by ARN.

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

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

GetPromptRouter returns a single prompt router by ARN.

func (*InMemoryBackend) GetProvisionedModelThroughput

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

func (*InMemoryBackend) GetResourcePolicy added in v1.2.0

func (b *InMemoryBackend) GetResourcePolicy(resourceArn string) (*ResourcePolicy, error)

GetResourcePolicy returns the resource policy attached to resourceArn (core bedrock domain).

func (*InMemoryBackend) GetUseCaseForModelAccess

func (b *InMemoryBackend) GetUseCaseForModelAccess() []byte

GetUseCaseForModelAccess returns the raw FormData bytes previously stored by PutUseCaseForModelAccess (real AWS: GetUseCaseForModelAccessOutput.FormData is a required raw byte payload, not a structured {useCaseType,useCaseDescription} object -- see PutUseCaseForModelAccess's doc comment for the full shape note).

func (*InMemoryBackend) ListAdvancedPromptOptimizationJobs added in v1.2.0

func (b *InMemoryBackend) ListAdvancedPromptOptimizationJobs(
	in *ListAdvancedPromptOptimizationJobsInput,
) ([]*AdvancedPromptOptimizationJob, string)

ListAdvancedPromptOptimizationJobs returns jobs sorted by creation time and paginated. in may be nil, matching an unfiltered call with default sort order and page size.

func (*InMemoryBackend) ListAutomatedReasoningPolicies

func (b *InMemoryBackend) ListAutomatedReasoningPolicies(
	policyARN string,
	maxResults int,
	nextToken string,
) ([]*AutomatedReasoningPolicy, string, error)

ListAutomatedReasoningPolicies lists DRAFT policies, or, when policyARN is set, that policy's versions (api_op_ListAutomatedReasoningPolicies.go:38-41).

func (*InMemoryBackend) ListAutomatedReasoningPolicyBuildWorkflows

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

ListAutomatedReasoningPolicyBuildWorkflows returns all workflows for a policy.

func (*InMemoryBackend) ListAutomatedReasoningPolicyTestCases

func (b *InMemoryBackend) ListAutomatedReasoningPolicyTestCases(
	policyARN string, maxResults int, nextToken string,
) ([]*AutomatedReasoningPolicyTestCase, string)

ListAutomatedReasoningPolicyTestCases returns all test cases for a policy.

func (*InMemoryBackend) ListAutomatedReasoningPolicyTestResults

func (b *InMemoryBackend) ListAutomatedReasoningPolicyTestResults(
	policyARN, buildWorkflowID string, maxResults int, nextToken string,
) ([]map[string]any, string, error)

ListAutomatedReasoningPolicyTestResults returns test results for a build workflow (bedrock@v1.66.4 serializers.go:5937 — build-workflow-scoped). Each item is the same real AutomatedReasoningPolicyTestResult shape as GetAutomatedReasoningPolicyTestResult (types.go:2055-2092), not the flat shape used before this fix.

func (*InMemoryBackend) ListCustomModelDeployments

func (b *InMemoryBackend) ListCustomModelDeployments(
	in *ListCustomModelDeploymentsInput,
) ([]*CustomModelDeployment, string)

ListCustomModelDeployments returns deployments matching in's filters, sorted and paginated. in may be nil, matching an unfiltered call. Structurally similar to ListModelCopyJobs/ListModelImportJobs/ ListProvisionedModelThroughputs (same filter/sort/paginate shape) but over a distinct resource type and filter set; see matchesCustomModelDeploymentFilter.

func (*InMemoryBackend) ListCustomModels

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

ListCustomModels returns custom models matching in's filters, sorted and paginated. in may be nil, matching an unfiltered call. Structurally similar to ListEvaluationJobs/ListModelInvocationJobs (same filter/sort/paginate shape) but over a distinct resource type and filter set; see matchesCustomModelFilter. baseModelArnEquals/foundationModelArnEquals only match models produced by a completed CreateModelCustomizationJob -- those carry a real BaseModelArn from the job's baseModelIdentifier. Imported models (CreateCustomModel) have no base model and match neither filter.

func (*InMemoryBackend) ListEnforcedGuardrailsConfiguration

func (b *InMemoryBackend) ListEnforcedGuardrailsConfiguration(
	nextToken string,
) ([]*AccountEnforcedGuardrailConfig, string)

ListEnforcedGuardrailsConfiguration returns all account-level enforced guardrail configurations, sorted by ConfigID for deterministic pagination.

func (*InMemoryBackend) ListEvaluationJobs

func (b *InMemoryBackend) ListEvaluationJobs(in *ListEvaluationJobsInput) ([]*EvaluationJob, string)

ListEvaluationJobs returns evaluation jobs matching the given filters, sorted and paginated. in may be nil, matching an unfiltered ListEvaluationJobs call. Structurally similar to ListModelInvocationJobs (same filter/sort/paginate shape) but over a distinct resource type and filter set; see matchesEvaluationJobFilter.

func (*InMemoryBackend) ListFoundationModelAgreementOffers

func (b *InMemoryBackend) ListFoundationModelAgreementOffers(modelID string) []*FoundationModelAgreementOffer

ListFoundationModelAgreementOffers returns the catalog of agreement offers available for modelID.

Real AWS: this is a catalog lookup ("what offers exist for this model") keyed by a required modelId PATH parameter -- it has nothing to do with agreements a caller has already created via CreateFoundationModelAgreement. gopherstack previously implemented this as "list every agreement this account has created," a different resource entirely (and returned only {modelId} per entry, missing the required offerToken/termDetails fields). Since gopherstack does not model a real per-model offer catalog, this returns one deterministic, wire-shape-valid offer per known model ID.

func (*InMemoryBackend) ListFoundationModels

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

ListFoundationModels returns the seeded catalog narrowed by f, paginated.

func (*InMemoryBackend) ListGuardrails

func (b *InMemoryBackend) ListGuardrails(
	nextToken, guardrailIdentifier string,
	maxResults int,
) ([]*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(in *ListImportedModelsInput) ([]*ModelImportJob, string)

ListImportedModels returns imported models (import jobs with an imported model ARN), optionally filtered by nameContains (matched against ImportedModelName) and creation-time range, sorted and paginated.

func (*InMemoryBackend) ListInferenceProfiles

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

ListInferenceProfiles returns inference profiles matching typeEquals (real query param "type", aws-sdk-go-v2 serializers.go:6752-6754), with optional pagination. An empty typeEquals matches every profile.

func (*InMemoryBackend) ListMarketplaceModelEndpoints

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

ListMarketplaceModelEndpoints returns marketplace endpoints matching modelSourceEquals (real query param "modelSourceIdentifier", aws-sdk-go-v2 serializers.go:6822-6824), with optional pagination. An empty modelSourceEquals matches every endpoint.

func (*InMemoryBackend) ListModelCopyJobs

func (b *InMemoryBackend) ListModelCopyJobs(in *ListModelCopyJobsInput) ([]*ModelCopyJob, string)

ListModelCopyJobs returns model copy jobs matching in's filters, sorted and paginated. in may be nil, matching an unfiltered call. Structurally similar to ListModelImportJobs/ListCustomModelDeployments/ ListProvisionedModelThroughputs (same filter/sort/paginate shape) but over a distinct resource type and filter set; see matchesModelCopyJobFilter.

func (*InMemoryBackend) ListModelCustomizationJobs

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

ListModelCustomizationJobs returns customization jobs matching in's filters, sorted and paginated. in may be nil, matching an unfiltered call. Structurally similar to ListEvaluationJobs/ListModelInvocationJobs (same filter/sort/paginate shape) but over a distinct resource type and filter set; see matchesCustomizationJobFilter.

func (*InMemoryBackend) ListModelImportJobs

func (b *InMemoryBackend) ListModelImportJobs(in *ListModelImportJobsInput) ([]*ModelImportJob, string)

ListModelImportJobs returns model import jobs matching in's filters, sorted and paginated. in may be nil, matching an unfiltered call. Structurally similar to ListModelCopyJobs/ListCustomModelDeployments/ ListProvisionedModelThroughputs (same filter/sort/paginate shape) but over a distinct resource type and filter set; see matchesModelImportJobFilter.

func (*InMemoryBackend) ListModelInvocationJobs

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

ListModelInvocationJobs returns invocation jobs with optional filters and pagination. Structurally similar to ListEvaluationJobs (same filter/sort/paginate shape) but over a distinct resource type and filter set; see matchesInvocationJobFilter.

func (*InMemoryBackend) ListPromptRouters

func (b *InMemoryBackend) ListPromptRouters(typeEquals, nextToken string, maxResults int) ([]*PromptRouter, string)

ListPromptRouters returns prompt routers optionally filtered by type ("default" or "custom"), sorted and paginated.

func (*InMemoryBackend) ListProvisionedModelThroughputs

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

ListProvisionedModelThroughputs returns provisioned model throughputs matching in's filters, sorted and paginated. in may be nil, matching an unfiltered call. Structurally similar to ListModelCopyJobs/ ListModelImportJobs/ListCustomModelDeployments (same filter/sort/paginate shape) but over a distinct resource type and filter set; see matchesProvisionedModelThroughputFilter.

func (*InMemoryBackend) ListTagsForResource

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

ListTagsForResource returns tags for a resource identified by ARN.

func (*InMemoryBackend) PutAccountDataRetention added in v1.2.0

func (b *InMemoryBackend) PutAccountDataRetention(mode string) (*AccountDataRetention, error)

PutAccountDataRetention sets the account's data retention mode.

func (*InMemoryBackend) PutEnforcedGuardrailConfiguration

func (b *InMemoryBackend) PutEnforcedGuardrailConfiguration(
	configID, guardrailIdentifier, guardrailVersion, inputTags string,
	includedModels, excludedModels []string,
) (*AccountEnforcedGuardrailConfig, error)

PutEnforcedGuardrailConfiguration creates or updates an account-level enforced guardrail configuration. If configID is empty, a new configuration is created; otherwise the existing configuration identified by configID is updated in place (real AWS: PutEnforcedGuardrailConfiguration is an upsert keyed by the optional ConfigId request field). guardrailIdentifier must resolve to an existing guardrail (by ID or ARN). inputTags is optional and defaults to HONOR: the real PutEnforcedGuardrailConfigurationInput (bedrock@v1.66.4 serializers.go's awsRestjson1_serializeDocumentAccountEnforcedGuardrailInferenceInputConfiguration) has no inputTags member at all -- it is a deprecated field that exists only on the OUTPUT shape -- so requiring it here made every real client's call fail with ValidationException, unconditionally.

func (*InMemoryBackend) PutModelInvocationLoggingConfiguration

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

PutModelInvocationLoggingConfiguration sets the logging configuration.

func (*InMemoryBackend) PutResourcePolicy added in v1.2.0

func (b *InMemoryBackend) PutResourcePolicy(resourceArn, policyDocument string) (*ResourcePolicy, error)

PutResourcePolicy creates or replaces the resource policy attached to resourceArn (core bedrock domain).

func (*InMemoryBackend) PutUseCaseForModelAccess

func (b *InMemoryBackend) PutUseCaseForModelAccess(formData []byte)

PutUseCaseForModelAccess stores the raw FormData bytes submitted for model access use-case registration.

Real AWS's PutUseCaseForModelAccessInput has a single required field, FormData []byte, sent as {"formData": "<base64>"} over POST /use-case-for-model-access -- there is no structured useCaseType/ useCaseDescription JSON body; that shape (and the PUT method, and the "/usecase-for-model-access" path typo) was a gopherstack invention with no basis in the real API and has been removed as part of the parity fix.

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, modelSourceIdentifier string,
) (*MarketplaceModelEndpoint, error)

RegisterMarketplaceModelEndpoint transitions endpoint status to Active and stores the required modelSourceIdentifier from the request (aws-sdk-go-v2 api_op_RegisterMarketplaceModelEndpoint.go:37).

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, buildWorkflowType string,
	sourceContent json.RawMessage,
) (*AutomatedReasoningPolicyBuildWorkflow, error)

StartAutomatedReasoningPolicyBuildWorkflow creates a new build workflow for a policy. buildWorkflowType and sourceContent are both required (bedrock@v1.66.4 api_op_StartAutomatedReasoningPolicyBuildWorkflow.go:37-53); buildWorkflowType arrives as a URI label, sourceContent as the entire JSON request body (serializers.go:8008-8058).

func (*InMemoryBackend) StartAutomatedReasoningPolicyTestWorkflow

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

StartAutomatedReasoningPolicyTestWorkflow starts a test workflow for a build workflow, optionally scoped to testCaseIDs (bedrock@v1.66.4 serializers.go:8117 — .../build-workflows/{id}/test-workflows, not per-test-case).

func (*InMemoryBackend) StopAdvancedPromptOptimizationJob added in v1.2.0

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

StopAdvancedPromptOptimizationJob stops a running job. Real AWS transitions through an intermediate "Stopping" status before settling on "Stopped"; this backend follows the same simplification every other Stop* op in this package already makes (StopModelCustomizationJob, StopEvaluationJob, StopModelInvocationJob) and transitions directly to the terminal status, since neither transition fabricates any data the API doesn't already ask gopherstack to model.

func (*InMemoryBackend) StopEvaluationJob

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

StopEvaluationJob marks an evaluation job as stopped.

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

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

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

func (*InMemoryBackend) UntagResource

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

UntagResource removes tags from a resource identified by ARN.

func (*InMemoryBackend) UpdateAutomatedReasoningPolicy

func (b *InMemoryBackend) UpdateAutomatedReasoningPolicy(
	policyARN, name, description string,
	policyDefinition json.RawMessage,
) (*AutomatedReasoningPolicy, error)

UpdateAutomatedReasoningPolicy updates a policy's definition (required -- bedrock@v1.66.4 api_op_UpdateAutomatedReasoningPolicy.go:37-63) and, optionally, its name and description. name only renames when non-empty: unlike description, policy.Name backs the arpByName secondary index, so an unconditional overwrite on every PATCH (including ones that omit name) would orphan that index instead of leaving the name unchanged.

func (*InMemoryBackend) UpdateAutomatedReasoningPolicyAnnotations

func (b *InMemoryBackend) UpdateAutomatedReasoningPolicyAnnotations(
	policyARN, buildWorkflowID string,
	annotations []any,
	lastUpdatedAnnotationSetHash string,
) (map[string]any, error)

UpdateAutomatedReasoningPolicyAnnotations stores the caller's real annotations for a build workflow (bedrock@v1.66.4 api_op_UpdateAutomatedReasoningPolicyAnnotations.go: both annotations and lastUpdatedAnnotationSetHash are required). lastUpdatedAnnotationSetHash is validated as present but not matched against the stored hash -- this backend does not enforce optimistic-concurrency conflicts, the same approach already taken for CreateAutomatedReasoningPolicyVersion's lastUpdatedDefinitionHash. Response fields (annotationSetHash, buildWorkflowId, policyArn, updatedAt) are all required on the real output.

func (*InMemoryBackend) UpdateAutomatedReasoningPolicyTestCase

func (b *InMemoryBackend) UpdateAutomatedReasoningPolicyTestCase(
	policyARN, testCaseID, guardContent, queryContent, expectedResult string,
	confidenceThreshold *float64,
) (*AutomatedReasoningPolicyTestCase, error)

UpdateAutomatedReasoningPolicyTestCase updates a test case's content, query, expected result, and confidence threshold (aws-sdk-go-v2 api_op_UpdateAutomatedReasoningPolicyTestCase.go:34-71).

func (*InMemoryBackend) UpdateCustomModelDeployment

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

UpdateCustomModelDeployment points a deployment at a new custom model. Real UpdateCustomModelDeploymentInput.ModelArn is a required member (bedrock@v1.66.4 api_op_UpdateCustomModelDeployment.go) -- it was previously dropped entirely (handler never read the request body), so a real client's model swap silently did nothing.

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

func (b *InMemoryBackend) UpdateGuardrailWithExtras(
	idOrARN, name, description, blockedInput, blockedOutput string,
	pol *GuardrailPolicies,
	extras *GuardrailExtras,
	setPolicies bool,
) (*Guardrail, error)

UpdateGuardrailWithExtras is UpdateGuardrail plus the extras (replaced when non-nil); setPolicies replaces the policies with pol.

func (*InMemoryBackend) UpdateMarketplaceModelEndpoint

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

UpdateMarketplaceModelEndpoint updates a marketplace endpoint's EndpointConfig (real AWS: UpdateMarketplaceModelEndpointInput.EndpointConfig is a required field -- gopherstack previously accepted but silently dropped it, only bumping UpdatedAt).

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

type InferenceConfiguration added in v1.2.0

type InferenceConfiguration struct {
	MaxTokens     *int32   `json:"maxTokens,omitempty"`
	Temperature   *float32 `json:"temperature,omitempty"`
	TopP          *float32 `json:"topP,omitempty"`
	StopSequences []string `json:"stopSequences,omitempty"`
}

InferenceConfiguration holds inference parameters (maxTokens, temperature, topP, stopSequences) for a model used in an advanced prompt optimization job. Matches types.InferenceConfiguration.

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"`
	ModelSource          string    `json:"modelSource"`
	Tags                 []Tag     `json:"tags,omitempty"`
}

InferenceProfile represents an inference profile resource. ModelSource is the CopyFrom ARN from types.InferenceProfileModelSource (api_op_CreateInferenceProfile.go), the union's only member -- the foundation model or system-defined inference profile this profile tracks. GetInferenceProfileOutput echoes it back as the required Models list (types.InferenceProfileModel), not as ModelSource itself; see inferenceProfileToOutput.

type ListAdvancedPromptOptimizationJobsInput added in v1.2.0

type ListAdvancedPromptOptimizationJobsInput struct {
	SortBy     string // CreationTime (only supported value)
	SortOrder  string // Ascending (default) | Descending
	NextToken  string
	MaxResults int32
}

ListAdvancedPromptOptimizationJobsInput holds filter/sort/pagination params for ListAdvancedPromptOptimizationJobs. Real AWS has no name/status filter for this op (unlike ListEvaluationJobs/ListModelInvocationJobs) -- only sortBy/sortOrder/maxResults/nextToken.

type ListCustomModelDeploymentsInput

type ListCustomModelDeploymentsInput struct {
	CreatedAfter   *time.Time
	CreatedBefore  *time.Time
	StatusEquals   string
	ModelArnEquals string
	NameContains   string
	SortBy         string
	SortOrder      string
	NextToken      string
	MaxResults     int32
}

ListCustomModelDeploymentsInput holds filter/pagination params for ListCustomModelDeployments (bedrock@v1.66.4 api_op_ListCustomModelDeployments.go).

type ListCustomModelsInput added in v1.3.1

type ListCustomModelsInput struct {
	CreationTimeAfter        *time.Time
	CreationTimeBefore       *time.Time
	IsOwned                  *bool
	ModelStatus              string
	NameContains             string
	BaseModelArnEquals       string
	FoundationModelArnEquals string
	SortBy                   string
	SortOrder                string
	NextToken                string
	MaxResults               int32
}

ListCustomModelsInput holds filter/pagination params for ListCustomModels.

type ListEvaluationJobsInput added in v1.2.0

type ListEvaluationJobsInput struct {
	StatusEquals          string
	ApplicationTypeEquals string
	NameContains          string
	CreationTimeAfter     *time.Time
	CreationTimeBefore    *time.Time
	SortBy                string // CreationTime (default)
	SortOrder             string // Ascending (default) | Descending
	NextToken             string
	MaxResults            int32
}

ListEvaluationJobsInput holds filter/pagination params for ListEvaluationJobs.

type ListFoundationModelsFilter

type ListFoundationModelsFilter struct {
	ByCustomizationType string
	ByInferenceType     string
	ByOutputModality    string
	ByProvider          string
	NextToken           string
}

ListFoundationModelsFilter holds the ListFoundationModels query filters (api_op_ListFoundationModels.go:32-55); empty fields match everything.

type ListImportedModelsInput

type ListImportedModelsInput struct {
	CreationTimeAfter  *time.Time
	CreationTimeBefore *time.Time
	NameContains       string
	NextToken          string
	MaxResults         int32
}

ListImportedModelsInput holds filter/pagination params for ListImportedModels (bedrock@v1.66.4 api_op_ListImportedModels.go). Real SortBy/SortOrder not modeled here: gopherstack has always sorted CreationTime ascending regardless of client input; out of scope for gopherstack-kkfs's MaxResults fix.

type ListModelCopyJobsInput

type ListModelCopyJobsInput struct {
	CreationTimeAfter       *time.Time
	CreationTimeBefore      *time.Time
	StatusEquals            string
	SourceAccountEquals     string
	SourceModelArnEquals    string
	TargetModelNameContains string
	SortBy                  string
	SortOrder               string
	NextToken               string
	MaxResults              int32
}

ListModelCopyJobsInput holds filter/pagination params for ListModelCopyJobs (bedrock@v1.66.4 api_op_ListModelCopyJobs.go).

type ListModelCustomizationJobsInput added in v1.3.1

type ListModelCustomizationJobsInput struct {
	StatusEquals       string
	NameContains       string
	CreationTimeAfter  *time.Time
	CreationTimeBefore *time.Time
	SortBy             string // CreationTime (default)
	SortOrder          string // Ascending (default) | Descending
	NextToken          string
	MaxResults         int32
}

ListModelCustomizationJobsInput holds filter/pagination params for ListModelCustomizationJobs.

type ListModelImportJobsInput

type ListModelImportJobsInput struct {
	CreationTimeAfter  *time.Time
	CreationTimeBefore *time.Time
	StatusEquals       string
	NameContains       string
	SortBy             string
	SortOrder          string
	NextToken          string
	MaxResults         int32
}

ListModelImportJobsInput holds filter/pagination params for ListModelImportJobs (bedrock@v1.66.4 api_op_ListModelImportJobs.go).

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
	MaxResults       int32
}

ListModelInvocationJobsInput holds filter/pagination params for ListModelInvocationJobs.

type ListProvisionedModelThroughputsInput

type ListProvisionedModelThroughputsInput struct {
	CreationTimeAfter  *time.Time
	CreationTimeBefore *time.Time
	StatusEquals       string
	ModelArnEquals     string
	NameContains       string
	SortBy             string
	SortOrder          string
	NextToken          string
	MaxResults         int32
}

ListProvisionedModelThroughputsInput holds filter/pagination params for ListProvisionedModelThroughputs (bedrock@v1.66.4 api_op_ListProvisionedModelThroughputs.go).

type MarketplaceModelEndpoint

type MarketplaceModelEndpoint struct {
	CreatedAt      time.Time                `json:"createdAt"`
	UpdatedAt      time.Time                `json:"updatedAt"`
	EndpointConfig *SageMakerEndpointConfig `json:"endpointConfig,omitempty"`
	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 ModelConfiguration added in v1.2.0

type ModelConfiguration struct {
	InferenceConfig              *InferenceConfiguration `json:"inferenceConfig,omitempty"`
	AdditionalModelRequestFields map[string]any          `json:"additionalModelRequestFields,omitempty"`
	ModelID                      string                  `json:"modelId"`
}

ModelConfiguration specifies a target model and its inference parameters for an advanced prompt optimization job. Matches types.ModelConfiguration.

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"`
	// TargetModelName is the caller's real input (CreateModelCopyJobInput's
	// required targetModelName, bedrock@v1.66.4 serializers.go:1720-1750) --
	// also a real optional Get/ListModelCopyJobs member (deserializers.go),
	// previously not surfaced on either response.
	TargetModelName string `json:"targetModelName,omitempty"`
	// TargetModelKmsKeyArn is CreateModelCopyJobInput.ModelKmsKeyId resolved to an ARN.
	TargetModelKmsKeyArn string `json:"targetModelKmsKeyArn,omitempty"`
	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"`
	HyperParameters      map[string]string  `json:"hyperParameters,omitempty"`
	CustomizationConfig  map[string]any     `json:"customizationConfig,omitempty"`
	VpcConfig            map[string]any     `json:"vpcConfig,omitempty"`
	JobArn               string             `json:"jobArn"`
	JobName              string             `json:"jobName"`
	BaseModelArn         string             `json:"baseModelArn"`
	BaseModelName        string             `json:"baseModelName,omitempty"`
	OutputModelArn       string             `json:"outputModelArn"`
	CustomModelName      string             `json:"customModelName"`
	Status               string             `json:"status"`
	CustomizationType    string             `json:"customizationType,omitempty"`
	RoleArn              string             `json:"roleArn"`
	OutputDataConfig     OutputDataConfig   `json:"outputDataConfig"`
	TrainingDataConfig   TrainingDataConfig `json:"trainingDataConfig"`
	OutputModelKmsKeyArn string             `json:"outputModelKmsKeyArn,omitempty"`
	// ValidatorS3Uris holds Validator.S3Uri from the optional
	// CreateModelCustomizationJobInput.ValidationDataConfig (bedrock@v1.66.4
	// serializers.go:13249); GetModelCustomizationJobOutput.ValidationDataConfig
	// is required regardless, so it's always emitted, empty or not.
	ValidatorS3Uris []string `json:"validatorS3Uris,omitempty"`
	Tags            []Tag    `json:"tags,omitempty"`
	// CustomModelTags tag the output custom model once the job materializes it.
	CustomModelTags []Tag `json:"customModelTags,omitempty"`
}

ModelCustomizationJob represents a model customization job. BaseModelName is the display name of the foundation model resolved from BaseModelArn (best effort: only populated when the base model identifier matches a seeded foundation model), carried here so the CustomModel materialized on completion (see AdvanceCustomizationJobStatuses) can populate CustomModelSummary's required baseModelName without a second lookup.

type ModelImportJob

type ModelImportJob struct {
	CreationTime           time.Time      `json:"creationTime"`
	LastModifiedTime       time.Time      `json:"lastModifiedTime"`
	EndTime                *time.Time     `json:"endTime,omitempty"`
	VpcConfig              map[string]any `json:"vpcConfig,omitempty"`
	JobArn                 string         `json:"jobArn"`
	JobName                string         `json:"jobName"`
	ImportedModelArn       string         `json:"importedModelArn"`
	ImportedModelName      string         `json:"importedModelName"`
	RoleArn                string         `json:"roleArn"`
	ModelDataSourceS3      string         `json:"modelDataSourceS3,omitempty"`
	Status                 string         `json:"status"`
	ImportedModelKmsKeyArn string         `json:"importedModelKmsKeyArn,omitempty"`
	Tags                   []Tag          `json:"tags,omitempty"`
	// ImportedModelTags tag the imported model (ARN ImportedModelArn), not the job.
	ImportedModelTags []Tag `json:"importedModelTags,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"`
	InvocationType   string         `json:"modelInvocationType,omitempty"`
	VpcConfig        map[string]any `json:"vpcConfig,omitempty"`
	Tags             []Tag          `json:"tags,omitempty"`
	TimeoutHours     int32          `json:"timeoutDurationInHours,omitempty"`
}

ModelInvocationJob represents a batch model invocation job.

type ModelInvocationLoggingConfiguration

type ModelInvocationLoggingConfiguration struct {
	CloudWatchConfig             *CloudWatchLoggingConfig `json:"cloudWatchConfig,omitempty"`
	S3Config                     *S3LoggingConfig         `json:"s3Config,omitempty"`
	AudioDataDeliveryEnabled     *bool                    `json:"audioDataDeliveryEnabled,omitempty"`
	EmbeddingDataDeliveryEnabled *bool                    `json:"embeddingDataDeliveryEnabled,omitempty"`
	ImageDataDeliveryEnabled     *bool                    `json:"imageDataDeliveryEnabled,omitempty"`
	TextDataDeliveryEnabled      *bool                    `json:"textDataDeliveryEnabled,omitempty"`
	VideoDataDeliveryEnabled     *bool                    `json:"videoDataDeliveryEnabled,omitempty"`
}

ModelInvocationLoggingConfiguration mirrors types.LoggingConfig in aws-sdk-go-v2/service/bedrock@v1.66.4 (deserializers.go:awsRestjson1_deserializeDocumentLoggingConfig, serializers.go:awsRestjson1_serializeDocumentLoggingConfig). All members are optional; the real shape has no s3BucketName/loggingEnabled fields at all.

type OutputDataConfig added in v1.3.1

type OutputDataConfig struct {
	S3Uri string `json:"s3Uri"`
}

OutputDataConfig mirrors bedrock@v1.66.4 types.OutputDataConfig (api_op_CreateModelCustomizationJob.go), the S3 location a completed job writes its output to.

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"`
	Type                       string    `json:"type"`
	Description                string    `json:"description,omitempty"`
	FallbackModelArn           string    `json:"fallbackModelArn"`
	ClientRequestToken         string    `json:"clientRequestToken,omitempty"`
	ModelArns                  []string  `json:"modelArns"`
	Tags                       []Tag     `json:"tags,omitempty"`
	RoutingResponseQualityDiff float64   `json:"routingResponseQualityDiff"`
}

PromptRouter represents a prompt router resource.

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 RAGConfig added in v1.5.0

type RAGConfig struct {
	KnowledgeBaseConfig        json.RawMessage `json:"knowledgeBaseConfig,omitempty"`
	PrecomputedRagSourceConfig json.RawMessage `json:"precomputedRagSourceConfig,omitempty"`
}

RAGConfig models bedrock's ragConfigs union member (types.RAGConfig, bedrock@v1.66.4 types/types.go:5979-5996): a single-key object naming "knowledgeBaseConfig" or "precomputedRagSourceConfig". Both variants are themselves further unions bottoming out in a recursive ~12-variant RetrievalFilter tree (types/types.go:6165-6344) that gopherstack's inert evaluation-job store never interprets; stored verbatim as received rather than partially modeled, same rationale as AutomatedEvaluationConfig. CustomMetricConfig above.

type ResourcePolicy added in v1.2.0

type ResourcePolicy struct {
	CreatedAt      time.Time
	UpdatedAt      time.Time
	ResourceArn    string
	PolicyDocument string
	RevisionID     string
}

ResourcePolicy represents a resource-based policy attached to a Bedrock resource (core bedrock's PutResourcePolicy/GetResourcePolicy/ DeleteResourcePolicy) or, in the bedrock-agent domain, to a knowledge base (bedrock-agent's PutResourcePolicy/GetResourcePolicy/DeleteResourcePolicy). RevisionID is only meaningful for the bedrock-agent flavor, which supports optimistic-concurrency updates via expectedRevisionId; core bedrock's ResourcePolicy shape has no revision concept and simply ignores this field.

type S3LoggingConfig added in v1.5.0

type S3LoggingConfig struct {
	BucketName string `json:"bucketName"`
	KeyPrefix  string `json:"keyPrefix,omitempty"`
}

S3LoggingConfig mirrors types.S3Config. BucketName is required when S3Config is present.

type SageMakerEndpointConfig added in v1.2.0

type SageMakerEndpointConfig struct {
	ExecutionRole        string `json:"executionRole"`
	InstanceType         string `json:"instanceType"`
	KmsEncryptionKey     string `json:"kmsEncryptionKey,omitempty"`
	InitialInstanceCount int32  `json:"initialInstanceCount"`
}

SageMakerEndpointConfig mirrors types.SageMakerEndpoint in aws-sdk-go-v2/service/bedrock (the sole real member of the EndpointConfig union today). Real AWS wire shape: {"sageMaker": {"executionRole":,"initialInstanceCount":,"instanceType":,"kmsEncryptionKey":}}.

type Tag

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

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

type TrainingDataConfig added in v1.3.1

type TrainingDataConfig struct {
	S3Uri                    string `json:"s3Uri,omitempty"`
	InvocationLogSourceS3Uri string `json:"invocationLogSourceS3Uri,omitempty"`
	UsePromptResponse        bool   `json:"usePromptResponse,omitempty"`
}

TrainingDataConfig mirrors bedrock@v1.66.4 types.TrainingDataConfig (api_op_CreateModelCustomizationJob.go). InvocationLogSource is flattened to InvocationLogSourceS3Uri, the same way ModelImportJob.ModelDataSourceS3 flattens ModelDataSource above -- it is the union's only member (types.InvocationLogSourceMemberS3Uri). RequestMetadataFilters is not modeled: a recursive filter-expression union (AndAll/OrAll/Equals/NotEquals) that only prunes which invocation logs a Distillation job trains on, and this backend has no invocation-log pipeline for such filters to act on.

Jump to

Keyboard shortcuts

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