opensearch

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: MIT Imports: 26 Imported by: 0

README

OpenSearch

Parity grade: A · SDK aws-sdk-go-v2/service/opensearch@v1.75.4 · last audited 2026-08-14 (acb2e23f9)

Coverage

Metric Value
PARITY entries audited 14 (14 ok)
Feature families 13 (12 ok, 1 deferred)
Known gaps none
Deferred items 1
Resource leaks clean
Deferred
  • serverless

More

Documentation

Index

Constants

View Source
const (
	EngineStub   = "stub"
	EngineDocker = "docker"
)

Engine mode constants.

Variables

View Source
var (
	ErrDomainNotFound           = errors.New("ResourceNotFoundException")
	ErrDomainAlreadyExists      = errors.New("ResourceAlreadyExistsException")
	ErrInvalidParameter         = errors.New("ValidationException")
	ErrValidation               = errors.New("ValidationException")
	ErrConnectionNotFound       = errors.New("ResourceNotFoundException")
	ErrDataSourceNotFound       = errors.New("ResourceNotFoundException")
	ErrDataSourceAlreadyExists  = errors.New("ResourceAlreadyExistsException")
	ErrPackageNotFound          = errors.New("ResourceNotFoundException")
	ErrApplicationNotFound      = errors.New("ResourceNotFoundException")
	ErrApplicationAlreadyExists = errors.New("ResourceAlreadyExistsException")
	ErrScheduledActionNotFound  = errors.New("ResourceNotFoundException")
	ErrAttachmentNotFound       = errors.New("ResourceNotFoundException")
	ErrAttachmentConflict       = errors.New("ConflictException")
	ErrCapabilityNotFound       = errors.New("ResourceNotFoundException")
	ErrMigrationNotFound        = errors.New("ResourceNotFoundException")
	ErrInsightNotFound          = errors.New("ResourceNotFoundException")
	ErrWorkspaceNotFound        = errors.New("ResourceNotFoundException")
	ErrAccessDenied             = errors.New("AccessDeniedException")
	// ErrPackageAssociated is returned by DeletePackage when the package is
	// still associated with a domain. Real AWS: DeletePackage's own doc
	// comment, "The package can't be associated with any OpenSearch Service
	// domain".
	ErrPackageAssociated = errors.New("ConflictException")
	// ErrServerlessTagLimitExceeded is returned by TagResource when applying
	// new tags would push a collection's tag count past the documented
	// 50-tag-per-resource cap. TagResource is the only serverless op
	// declaring ServiceQuotaExceededException (opensearchserverless
	// v1.34.4 deserializers.go awsAwsjson10_deserializeOpErrorTagResource).
	ErrServerlessTagLimitExceeded = errors.New("ServiceQuotaExceededException")
	// ErrDocumentVersionConflict is returned by CreateDocument (the _bulk
	// "create" action's semantics) when a document with the given ID already
	// exists -- real OpenSearch's version_conflict_engine_exception
	// (https://opensearch.org/docs/latest/api-reference/document-apis/bulk/).
	// Unlike the AWS-control-plane Err* sentinels above, this one carries the
	// raw OpenSearch REST error "type" string, matching the data plane's own
	// error item shape ({"type":..., "reason":...}), not AWS's
	// {Message} envelope.
	ErrDocumentVersionConflict = errors.New("version_conflict_engine_exception")
)

Errors returned by the OpenSearch backend.

View Source
var ErrNilAppContext = errors.New("nil AppContext passed to OpenSearch Provider.Init")

ErrNilAppContext is returned by Init when a nil AppContext is passed.

Functions

This section is empty.

Types

type AdditionalLimit

type AdditionalLimit struct {
	LimitName   string   `json:"LimitName"`
	LimitValues []string `json:"LimitValues"`
}

AdditionalLimit is an additional named limit for an instance type.

type AdvancedSecurityOptions

type AdvancedSecurityOptions struct {
	SAMLOptions                 *SAMLOptionsInput `json:"samlOptions,omitempty"`
	AnonymousAuthEnabled        bool              `json:"anonymousAuthEnabled,omitempty"`
	Enabled                     bool              `json:"enabled"`
	InternalUserDatabaseEnabled bool              `json:"internalUserDatabaseEnabled,omitempty"`
}

AdvancedSecurityOptions holds fine-grained access control settings.

type AppConfig

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

AppConfig represents an application configuration key-value pair.

type AppDataSource

type AppDataSource struct {
	DataSourceArn string `json:"dataSourceArn"`
}

AppDataSource represents a data source linked to an application.

type Application

type Application struct {
	Tags          *tags.Tags      `json:"tags,omitempty"`
	ID            string          `json:"id"`
	Name          string          `json:"name"`
	ARN           string          `json:"arn"`
	AppConfigs    []AppConfig     `json:"appConfigs"`
	DataSources   []AppDataSource `json:"dataSources"`
	CreatedAt     float64         `json:"createdAt"`
	LastUpdatedAt float64         `json:"lastUpdatedAt"`
}

Application represents an OpenSearch UI application.

type AuthorizedPrincipal

type AuthorizedPrincipal struct {
	Principal     string `json:"principal"`
	PrincipalType string `json:"principalType"`
}

AuthorizedPrincipal represents an authorized principal for VPC endpoint access.

type AutoTune

type AutoTune struct {
	AutoTuneType    string          `json:"AutoTuneType"`
	AutoTuneDetails AutoTuneDetails `json:"AutoTuneDetails"`
}

AutoTune is the response shape for one auto-tune item.

type AutoTuneConfig

type AutoTuneConfig struct {
	CreatedAt            time.Time                     `json:"CreatedAt,omitzero"`
	UpdatedAt            time.Time                     `json:"UpdatedAt,omitzero"`
	UseOffPeakWindow     *bool                         `json:"UseOffPeakWindow,omitempty"`
	DesiredState         string                        `json:"DesiredState"`
	RollbackOnDisable    string                        `json:"RollbackOnDisable,omitempty"`
	State                string                        `json:"State"`
	ErrorMessage         string                        `json:"ErrorMessage,omitempty"`
	MaintenanceSchedules []AutoTuneMaintenanceSchedule `json:"MaintenanceSchedules,omitempty"`
	UpdateVersion        int                           `json:"UpdateVersion,omitempty"`
}

AutoTuneConfig stores a domain's Auto-Tune configuration and status, nested directly on Domain (types.AutoTuneOptions/AutoTuneOptionsOutput/ AutoTuneOptionsStatus/AutoTuneStatus, opensearch@v1.75.4 types/types.go: 414-521). State mirrors DesiredState directly (ENABLED/DISABLED): this backend has no async enable/disable pipeline, so it never reports the real enum's transient ENABLE_IN_PROGRESS/DISABLE_IN_PROGRESS/ DISABLED_AND_ROLLBACK_* values -- an honest restraint, not a fabricated state machine, matching the off-peak-window/IdentityCenter options above (also stored and echoed verbatim, no transition modeling).

type AutoTuneDetails

type AutoTuneDetails struct {
	ScheduledAutoTuneDetails ScheduledAutoTuneDetails `json:"ScheduledAutoTuneDetails"`
}

AutoTuneDetails holds the state details of an auto-tune entry.

type AutoTuneDuration

type AutoTuneDuration struct {
	Unit  string `json:"Unit"`
	Value int    `json:"Value"`
}

AutoTuneDuration represents a duration for a maintenance window.

type AutoTuneMaintenanceSchedule

type AutoTuneMaintenanceSchedule struct {
	CronExpression string           `json:"CronExpressionForRecurrence,omitempty"`
	Duration       AutoTuneDuration `json:"Duration"`
	StartAt        float64          `json:"StartAt,omitempty"`
}

AutoTuneMaintenanceSchedule represents a maintenance window.

type AutoTuneOptionsInput

type AutoTuneOptionsInput struct {
	UseOffPeakWindow     *bool
	DesiredState         string
	MaintenanceSchedules []AutoTuneMaintenanceSchedule
}

AutoTuneOptionsInput is the Auto-Tune request shape accepted by CreateDomain (types.AutoTuneOptionsInput) -- unlike UpdateDomainConfig's AutoTuneUpdateInput below, it has no RollbackOnDisable member (serializers.go awsRestjson1_serializeDocumentAutoTuneOptionsInput vs. awsRestjson1_serializeDocumentAutoTuneOptions).

type AutoTuneUpdateInput

type AutoTuneUpdateInput struct {
	UseOffPeakWindow     *bool
	DesiredState         string
	RollbackOnDisable    string
	MaintenanceSchedules []AutoTuneMaintenanceSchedule
}

AutoTuneUpdateInput is the Auto-Tune request shape accepted by UpdateDomainConfig (types.AutoTuneOptions).

type BlueGreenDeploymentOptions

type BlueGreenDeploymentOptions struct {
	Enabled bool `json:"enabled"`
}

BlueGreenDeploymentOptions holds blue-green deployment settings.

type Capability added in v1.2.0

type Capability struct {
	StatusUntil    time.Time `json:"statusUntil,omitzero"`
	ApplicationID  string    `json:"applicationId"`
	CapabilityName string    `json:"capabilityName"`
	Status         string    `json:"status"`
}

Capability represents a registered capability (currently only AI Assistant, capabilityName "ai-capability") on an OpenSearch UI application. Matches types.CapabilityStatus / the ApplicationId+CapabilityName+Status fields shared by RegisterCapability/DeregisterCapability/GetCapability's outputs. CapabilityConfig itself is not modeled as stored state: the only union member the SDK defines (types.AIConfig) is an empty struct with no fields at all, so there is nothing beyond the name/status to persist -- see handler_capabilities.go.

type ClusterConfig

type ClusterConfig struct {
	ZoneAwarenessConfig        *ZoneAwarenessConfig        `json:"zoneAwarenessConfig,omitempty"`
	BlueGreenDeploymentOptions *BlueGreenDeploymentOptions `json:"blueGreenDeploymentOptions,omitempty"`
	InstanceType               string                      `json:"instanceType"`
	DedicatedMasterType        string                      `json:"dedicatedMasterType,omitempty"`
	WarmType                   string                      `json:"warmType,omitempty"`
	InstanceCount              int                         `json:"instanceCount"`
	DedicatedMasterCount       int                         `json:"dedicatedMasterCount,omitempty"`
	WarmCount                  int                         `json:"warmCount,omitempty"`
	DedicatedMasterEnabled     bool                        `json:"dedicatedMasterEnabled,omitempty"`
	ZoneAwarenessEnabled       bool                        `json:"zoneAwarenessEnabled,omitempty"`
	WarmEnabled                bool                        `json:"warmEnabled,omitempty"`
	ColdStorageEnabled         bool                        `json:"coldStorageEnabled,omitempty"`
	MultiAZWithStandbyEnabled  bool                        `json:"multiAZWithStandbyEnabled,omitempty"`
}

ClusterConfig represents the cluster configuration for an OpenSearch domain.

type CognitoOptions

type CognitoOptions struct {
	IdentityPoolID string `json:"identityPoolId,omitempty"`
	RoleARN        string `json:"roleArn,omitempty"`
	UserPoolID     string `json:"userPoolId,omitempty"`
	Enabled        bool   `json:"enabled"`
}

CognitoOptions holds Cognito configuration for Kibana authentication.

type CreateDomainInput

type CreateDomainInput struct {
	AutoTuneOptions             *AutoTuneOptionsInput
	EBSOptions                  *EBSOptions
	SnapshotOptions             *SnapshotOptions
	EncryptionAtRestOptions     *EncryptionAtRestOptions
	NodeToNodeEncryptionOptions *NodeToNodeEncryptionOptions
	DomainEndpointOptions       *DomainEndpointOptions
	AdvancedSecurityOptions     *AdvancedSecurityOptions
	VPCOptions                  *VPCOptions
	CognitoOptions              *CognitoOptions
	OffPeakWindowOptions        *OffPeakWindowOptions
	IdentityCenterOptions       *IdentityCenterOptions
	EnableSoftwareUpdateOptions *EnableSoftwareUpdateOptions
	LogPublishingOptions        map[string]*LogPublishingOption
	Tags                        map[string]string
	Name                        string
	EngineVersion               string
	AccessPolicies              string
	ClusterConfig               ClusterConfig
}

CreateDomainInput holds all options for creating a new OpenSearch domain.

type DNSRegistrar

type DNSRegistrar interface {
	Register(hostname string)
	Deregister(hostname string)
}

DNSRegistrar can register and deregister hostnames with an embedded DNS server.

type DataSource

type DataSource struct {
	Name           string          `json:"name"`
	Description    string          `json:"description"`
	Status         string          `json:"status,omitempty"`
	DomainName     string          `json:"-"`
	DataSourceType json.RawMessage `json:"dataSourceType,omitempty"`
}

DataSource represents a data source attached to an OpenSearch domain.

type DataSourceAttachment added in v1.2.0

type DataSourceAttachment struct {
	CreatedAt     time.Time `json:"-"`
	AttachmentID  string    `json:"attachmentId"`
	ApplicationID string    `json:"applicationId"`
	DataSourceArn string    `json:"dataSourceArn"`
	Status        string    `json:"status"`
}

