elasticsearch

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 21 Imported by: 0

README

Elasticsearch

Parity grade: A · SDK aws-sdk-go-v2/service/elasticsearchservice@v1.39.1 · last audited 2026-07-24 (59ab8f6a)

Coverage

Metric Value
Operations audited 51 (51 ok)
Known gaps 5
Deferred items 0
Resource leaks clean
Known gaps
  • "Domains never transition through a Processing/creating state -- CreateElasticsearchDomain \ returns Processing=false / DomainProcessingStatus=Active immediately. This is a deliberate \ simplification (no artificial async delay) rather than a stub; flagging so a future \ auditor doesn't mistake the always-Active state for a bug in the other direction."
  • "AdvancedSecurityOptions.SAMLOptions and AutoTuneOptions.MaintenanceSchedules are accepted \ on the wire (parsed as json.RawMessage so unmarshal doesn't reject them) but not modeled \ or persisted -- SAML SSO and maintenance-window scheduling have no backend state machine. \ MasterUserOptions (master username/password/ARN) is intentionally never persisted or \ echoed back either, matching real AWS's own behavior of never returning credentials on \ any Describe/Create/Update response; the only gap is that this backend also can't act on \ internal-user-database auth using those credentials. Not filed as a bd issue this pass \ (no observed consumer exercises SAML or credential-checked internal auth against this \ emulator)."
  • "VPCOptions.VPCId and .AvailabilityZones are never populated on Describe/domain-status \ responses -- deriving them would require a cross-service EC2 subnet/VPC lookup this \ backend does not perform (SubnetIds/SecurityGroupIds are correctly modeled and echoed). \ Matches services/opensearch's identical, already-accepted simplification."
  • "CreatePackageInput.DeploymentStrategyOptions (on CreateElasticsearchDomain) is not \ modeled at all -- not in the explicit field list this pass targeted and no observed \ consumer depends on it."
  • "Package.CreatedAt/LastUpdatedAt/ErrorDetails (types.PackageDetails) are not modeled -- \ packages are always AVAILABLE synchronously in this backend (no COPYING/COPY_FAILED \ state machine), so there is no natural timestamp/error-detail source. Not filed as a bd \ issue this pass (low traffic op)."

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")
	// ErrValidation is returned for invalid or missing input parameters.
	ErrValidation = errors.New("ValidationException")
	// ErrInvalidParameter is an alias for ErrValidation kept for compatibility.
	ErrInvalidParameter    = ErrValidation
	ErrConnectionNotFound  = errors.New("ResourceNotFoundException")
	ErrPackageNotFound     = errors.New("ResourceNotFoundException")
	ErrVpcEndpointNotFound = errors.New("ResourceNotFoundException")
	// ErrPackageAlreadyAssociated is returned when AssociatePackage targets a
	// (package, domain) pair that is already associated. AWS returns ConflictException.
	ErrPackageAlreadyAssociated = errors.New("ConflictException")
)

Errors returned by the Elasticsearch backend.

View Source
var ErrNilAppContext = errors.New("AppContext is required")

ErrNilAppContext is returned by Init when appCtx is nil.

Functions

This section is empty.

Types

type AdvancedSecurityOptions added in v1.2.0

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

AdvancedSecurityOptions holds fine-grained access control settings (types.AdvancedSecurityOptions on response). Master user credentials (MasterUserOptions on the *Input request shape) and SAML IdP configuration are intentionally not persisted here: real AWS never echoes MasterUserOptions back on any Describe/Create/Update response either, and full SAML modeling is out of scope for this pass (see PARITY.md gaps).

type AutoTuneOptions added in v1.2.0

type AutoTuneOptions struct {
	DesiredState string `json:"desiredState,omitempty"`
}

