bedrockagentcorecontrol

package
v1.8.2 Latest Latest
Warning

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

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

README

Bedrockagentcorecontrol

Parity grade: B · SDK aws-sdk-go-v2/service/bedrockagentcorecontrol@v1.73.0 · last audited 2026-10-18 (c1af87ba3)

Coverage

Metric Value
PARITY entries audited 171 (171 ok)
Feature families 14 (14 ok)
Known gaps 13
Structural gaps (can't be emulated) 2
Deferred items 0
Resource leaks clean
Known gaps
  • Data plane: the bedrockagentcore module is not a dependency, so InvokeAgentRuntime, browser and code-interpreter sessions, memory events and records, and the gateway MCP endpoint are not served
  • Update semantics: PUT-style updates (UpdateAgentRuntime, UpdateGateway, UpdateGatewayTarget) merge supplied members instead of clearing omitted optional ones
  • Nested validation: only union exclusivity, enums, name patterns, ARN shapes and cross-resource references are checked; deeper member constraints (JWT claim rules, schema contents, VPC endpoint overrides) are accepted as sent
  • Cross-service references: ECR repositories, Lambda functions, Secrets Manager secrets and S3 objects are verified only when internal/app wiring is present; IAM roles and KMS keys are checked for ARN shape only
  • Credential providers: API key and client secret values are discarded, and managed secret ARNs are synthesized rather than written to Secrets Manager
  • Failure states: CREATE_FAILED and UPDATE_FAILED are only reached by dataset S3 sources; no other asynchronous failure is modeled
  • Gateway targets: SynchronizeGatewayTargets only stamps lastSynchronizedAt; Lambda, OpenAPI and MCP tool discovery never runs and OAuth targets never reach a PENDING_AUTH status
  • Registry records: synchronizationConfiguration is stored but nothing synchronizes
  • Authorizers: JWT and IAM authorizer configuration is stored, not enforced
  • GetMemory: the view query parameter is accepted and ignored
  • Success status codes: 202 for asynchronous creates, updates and deletes comes from AWS documentation; the SDK does not encode it
  • Error statuses: ConflictException 409, ResourceNotFoundException 404, ServiceQuotaExceededException 402 and ValidationException 400 come from AWS documentation, not SDK evidence
  • Quotas: no per-account resource limits are enforced
Structural gaps

These do not block an A grade — no implementation could produce real data here because the underlying data source cannot exist in an emulator.

  • StartPolicyGeneration: deriving Cedar from natural language needs a generative model, so every generation ends GENERATE_FAILED with no assets
  • Evaluators and online evaluation configs: evaluation needs a model and live agent traces, so configurations are validated and stored but never run

More

Documentation

Overview

Package bedrockagentcorecontrol emulates the Amazon Bedrock AgentCore control plane.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Backend *InMemoryBackend

	DefaultRegion string
	// contains filtered or unexported fields
}

Handler serves the AgentCore control-plane REST-JSON API.

func NewHandler

func NewHandler(backend *InMemoryBackend) *Handler

NewHandler wraps a backend.

func (*Handler) ChaosOperations

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

ChaosOperations lists the fault-injectable operations.

func (*Handler) ChaosRegions

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

ChaosRegions lists the regions this handler serves.

func (*Handler) ChaosServiceName

func (h *Handler) ChaosServiceName() string

ChaosServiceName returns the lowercase service name for fault rules.

func (*Handler) ExtractOperation

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

ExtractOperation returns the operation name.

func (*Handler) ExtractResource

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

ExtractResource returns the resource ARN or identifier the request addresses.

func (*Handler) GetSupportedOperations

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

GetSupportedOperations lists every implemented operation.

func (*Handler) Handler

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

Handler returns the echo handler.

func (*Handler) MatchPriority

func (h *Handler) MatchPriority() int

MatchPriority returns the routing priority.

func (*Handler) Name

func (h *Handler) Name() string

Name returns the service name.

func (*Handler) Reset

func (h *Handler) Reset()

Reset clears all state.