DataSourceAttachment represents an attachment of a real data source (an OpenSearch domain or an OpenSearch Serverless collection, identified by ARN) to an OpenSearch UI application. Matches types.DataSourceAttachmentSummary plus the identity fields (AttachmentId/DataSourceArn/Status) shared by Attach/Detach/ DescribeDataSourceAttachment's outputs. CreatedAt carries json:"-": real types.DataSourceAttachmentSummary (opensearch@v1.75.4 types/types.go:943-959) has no creation-timestamp member, and dataSourceAttachmentJSON (handler_data_source_attachments.go) is the actual wire converter for every op that returns this type, so the tag is correct for the wire. See persistence.go's dataSourceAttachmentSnapshot for why it must still be given a real tag for persistence (gopherstack-ike6y).

type DirectQueryDataSource

type DirectQueryDataSource struct {
	// DataSourceType is stored as raw JSON for the same reason as
	// DataSource.DataSourceType above -- types.DirectQueryDataSourceType is
	// also a tagged union (CloudWatchLog / SecurityLake members).
	DataSourceType json.RawMessage `json:"dataSourceType,omitempty"`
	Name           string          `json:"name"`
	Description    string          `json:"description"`
	DataSourceArn  string          `json:"dataSourceArn"`
	OpenSearchArns []string        `json:"openSearchArns"`
}

DirectQueryDataSource represents a direct-query data source.

type DocumentMeta

type DocumentMeta struct {
	Version int `json:"Version"`
	SeqNo   int `json:"SeqNo"`
}

DocumentMeta is the real per-document _version/_seq_no pair for the data-plane document store (see DomainIndex.DocMeta).

type Domain

type Domain struct {
	ProcessingUntil             time.Time                       `json:"processingUntil,omitzero"`
	Tags                        *tags.Tags                      `json:"tags,omitempty"`
	AutoTuneOptions             *AutoTuneConfig                 `json:"autoTuneOptions,omitempty"`
	SnapshotOptions             *SnapshotOptions                `json:"snapshotOptions,omitempty"`
	NodeToNodeEncryptionOptions *NodeToNodeEncryptionOptions    `json:"nodeToNodeEncryptionOptions,omitempty"`
	DomainEndpointOptions       *DomainEndpointOptions          `json:"domainEndpointOptions,omitempty"`
	AdvancedSecurityOptions     *AdvancedSecurityOptions        `json:"advancedSecurityOptions,omitempty"`
	VPCOptions                  *VPCOptions                     `json:"vpcOptions,omitempty"`
	CognitoOptions              *CognitoOptions                 `json:"cognitoOptions,omitempty"`
	OffPeakWindowOptions        *OffPeakWindowOptions           `json:"offPeakWindowOptions,omitempty"`
	IdentityCenterOptions       *IdentityCenterOptions          `json:"identityCenterOptions,omitempty"`
	EnableSoftwareUpdateOptions *EnableSoftwareUpdateOptions    `json:"enableSoftwareUpdateOptions,omitempty"`
	LogPublishingOptions        map[string]*LogPublishingOption `json:"logPublishingOptions,omitempty"`
	EBSOptions                  *EBSOptions                     `json:"ebsOptions,omitempty"`
	EncryptionAtRestOptions     *EncryptionAtRestOptions        `json:"encryptionAtRestOptions,omitempty"`
	ServiceSoftware             *ServiceSoftwareOptions         `json:"serviceSoftware,omitempty"`
	Name                        string                          `json:"name"`
	ARN                         string                          `json:"arn"`
	// DomainID is the AWS-format unique domain identifier ("{accountId}/{name}"),
	// a required field on DomainStatus (see aws-sdk-go-v2/service/opensearch
	// types.DomainStatus.DomainId) that real AWS always returns alongside ARN.
	DomainID         string        `json:"domainID"`
	EngineVersion    string        `json:"engineVersion"`
	Endpoint         string        `json:"endpoint"`
	Status           string        `json:"status"`
	LastChangeID     string        `json:"lastChangeID,omitempty"`
	ProcessingStatus string        `json:"processingStatus,omitempty"`
	AccessPolicies   string        `json:"accessPolicies,omitempty"`
	ClusterConfig    ClusterConfig `json:"clusterConfig"`
	Created          bool          `json:"created,omitempty"`
	Deleted          bool          `json:"deleted,omitempty"`
}

Domain represents an OpenSearch domain.

type DomainEndpointOptions

type DomainEndpointOptions struct {
	CustomEndpointCertificateArn string `json:"customEndpointCertificateArn,omitempty"`
	CustomEndpoint               string `json:"customEndpoint,omitempty"`
	TLSSecurityPolicy            string `json:"tlsSecurityPolicy,omitempty"`
	EnforceHTTPS                 bool   `json:"enforceHTTPS,omitempty"`
	CustomEndpointEnabled        bool   `json:"customEndpointEnabled,omitempty"`
}

DomainEndpointOptions holds HTTPS and custom endpoint settings.

type DomainEntry

type DomainEntry struct {
	Name          string
	EngineVersion string
}

DomainEntry holds the name and engine version of a domain, used for list responses.

type DomainIndex

type DomainIndex struct {
	Mappings map[string]any `json:"Mappings,omitempty"`
	Settings map[string]any `json:"Settings,omitempty"`
	Aliases  map[string]any `json:"Aliases,omitempty"`
	// IndexSchema is the opaque smithy document body of the real AWS
	// CreateIndex/UpdateIndex request (api_op_CreateIndex.go:57,
	// api_op_UpdateIndex.go:49 in the pinned SDK: IndexSchema
	// document.Interface). It is an arbitrary JSON value with no fixed
	// schema on the wire, so it is stored and echoed back verbatim rather
	// than parsed into Mappings/Settings/Aliases.
	IndexSchema any `json:"IndexSchema,omitempty"`
	// Documents holds the real per-index document store keyed by document ID.
	Documents map[string]map[string]any `json:"Documents,omitempty"`
	// DocMeta tracks the real OpenSearch per-document _version/_seq_no
	// (updated on every index or delete of that document ID) -- the raw
	// data-plane REST surface this backend serves under /index/{name}/_doc
	// (not an AWS SDK op; see documents.go) echoes these back like a real
	// OpenSearch node does.
	DocMeta     map[string]DocumentMeta `json:"DocMeta,omitempty"`
	IndexName   string                  `json:"IndexName"`
	IndexStatus string                  `json:"IndexStatus"`
	// DomainName identifies the owning domain and is used only to key the
	// pkgs/store composite table (domainName#indexName); it is never
	// serialized on the wire, matching how the domain name was already
	// implied by the outer map key before the pkgs/store conversion.
	DomainName string `json:"-"`
	// DocumentCount is the number of documents currently stored in the index.
	DocumentCount int `json:"DocumentCount"`
	// NextSeqNo is the real per-index _seq_no counter (this backend models
	// one shard per index, so it is tracked per index rather than per shard).
	NextSeqNo int `json:"NextSeqNo,omitempty"`
}

DomainIndex represents an OpenSearch index, including its stored documents.

type DomainInformation added in v1.2.0

type DomainInformation struct {
	DomainName string `json:"domainName"`
	OwnerID    string `json:"ownerId,omitempty"`
	Region     string `json:"region,omitempty"`
}

DomainInformation identifies the source or destination domain of a cross-cluster connection. On the wire this nests inside a DomainInformationContainer under the AWSDomainInformation key (see types.AWSDomainInformation / types.DomainInformationContainer).

type DomainMaintenance

type DomainMaintenance struct {
	MaintenanceID string  `json:"MaintenanceId"`
	DomainName    string  `json:"DomainName"`
	Action        string  `json:"Action"`
	NodeID        string  `json:"NodeId,omitempty"`
	Status        string  `json:"Status"`
	StatusMessage string  `json:"StatusMessage,omitempty"`
	CreatedAt     float64 `json:"CreatedAt"`
	UpdatedAt     float64 `json:"UpdatedAt"`
}

DomainMaintenance represents a maintenance action on a domain.

type DomainPackageDetails

type DomainPackageDetails struct {
	PackageID   string  `json:"packageId"`
	DomainName  string  `json:"domainName"`
	State       string  `json:"state"`
	PackageName string  `json:"packageName,omitempty"`
	PackageType string  `json:"packageType,omitempty"`
	LastUpdated float64 `json:"lastUpdated,omitempty"`
}

DomainPackageDetails holds details about a package associated with a domain.

type DryRunStatus

type DryRunStatus struct {
	DryRunID           string           `json:"DryRunId"`
	DryRunStatus       string           `json:"DryRunStatus"`
	CreationDate       string           `json:"CreationDate"`
	UpdateDate         string           `json:"UpdateDate"`
	DomainName         string           `json:"-"`
	ValidationFailures []map[string]any `json:"ValidationFailures"`
}

DryRunStatus holds dry-run progress state for a domain.

type EBSOptions

type EBSOptions struct {
	VolumeType string `json:"volumeType,omitempty"`
	KMSKeyID   string `json:"kmsKeyId,omitempty"`
	VolumeSize int    `json:"volumeSize,omitempty"`
	IOPS       int    `json:"iops,omitempty"`
	Throughput int    `json:"throughput,omitempty"`
	EBSEnabled bool   `json:"ebsEnabled"`
}

EBSOptions represents EBS volume settings for an OpenSearch domain.

type EnableSoftwareUpdateOptions

type EnableSoftwareUpdateOptions struct {
	AutoSoftwareUpdateEnabled bool `json:"autoSoftwareUpdateEnabled"`
}

EnableSoftwareUpdateOptions holds settings for automatic software updates.

type EncryptionAtRestOptions

type EncryptionAtRestOptions struct {
	KMSKeyID string `json:"kmsKeyId,omitempty"`
	Enabled  bool   `json:"enabled"`
}

EncryptionAtRestOptions holds encryption at rest settings.

type EngineConfig

type EngineConfig interface {
	GetOpenSearchEngine() string
}

EngineConfig is the interface for accessing the OpenSearch engine mode configuration.

type ExportOptionsInput added in v1.2.0

type ExportOptionsInput struct {
	Objects               []SavedObjectIdentifierInput
	Types                 []string
	IncludeReferencesDeep bool
}