AutoTuneOptions holds the Auto-Tune desired state for a domain (types.AutoTuneOptionsInput's DesiredState member). MaintenanceSchedules is not modeled (see PARITY.md gaps).

type ClusterConfig

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

ClusterConfig represents the cluster configuration for an Elasticsearch domain.

type CognitoOptions added in v1.2.0

type CognitoOptions struct {
	UserPoolID     string `json:"userPoolID,omitempty"`
	IdentityPoolID string `json:"identityPoolID,omitempty"`
	RoleARN        string `json:"roleARN,omitempty"`
	Enabled        bool   `json:"enabled"`
}

CognitoOptions holds the Cognito user/identity pool configuration for Kibana authentication (types.CognitoOptions -- the same shape is used for both the request and response).

type CreateDomainInput

type CreateDomainInput struct {
	VPCOptions                  *VPCOptions
	Tags                        map[string]string
	LogPublishingOptions        map[string]LogPublishingOption
	AutoTuneOptions             *AutoTuneOptions
	AdvancedOptions             map[string]string
	AdvancedSecurityOptions     *AdvancedSecurityOptions
	CognitoOptions              *CognitoOptions
	AccessPolicies              string
	TLSSecurityPolicy           string
	ElasticsearchVersion        string
	Name                        string
	EBSOptions                  EBSOptions
	ClusterConfig               ClusterConfig
	SnapshotOptions             SnapshotOptions
	EncryptionAtRestEnabled     bool
	NodeToNodeEncryptionEnabled bool
	EnforceHTTPS                bool
}

CreateDomainInput holds all parameters for CreateDomain.

type CrossClusterDomainInfo

type CrossClusterDomainInfo struct {
	OwnerID    string `json:"OwnerId"`
	DomainName string `json:"DomainName"`
	Region     string `json:"Region"`
}

CrossClusterDomainInfo holds domain endpoint info used in cross-cluster connections.

type DNSRegistrar

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

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

type Domain

type Domain struct {
	ConfigUpdatedAt         time.Time                      `json:"configUpdatedAt,omitzero"`
	CreatedAt               time.Time                      `json:"createdAt,omitzero"`
	VPCOptions              *VPCOptions                    `json:"vpcOptions,omitempty"`
	AdvancedOptions         map[string]string              `json:"advancedOptions,omitempty"`
	LogPublishingOptions    map[string]LogPublishingOption `json:"logPublishingOptions,omitempty"`
	AutoTuneOptions         *AutoTuneOptions               `json:"autoTuneOptions,omitempty"`
	Tags                    *tags.Tags                     `json:"tags,omitempty"`
	AdvancedSecurityOptions *AdvancedSecurityOptions       `json:"advancedSecurityOptions,omitempty"`
	CognitoOptions          *CognitoOptions                `json:"cognitoOptions,omitempty"`
	ElasticsearchVersion    string                         `json:"elasticsearchVersion"`
	AccessPolicies          string                         `json:"accessPolicies,omitempty"`
	Status                  string                         `json:"status"`
	TLSSecurityPolicy       string                         `json:"tlsSecurityPolicy,omitempty"`
	DomainID                string                         `json:"domainID"`
	Name                    string                         `json:"name"`

	Endpoint                    string          `json:"endpoint"`
	ARN                         string          `json:"arn"`
	EBSOptions                  EBSOptions      `json:"ebsOptions"`
	ClusterConfig               ClusterConfig   `json:"clusterConfig"`
	SnapshotOptions             SnapshotOptions `json:"snapshotOptions"`
	ConfigVersion               int             `json:"configVersion"`
	EncryptionAtRestEnabled     bool            `json:"encryptionAtRestEnabled"`
	NodeToNodeEncryptionEnabled bool            `json:"nodeToNodeEncryptionEnabled"`
	EnforceHTTPS                bool            `json:"enforceHTTPS"`
	// contains filtered or unexported fields
}

Domain represents an Elasticsearch domain.

type EBSOptions

type EBSOptions struct {
	VolumeType string `json:"volumeType"`
	VolumeSize int    `json:"volumeSize"`
	Iops       int    `json:"iops"`
	Throughput int    `json:"throughput"`
	EBSEnabled bool   `json:"ebsEnabled"`
}

EBSOptions represents the EBS storage options for an Elasticsearch domain.

type EngineConfig

type EngineConfig interface {
	GetElasticsearchEngine() string
}

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

type Handler

type Handler struct {
	Backend *InMemoryBackend

	AccountID string
	Region    string
	// contains filtered or unexported fields
}

Handler is the HTTP handler for Elasticsearch operations.

func NewHandler

func NewHandler(backend *InMemoryBackend) *Handler

NewHandler creates a new Elasticsearch 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 Elasticsearch 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.

func (*Handler) ExtractResource

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

ExtractResource returns the domain name 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 implements service.Resettable by delegating to the backend.

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 Elasticsearch requests by path prefix.

func (*Handler) ServeHTTP

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

ServeHTTP implements http.Handler for the Elasticsearch service.

func (*Handler) Snapshot

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

Snapshot implements persistence.Persistable by delegating to the backend.

type InMemoryBackend

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

InMemoryBackend is the in-memory store for Elasticsearch domains.

Elasticsearch resources are region-scoped in AWS. Phase 3.3 of the datalayer refactor replaces the resource collections that used to be nested by region (outer key = region, e.g. map[string]map[string]*Domain) with a flat *store.Table, keyed by the composite "region|id" string (see regionKey), with a companion *store.Index grouping entries by region for the per-region scans the nested maps used to answer directly -- the same region-qualified-table pattern services/emr and services/codeartifact use. None of Domain/Package/InboundConnection/OutboundConnection/VpcEndpoint/ ReservedInstance carried a region field of their own before this conversion, so each gained an unexported region field purely for this composite key; persistence.go carries it through via a shared regionalDTO wrapper (store.Table.Snapshot's plain json.Marshal cannot see unexported fields).

arnIndex, packagesByName, packageAssociations, and vpcAccess are deliberately NOT converted: store.Table requires a *V value with its own identity, but each entry in these four maps is a bare string or string slice with no identifier of its own. They remain plain region-nested maps, unchanged by this refactor.

func NewInMemoryBackend

func NewInMemoryBackend(accountID, region string) *InMemoryBackend

NewInMemoryBackend creates a new InMemoryBackend.

func (*InMemoryBackend) AcceptInboundCrossClusterSearchConnection

func (b *InMemoryBackend) AcceptInboundCrossClusterSearchConnection(
	ctx context.Context, connectionID string,
) (*InboundConnection, error)

AcceptInboundCrossClusterSearchConnection accepts a pending inbound cross-cluster search connection.

func (*InMemoryBackend) AddDomainInternal

func (b *InMemoryBackend) AddDomainInternal(ctx context.Context, d Domain)

AddDomainInternal seeds a domain directly into the backend for testing. Tags are initialised fresh for the seeded domain.

func (*InMemoryBackend) AddInboundConnectionInternal

func (b *InMemoryBackend) AddInboundConnectionInternal(ctx context.Context, conn InboundConnection)

AddInboundConnectionInternal seeds an inbound connection for testing.

func (*InMemoryBackend) AddTags

func (b *InMemoryBackend) AddTags(ctx context.Context, domainARN string, kv map[string]string) error

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

func (*InMemoryBackend) AssociatePackage

func (b *InMemoryBackend) AssociatePackage(ctx context.Context, packageID, domainName string) error

AssociatePackage associates an Elasticsearch package with a domain.

func (*InMemoryBackend) AuthorizeVpcEndpointAccess

func (b *InMemoryBackend) AuthorizeVpcEndpointAccess(ctx context.Context, domainName, account string) error

AuthorizeVpcEndpointAccess grants an account or service access to the domain's VPC endpoint.

func (*InMemoryBackend) CancelDomainConfigChange

func (b *InMemoryBackend) CancelDomainConfigChange(ctx context.Context, domainName string) (*Domain, error)

CancelDomainConfigChange cancels any in-progress configuration change for a domain. Because the in-memory backend applies changes synchronously this is a no-op.

func (*InMemoryBackend) CancelElasticsearchServiceSoftwareUpdate

func (b *InMemoryBackend) CancelElasticsearchServiceSoftwareUpdate(
	ctx context.Context, domainName string,
) (*Domain, error)

CancelElasticsearchServiceSoftwareUpdate cancels a scheduled software update. Because the in-memory backend never schedules updates this is a no-op.

func (*InMemoryBackend) CreateDomain

func (b *InMemoryBackend) CreateDomain(ctx context.Context, inp CreateDomainInput) (*Domain, error)

CreateDomain creates a new Elasticsearch domain.

func (*InMemoryBackend) CreateOutboundCrossClusterSearchConnection

func (b *InMemoryBackend) CreateOutboundCrossClusterSearchConnection(
	ctx context.Context,
	localDomain, remoteDomain CrossClusterDomainInfo,
	alias string,
) (*OutboundConnection, error)

CreateOutboundCrossClusterSearchConnection creates a new outbound cross-cluster search connection request.

func (*InMemoryBackend) CreatePackage

func (b *InMemoryBackend) CreatePackage(
	ctx context.Context, name, packageType, description string, source PackageSource,
) (*Package, error)

CreatePackage creates a new Elasticsearch package (e.g., a dictionary file). PackageSource (S3BucketName + S3Key) is a required member of CreatePackageInput in the real API (types.CreatePackageInput.PackageSource has no default), so a missing/incomplete source is rejected exactly like a missing name or an invalid type.

func (*InMemoryBackend) CreateVpcEndpoint

func (b *InMemoryBackend) CreateVpcEndpoint(
	ctx context.Context, domainARN string, vpcOptions map[string]string,
) (*VpcEndpoint, error)

CreateVpcEndpoint creates a managed VPC endpoint for an Elasticsearch domain. The endpoint's region is resolved from the domain ARN, falling back to ctx.

func (*InMemoryBackend) DeleteDomain

func (b *InMemoryBackend) DeleteDomain(ctx context.Context, name string) (*Domain, error)

DeleteDomain removes a domain by name.

func (*InMemoryBackend) DeleteElasticsearchServiceRole

func (b *InMemoryBackend) DeleteElasticsearchServiceRole() error

DeleteElasticsearchServiceRole deletes the Elasticsearch service-linked IAM role. The in-memory backend has no IAM state so this is always a no-op success.

func (*InMemoryBackend) DeleteInboundCrossClusterSearchConnection

func (b *InMemoryBackend) DeleteInboundCrossClusterSearchConnection(
	ctx context.Context, connectionID string,
) (*InboundConnection, error)

DeleteInboundCrossClusterSearchConnection removes an inbound cross-cluster connection.

func (*InMemoryBackend) DeleteOutboundCrossClusterSearchConnection

func (b *InMemoryBackend) DeleteOutboundCrossClusterSearchConnection(
	ctx context.Context, connectionID string,
) (*OutboundConnection, error)

DeleteOutboundCrossClusterSearchConnection removes an outbound cross-cluster connection.

func (*InMemoryBackend) DeletePackage

func (b *InMemoryBackend) DeletePackage(ctx context.Context, packageID string) (*Package, error)

DeletePackage removes a package by ID.

func (*InMemoryBackend) DeleteVpcEndpoint

func (b *InMemoryBackend) DeleteVpcEndpoint(ctx context.Context, vpcEndpointID string) (*VpcEndpoint, error)

DeleteVpcEndpoint removes a VPC endpoint by ID.

func (*InMemoryBackend) DescribeDomain

func (b *InMemoryBackend) DescribeDomain(ctx context.Context, name string) (*Domain, error)

DescribeDomain returns details about a domain.

func (*InMemoryBackend) DescribeDomainAutoTunes

func (b *InMemoryBackend) DescribeDomainAutoTunes(ctx context.Context, domainName string) error

DescribeDomainAutoTunes validates a domain exists and returns (the in-memory backend has no auto-tune state).

func (*InMemoryBackend) DescribeDomainChangeProgress

func (b *InMemoryBackend) DescribeDomainChangeProgress(ctx context.Context, domainName string) error

DescribeDomainChangeProgress validates a domain exists and returns (changes are synchronous in-memory).

func (*InMemoryBackend) DescribeInboundCrossClusterSearchConnections

func (b *InMemoryBackend) DescribeInboundCrossClusterSearchConnections(ctx context.Context) []*InboundConnection

DescribeInboundCrossClusterSearchConnections returns all inbound cross-cluster connections.

func (*InMemoryBackend) DescribeOutboundCrossClusterSearchConnections

func (b *InMemoryBackend) DescribeOutboundCrossClusterSearchConnections(ctx context.Context) []*OutboundConnection

DescribeOutboundCrossClusterSearchConnections returns all outbound cross-cluster connections.

func (*InMemoryBackend) DescribePackages

func (b *InMemoryBackend) DescribePackages(ctx context.Context, packageIDs []string) []*Package

DescribePackages returns packages matching the given IDs, or all packages if the list is empty.

func (*InMemoryBackend) DescribeReservedElasticsearchInstanceOfferings

func (b *InMemoryBackend) DescribeReservedElasticsearchInstanceOfferings() []ReservedInstanceOffering

DescribeReservedElasticsearchInstanceOfferings returns available reserved instance offerings.

func (*InMemoryBackend) DescribeReservedElasticsearchInstances

func (b *InMemoryBackend) DescribeReservedElasticsearchInstances(ctx context.Context) []ReservedInstance

DescribeReservedElasticsearchInstances returns purchased reserved instances for the request's region.

func (*InMemoryBackend) DescribeVpcEndpoints

func (b *InMemoryBackend) DescribeVpcEndpoints(ctx context.Context, vpcEndpointIDs []string) []*VpcEndpoint

DescribeVpcEndpoints returns VPC endpoints matching the given IDs, or all endpoints if empty.

func (*InMemoryBackend) DissociatePackage

func (b *InMemoryBackend) DissociatePackage(ctx context.Context, packageID, domainName string) error

DissociatePackage removes a package association from a domain.

func (*InMemoryBackend) GetPackageVersionHistory

func (b *InMemoryBackend) GetPackageVersionHistory(ctx context.Context, packageID string) ([]*Package, error)

GetPackageVersionHistory returns the version history for a package.

func (*InMemoryBackend) GetUpgradeHistory

func (b *InMemoryBackend) GetUpgradeHistory(ctx context.Context, domainName string) error

GetUpgradeHistory validates a domain exists and returns empty history (no upgrade state tracked).

func (*InMemoryBackend) GetUpgradeStatus

func (b *InMemoryBackend) GetUpgradeStatus(ctx context.Context, domainName string) error

GetUpgradeStatus validates a domain exists and returns (no upgrade in progress in-memory).

func (*InMemoryBackend) ListDomainNames

func (b *InMemoryBackend) ListDomainNames(ctx context.Context) []string

ListDomainNames returns the sorted names of all domains in the request's region.

func (*InMemoryBackend) ListDomainsForPackage

func (b *InMemoryBackend) ListDomainsForPackage(ctx context.Context, packageID string) ([]string, error)

ListDomainsForPackage returns all domain names associated with a package.

func (*InMemoryBackend) ListPackagesForDomain

func (b *InMemoryBackend) ListPackagesForDomain(ctx context.Context, domainName string) []*Package

ListPackagesForDomain returns all packages associated with a domain.

func (*InMemoryBackend) ListTags

func (b *InMemoryBackend) ListTags(ctx context.Context, domainARN string) (map[string]string, error)

ListTags returns tags for the domain identified by ARN. The region is resolved from the ARN, falling back to the ctx region.

func (*InMemoryBackend) ListVpcEndpointAccess

func (b *InMemoryBackend) ListVpcEndpointAccess(ctx context.Context, domainName string) ([]string, error)

ListVpcEndpointAccess returns authorized account principals for a domain's VPC endpoint access.

func (*InMemoryBackend) ListVpcEndpoints

func (b *InMemoryBackend) ListVpcEndpoints(ctx context.Context) []*VpcEndpoint

ListVpcEndpoints returns all VPC endpoints in the request's region.

func (*InMemoryBackend) ListVpcEndpointsForDomain

func (b *InMemoryBackend) ListVpcEndpointsForDomain(ctx context.Context, domainName string) []*VpcEndpoint

ListVpcEndpointsForDomain returns VPC endpoints associated with a specific domain ARN.

func (*InMemoryBackend) PurchaseReservedElasticsearchInstanceOffering

func (b *InMemoryBackend) PurchaseReservedElasticsearchInstanceOffering(
	ctx context.Context, offeringID, name string, count int,
) (*ReservedInstance, error)

PurchaseReservedElasticsearchInstanceOffering purchases a reserved instance offering.

func (*InMemoryBackend) Region

func (b *InMemoryBackend) Region() string

Region returns the backend's default AWS region.

func (*InMemoryBackend) RejectInboundCrossClusterSearchConnection

func (b *InMemoryBackend) RejectInboundCrossClusterSearchConnection(
	ctx context.Context, connectionID string,
) (*InboundConnection, error)

RejectInboundCrossClusterSearchConnection rejects a pending inbound connection.

func (*InMemoryBackend) RemoveTags

func (b *InMemoryBackend) RemoveTags(ctx context.Context, domainARN string, keys []string) error

RemoveTags removes tag keys from the domain identified by ARN.

func (*InMemoryBackend) Reset

func (b *InMemoryBackend) Reset()

Reset clears all in-memory state. It closes all domain Tags to release Prometheus metrics before discarding the domain maps.

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(ctx context.Context, domainName, account string) error

RevokeVpcEndpointAccess revokes an account's access to a domain's VPC endpoint.

func (*InMemoryBackend) SetDNSRegistrar

func (b *InMemoryBackend) SetDNSRegistrar(dns DNSRegistrar)

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

func (*InMemoryBackend) Snapshot

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

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

func (*InMemoryBackend) StartElasticsearchServiceSoftwareUpdate

func (b *InMemoryBackend) StartElasticsearchServiceSoftwareUpdate(
	ctx context.Context, domainName string,
) (*Domain, error)

StartElasticsearchServiceSoftwareUpdate schedules a software update (no-op in-memory).

func (*InMemoryBackend) UpdateDomainConfig

func (b *InMemoryBackend) UpdateDomainConfig(ctx context.Context, name string, cfg UpdateConfig) (*Domain, error)

UpdateDomainConfig updates the cluster configuration and/or EBS options for a domain.

func (*InMemoryBackend) UpdatePackage

func (b *InMemoryBackend) UpdatePackage(ctx context.Context, packageID, description string) (*Package, error)

UpdatePackage updates a package description.

func (*InMemoryBackend) UpdateVpcEndpoint

func (b *InMemoryBackend) UpdateVpcEndpoint(
	ctx context.Context, vpcEndpointID string, vpcOptions map[string]string,
) (*VpcEndpoint, error)

UpdateVpcEndpoint updates the VPC options of a VPC endpoint.

func (*InMemoryBackend) UpgradeElasticsearchDomain

func (b *InMemoryBackend) UpgradeElasticsearchDomain(
	ctx context.Context, domainName, targetVersion string,
) (*Domain, error)

UpgradeElasticsearchDomain upgrades a domain to the target version.

type InboundConnection

type InboundConnection struct {
	ConnectionID     string                 `json:"connectionID"`
	ConnectionStatus string                 `json:"connectionStatus"`
	SourceDomainInfo CrossClusterDomainInfo `json:"sourceDomainInfo"`
	DestDomainInfo   CrossClusterDomainInfo `json:"destDomainInfo"`
	// contains filtered or unexported fields
}

InboundConnection represents an inbound cross-cluster search connection.

type LogPublishingOption added in v1.2.0

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

LogPublishingOption holds a single log-type publishing configuration (types.LogPublishingOption), keyed by AWS LogType string (INDEX_SLOW_LOGS/SEARCH_SLOW_LOGS/ES_APPLICATION_LOGS/AUDIT_LOGS) in Domain.LogPublishingOptions.

type OutboundConnection

type OutboundConnection struct {
	ConnectionID     string                 `json:"connectionID"`
	ConnectionAlias  string                 `json:"connectionAlias"`
	ConnectionStatus string                 `json:"connectionStatus"`
	LocalDomainInfo  CrossClusterDomainInfo `json:"localDomainInfo"`
	RemoteDomainInfo CrossClusterDomainInfo `json:"remoteDomainInfo"`
	// contains filtered or unexported fields
}

OutboundConnection represents an outbound cross-cluster search connection.

type Package

type Package struct {
	ID            string        `json:"packageID"`
	Name          string        `json:"packageName"`
	PackageType   string        `json:"packageType"`
	Description   string        `json:"packageDescription"`
	Status        string        `json:"packageStatus"`
	PackageSource PackageSource `json:"packageSource"`
	// contains filtered or unexported fields
}

Package represents an Elasticsearch package (e.g., a custom dictionary or synonym file).

type PackageSource added in v1.2.0

type PackageSource struct {
	S3BucketName string `json:"s3BucketName"`
	S3Key        string `json:"s3Key"`
}

PackageSource holds the S3 bucket/key location a package was imported from (types.PackageSource). It is a required member of CreatePackageInput in the real API but is never echoed back by any Describe/Create/Update package response (types.PackageDetails has no PackageSource field), so it is stored on Package purely so the backend has captured real input state -- it is intentionally not surfaced by toPackageJSON.

type Provider

type Provider struct{}

Provider implements service.Provider for the Elasticsearch service.

func (*Provider) Init

Init initializes the Elasticsearch service backend and handler.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the service provider name.

type ReservedInstance

type ReservedInstance struct {
	ReservationID   string `json:"reservedElasticsearchInstanceId"`
	ReservationName string `json:"reservationName"`
	OfferingID      string `json:"reservedElasticsearchInstanceOfferingId"`
	InstanceType    string `json:"elasticsearchInstanceType"`
	State           string `json:"state"`

	FixedPrice float64 `json:"fixedPrice"`
	UsagePrice float64 `json:"usagePrice"`
	Duration   int     `json:"duration"`
	Count      int     `json:"elasticsearchInstanceCount"`
	// contains filtered or unexported fields
}

ReservedInstance represents a purchased reserved Elasticsearch instance.

type ReservedInstanceOffering

type ReservedInstanceOffering struct {
	OfferingID    string  `json:"reservedElasticsearchInstanceOfferingId"`
	InstanceType  string  `json:"elasticsearchInstanceType"`
	PaymentOption string  `json:"paymentOption"`
	Currency      string  `json:"currencyCode"`
	FixedPrice    float64 `json:"fixedPrice"`
	UsagePrice    float64 `json:"usagePrice"`
	Duration      int     `json:"duration"`
}

ReservedInstanceOffering represents a reserved Elasticsearch instance offering.

type SnapshotOptions

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

SnapshotOptions holds automated snapshot configuration for a domain.

type UpdateConfig

type UpdateConfig struct {
	ClusterConfig               *ClusterConfig
	EBSOptions                  *EBSOptions
	SnapshotOptions             *SnapshotOptions
	AdvancedOptions             map[string]string
	VPCOptions                  *VPCOptions
	CognitoOptions              *CognitoOptions
	AdvancedSecurityOptions     *AdvancedSecurityOptions
	AutoTuneOptions             *AutoTuneOptions
	LogPublishingOptions        map[string]LogPublishingOption
	AccessPolicies              *string
	TLSSecurityPolicy           *string
	EncryptionAtRestEnabled     *bool
	NodeToNodeEncryptionEnabled *bool
	EnforceHTTPS                *bool
}

UpdateConfig holds the fields that can be updated via UpdateDomainConfig.

type VPCOptions added in v1.2.0

type VPCOptions struct {
	SubnetIDs        []string `json:"subnetIDs,omitempty"`
	SecurityGroupIDs []string `json:"securityGroupIDs,omitempty"`
}

VPCOptions holds the subnet/security-group configuration for placing a domain inside a VPC (types.VPCOptions on request, types.VPCDerivedInfo on response). AvailabilityZones/VPCId are not modeled -- deriving them would require cross-service EC2 subnet lookups this backend does not perform (matches services/opensearch's identical simplification), so they are always left empty on the wire.

type VpcEndpoint

type VpcEndpoint struct {
	VpcOptions     map[string]string `json:"vpcOptions"`
	ID             string            `json:"vpcEndpointID"`
	OwnerAccountID string            `json:"ownerAccountID"`
	DomainARN      string            `json:"domainARN"`
	Endpoint       string            `json:"endpoint"`
	Status         string            `json:"status"`

	AuthorizedAccts []string `json:"authorizedAccounts"`
	// contains filtered or unexported fields
}

VpcEndpoint represents a managed VPC endpoint for an Elasticsearch domain.

type ZoneAwarenessConfig

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

ZoneAwarenessConfig holds the zone awareness configuration for a cluster.

Jump to

Keyboard shortcuts

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