func (*Handler) Restore

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

Restore implements persistence.Persistable.

func (*Handler) RouteMatcher

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

RouteMatcher matches by SigV4 signing name (or SDK user agent) plus a known path shape.

func (*Handler) Snapshot

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

Snapshot implements persistence.Persistable.

type InMemoryBackend

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

InMemoryBackend is the AgentCore control-plane state; one coarse lock guards every table.

func NewInMemoryBackend

func NewInMemoryBackend(accountID, region string) *InMemoryBackend

NewInMemoryBackend creates an empty backend.

func (*InMemoryBackend) AccountID

func (b *InMemoryBackend) AccountID() string

AccountID returns the default account.

func (*InMemoryBackend) Region

func (b *InMemoryBackend) Region() string

Region returns the default Region.

func (*InMemoryBackend) Reset

func (b *InMemoryBackend) Reset()

Reset clears every table.

func (*InMemoryBackend) Restore

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

Restore loads a snapshot; an incompatible version is discarded.

func (*InMemoryBackend) SetLifecycleDelay

func (b *InMemoryBackend) SetLifecycleDelay(d time.Duration)

SetLifecycleDelay keeps resources in CREATING, UPDATING and DELETING for d; zero settles immediately.

func (*InMemoryBackend) SetReferences

func (b *InMemoryBackend) SetReferences(r References)

SetReferences wires lookups of resources owned by other services.

func (*InMemoryBackend) Snapshot

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

Snapshot serialises the backend state.

type Provider

type Provider struct{}

Provider implements service.Provider for the Bedrock AgentCore control plane.

func (*Provider) Init

Init builds the backend and handler.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the provider name.

type References

type References interface {
	ECRRepositoryExists(account, region, repository string) bool
	LambdaFunctionExists(arn string) bool
	SecretExists(arn string) bool
	ReadObject(bucket, key string) ([]byte, bool)
}

References resolves resources owned by other emulated services; nil members skip the check.

type Resource

type Resource struct {
	Created    time.Time         `json:"created"`
	Updated    time.Time         `json:"updated"`
	SettleAt   time.Time         `json:"settleAt"`
	Doc        map[string]any    `json:"doc"`
	Tags       map[string]string `json:"tags,omitempty"`
	Aux        map[string]any    `json:"aux,omitempty"`
	Account    string            `json:"account"`
	Region     string            `json:"region"`
	Kind       string            `json:"kind"`
	Parent     string            `json:"parent,omitempty"`
	ParentARN  string            `json:"parentArn,omitempty"`
	ID         string            `json:"id"`
	ARN        string            `json:"arn,omitempty"`
	Status     string            `json:"status,omitempty"`
	Transition string            `json:"transition,omitempty"`
	Versions   []Version         `json:"versions,omitempty"`
	Deleting   bool              `json:"deleting,omitempty"`
	System     bool              `json:"system,omitempty"`
}

Resource is one AgentCore control-plane resource. Doc holds the caller-supplied members verbatim (JSON-decoded); server-assigned identity, status, timestamps and tags live in typed fields.

func (*Resource) Aux2

func (r *Resource) Aux2() map[string]any

Aux2 returns the auxiliary map, never nil.

type ResourcePolicy

type ResourcePolicy struct {
	ARN    string `json:"arn"`
	Policy string `json:"policy"`
}

ResourcePolicy is the resource-based policy attached to a runtime, endpoint or gateway ARN.

type TokenVault

type TokenVault struct {
	Modified time.Time      `json:"modified"`
	KMS      map[string]any `json:"kms"`
	Key      string         `json:"key"`
}

TokenVault is the per-account token vault configuration.

type Version

type Version struct {
	Created time.Time      `json:"created"`
	Doc     map[string]any `json:"doc"`
	ID      string         `json:"id"`
	Branch  string         `json:"branch,omitempty"`
	Parents []string       `json:"parents,omitempty"`
}

Version is an immutable snapshot taken on create and on every update of a versioned resource.

Jump to

Keyboard shortcuts

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