ExportOptionsInput mirrors types.ExportOptions (StartMigration's optional export-scope filter). This emulator has no saved-object store to actually filter (see the Migration doc comment in models.go), so beyond structural validation these fields are parsed and then intentionally discarded -- GetMigrationOutput/MigrationSummary never echo them back either, the same "accepted, validated, not stored" precedent services/appconfig's StartExperimentRun DeploymentParameters already established.

type Handler

type Handler struct {
	Backend   StorageBackend
	AccountID string
	Region    string
}

Handler is the HTTP handler for OpenSearch operations.

func NewHandler

func NewHandler(backend StorageBackend) *Handler

NewHandler creates a new OpenSearch Handler.

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 OpenSearch instance handles.

func (*Handler) ChaosServiceName

func (h *Handler) ChaosServiceName() string

ChaosServiceName returns the lowercase AWS service name for fault rule matching.

func (*Handler) ExtractOperation

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

ExtractOperation returns the operation name from a request. It mirrors ServeHTTP's real dispatch tree op-for-op (gopherstack-l5ir): every branch here corresponds 1:1 to a route actually wired in handler.go and its per-family handler files, so this function's correctness is exercised by TestExtractOperation_SDKRouteTable in handler_paths_sdk_diff_test.go.

func (*Handler) ExtractResource

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

ExtractResource returns the primary resource identifier from the request path.

func (*Handler) GetSupportedOperations

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

GetSupportedOperations returns supported operations.

func (*Handler) Handle

func (h *Handler) Handle(c *echo.Context) error

Handle satisfies the Echo handler interface.

func (*Handler) Handler

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

Handler returns the Echo HandlerFunc for this service.

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 the handler's backend state.

func (*Handler) Restore

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

Restore implements persistence.Persistable by delegating to the backend.

func (*Handler) RouteMatcher

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

RouteMatcher returns a matcher that selects OpenSearch requests by path prefix (classic control-plane, REST-JSON) or by the real AOSS X-Amz-Target prefix (JSON-RPC 1.0, always POST /) -- see openSearchServerlessTargetPrefix's doc comment (gopherstack-92ft). The target prefix alone fully discriminates AOSS requests: X-Amz-Target values are unique per AWS service by construction (SSM's and Personalize's RouteMatchers scope on target prefix the same way, with no SigV4 check), unlike iot/iotdataplane's shared generic path segments (gopherstack-61i8) where SigV4 scoping was needed to break a real ambiguity.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements http.Handler for the OpenSearch service.

func (*Handler) Snapshot

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

Snapshot implements persistence.Persistable by delegating to the backend.

type IdentityCenterOptions

type IdentityCenterOptions struct {
	IdentityCenterInstanceARN    string `json:"identityCenterInstanceARN,omitempty"`
	IdentityCenterApplicationARN string `json:"identityCenterApplicationARN,omitempty"`
	IdentityStoreID              string `json:"identityStoreId,omitempty"`
	RolesKey                     string `json:"rolesKey,omitempty"`
	SubjectKey                   string `json:"subjectKey,omitempty"`
	EnabledAPIAccess             bool   `json:"enabledAPIAccess"`
}

IdentityCenterOptions holds IAM Identity Center integration settings. Field names match the current aws-sdk-go-v2 IdentityCenterOptions/-Input shapes (IdentityCenterInstanceARN/RolesKey/SubjectKey), which superseded the older IamIdentityCenterOptions shape (IamIdentityCenterArn/IamRoleFor...) that AWS no longer wires into CreateDomain/UpdateDomainConfig.

type InMemoryBackend

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

InMemoryBackend is the in-memory store for OpenSearch domains.

Most resource collections are *store.Table[T] registered on b.registry -- see store_setup.go's registerAllTables doc for the full clean/dirty split and the reasoning behind the handful of fields left as plain maps.

func NewInMemoryBackend

func NewInMemoryBackend(accountID, region string) *InMemoryBackend

NewInMemoryBackend creates a new InMemoryBackend.

func (*InMemoryBackend) AcceptInboundConnection

func (b *InMemoryBackend) AcceptInboundConnection(connectionID string) (*InboundConnection, error)

AcceptInboundConnection accepts an inbound cross-cluster connection by ID, transitioning it (and, if present, its mirrored outbound counterpart) to ACTIVE.

func (*InMemoryBackend) AccountID

func (b *InMemoryBackend) AccountID() string

AccountID returns the AWS account ID this backend is configured for.

func (*InMemoryBackend) AddDataSource

func (b *InMemoryBackend) AddDataSource(
	domainName, name, description string,
	dataSourceType json.RawMessage,
) (string, error)

AddDataSource adds a data source to a domain.

func (*InMemoryBackend) AddDirectQueryDataSource

func (b *InMemoryBackend) AddDirectQueryDataSource(
	name, description string,
	dataSourceType json.RawMessage,
	openSearchArns []string,
) (string, error)

AddDirectQueryDataSource adds a direct-query data source.

func (*InMemoryBackend) AddDomainInternal

func (b *InMemoryBackend) AddDomainInternal(name, engineVersion string)

AddDomainInternal seeds a domain directly for use in tests.

func (*InMemoryBackend) AddPackageInternal

func (b *InMemoryBackend) AddPackageInternal(packageID, packageName, packageType string)

AddPackageInternal seeds a package directly for use in tests.

func (*InMemoryBackend) AddTags

func (b *InMemoryBackend) AddTags(resourceARN string, kv map[string]string) error

AddTags adds or updates tags on the domain or application identified by ARN.

func (*InMemoryBackend) AssociatePackage

func (b *InMemoryBackend) AssociatePackage(
	packageID, domainName string,
) (*DomainPackageDetails, error)

AssociatePackage associates a package with a domain.

func (*InMemoryBackend) AssociatePackages

func (b *InMemoryBackend) AssociatePackages(
	domainName string,
	packageIDs []string,
) ([]DomainPackageDetails, error)

AssociatePackages associates multiple packages with a domain.

func (*InMemoryBackend) AttachDataSource added in v1.2.0

func (b *InMemoryBackend) AttachDataSource(
	applicationID, dataSourceArn string,
	workspaceConfig *WorkspaceConfigInput, workspaceID string,
) (*DataSourceAttachment, error)

AttachDataSource attaches a real data source (domain or serverless collection ARN) to an OpenSearch application. Idempotent: re-attaching the same (applicationID, dataSourceArn) pair returns the existing attachment rather than creating a duplicate. workspaceConfig/workspaceID are the optional WorkspaceConfiguration/WorkspaceId request fields (see resolveWorkspaceConfigLocked and the Workspace doc comment in models.go for why this can validate/create a workspace but never surfaces one back to the caller -- AttachDataSourceOutput has no field for it); both are validated on every call, including idempotent replays, since a validation error should not be silently skipped just because the attachment itself already exists.

func (*InMemoryBackend) AuthorizeVpcEndpointAccess

func (b *InMemoryBackend) AuthorizeVpcEndpointAccess(
	domainName, account, service string,
) (*AuthorizedPrincipal, error)

AuthorizeVpcEndpointAccess grants VPC endpoint access for an account or service.

func (*InMemoryBackend) BatchGetServerlessCollections

func (b *InMemoryBackend) BatchGetServerlessCollections(ids, names []string) []*ServerlessCollection

BatchGetServerlessCollections returns a list of collections by IDs or names. Empty ids/names returns all collections.

func (*InMemoryBackend) BulkDeleteDocument

func (b *InMemoryBackend) BulkDeleteDocument(
	domainName, indexName, docID string,
) (bool, DocumentMeta, error)

BulkDeleteDocument implements the _bulk "delete" action's real semantics: deleting a document that doesn't exist is not an error -- real OpenSearch still reports status 404, but as a "not_found" result with a bumped tombstone version, not an error{} item (https://opensearch.org/docs/latest/api-reference/document-apis/bulk/). DeleteDocument, used by the single-document REST endpoint, keeps its existing error-on-missing behavior unchanged; this is a bulk-specific twin so that endpoint's semantics and tests are unaffected.

func (*InMemoryBackend) CancelDomainConfigChange

func (b *InMemoryBackend) CancelDomainConfigChange(
	domainName string,
	dryRun bool,
) ([]string, bool, error)

CancelDomainConfigChange cancels a pending configuration change on a domain.

func (*InMemoryBackend) CancelServiceSoftwareUpdate

func (b *InMemoryBackend) CancelServiceSoftwareUpdate(
	domainName string,
) (*ServiceSoftwareOptions, error)

CancelServiceSoftwareUpdate cancels a pending service software update.

AWS only permits cancellation while an update is actually scheduled (UpdateStatus == PENDING_UPDATE). When nothing is scheduled it rejects the request, so this mutates the stored software-update state and returns a ValidationException in that case rather than a canned success envelope.

func (*InMemoryBackend) CountDocuments

func (b *InMemoryBackend) CountDocuments(domainName, indexName string) (int, error)

CountDocuments returns the number of documents stored in an index.

func (*InMemoryBackend) CreateApplication

func (b *InMemoryBackend) CreateApplication(
	name string,
	appConfigs []AppConfig,
	dataSources []AppDataSource,
	tagMap map[string]string,
) (*Application, error)

CreateApplication creates an OpenSearch UI application.

func (*InMemoryBackend) CreateDocument

func (b *InMemoryBackend) CreateDocument(
	domainName, indexName, docID string,
	doc map[string]any,
) (string, DocumentMeta, error)

CreateDocument indexes a new document, matching the _bulk "create" action's real semantics: unlike IndexDocument (upsert), it fails with ErrDocumentVersionConflict when a document with this ID already exists (https://opensearch.org/docs/latest/api-reference/document-apis/bulk/).

func (*InMemoryBackend) CreateDomain

func (b *InMemoryBackend) CreateDomain(input CreateDomainInput) (*Domain, error)

CreateDomain creates a new OpenSearch domain.

func (*InMemoryBackend) CreateIndex

func (b *InMemoryBackend) CreateIndex(
	domainName, indexName string,
	mappings, settings, aliases map[string]any,
	indexSchema any,
) (*DomainIndex, error)

CreateIndex creates an index for a domain. indexSchema is the opaque smithy-document body of the real AWS CreateIndex request (see DomainIndex.IndexSchema); it is nil for the emulator's separate OpenSearch-data-plane-style index creation route, which supplies mappings/settings/aliases directly instead.

func (*InMemoryBackend) CreateOutboundConnection

func (b *InMemoryBackend) CreateOutboundConnection(
	connectionAlias, connectionMode string,
	localDomainInfo, remoteDomainInfo DomainInformation,
	skipUnavailable, endpoint string,
) (*OutboundConnection, error)

CreateOutboundConnection creates a new outbound cross-cluster connection. It starts in PENDING_ACCEPTANCE, matching real AWS behavior where the remote domain owner must accept the connection before it becomes ACTIVE. gopherstack emulates a single account/region, so it also mirrors a pending InboundConnection sharing the same ConnectionId (Local/Remote swapped) so the connection can be discovered and accepted/rejected via the inbound cross-cluster connection APIs, exactly like a real remote domain owner would see it.

func (*InMemoryBackend) CreatePackage

func (b *InMemoryBackend) CreatePackage(
	name, pkgType, description string,
	source *PackageSource,
	encryptionOptions *PackageEncryptionOptions,
) (*Package, error)

CreatePackage creates a new OpenSearch package.

func (*InMemoryBackend) CreateServerlessAccessPolicy

func (b *InMemoryBackend) CreateServerlessAccessPolicy(
	policyType, name, description, policy string,
) (*ServerlessAccessPolicy, error)

CreateServerlessAccessPolicy creates a new access policy.

func (*InMemoryBackend) CreateServerlessCollection

func (b *InMemoryBackend) CreateServerlessCollection(
	name, collectionType, description, kmsKeyArn string,
	tagMap map[string]string,
) (*ServerlessCollection, error)

CreateServerlessCollection creates a new OpenSearch Serverless collection.

func (*InMemoryBackend) CreateServerlessEncryptionPolicy

func (b *InMemoryBackend) CreateServerlessEncryptionPolicy(
	policyType, name, description, policy string,
) (*ServerlessEncryptionPolicy, error)

CreateServerlessEncryptionPolicy creates a new encryption policy.

func (*InMemoryBackend) CreateServerlessNetworkPolicy

func (b *InMemoryBackend) CreateServerlessNetworkPolicy(
	policyType, name, description, policy string,
) (*ServerlessNetworkPolicy, error)

CreateServerlessNetworkPolicy creates a new network policy.

func (*InMemoryBackend) CreateServerlessSecurityConfig

func (b *InMemoryBackend) CreateServerlessSecurityConfig(
	configType, description string,
	samlOptions *ServerlessSAMLOptions,
) (*ServerlessSecurityConfig, error)

CreateServerlessSecurityConfig creates a new security config.

func (*InMemoryBackend) CreateVpcEndpoint

func (b *InMemoryBackend) CreateVpcEndpoint(
	domainArn string,
	vpcOptions map[string]any,
) (*VpcEndpoint, error)

CreateVpcEndpoint creates a new VPC endpoint.

func (*InMemoryBackend) DeleteApplication

func (b *InMemoryBackend) DeleteApplication(id string) error

DeleteApplication removes an application by ID, cascading the removal of every resource scoped to it: data source attachments, capabilities, migration jobs, and workspaces (all four families added by AttachDataSource/RegisterCapability/StartMigration and friends), matching the cascade-cleanup precedent DeleteDomain already established for domain-scoped resources.

func (*InMemoryBackend) DeleteDataSource

func (b *InMemoryBackend) DeleteDataSource(domainName, name string) error

DeleteDataSource removes a data source from a domain.

func (*InMemoryBackend) DeleteDirectQueryDataSource

func (b *InMemoryBackend) DeleteDirectQueryDataSource(name string) error

DeleteDirectQueryDataSource removes a direct-query data source by name.

func (*InMemoryBackend) DeleteDocument

func (b *InMemoryBackend) DeleteDocument(domainName, indexName, docID string) (DocumentMeta, error)

DeleteDocument removes a document by ID, updates the document count, and returns the deleted document's real post-delete _version/_seq_no (real OpenSearch bumps both on delete too, keeping a tombstone version).

func (*InMemoryBackend) DeleteDomain

func (b *InMemoryBackend) DeleteDomain(name string) (*Domain, error)

DeleteDomain removes a domain by name and cleans up all associated resources.

When processingDelay is 0 the domain (and all its scoped resources) is removed immediately and the returned status reports Deleted:true / Deleting. When a delay is configured the domain enters a real, observable Deleting window: it remains describable with Deleted:true until the window elapses, after which it is cascaded away lazily on the next write.

func (*InMemoryBackend) DeleteInboundConnection

func (b *InMemoryBackend) DeleteInboundConnection(connectionID string) (*InboundConnection, error)

DeleteInboundConnection removes an inbound connection by ID. With a processing delay configured the connection first enters an observable DELETING window. Deleting an unknown connection ID is a ResourceNotFoundException, matching DeleteOutboundConnection.

func (*InMemoryBackend) DeleteIndex

func (b *InMemoryBackend) DeleteIndex(domainName, indexName string) (*DomainIndex, error)

DeleteIndex removes an index from a domain.

func (*InMemoryBackend) DeleteOutboundConnection

func (b *InMemoryBackend) DeleteOutboundConnection(
	connectionID string,
) (*OutboundConnection, error)

DeleteOutboundConnection removes an outbound connection by ID. With a processing delay configured the connection first enters an observable DELETING window before it is finally removed.

func (*InMemoryBackend) DeletePackage

func (b *InMemoryBackend) DeletePackage(packageID string) (*Package, error)

DeletePackage removes a package by ID. Real AWS: "The package can't be associated with any OpenSearch Service domain".

func (*InMemoryBackend) DeleteServerlessAccessPolicy

func (b *InMemoryBackend) DeleteServerlessAccessPolicy(policyType, name string) error

DeleteServerlessAccessPolicy removes an access policy by type and name.

func (*InMemoryBackend) DeleteServerlessCollection

func (b *InMemoryBackend) DeleteServerlessCollection(id string) (*ServerlessCollection, error)

DeleteServerlessCollection removes a collection by ID. With a processing delay configured the collection first enters an observable DELETING window before it is finally removed.

func (*InMemoryBackend) DeleteServerlessEncryptionPolicy

func (b *InMemoryBackend) DeleteServerlessEncryptionPolicy(policyType, name string) error

DeleteServerlessEncryptionPolicy removes an encryption policy.

func (*InMemoryBackend) DeleteServerlessNetworkPolicy

func (b *InMemoryBackend) DeleteServerlessNetworkPolicy(policyType, name string) error

DeleteServerlessNetworkPolicy removes a network policy.

func (*InMemoryBackend) DeleteServerlessSecurityConfig

func (b *InMemoryBackend) DeleteServerlessSecurityConfig(id string) error

DeleteServerlessSecurityConfig removes a security config by ID.

func (*InMemoryBackend) DeleteVpcEndpoint

func (b *InMemoryBackend) DeleteVpcEndpoint(id string) (*VpcEndpoint, error)

DeleteVpcEndpoint removes a VPC endpoint by ID. With a processing delay configured the endpoint first enters an observable DELETING window before it is finally removed.

func (*InMemoryBackend) DeregisterCapability added in v1.2.0

func (b *InMemoryBackend) DeregisterCapability(applicationID, capabilityName string) error

DeregisterCapability removes a registered capability. Its response status is always "deleting" per the real API's documented behavior ("Returns deleting when the capability is being removed"), regardless of the removal's actual synchronicity in this emulator.

func (*InMemoryBackend) DescribeDataSourceAttachment added in v1.2.0

func (b *InMemoryBackend) DescribeDataSourceAttachment(
	applicationID, dataSourceArn string,
) (*DataSourceAttachment, error)

DescribeDataSourceAttachment returns the current status and details of a specific data source attachment.

func (*InMemoryBackend) DescribeDomain

func (b *InMemoryBackend) DescribeDomain(name string) (*Domain, error)

DescribeDomain returns details about a domain. A domain whose deleting window has elapsed is reported as not found.

func (*InMemoryBackend) DescribeDomains

func (b *InMemoryBackend) DescribeDomains(names []string) ([]*Domain, error)

DescribeDomains returns a list of domains. If names is empty, all domains are returned. Missing names are silently skipped.

func (*InMemoryBackend) DescribeInboundConnections

func (b *InMemoryBackend) DescribeInboundConnections(
	connectionIDs []string, nextToken string, maxResults int,
) page.Page[*InboundConnection]

DescribeInboundConnections returns inbound connections excluding any whose deleting window has elapsed, filtered and paginated per the request. connectionIDs comes from Filter entries named "connection-id" -- the only Filter Name documented anywhere in api_op_DescribeInboundConnections.go or API_Filter.html for this operation (neither enumerates a Name value set); an empty slice matches everything.

func (*InMemoryBackend) DescribeInstanceTypeLimits

func (b *InMemoryBackend) DescribeInstanceTypeLimits(
	instanceType, _ string,
) (*InstanceTypeLimits, error)

DescribeInstanceTypeLimits returns instance type limits for a given instance type and engine version. This is a static lookup table for common types.

func (*InMemoryBackend) DescribeOutboundConnections

func (b *InMemoryBackend) DescribeOutboundConnections(
	connectionIDs []string, nextToken string, maxResults int,
) page.Page[*OutboundConnection]

DescribeOutboundConnections returns outbound connections excluding any whose deleting window has elapsed, filtered and paginated per the request. connectionIDs comes from Filter entries named "connection-id" -- the only Filter Name documented anywhere in api_op_DescribeOutboundConnections.go or API_Filter.html for this operation (neither enumerates a Name value set); an empty slice matches everything.

func (*InMemoryBackend) DescribePackages

func (b *InMemoryBackend) DescribePackages(
	filters map[string][]string, nextToken string, maxResults int,
) (page.Page[*Package], error)

DescribePackages returns packages matching filters, paginated per nextToken/maxResults. filters is keyed by DescribePackagesFilterName (opensearch@v1.75.4 types/enums.go): PackageID, PackageName, PackageStatus and PackageType are all fields this backend's Package tracks and applies here; EngineVersion and PackageOwner are also valid enum members but this backend has no such fields on Package to filter against (structural gap, documented in PARITY.md) -- those two filter names are accepted but have no effect, same as an absent filter. With no PackageID filter, the unfiltered set is read via Snapshot() (ordered by PackageID ascending) so pkgs/page.New's offset-based pagination sees a reproducible order across calls, rather than All()'s unspecified map order.

func (*InMemoryBackend) DescribeReservedInstanceOfferings

func (b *InMemoryBackend) DescribeReservedInstanceOfferings(offeringID string) []*ReservedInstanceOffering

DescribeReservedInstanceOfferings returns available reserved instance offerings, optionally filtered to a single offering ID (the "offeringId" query parameter on the real DescribeReservedInstanceOfferings operation).

func (*InMemoryBackend) DescribeReservedInstances

func (b *InMemoryBackend) DescribeReservedInstances(reservationID string) []*ReservedInstance

DescribeReservedInstances returns purchased reserved instances, optionally filtered to a single reservation ID (the "reservationId" query parameter on the real DescribeReservedInstances operation).

func (*InMemoryBackend) DescribeVpcEndpoints

func (b *InMemoryBackend) DescribeVpcEndpoints(ids []string) ([]*VpcEndpoint, []map[string]any)

DescribeVpcEndpoints returns matching VPC endpoints and errors for not-found IDs.

func (*InMemoryBackend) DetachDataSource added in v1.2.0

func (b *InMemoryBackend) DetachDataSource(
	applicationID, dataSourceArn string,
) (*DataSourceAttachment, error)

DetachDataSource removes an existing attachment. Returns ErrAttachmentNotFound if no attachment exists for the (applicationID, dataSourceArn) pair, and ErrAttachmentConflict if the attachment is still PENDING (matching DetachDataSource's documented ConflictException for a pending attachment).

func (*InMemoryBackend) DissociatePackage

func (b *InMemoryBackend) DissociatePackage(
	packageID, domainName string,
) (*DomainPackageDetails, error)

DissociatePackage removes a package association from a domain.

func (*InMemoryBackend) DissociatePackages

func (b *InMemoryBackend) DissociatePackages(
	domainName string,
	packageIDs []string,
) ([]DomainPackageDetails, error)

DissociatePackages removes multiple package associations from a domain.

func (*InMemoryBackend) DomainDocumentCount

func (b *InMemoryBackend) DomainDocumentCount(domainName string) int

DomainDocumentCount returns the total number of documents stored across all indexes of a domain.

func (*InMemoryBackend) GetApplication

func (b *InMemoryBackend) GetApplication(id string) (*Application, error)

GetApplication returns an application by ID.

func (*InMemoryBackend) GetAutoTune

func (b *InMemoryBackend) GetAutoTune(domainName string) ([]*AutoTune, error)

GetAutoTune returns the AutoTune entries DescribeDomainAutoTunes reports: one per configured MaintenanceSchedule, honoring only what the domain's stored AutoTuneOptions actually imply -- no entries at all when Auto-Tune is disabled or no schedule was ever configured, rather than a fabricated canned optimization (see autoTunePlaceholder* above for what a real schedule does still borrow, disclosed).

func (*InMemoryBackend) GetCapability added in v1.2.0

func (b *InMemoryBackend) GetCapability(applicationID, capabilityName string) (*Capability, error)

GetCapability returns a registered capability's current status.

func (*InMemoryBackend) GetChangeProgress

func (b *InMemoryBackend) GetChangeProgress(domainName string) (map[string]any, error)

GetChangeProgress returns the last change progress for a domain.

func (*InMemoryBackend) GetCompatibleVersions

func (b *InMemoryBackend) GetCompatibleVersions(domainName string) []map[string]any

GetCompatibleVersions returns the real AWS-documented compatible version pairs (see versions.go's file-level citation). If domainName is non-empty, the result is a single entry for that domain's current EngineVersion.

func (*InMemoryBackend) GetDataSource

func (b *InMemoryBackend) GetDataSource(domainName, name string) (*DataSource, error)

GetDataSource returns a data source by domain and name.

func (*InMemoryBackend) GetDefaultApplicationSetting added in v1.2.0

func (b *InMemoryBackend) GetDefaultApplicationSetting() string

GetDefaultApplicationSetting returns the account's default OpenSearch application ARN, or "" if none is set (types.GetDefaultApplicationSettingOutput).

func (*InMemoryBackend) GetDirectQueryDataSource

func (b *InMemoryBackend) GetDirectQueryDataSource(name string) (*DirectQueryDataSource, error)

GetDirectQueryDataSource returns a direct-query data source by name.

func (*InMemoryBackend) GetDocument

func (b *InMemoryBackend) GetDocument(
	domainName, indexName, docID string,
) (map[string]any, DocumentMeta, error)

GetDocument returns a stored document by ID along with its current real _version/_seq_no (see DomainIndex.DocMeta). A read does not itself advance either counter.

func (*InMemoryBackend) GetDomainHealth

func (b *InMemoryBackend) GetDomainHealth(domainName string) (map[string]any, error)

GetDomainHealth returns computed health metrics for a domain.

TotalShards/TotalUnAssignedShards/DataNodeCount/WarmNodeCount/ ActiveAvailabilityZoneCount are all NumberOfShards/NumberOfNodes/NumberOfAZs shapes, which deserialize as JSON strings -- confirmed against aws-sdk-go-v2/service/opensearch@v1.75.4's deserializers.go (awsRestjson1_deserializeOpDocumentDescribeDomainHealthOutput). Emitting them as raw numbers failed DescribeDomainHealth's decode outright. "ActiveShards", "UnAssignedShards" (without "Total") and "DocumentCount" are not members of that shape at all -- dropped rather than renamed blind, since real AWS's DescribeDomainHealth genuinely has no per-domain document count.

func (*InMemoryBackend) GetDomainMaintenanceStatus

func (b *InMemoryBackend) GetDomainMaintenanceStatus(
	domainName, maintenanceID string,
) (*DomainMaintenance, error)

GetDomainMaintenanceStatus returns a specific maintenance record.

func (*InMemoryBackend) GetDomainNodes

func (b *InMemoryBackend) GetDomainNodes(domainName string) ([]map[string]any, error)

GetDomainNodes returns a list of node descriptors based on cluster config.

func (*InMemoryBackend) GetDryRunProgress

func (b *InMemoryBackend) GetDryRunProgress(domainName string) (*DryRunStatus, error)

GetDryRunProgress returns dry-run progress for a domain. Creates a default entry if none exists.

func (*InMemoryBackend) GetIndex

func (b *InMemoryBackend) GetIndex(domainName, indexName string) (*DomainIndex, error)

GetIndex returns an index by domain and name.

func (*InMemoryBackend) GetMigration added in v1.2.0

func (b *InMemoryBackend) GetMigration(migrationID string) (*Migration, error)

GetMigration returns a migration job's current status and progress.

func (*InMemoryBackend) GetPackageVersionHistory

func (b *InMemoryBackend) GetPackageVersionHistory(
	packageID string,
) ([]*PackageVersionHistory, error)

GetPackageVersionHistory returns the version history for a package.

func (*InMemoryBackend) GetServerlessAccessPolicy

func (b *InMemoryBackend) GetServerlessAccessPolicy(policyType, name string) (*ServerlessAccessPolicy, error)

GetServerlessAccessPolicy retrieves an access policy by type and name.

func (*InMemoryBackend) GetServerlessEncryptionPolicy

func (b *InMemoryBackend) GetServerlessEncryptionPolicy(policyType, name string) (*ServerlessEncryptionPolicy, error)

GetServerlessEncryptionPolicy retrieves an encryption policy by type and name.

func (*InMemoryBackend) GetServerlessSecurityConfig

func (b *InMemoryBackend) GetServerlessSecurityConfig(id string) (*ServerlessSecurityConfig, error)

GetServerlessSecurityConfig retrieves a security config by ID.

func (*InMemoryBackend) GetUpgradeHistory

func (b *InMemoryBackend) GetUpgradeHistory(domainName string) ([]*UpgradeHistory, error)

GetUpgradeHistory returns the upgrade history for a domain, newest first.

func (*InMemoryBackend) GetUpgradeStatus

func (b *InMemoryBackend) GetUpgradeStatus(domainName string) (string, string, string, error)

GetUpgradeStatus returns the most recent upgrade status for a domain.

func (*InMemoryBackend) IndexDocument

func (b *InMemoryBackend) IndexDocument(
	domainName, indexName, docID string,
	doc map[string]any,
) (string, bool, DocumentMeta, error)

IndexDocument stores (or replaces) a document in an index and keeps the index document count accurate. When docID is empty a fresh ID is generated. It returns the effective document ID, whether a new document was created, and the document's real per-write _version/_seq_no (see DomainIndex.DocMeta).

func (*InMemoryBackend) ListApplications

func (b *InMemoryBackend) ListApplications(
	statuses []string, nextToken string, maxResults int,
) page.Page[*Application]

ListApplications returns applications matching statuses, paginated per nextToken/maxResults. Every application returned by GetApplication/ ListApplications is implicitly ACTIVE -- DeleteApplication removes its record immediately with no DELETING window (see DeleteApplication above), so CREATING/UPDATING/DELETING/FAILED/DELETED (api_op_ListApplications.go: types.ApplicationStatus) never occur here; a statuses filter that excludes ACTIVE therefore correctly yields an empty page rather than fabricating a status this backend cannot produce.

func (*InMemoryBackend) ListDataSourceAttachments added in v1.2.0

func (b *InMemoryBackend) ListDataSourceAttachments(
	applicationID, nextToken string, maxResults int,
) (page.Page[*DataSourceAttachment], error)

ListDataSourceAttachments returns every attachment (of any status) for the given application, paginated. b.dataSourceAttachmentsByApp is a pkgs/store.Index, whose Get() is insertion-ordered and stable across calls, so no additional sort is needed before paginating it.

func (*InMemoryBackend) ListDataSources

func (b *InMemoryBackend) ListDataSources(domainName string) ([]*DataSource, error)

ListDataSources returns all data sources for a domain.

func (*InMemoryBackend) ListDirectQueryDataSources

func (b *InMemoryBackend) ListDirectQueryDataSources() []*DirectQueryDataSource

ListDirectQueryDataSources returns all direct-query data sources.

func (*InMemoryBackend) ListDomainEntriesFiltered

func (b *InMemoryBackend) ListDomainEntriesFiltered(engineType string) []DomainEntry

ListDomainEntriesFiltered returns name+engine version for all domains matching engineType, under a single read lock. Pass an empty string to return all domains.

func (*InMemoryBackend) ListDomainMaintenances

func (b *InMemoryBackend) ListDomainMaintenances(
	domainName, action, status, nextToken string, maxResults int,
) (page.Page[*DomainMaintenance], error)

ListDomainMaintenances returns maintenance records for a domain, filtered by action/status and paginated per nextToken/maxResults (api_op_ListDomainMaintenances.go: Action/Status/MaxResults/NextToken are all query-bound, per serializers.go's HttpBindings function for this op). action/status empty means "no filter" -- both are optional on the wire.

func (*InMemoryBackend) ListDomainNames

func (b *InMemoryBackend) ListDomainNames() []string

ListDomainNames returns the names of all live domains in sorted order.

func (*InMemoryBackend) ListDomainNamesByEngine

func (b *InMemoryBackend) ListDomainNamesByEngine(engineType string) []string

ListDomainNamesByEngine returns domain names filtered by engine type.

func (*InMemoryBackend) ListDomainsForPackage

func (b *InMemoryBackend) ListDomainsForPackage(packageID string) []string

ListDomainsForPackage returns domain names associated with a package.

func (*InMemoryBackend) ListInstanceTypeDetails

func (b *InMemoryBackend) ListInstanceTypeDetails(_, _ string) []map[string]any

ListInstanceTypeDetails returns a static list of common OpenSearch instance type details.

func (*InMemoryBackend) ListMigrations added in v1.2.0

func (b *InMemoryBackend) ListMigrations(
	applicationID, statusFilter, nextToken string, maxResults int,
) (page.Page[*Migration], error)

ListMigrations returns every migration job for the given application, optionally filtered by status.

func (*InMemoryBackend) ListPackagesForDomain

func (b *InMemoryBackend) ListPackagesForDomain(domainName string) []*Package

ListPackagesForDomain returns packages associated with a domain.

func (*InMemoryBackend) ListScheduledActions

func (b *InMemoryBackend) ListScheduledActions(domainName string) []*ScheduledAction

ListScheduledActions returns scheduled actions for a domain.

func (*InMemoryBackend) ListServerlessAccessPolicies

func (b *InMemoryBackend) ListServerlessAccessPolicies(policyType string) []*ServerlessAccessPolicy

ListServerlessAccessPolicies lists access policies filtered by type.

func (*InMemoryBackend) ListServerlessEncryptionPolicies

func (b *InMemoryBackend) ListServerlessEncryptionPolicies(policyType string) []*ServerlessEncryptionPolicy

ListServerlessEncryptionPolicies lists encryption policies filtered by type.

func (*InMemoryBackend) ListServerlessNetworkPolicies

func (b *InMemoryBackend) ListServerlessNetworkPolicies(policyType string) []*ServerlessNetworkPolicy

ListServerlessNetworkPolicies lists network policies filtered by type.

func (*InMemoryBackend) ListServerlessResourceTags

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

ListServerlessResourceTags returns the tags on the collection identified by resourceArn. Only collections are taggable here: the real ListTagsForResource/TagResource/UntagResource also cover collection groups, VPC endpoints and lifecycle policies, none of which this package models (see sdk_completeness_test.go's notImplemented list).

func (*InMemoryBackend) ListServerlessSecurityConfigs

func (b *InMemoryBackend) ListServerlessSecurityConfigs(configType string) []*ServerlessSecurityConfig

ListServerlessSecurityConfigs lists security configs filtered by type.

func (*InMemoryBackend) ListTags

func (b *InMemoryBackend) ListTags(resourceARN string) (map[string]string, error)

ListTags returns tags for the domain or application identified by ARN.

func (*InMemoryBackend) ListVpcEndpointAccess

func (b *InMemoryBackend) ListVpcEndpointAccess(domainName string) ([]AuthorizedPrincipal, error)

ListVpcEndpointAccess returns authorized principals for a domain.

func (*InMemoryBackend) ListVpcEndpoints

func (b *InMemoryBackend) ListVpcEndpoints() []*VpcEndpoint

ListVpcEndpoints returns all VPC endpoints, excluding any whose deleting window has elapsed.

func (*InMemoryBackend) ListVpcEndpointsForDomain

func (b *InMemoryBackend) ListVpcEndpointsForDomain(domainArn string) []*VpcEndpoint

ListVpcEndpointsForDomain returns VPC endpoints associated with a domain ARN, excluding any whose deleting window has elapsed.

func (*InMemoryBackend) PreviewDomainConfig

func (b *InMemoryBackend) PreviewDomainConfig(
	name string,
	input UpdateDomainConfigInput,
) (*Domain, error)

PreviewDomainConfig computes the domain configuration that UpdateDomainConfig would produce for input, without mutating stored state or advancing the processing/change-ID bookkeeping. This backs UpdateDomainConfig's DryRun=true mode (aws-sdk-go-v2 UpdateDomainConfigInput.DryRun): AWS validates and previews the change but never applies it.

func (*InMemoryBackend) PurchaseReservedInstanceOffering

func (b *InMemoryBackend) PurchaseReservedInstanceOffering(
	offeringID, name string,
	count int,
) (*ReservedInstance, error)

PurchaseReservedInstanceOffering purchases a reserved instance offering.

func (*InMemoryBackend) PutDefaultApplicationSetting added in v1.2.0

func (b *InMemoryBackend) PutDefaultApplicationSetting(
	applicationArn string,
	setAsDefault bool,
) (string, error)

PutDefaultApplicationSetting sets or clears the account's default OpenSearch application ARN (types.PutDefaultApplicationSettingInput: ApplicationArn is the ARN to set, SetAsDefault true sets it as default, false clears it) and returns the resulting default ARN.

func (*InMemoryBackend) Region

func (b *InMemoryBackend) Region() string

Region returns the AWS region this backend is configured for.

func (*InMemoryBackend) RegisterCapability added in v1.2.0

func (b *InMemoryBackend) RegisterCapability(
	applicationID, capabilityName string,
) (*Capability, error)

RegisterCapability registers (or re-registers) a capability on an OpenSearch UI application. The only capability configuration the SDK currently defines (types.AIConfig) has no fields of its own, so there is nothing beyond the name/status to validate or store -- see the CapabilityConfig doc comment on the Capability type.

func (*InMemoryBackend) RejectInboundConnection

func (b *InMemoryBackend) RejectInboundConnection(connectionID string) (*InboundConnection, error)

RejectInboundConnection sets an inbound connection status to REJECTED, propagating the same status to its mirrored outbound counterpart when one exists.

func (*InMemoryBackend) RemoveTags

func (b *InMemoryBackend) RemoveTags(resourceARN string, keys []string) error

RemoveTags removes tag keys from the domain or application identified by ARN.

func (*InMemoryBackend) Reset

func (b *InMemoryBackend) Reset()

Reset clears all backend state, releasing any resources held.

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

func (b *InMemoryBackend) RevokeVpcEndpointAccess(domainName, account string) error

RevokeVpcEndpointAccess removes a principal from the VPC authorizations for a domain.

func (*InMemoryBackend) RollbackServiceSoftwareUpdate added in v1.2.0

func (b *InMemoryBackend) RollbackServiceSoftwareUpdate(
	domainName string,
) (*RollbackServiceSoftwareOptions, error)

RollbackServiceSoftwareUpdate rolls back a domain's service software update, operating on the same ServiceSoftware state StartServiceSoftwareUpdate/ CancelServiceSoftwareUpdate track (see those above) rather than a separate invented history. A rollback is only meaningfully available while a software update is actually pending install (UpdateStatus == PENDING_UPDATE) -- the same state CancelServiceSoftwareUpdate acts on -- so rolling back cancels that pending install (identical state transition to Cancel) and reports RollbackAvailable accordingly. When nothing is pending, RollbackAvailable is honestly reported false rather than erroring, matching the response shape's purpose (types.RollbackServiceSoftwareOptions exists specifically to communicate "no rollback available" without an exception).

func (*InMemoryBackend) SearchIndex

func (b *InMemoryBackend) SearchIndex(
	domainName, indexName string,
	query map[string]any,
	size int,
) (*SearchResult, error)

SearchIndex runs a bounded search over the stored documents of an index.

Supported queries: an empty query or {"match_all": {}} returns every document; {"term": {field: value}} returns documents whose field equals value exactly; {"match": {field: text}} returns documents whose field contains text (case-insensitive substring). Hits are ordered by document ID for determinism. size defaults to 10 and is capped at maxSearchSize.

func (*InMemoryBackend) SetAutoTune

func (b *InMemoryBackend) SetAutoTune(
	domainName, desiredState string,
	schedules []AutoTuneMaintenanceSchedule,
) error

SetAutoTune stores auto-tune configuration for a domain. Test-seeding helper (export_test.go/persistence_test.go callers) that shares the same storage and update semantics CreateDomain/UpdateDomainConfig now use for real client requests (applyAutoTuneUpdateLocked).

func (*InMemoryBackend) SetClock

func (b *InMemoryBackend) SetClock(fn func() time.Time)

SetClock installs a deterministic clock, primarily for tests. Passing nil restores the default time.Now clock.

func (*InMemoryBackend) SetDNSRegistrar

func (b *InMemoryBackend) SetDNSRegistrar(dns DNSRegistrar)

SetDNSRegistrar wires a DNS server so OpenSearch domain hostnames are auto-registered.

func (*InMemoryBackend) SetProcessingDelay

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

SetProcessingDelay configures how long create/update/upgrade/delete lifecycle windows remain observable before settling to their terminal state. A delay of 0 (the default) keeps the historical fast behaviour: transitions still run through the real code path but settle immediately.

func (*InMemoryBackend) Snapshot

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

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

func (*InMemoryBackend) StartDomainMaintenance

func (b *InMemoryBackend) StartDomainMaintenance(
	domainName, action, nodeID string,
) (*DomainMaintenance, error)

StartDomainMaintenance starts a maintenance action on a domain.

func (*InMemoryBackend) StartMigration added in v1.2.0

func (b *InMemoryBackend) StartMigration(
	applicationID, sourceArn string,
	workspace *MigrationWorkspaceInput,
	exportOptions *ExportOptionsInput,
	conflictResolution string,
) (*Migration, error)

StartMigration starts a saved-object migration job from a real, backend-tracked data source (see resolveDataSourceRefLocked, shared with the data source attachment family) into an application workspace. workspace is MigrationOptions.Workspace (required by the SDK -- see resolveMigrationWorkspaceLocked); exportOptions/conflictResolution are MigrationOptions' optional ExportOptions/ConflictResolution fields, validated but not persisted (see ExportOptionsInput's doc comment).

func (*InMemoryBackend) StartServiceSoftwareUpdate

func (b *InMemoryBackend) StartServiceSoftwareUpdate(
	domainName, scheduleAt string,
) (*ServiceSoftwareOptions, error)

StartServiceSoftwareUpdate marks a domain as having a pending software update. StartServiceSoftwareUpdate schedules a service software update for the domain. scheduleAt must be one of "NOW", "TIMESTAMP", "OFF_PEAK_WINDOW", or "".

func (*InMemoryBackend) TagServerlessResource

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

TagServerlessResource adds or overwrites tags on the collection identified by resourceArn.

func (*InMemoryBackend) UntagServerlessResource

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

UntagServerlessResource removes the given tag keys from the collection identified by resourceArn.

func (*InMemoryBackend) UpdateApplication

func (b *InMemoryBackend) UpdateApplication(
	id string,
	appConfigs []AppConfig,
	dataSources []AppDataSource,
) (*Application, error)

UpdateApplication updates an application's configs and data sources.

func (*InMemoryBackend) UpdateDataSource

func (b *InMemoryBackend) UpdateDataSource(
	domainName, name, description string,
	dataSourceType json.RawMessage,
	status string,
) error

UpdateDataSource updates a data source's description, type, and/or status. Real AWS requires DataSourceType on every update call; Description and Status are optional and left unchanged when omitted.

func (*InMemoryBackend) UpdateDirectQueryDataSource

func (b *InMemoryBackend) UpdateDirectQueryDataSource(
	name, description string,
	dataSourceType json.RawMessage,
	openSearchArns []string,
) (*DirectQueryDataSource, error)

UpdateDirectQueryDataSource updates a direct-query data source's description, type, and OpenSearch ARNs. Real AWS requires DataSourceType and OpenSearchArns on every update call.

func (*InMemoryBackend) UpdateDocument

func (b *InMemoryBackend) UpdateDocument(
	domainName, indexName, docID string,
	doc map[string]any,
	docAsUpsert bool,
) (bool, DocumentMeta, error)

UpdateDocument applies a partial update to a document: doc is merged field-by-field into the stored source (real OpenSearch's Update Document "doc" semantics), not replaced wholesale like IndexDocument. When the document doesn't exist, docAsUpsert=true creates it from doc (the documented "doc_as_upsert" behavior); otherwise it is ErrConnectionNotFound, matching GetDocument/DeleteDocument's own not-found convention.

func (*InMemoryBackend) UpdateDomainConfig

func (b *InMemoryBackend) UpdateDomainConfig(
	name string,
	input UpdateDomainConfigInput,
) (*Domain, error)

UpdateDomainConfig updates mutable fields on a domain and records a change ID.

func (*InMemoryBackend) UpdateIndex

func (b *InMemoryBackend) UpdateIndex(
	domainName, indexName string,
	mappings, settings map[string]any,
	indexSchema any,
) (*DomainIndex, error)

UpdateIndex updates the mappings and settings of an index. indexSchema is the opaque smithy-document body of the real AWS UpdateIndex request (see DomainIndex.IndexSchema); it is nil for the emulator's separate OpenSearch-data-plane-style index update route.

func (*InMemoryBackend) UpdatePackage

func (b *InMemoryBackend) UpdatePackage(packageID, description string) (*Package, error)

UpdatePackage updates a package's description and adds a version history entry.

func (*InMemoryBackend) UpdatePackageScope

func (b *InMemoryBackend) UpdatePackageScope(packageID, operation string, users []string) (*Package, error)

UpdatePackageScope applies operation (ADD/REMOVE/OVERRIDE, types. PackageScopeOperationEnum in the pinned SDK) to the package's user list and returns the resulting scope.

func (*InMemoryBackend) UpdateScheduledAction

func (b *InMemoryBackend) UpdateScheduledAction(
	domainName, actionID, actionType, scheduleAt string,
	desiredStartTime int64,
) (*ScheduledAction, error)

UpdateScheduledAction reschedules an existing scheduled action (identified by ActionID + ActionType) for a domain. Real AWS Service creates scheduled actions automatically ahead of service-software updates or JVM tuning changes; this operation only reschedules one that already exists -- it cannot create a new one. See AddScheduledActionInternal (export_test.go) for test seeding of the initial action.

func (*InMemoryBackend) UpdateServerlessAccessPolicy

func (b *InMemoryBackend) UpdateServerlessAccessPolicy(
	policyType, name, description, policy, policyVersion string,
) (*ServerlessAccessPolicy, error)

UpdateServerlessAccessPolicy updates an existing access policy.

func (*InMemoryBackend) UpdateServerlessEncryptionPolicy

func (b *InMemoryBackend) UpdateServerlessEncryptionPolicy(
	policyType, name, description, policy, policyVersion string,
) (*ServerlessEncryptionPolicy, error)

UpdateServerlessEncryptionPolicy updates an existing encryption policy.

func (*InMemoryBackend) UpdateServerlessSecurityConfig

func (b *InMemoryBackend) UpdateServerlessSecurityConfig(
	id, description, configVersion string,
	samlOptions *ServerlessSAMLOptions,
) (*ServerlessSecurityConfig, error)

UpdateServerlessSecurityConfig updates an existing security config.

func (*InMemoryBackend) UpdateVpcEndpoint

func (b *InMemoryBackend) UpdateVpcEndpoint(
	id string,
	vpcOptions map[string]any,
) (*VpcEndpoint, error)

UpdateVpcEndpoint updates the VPC options for a VPC endpoint.

func (*InMemoryBackend) UpgradeDomain

func (b *InMemoryBackend) UpgradeDomain(domainName, upgradeName string) error

UpgradeDomain records an upgrade in the domain's history. Called when an upgrade is triggered.

func (*InMemoryBackend) ValidateInsightEntity added in v1.2.0

func (b *InMemoryBackend) ValidateInsightEntity(entityType, entityValue string) error

ValidateInsightEntity checks an InsightEntity/InsightFeedbackEntity's Type/Value against real backend state: a DomainName entity must reference a domain that actually exists, matching how every other domain-scoped operation in this backend errors on an unknown domain. An Account entity is accepted for any non-empty account ID -- this backend has no concept of a second account to validate against.

ListInsights/DescribeInsightDetails/InsightFeedback have no analytics engine behind them (this emulator generates no real insights), so beyond this entity validation they report "nothing found" rather than fabricating data -- see handler_insights.go.

type InboundConnection

type InboundConnection struct {
	StatusUntil      time.Time         `json:"statusUntil,omitzero"`
	ConnectionID     string            `json:"connectionId"`
	ConnectionMode   string            `json:"connectionMode"`
	Status           string            `json:"status"`
	StatusMessage    string            `json:"statusMessage,omitempty"`
	LocalDomainInfo  DomainInformation `json:"localDomainInfo"`
	RemoteDomainInfo DomainInformation `json:"remoteDomainInfo"`
}

InboundConnection represents an OpenSearch inbound cross-cluster connection.

type InstanceTypeLimits

type InstanceTypeLimits struct {
	InstanceType     string            `json:"InstanceType"`
	InstanceLimits   map[string]any    `json:"InstanceLimits"`
	StorageTypes     []StorageType     `json:"StorageTypes,omitempty"`
	AdditionalLimits []AdditionalLimit `json:"AdditionalLimits,omitempty"`
}

InstanceTypeLimits holds limits for a given OpenSearch instance type.

type LogPublishingOption

type LogPublishingOption struct {
	CloudWatchLogsLogGroupARN string `json:"cloudWatchLogsLogGroupArn,omitempty"`
	Enabled                   bool   `json:"enabled"`
}

LogPublishingOption holds a single log type publishing configuration.

type Migration added in v1.2.0

type Migration struct {
	CreatedAt     time.Time `json:"createdAt,omitzero"`
	UpdatedAt     time.Time `json:"updatedAt,omitzero"`
	MigrationID   string    `json:"migrationId"`
	ApplicationID string    `json:"applicationId"`
	SourceArn     string    `json:"sourceArn"`
	Status        string    `json:"status"`
	ExportedCount int       `json:"exportedCount"`
	ImportedCount int       `json:"importedCount"`
}

Migration represents a saved-object migration job from a data source into an OpenSearch application workspace. Matches types.MigrationSummary. ExportedCount/ImportedCount are always 0: this emulator has no saved-object store (dashboards/visualizations/index-patterns) to actually migrate, so reporting non-zero counts would be fabricated. Status still genuinely transitions PENDING -> IN_PROGRESS -> SUCCEEDED against the backend's clock (see resolveMigrationStatus in migrations.go), it just always migrates zero objects -- an honest "nothing to migrate" result rather than invented data. CreatedAt/UpdatedAt carry real tags, unlike this file's other internal timing fields: real types.MigrationSummary (opensearch@v1.75.4 types/types.go:2299,2320) has both members, and migrationJSON (handler_migrations.go) -- the actual wire converter for every op that returns this type -- reads them by direct field access, independent of Migration's own tags. So json:"-" here was never wire-motivated; it only suppressed both fields from persistence (registered directly, store_setup.go), which is what made resolveMigrationStatus's elapsed calculation see a zero CreatedAt after every restore (gopherstack-ike6y).

type MigrationWorkspaceInput added in v1.2.0

type MigrationWorkspaceInput struct {
	WorkspaceID     string
	Name            string
	Type            string
	CreateWorkspace bool
}

MigrationWorkspaceInput mirrors types.MigrationWorkspace (StartMigration's required MigrationOptions.Workspace).

type NodeToNodeEncryptionOptions

type NodeToNodeEncryptionOptions struct {
	Enabled bool `json:"enabled"`
}

NodeToNodeEncryptionOptions holds node-to-node encryption settings.

type OffPeakWindow

type OffPeakWindow struct {
	WindowStartTime *WindowStartTime `json:"windowStartTime,omitempty"`
}

OffPeakWindow defines a custom start time for off-peak maintenance.

type OffPeakWindowOptions

type OffPeakWindowOptions struct {
	OffPeakWindow *OffPeakWindow `json:"offPeakWindow,omitempty"`
	Enabled       bool           `json:"enabled"`
}

OffPeakWindowOptions holds off-peak window settings for a domain.

type OutboundConnection

type OutboundConnection struct {
	StatusUntil      time.Time         `json:"statusUntil,omitzero"`
	ConnectionID     string            `json:"connectionId"`
	ConnectionAlias  string            `json:"connectionAlias"`
	ConnectionMode   string            `json:"connectionMode"`
	Status           string            `json:"status"`
	StatusMessage    string            `json:"statusMessage,omitempty"`
	SkipUnavailable  string            `json:"skipUnavailable,omitempty"`
	Endpoint         string            `json:"endpoint,omitempty"`
	LocalDomainInfo  DomainInformation `json:"localDomainInfo"`
	RemoteDomainInfo DomainInformation `json:"remoteDomainInfo"`
}

OutboundConnection represents a cross-cluster outbound connection.

type Package

type Package struct {
	PackageSource            *PackageSource            `json:"PackageSource,omitempty"`
	PackageEncryptionOptions *PackageEncryptionOptions `json:"PackageEncryptionOptions,omitempty"`
	PackageID                string                    `json:"PackageID"`
	PackageName              string                    `json:"PackageName"`
	PackageType              string                    `json:"PackageType"`
	PackageDescription       string                    `json:"PackageDescription"`
	PackageStatus            string                    `json:"PackageStatus"`
	AvailablePackageVersion  string                    `json:"AvailablePackageVersion,omitempty"`
	// VersionHistory carries json:"-": real types.PackageDetails
	// (opensearch@v1.75.4 types/types.go:2631-2681) has no such member --
	// version history is only ever returned by the separate
	// GetPackageVersionHistory operation, as a top-level list (see
	// handler_packages.go) -- and Package is marshaled directly onto the wire
	// by DescribePackages/UpdatePackage (handler_packages.go), so the tag is
	// correct for the wire. See persistence.go's packageSnapshot for why it
	// must still be given a real tag for persistence (gopherstack-ike6y).
	VersionHistory []*PackageVersionHistory `json:"-"`
	// PackageUserList holds the package's scope (users who can view/associate
	// it), maintained by UpdatePackageScope. Not part of the Package/
	// PackageDetails wire shape itself -- only UpdatePackageScopeOutput
	// carries it (api_op_UpdatePackageScope.go:50-65 in the pinned SDK).
	PackageUserList []string `json:"-"`
	CreatedAt       float64  `json:"CreatedAt"`
}

Package represents an OpenSearch package.

type PackageEncryptionOptions

type PackageEncryptionOptions struct {
	KmsKeyIdentifier  string `json:"KmsKeyIdentifier,omitempty"`
	EncryptionEnabled bool   `json:"EncryptionEnabled"`
}

PackageEncryptionOptions holds encryption settings for a package.

type PackageSource

type PackageSource struct {
	S3BucketName string `json:"S3BucketName,omitempty"`
	S3Key        string `json:"S3Key,omitempty"`
}

PackageSource holds the S3 source location for a custom package.

type PackageVersionHistory

type PackageVersionHistory struct {
	PackageVersion string  `json:"PackageVersion"`
	CommitMessage  string  `json:"CommitMessage"`
	CreatedAt      float64 `json:"CreatedAt"`
}

PackageVersionHistory records a version of a package.

type Provider

type Provider struct{}

Provider implements service.Provider for the OpenSearch service.

func (*Provider) Init

Init initializes the OpenSearch service backend and handler.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the service provider name.

type ReservedInstance

type ReservedInstance struct {
	ReservedInstanceID         string  `json:"ReservedInstanceId"`
	ReservedInstanceOfferingID string  `json:"ReservedInstanceOfferingId"`
	InstanceType               string  `json:"InstanceType"`
	ReservationName            string  `json:"ReservationName"`
	CurrencyCode               string  `json:"CurrencyCode"`
	PaymentOption              string  `json:"PaymentOption"`
	State                      string  `json:"State"`
	Duration                   int     `json:"Duration"`
	FixedPrice                 float64 `json:"FixedPrice"`
	UsagePrice                 float64 `json:"UsagePrice"`
	InstanceCount              int     `json:"InstanceCount"`
	StartTime                  float64 `json:"StartTime"`
}

ReservedInstance is a purchased reserved instance.

type ReservedInstanceOffering

type ReservedInstanceOffering struct {
	ReservedInstanceOfferingID string  `json:"ReservedInstanceOfferingId"`
	InstanceType               string  `json:"InstanceType"`
	CurrencyCode               string  `json:"CurrencyCode"`
	PaymentOption              string  `json:"PaymentOption"`
	Duration                   int     `json:"Duration"`
	FixedPrice                 float64 `json:"FixedPrice"`
	UsagePrice                 float64 `json:"UsagePrice"`
}

ReservedInstanceOffering is an available reserved instance offering.

type RollbackServiceSoftwareOptions added in v1.2.0

type RollbackServiceSoftwareOptions struct {
	CurrentVersion    string `json:"currentVersion"`
	NewVersion        string `json:"newVersion"`
	Description       string `json:"description"`
	RollbackAvailable bool   `json:"rollbackAvailable"`
}

RollbackServiceSoftwareOptions represents the result of a RollbackServiceSoftwareUpdate call, matching types.RollbackServiceSoftwareOptions (PascalCase wire keys, same convention as ServiceSoftwareOptions/serviceSoftwareOptionsJSON above).

type SAMLOptionsInput

type SAMLOptionsInput struct {
	IDPEntityID           string `json:"idpEntityId,omitempty"`
	IDPMetadataContent    string `json:"idpMetadataContent,omitempty"`
	RolesKey              string `json:"rolesKey,omitempty"`
	SubjectKey            string `json:"subjectKey,omitempty"`
	SessionTimeoutMinutes int    `json:"sessionTimeoutMinutes,omitempty"`
	Enabled               bool   `json:"enabled,omitempty"`
}

SAMLOptionsInput holds SAML configuration for AdvancedSecurityOptions.

type SavedObjectIdentifierInput added in v1.2.0

type SavedObjectIdentifierInput struct {
	ID   string
	Type string
}

SavedObjectIdentifierInput mirrors types.SavedObjectIdentifier (ExportOptions.Objects elements).

type ScheduledAction

type ScheduledAction struct {
	ID            string  `json:"Id"`
	Type          string  `json:"Type"`
	Severity      string  `json:"Severity"`
	Description   string  `json:"Description"`
	ScheduledBy   string  `json:"ScheduledBy"`
	Status        string  `json:"Status"`
	ScheduledTime float64 `json:"ScheduledTime"`
	Mandatory     bool    `json:"Mandatory"`
	Cancellable   bool    `json:"Cancellable"`
}

ScheduledAction represents a scheduled action for a domain.

type ScheduledAutoTuneDetails

type ScheduledAutoTuneDetails struct {
	ActionType string  `json:"ActionType,omitempty"`
	Action     string  `json:"Action,omitempty"`
	Severity   string  `json:"Severity,omitempty"`
	Date       float64 `json:"Date,omitempty"`
}

ScheduledAutoTuneDetails holds action details for a scheduled auto-tune.

type SearchHit

type SearchHit struct {
	Source map[string]any `json:"_source"`
	ID     string         `json:"_id"`
	Index  string         `json:"_index"`
}

SearchHit is a single document returned by a search.

type SearchResult

type SearchResult struct {
	Hits  []SearchHit
	Total int
}

SearchResult is the outcome of a bounded search over an index.

type ServerlessAccessPolicy

type ServerlessAccessPolicy struct {
	Description      string  `json:"description,omitempty"`
	Name             string  `json:"name"`
	Policy           string  `json:"policy"`
	PolicyVersion    string  `json:"policyVersion"`
	Type             string  `json:"type"`
	CreatedDate      float64 `json:"createdDate"`
	LastModifiedDate float64 `json:"lastModifiedDate"`
}

ServerlessAccessPolicy represents an OpenSearch Serverless access policy.

type ServerlessCollection

type ServerlessCollection struct {
	StatusUntil        time.Time         `json:"statusUntil,omitzero"`
	Tags               map[string]string `json:"tags,omitempty"`
	KmsKeyArn          string            `json:"kmsKeyArn,omitempty"`
	DashboardEndpoint  string            `json:"dashboardEndpoint,omitempty"`
	Description        string            `json:"description,omitempty"`
	ID                 string            `json:"id"`
	CollectionEndpoint string            `json:"collectionEndpoint,omitempty"`
	Name               string            `json:"name"`
	Status             string            `json:"status"`
	Type               string            `json:"type"`
	Arn                string            `json:"arn"`
	CreatedDate        float64           `json:"createdDate"`
	LastModifiedDate   float64           `json:"lastModifiedDate"`
}

ServerlessCollection represents an OpenSearch Serverless collection.

type ServerlessEncryptionPolicy

type ServerlessEncryptionPolicy struct {
	Description      string  `json:"description,omitempty"`
	Name             string  `json:"name"`
	Policy           string  `json:"policy"`
	PolicyVersion    string  `json:"policyVersion"`
	Type             string  `json:"type"`
	CreatedDate      float64 `json:"createdDate"`
	LastModifiedDate float64 `json:"lastModifiedDate"`
}

ServerlessEncryptionPolicy represents an OpenSearch Serverless encryption policy.

type ServerlessNetworkPolicy

type ServerlessNetworkPolicy struct {
	Description      string  `json:"description,omitempty"`
	Name             string  `json:"name"`
	Policy           string  `json:"policy"`
	PolicyVersion    string  `json:"policyVersion"`
	Type             string  `json:"type"`
	CreatedDate      float64 `json:"createdDate"`
	LastModifiedDate float64 `json:"lastModifiedDate"`
}

ServerlessNetworkPolicy represents an OpenSearch Serverless network policy.

type ServerlessSAMLOptions

type ServerlessSAMLOptions struct {
	GroupAttribute string `json:"groupAttribute,omitempty"`
	Metadata       string `json:"metadata,omitempty"`
	UserAttribute  string `json:"userAttribute,omitempty"`
	SessionTimeout int    `json:"sessionTimeout,omitempty"`
}

ServerlessSAMLOptions holds SAML options for a serverless security config.

type ServerlessSecurityConfig

type ServerlessSecurityConfig struct {
	SamlOptions      *ServerlessSAMLOptions `json:"samlOptions,omitempty"`
	ConfigVersion    string                 `json:"configVersion"`
	Description      string                 `json:"description,omitempty"`
	ID               string                 `json:"id"`
	Type             string                 `json:"type"`
	CreatedDate      float64                `json:"createdDate"`
	LastModifiedDate float64                `json:"lastModifiedDate"`
}

ServerlessSecurityConfig represents an OpenSearch Serverless security config.

type ServiceSoftwareOptions

type ServiceSoftwareOptions struct {
	CurrentVersion      string `json:"currentVersion"`
	NewVersion          string `json:"newVersion"`
	UpdateStatus        string `json:"updateStatus"`
	Description         string `json:"description"`
	AutomatedUpdateDate string `json:"automatedUpdateDate"`
	UpdateAvailable     bool   `json:"updateAvailable"`
	Cancellable         bool   `json:"cancellable"`
	OptionalDeployment  bool   `json:"optionalDeployment"`
}

ServiceSoftwareOptions represents service software options for a domain.

type SnapshotOptions

type SnapshotOptions struct {
	AutomatedSnapshotStartHour int `json:"automatedSnapshotStartHour"`
}

SnapshotOptions holds automated snapshot settings.

type StorageBackend

type StorageBackend interface {
	// Domain operations
	CreateDomain(input CreateDomainInput) (*Domain, error)
	DeleteDomain(name string) (*Domain, error)
	DescribeDomain(name string) (*Domain, error)
	DescribeDomains(names []string) ([]*Domain, error)
	ListDomainNames() []string
	UpdateDomainConfig(name string, input UpdateDomainConfigInput) (*Domain, error)
	PreviewDomainConfig(name string, input UpdateDomainConfigInput) (*Domain, error)
	GetDomainHealth(domainName string) (map[string]any, error)
	GetDomainNodes(domainName string) ([]map[string]any, error)
	GetChangeProgress(domainName string) (map[string]any, error)
	GetDryRunProgress(domainName string) (*DryRunStatus, error)

	// Tag operations
	ListTags(domainARN string) (map[string]string, error)
	AddTags(domainARN string, kv map[string]string) error
	RemoveTags(domainARN string, keys []string) error

	// Inbound cross-cluster connection operations
	AcceptInboundConnection(connectionID string) (*InboundConnection, error)
	RejectInboundConnection(connectionID string) (*InboundConnection, error)
	DeleteInboundConnection(connectionID string) (*InboundConnection, error)
	DescribeInboundConnections(
		connectionIDs []string, nextToken string, maxResults int,
	) page.Page[*InboundConnection]

	// Outbound cross-cluster connection operations
	CreateOutboundConnection(
		connectionAlias, connectionMode string,
		localDomainInfo, remoteDomainInfo DomainInformation,
		skipUnavailable, endpoint string,
	) (*OutboundConnection, error)
	DescribeOutboundConnections(
		connectionIDs []string, nextToken string, maxResults int,
	) page.Page[*OutboundConnection]
	DeleteOutboundConnection(connectionID string) (*OutboundConnection, error)

	// Data source operations
	AddDataSource(domainName, name, description string, dataSourceType json.RawMessage) (string, error)
	GetDataSource(domainName, name string) (*DataSource, error)
	ListDataSources(domainName string) ([]*DataSource, error)
	UpdateDataSource(domainName, name, description string, dataSourceType json.RawMessage, status string) error
	DeleteDataSource(domainName, name string) error

	// Direct-query data source operations
	AddDirectQueryDataSource(
		name, description string,
		dataSourceType json.RawMessage,
		openSearchArns []string,
	) (string, error)
	ListDirectQueryDataSources() []*DirectQueryDataSource
	GetDirectQueryDataSource(name string) (*DirectQueryDataSource, error)
	UpdateDirectQueryDataSource(
		name, description string,
		dataSourceType json.RawMessage,
		openSearchArns []string,
	) (*DirectQueryDataSource, error)
	DeleteDirectQueryDataSource(name string) error

	// Package operations
	AssociatePackage(packageID, domainName string) (*DomainPackageDetails, error)
	AssociatePackages(domainName string, packageIDs []string) ([]DomainPackageDetails, error)
	DissociatePackage(packageID, domainName string) (*DomainPackageDetails, error)
	DissociatePackages(domainName string, packageIDs []string) ([]DomainPackageDetails, error)
	CreatePackage(
		name, pkgType, description string,
		source *PackageSource,
		encryptionOpts *PackageEncryptionOptions,
	) (*Package, error)
	DeletePackage(packageID string) (*Package, error)
	DescribePackages(
		filters map[string][]string, nextToken string, maxResults int,
	) (page.Page[*Package], error)
	GetPackageVersionHistory(packageID string) ([]*PackageVersionHistory, error)
	UpdatePackage(packageID, description string) (*Package, error)
	UpdatePackageScope(packageID, operation string, domainNames []string) (*Package, error)
	ListPackagesForDomain(domainName string) []*Package
	ListDomainsForPackage(packageID string) []string

	// VPC endpoint operations
	AuthorizeVpcEndpointAccess(domainName, account, service string) (*AuthorizedPrincipal, error)
	CreateVpcEndpoint(domainArn string, vpcOptions map[string]any) (*VpcEndpoint, error)
	DescribeVpcEndpoints(ids []string) ([]*VpcEndpoint, []map[string]any)
	UpdateVpcEndpoint(id string, vpcOptions map[string]any) (*VpcEndpoint, error)
	DeleteVpcEndpoint(id string) (*VpcEndpoint, error)
	ListVpcEndpoints() []*VpcEndpoint
	ListVpcEndpointsForDomain(domainArn string) []*VpcEndpoint
	RevokeVpcEndpointAccess(domainName, account string) error
	ListVpcEndpointAccess(domainName string) ([]AuthorizedPrincipal, error)

	// Config/software operations
	CancelDomainConfigChange(domainName string, dryRun bool) ([]string, bool, error)
	CancelServiceSoftwareUpdate(domainName string) (*ServiceSoftwareOptions, error)
	StartServiceSoftwareUpdate(domainName, scheduleAt string) (*ServiceSoftwareOptions, error)
	RollbackServiceSoftwareUpdate(domainName string) (*RollbackServiceSoftwareOptions, error)

	// Data source attachment operations (OpenSearch application <-> real
	// domain/serverless-collection data source)
	AttachDataSource(
		applicationID, dataSourceArn string,
		workspaceConfig *WorkspaceConfigInput, workspaceID string,
	) (*DataSourceAttachment, error)
	DetachDataSource(applicationID, dataSourceArn string) (*DataSourceAttachment, error)
	DescribeDataSourceAttachment(applicationID, dataSourceArn string) (*DataSourceAttachment, error)
	ListDataSourceAttachments(
		applicationID, nextToken string, maxResults int,
	) (page.Page[*DataSourceAttachment], error)

	// Capability operations
	RegisterCapability(applicationID, capabilityName string) (*Capability, error)
	DeregisterCapability(applicationID, capabilityName string) error
	GetCapability(applicationID, capabilityName string) (*Capability, error)

	// Insight operations (no analytics engine backs this emulator -- see
	// insights.go)
	ValidateInsightEntity(entityType, entityValue string) error

	// Migration operations
	StartMigration(
		applicationID, sourceArn string,
		workspace *MigrationWorkspaceInput, exportOptions *ExportOptionsInput, conflictResolution string,
	) (*Migration, error)
	GetMigration(migrationID string) (*Migration, error)
	ListMigrations(
		applicationID, statusFilter, nextToken string, maxResults int,
	) (page.Page[*Migration], error)

	// Application operations
	CreateApplication(
		name string, appConfigs []AppConfig, dataSources []AppDataSource, tagMap map[string]string,
	) (*Application, error)
	GetApplication(id string) (*Application, error)
	ListApplications(statuses []string, nextToken string, maxResults int) page.Page[*Application]
	UpdateApplication(id string, appConfigs []AppConfig, dataSources []AppDataSource) (*Application, error)
	DeleteApplication(id string) error
	GetDefaultApplicationSetting() string
	PutDefaultApplicationSetting(applicationArn string, setAsDefault bool) (string, error)

	// Scheduled actions
	ListScheduledActions(domainName string) []*ScheduledAction
	UpdateScheduledAction(
		domainName, actionID, actionType, scheduleAt string,
		desiredStartTime int64,
	) (*ScheduledAction, error)

	// Reserved instances
	DescribeReservedInstanceOfferings(offeringID string) []*ReservedInstanceOffering
	DescribeReservedInstances(reservationID string) []*ReservedInstance
	PurchaseReservedInstanceOffering(offeringID, name string, count int) (*ReservedInstance, error)

	// Domain maintenance
	StartDomainMaintenance(domainName, action, nodeID string) (*DomainMaintenance, error)
	GetDomainMaintenanceStatus(domainName, maintenanceID string) (*DomainMaintenance, error)
	ListDomainMaintenances(
		domainName, action, status, nextToken string, maxResults int,
	) (page.Page[*DomainMaintenance], error)

	// Index operations
	CreateIndex(
		domainName, indexName string, mappings, settings, aliases map[string]any, indexSchema any,
	) (*DomainIndex, error)
	DeleteIndex(domainName, indexName string) (*DomainIndex, error)
	GetIndex(domainName, indexName string) (*DomainIndex, error)
	UpdateIndex(domainName, indexName string, mappings, settings map[string]any, indexSchema any) (*DomainIndex, error)

	// Document operations (real per-index document storage + bounded search)
	IndexDocument(domainName, indexName, docID string, doc map[string]any) (string, bool, DocumentMeta, error)
	CreateDocument(domainName, indexName, docID string, doc map[string]any) (string, DocumentMeta, error)
	UpdateDocument(
		domainName, indexName, docID string, doc map[string]any, docAsUpsert bool,
	) (bool, DocumentMeta, error)
	GetDocument(domainName, indexName, docID string) (map[string]any, DocumentMeta, error)
	DeleteDocument(domainName, indexName, docID string) (DocumentMeta, error)
	BulkDeleteDocument(domainName, indexName, docID string) (bool, DocumentMeta, error)
	CountDocuments(domainName, indexName string) (int, error)
	DomainDocumentCount(domainName string) int
	SearchIndex(domainName, indexName string, query map[string]any, size int) (*SearchResult, error)

	// Upgrade operations
	UpgradeDomain(domainName, upgradeName string) error
	GetUpgradeHistory(domainName string) ([]*UpgradeHistory, error)
	GetUpgradeStatus(domainName string) (upgradeName, upgradeStatus, upgradeStep string, err error)

	// Auto-tune operations
	SetAutoTune(domainName, desiredState string, schedules []AutoTuneMaintenanceSchedule) error
	GetAutoTune(domainName string) ([]*AutoTune, error)

	// Instance type limits
	DescribeInstanceTypeLimits(instanceType, engineVersion string) (*InstanceTypeLimits, error)

	// Instance type details and compatible versions
	ListInstanceTypeDetails(engineVersion, instanceType string) []map[string]any
	GetCompatibleVersions(domainName string) []map[string]any

	// Engine-type filtered list
	ListDomainNamesByEngine(engineType string) []string

	// ListDomainEntriesFiltered returns name+engine version under a single lock.
	ListDomainEntriesFiltered(engineType string) []DomainEntry

	// Serverless collection operations
	CreateServerlessCollection(
		name, collectionType, description, kmsKeyArn string,
		tags map[string]string,
	) (*ServerlessCollection, error)
	BatchGetServerlessCollections(ids, names []string) []*ServerlessCollection
	DeleteServerlessCollection(id string) (*ServerlessCollection, error)

	// Serverless resource tagging (collections only; see serverless.go's
	// findServerlessCollectionByARNLocked)
	ListServerlessResourceTags(resourceArn string) (map[string]string, error)
	TagServerlessResource(resourceArn string, tagMap map[string]string) error
	UntagServerlessResource(resourceArn string, tagKeys []string) error

	// Serverless access policy operations
	CreateServerlessAccessPolicy(policyType, name, description, policy string) (*ServerlessAccessPolicy, error)
	GetServerlessAccessPolicy(policyType, name string) (*ServerlessAccessPolicy, error)
	ListServerlessAccessPolicies(policyType string) []*ServerlessAccessPolicy
	UpdateServerlessAccessPolicy(
		policyType, name, description, policy, policyVersion string,
	) (*ServerlessAccessPolicy, error)
	DeleteServerlessAccessPolicy(policyType, name string) error

	// Serverless security config operations
	CreateServerlessSecurityConfig(
		configType, description string,
		samlOptions *ServerlessSAMLOptions,
	) (*ServerlessSecurityConfig, error)
	GetServerlessSecurityConfig(id string) (*ServerlessSecurityConfig, error)
	ListServerlessSecurityConfigs(configType string) []*ServerlessSecurityConfig
	UpdateServerlessSecurityConfig(
		id, description, configVersion string,
		samlOptions *ServerlessSAMLOptions,
	) (*ServerlessSecurityConfig, error)
	DeleteServerlessSecurityConfig(id string) error

	// Serverless encryption policy operations
	CreateServerlessEncryptionPolicy(policyType, name, description, policy string) (*ServerlessEncryptionPolicy, error)
	GetServerlessEncryptionPolicy(policyType, name string) (*ServerlessEncryptionPolicy, error)
	ListServerlessEncryptionPolicies(policyType string) []*ServerlessEncryptionPolicy
	UpdateServerlessEncryptionPolicy(
		policyType, name, description, policy, policyVersion string,
	) (*ServerlessEncryptionPolicy, error)
	DeleteServerlessEncryptionPolicy(policyType, name string) error

	// Serverless network policy operations
	CreateServerlessNetworkPolicy(policyType, name, description, policy string) (*ServerlessNetworkPolicy, error)
	ListServerlessNetworkPolicies(policyType string) []*ServerlessNetworkPolicy
	DeleteServerlessNetworkPolicy(policyType, name string) error

	// Lifecycle
	Reset()
	Region() string
	AccountID() string
	Snapshot(ctx context.Context) []byte
	Restore(ctx context.Context, data []byte) error
}

StorageBackend defines the interface for OpenSearch backend implementations. All mutating methods must be safe for concurrent use.

type StorageType

type StorageType struct {
	StorageTypeName    string             `json:"StorageTypeName"`
	StorageSubTypeName string             `json:"StorageSubTypeName"`
	StorageTypeLimits  []StorageTypeLimit `json:"StorageTypeLimits"`
}

StorageType describes a storage configuration available for an instance type.

type StorageTypeLimit

type StorageTypeLimit struct {
	LimitName   string   `json:"LimitName"`
	LimitValues []string `json:"LimitValues"`
}

StorageTypeLimit holds a named limit value.

type UpdateDomainConfigInput

type UpdateDomainConfigInput struct {
	AutoTuneOptions             *AutoTuneUpdateInput
	EBSOptions                  *EBSOptions
	SnapshotOptions             *SnapshotOptions
	EncryptionAtRestOptions     *EncryptionAtRestOptions
	NodeToNodeEncryptionOptions *NodeToNodeEncryptionOptions
	DomainEndpointOptions       *DomainEndpointOptions
	AdvancedSecurityOptions     *AdvancedSecurityOptions
	VPCOptions                  *VPCOptions
	CognitoOptions              *CognitoOptions
	OffPeakWindowOptions        *OffPeakWindowOptions
	IdentityCenterOptions       *IdentityCenterOptions
	EnableSoftwareUpdateOptions *EnableSoftwareUpdateOptions
	LogPublishingOptions        map[string]*LogPublishingOption
	ClusterConfig               *ClusterConfig
	AccessPolicies              string
	EngineVersion               string
}

UpdateDomainConfigInput holds mutable fields for UpdateDomainConfig.

type UpgradeHistory

type UpgradeHistory struct {
	UpgradeName    string            `json:"UpgradeName"`
	UpgradeStatus  string            `json:"UpgradeStatus"`
	StepsList      []UpgradeStepItem `json:"StepsList"`
	StartTimestamp float64           `json:"StartTimestamp"`
}

UpgradeHistory records a single domain upgrade event.

type UpgradeStepItem

type UpgradeStepItem struct {
	UpgradeStep       string   `json:"UpgradeStep"`
	UpgradeStepStatus string   `json:"UpgradeStepStatus"`
	Issues            []string `json:"Issues,omitempty"`
	ProgressPercent   float64  `json:"ProgressPercent"`
}

UpgradeStepItem describes one step in an upgrade.

type VPCOptions

type VPCOptions struct {
	VPCID            string   `json:"vpcId,omitempty"`
	SecurityGroupIDs []string `json:"securityGroupIds,omitempty"`
	SubnetIDs        []string `json:"subnetIds,omitempty"`
}

VPCOptions holds VPC configuration for an OpenSearch domain.

type VpcEndpoint

type VpcEndpoint struct {
	StatusUntil      time.Time      `json:"-"`
	VpcOptions       map[string]any `json:"VpcOptions"`
	VpcEndpointID    string         `json:"VpcEndpointId"`
	VpcEndpointOwner string         `json:"VpcEndpointOwner"`
	DomainArn        string         `json:"DomainArn"`
	Status           string         `json:"Status"`
	Endpoint         string         `json:"Endpoint"`
}

VpcEndpoint represents a VPC endpoint for an OpenSearch domain.

type WindowStartTime

type WindowStartTime struct {
	Hours   int `json:"hours"`
	Minutes int `json:"minutes"`
}

WindowStartTime holds hours and minutes for a maintenance window start.

type Workspace added in v1.2.0

type Workspace struct {
	CreatedAt     time.Time `json:"-"`
	WorkspaceID   string    `json:"workspaceId"`
	ApplicationID string    `json:"applicationId"`
	Name          string    `json:"name"`
	Type          string    `json:"type"`
}

Workspace tracks the target-workspace side effect of AttachDataSource's optional WorkspaceConfiguration/WorkspaceId (types.WorkspaceConfigurationInput) and StartMigration's required MigrationOptions.Workspace (types.MigrationWorkspace). AWS defines no independent workspace resource API anywhere in this SDK: grepping every api_op_*.go in aws-sdk-go-v2/service/opensearch@v1.75.4 for "Workspace" turns up only these two request-side fields, there is no CreateWorkspace/GetWorkspace/ ListWorkspaces/DeleteWorkspace operation, and no output struct in the entire service (not AttachDataSourceOutput, not DescribeDataSourceAttachmentOutput, not GetMigrationOutput/ MigrationSummary) ever echoes a WorkspaceId back to the caller. This type exists purely so a WorkspaceId reference on either op can be validated against something real (existence, and that it belongs to the referencing application) instead of accepted as any string -- it is never surfaced through any handler response, matching what the SDK actually defines. See PARITY.md for why this stops short of a full CRUD resource model.

type WorkspaceConfigInput added in v1.2.0

type WorkspaceConfigInput struct {
	Name          string
	WorkspaceType string
}

WorkspaceConfigInput mirrors types.WorkspaceConfigurationInput (AttachDataSource's optional "create a new workspace" request field).

type ZoneAwarenessConfig

type ZoneAwarenessConfig struct {
	AvailabilityZoneCount int `json:"availabilityZoneCount"`
}

ZoneAwarenessConfig holds zone awareness settings.

Jump to

Keyboard shortcuts

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