Help us shape the future of Go! Take the 2026 Go Developer Survey

elasticbeanstalk

package
v1.8.3 Latest Latest
Warning

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

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

README

Elastic Beanstalk

Parity grade: A · SDK aws-sdk-go-v2/service/elasticbeanstalk@v1.37.4 · last audited 2026-10-10 (16aa469b2)

Coverage

Metric Value
PARITY entries audited 47 (46 ok, 1 partial)
Feature families 7 (7 ok)
Known gaps none
Structural gaps (can't be emulated) 4
Deferred items 0
Resource leaks clean
Structural gaps

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

  • DescribeConfigurationOptions returns one curated ~48-option catalog regardless of SolutionStackName/PlatformArn: real per-platform option metadata is AWS-managed data the SDK does not carry.
  • No CodeBuild/EC2/ELB/CloudWatch backing: ApplicationVersionDescription.BuildArn, EnvironmentDescription.Resources, DescribeEnvironmentHealth ApplicationMetrics/Causes/InstancesHealth and TerminateEnvironment.TerminateResources have nothing to read or release, because environments launch no instances or load balancers.
  • ManagedActionHistoryItem.FailureDescription/FailureType: every managed action succeeds synchronously, so no failure state exists.
  • Platform metadata (DescribePlatformVersion Frameworks/Maintainer/OperatingSystem*/ProgrammingLanguages, PlatformBranchSummary.BranchOrder/SupportedTierList, SolutionStackDetails.PermittedFileTypes) is AWS-managed catalog data with no source in the SDK or a platform builder.

More

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound is returned when a requested resource does not exist. It is
	// used by name-based lookups (application/environment/version/template),
	// which AWS surfaces as the generic InvalidParameterValue sender error.
	ErrNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound)
	// ErrResourceNotFound is returned specifically when a ListTagsForResource
	// or UpdateTagsForResource ResourceArn does not match any known resource.
	// Unlike ErrNotFound, AWS documents this ARN-lookup case as a distinct
	// modeled exception (ResourceNotFoundException, HTTP 400) rather than
	// the generic InvalidParameterValue used by name-based CRUD ops -- see
	// handleOpError's mapping table.
	ErrResourceNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound)
	// ErrAlreadyExists is returned when a resource already exists.
	ErrAlreadyExists = awserr.New("ClientException", awserr.ErrAlreadyExists)
	// ErrUnknownAction is returned when an unknown action is requested.
	ErrUnknownAction = awserr.New("UnknownOperationException", awserr.ErrInvalidParameter)
	// ErrInvalidParameter is returned when a required parameter is missing or invalid.
	ErrInvalidParameter = awserr.New("InvalidParameterValue", awserr.ErrInvalidParameter)
	// ErrValidation is returned when request input fails validation.
	ErrValidation = awserr.New("ValidationException", awserr.ErrInvalidParameter)
)
View Source
var ErrNilAppContext = errors.New("AppContext is required")

ErrNilAppContext is returned when Provider.Init is called with a nil AppContext.

Functions

func ValidateInstanceProfileARN

func ValidateInstanceProfileARN(instanceProfile string) error

ValidateInstanceProfileARN validates that an instance profile ARN has the correct format (improvement #16).

Types

type Application

type Application struct {
	VersionLifecycleMaxAgeRule   *MaxAgeRule       `json:"versionLifecycleMaxAgeRule,omitempty"`
	VersionLifecycleMaxCountRule *MaxCountRule     `json:"versionLifecycleMaxCountRule,omitempty"`
	Tags                         map[string]string `json:"tags,omitempty"`
	ApplicationName              string            `json:"applicationName"`
	ApplicationARN               string            `json:"applicationArn"`
	Description                  string            `json:"description,omitempty"`
	DateCreated                  string            `json:"dateCreated,omitempty"`
	DateUpdated                  string            `json:"dateUpdated,omitempty"`
	ResourceLifecycleServiceRole string            `json:"resourceLifecycleServiceRole,omitempty"`
	// contains filtered or unexported fields
}

Application represents an Elastic Beanstalk application.

type ApplicationResourceLifecycleParams

type ApplicationResourceLifecycleParams struct {
	MaxAgeRule   *MaxAgeRule
	MaxCountRule *MaxCountRule
	ServiceRole  string
}

ApplicationResourceLifecycleParams holds ResourceLifecycleConfig's fields as parsed off the wire (CreateApplication and UpdateApplicationResourceLifecycle share this exact shape -- api_op_CreateApplication.go and api_op_UpdateApplicationResourceLifecycle.go both declare ResourceLifecycleConfig *types.ApplicationResourceLifecycleConfig). A nil MaxAgeRule/MaxCountRule means "not present in this request, leave whatever is already stored unchanged" -- matching ServiceRole's own documented leniency ("you don't need to specify it again in subsequent ... calls").

type ApplicationVersion

type ApplicationVersion struct {
	Tags                   map[string]string       `json:"tags,omitempty"`
	SourceBuildInformation *SourceBuildInformation `json:"sourceBuildInformation,omitempty"`
	ApplicationName        string                  `json:"applicationName"`
	VersionLabel           string                  `json:"versionLabel"`
	ApplicationVersionARN  string                  `json:"applicationVersionArn"`
	Description            string                  `json:"description,omitempty"`
	DateCreated            string                  `json:"dateCreated,omitempty"`
	DateUpdated            string                  `json:"dateUpdated,omitempty"`
	Status                 string                  `json:"status"`
	S3Bucket               string                  `json:"s3Bucket,omitempty"`
	S3Key                  string                  `json:"s3Key,omitempty"`

	Process bool `json:"process"`
	// contains filtered or unexported fields
}

ApplicationVersion represents an Elastic Beanstalk application version.

type ApplicationVersionParams

type ApplicationVersionParams struct {
	SourceBuildInformation *SourceBuildInformation
	Tags                   map[string]string
	Description            string
	S3Bucket               string
	S3Key                  string
	Process                bool
	AutoCreateApplication  bool
}

ApplicationVersionParams holds optional CreateApplicationVersion properties.

type ComposeEnvironmentsParams

type ComposeEnvironmentsParams struct {
	ApplicationName string
	GroupName       string
	VersionLabels   []string
}

ComposeEnvironmentsParams holds ComposeEnvironments' inputs.

type ConfigurationTemplate

type ConfigurationTemplate struct {
	Tags              map[string]string `json:"tags,omitempty"`
	ApplicationName   string            `json:"applicationName"`
	TemplateName      string            `json:"templateName"`
	Description       string            `json:"description,omitempty"`
	DateCreated       string            `json:"dateCreated,omitempty"`
	DateUpdated       string            `json:"dateUpdated,omitempty"`
	SolutionStackName string            `json:"solutionStackName,omitempty"`
	PlatformArn       string            `json:"platformArn,omitempty"`

	OptionSettings []OptionSetting `json:"optionSettings,omitempty"`
	// contains filtered or unexported fields
}

ConfigurationTemplate represents an Elastic Beanstalk configuration template.

type ConfigurationTemplateParams added in v1.2.0

type ConfigurationTemplateParams struct {
	// PlatformArn is the ARN of a custom platform to base the template on.
	// Real AWS documents PlatformArn and SolutionStackName as mutually
	// exclusive -- see CreateConfigurationTemplateInput.
	PlatformArn string
	// EnvironmentID seeds the template from an existing environment's option
	// settings (CreateConfigurationTemplateInput.EnvironmentId: "The ID of an
	// environment whose settings you want to use to create the configuration
	// template").
	EnvironmentID string
	// SourceApplicationName/SourceTemplateName seed the template from another
	// configuration template's option settings
	// (CreateConfigurationTemplateInput.SourceConfiguration). SourceApplicationName
	// defaults to the request's own ApplicationName when unset.
	SourceApplicationName string
	SourceTemplateName    string
	// OptionSettings overrides option values obtained from the solution
	// stack/platform/EnvironmentID/SourceConfiguration for this template.
	OptionSettings []OptionSetting
}

ConfigurationTemplateParams holds optional CreateConfigurationTemplate properties beyond the application/template name, description and solution stack.

type CreateEnvironmentParams

type CreateEnvironmentParams struct {
	TierType         string
	TierName         string
	TierVersion      string
	CNAMEPrefix      string
	PlatformARN      string
	TemplateName     string
	VersionLabel     string
	OperationsRole   string
	LoadBalancerType string
	VPCID            string
	Subnets          string
	InstanceProfile  string
	CustomAMI        string
	OptionSettings   []OptionSetting
	OptionsToRemove  []OptionSetting

	EnvironmentLinks []EnvironmentLink
}

CreateEnvironmentParams holds optional parameters for CreateEnvironment (improvements #1, #5, #14, #15, #16).

type Environment

type Environment struct {
	Tags              map[string]string `json:"tags,omitempty"`
	Tier              string            `json:"tier,omitempty"`
	VPCID             string            `json:"vpcId,omitempty"`
	EnvironmentID     string            `json:"environmentId"`
	EnvironmentARN    string            `json:"environmentArn"`
	SolutionStackName string            `json:"solutionStackName,omitempty"`
	CustomAMI         string            `json:"customAMI,omitempty"`
	TemplateName      string            `json:"templateName,omitempty"`
	VersionLabel      string            `json:"versionLabel,omitempty"`
	Description       string            `json:"description,omitempty"`
	ApplicationName   string            `json:"applicationName"`
	PlatformARN       string            `json:"platformArn,omitempty"`
	TierVersion       string            `json:"tierVersion,omitempty"`
	Health            string            `json:"health"`
	TierType          string            `json:"tierType,omitempty"`
	EnvironmentName   string            `json:"environmentName"`
	CNAME             string            `json:"cname,omitempty"`
	TierName          string            `json:"tierName,omitempty"`
	CNAMEPrefix       string            `json:"cnamePrefix,omitempty"`
	LoadBalancerType  string            `json:"loadBalancerType,omitempty"`
	OperationsRole    string            `json:"operationsRole,omitempty"`
	Subnets           string            `json:"subnets,omitempty"`
	InstanceProfile   string            `json:"instanceProfile,omitempty"`
	DateCreated       string            `json:"dateCreated,omitempty"`
	DateUpdated       string            `json:"dateUpdated,omitempty"`
	Region            string            `json:"region"`

	Status string `json:"status"`
	// EnvironmentLinks are the links created from an env.yaml manifest by ComposeEnvironments.
	EnvironmentLinks []EnvironmentLink `json:"environmentLinks,omitempty"`
	OptionSettings   []OptionSetting   `json:"optionSettings,omitempty"`
	// contains filtered or unexported fields
}

Environment represents an Elastic Beanstalk environment.

type EnvironmentLink struct {
	LinkName        string `json:"linkName"`
	EnvironmentName string `json:"environmentName"`
}

EnvironmentLink mirrors types.EnvironmentLink.

type EventRecord

type EventRecord struct {
	ApplicationName string `json:"applicationName,omitempty"`
	EnvironmentName string `json:"environmentName,omitempty"`
	PlatformArn     string `json:"platformArn,omitempty"`
	TemplateName    string `json:"templateName,omitempty"`
	VersionLabel    string `json:"versionLabel,omitempty"`
	EventDate       string `json:"eventDate"`
	RequestID       string `json:"requestId,omitempty"`
	Message         string `json:"message"`
	Severity        string `json:"severity"`
	// contains filtered or unexported fields
}

EventRecord represents a single Elastic Beanstalk event.

type Handler

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

Handler is the Echo HTTP handler for Elastic Beanstalk operations.

func NewHandler

func NewHandler(backend *InMemoryBackend) *Handler

NewHandler creates a new Elastic Beanstalk 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 handler instance handles.

func (*Handler) ChaosServiceName

func (h *Handler) ChaosServiceName() string

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

func (*Handler) ExtractOperation

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

ExtractOperation extracts the Elastic Beanstalk action from the request.

func (*Handler) ExtractResource

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

ExtractResource extracts a resource identifier from the request.

func (*Handler) GetSupportedOperations

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

GetSupportedOperations returns the list of supported operations.

func (*Handler) Handler

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

Handler returns the Echo handler function for Elastic Beanstalk requests.

func (*Handler) MatchPriority

func (h *Handler) MatchPriority() int

MatchPriority returns the routing priority.

func (*Handler) Name

func (h *Handler) Name() string

Name returns the service name.

func (*Handler) Reset

func (h *Handler) Reset()

Reset clears all 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 function that matches Elastic Beanstalk requests. Elastic Beanstalk uses the same Version=2010-12-01 as SES, so we disambiguate by matching on the Action field against the list of supported EB operations. We also require Version=2010-12-01 to avoid matching other services (e.g. SNS with Version=2010-03-31 or CloudWatch with Version=2010-08-01) that share the same action names (e.g. ListTagsForResource).

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 stores AWS Elastic Beanstalk state in memory.

applications, environments, appVersions, configTemplates, and platformVersions were previously nested by region (outer key = region, e.g. map[string]map[string]*Application). Phase 3.3 of the datalayer refactor replaces each with a flat *store.Table, keyed by the composite "region|id" string (see regionKey), with companion *store.Index instances for per-region scans and ARN/name/CNAME reverse lookups -- see store_setup.go for the full rationale and every keyFn. managedActionHistory, events, and envCounters are deliberately NOT converted: they are slice- or scalar-valued maps with no single-value- per-key shape to model as a store.Table, so 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) AbortEnvironmentUpdate

func (b *InMemoryBackend) AbortEnvironmentUpdate(_ context.Context, _ string) error

AbortEnvironmentUpdate aborts an in-progress environment configuration update. This is a no-op in the in-memory backend since updates complete instantly.

func (*InMemoryBackend) AddManagedActionHistory

func (b *InMemoryBackend) AddManagedActionHistory(
	ctx context.Context,
	envName, actionID, actionType, actionDesc, status string,
)

AddManagedActionHistory records a managed action history item for an environment (improvement #4).

func (*InMemoryBackend) ApplyEnvironmentManagedAction

func (b *InMemoryBackend) ApplyEnvironmentManagedAction(ctx context.Context, envName, actionID string) error

ApplyEnvironmentManagedAction applies a scheduled managed action immediately. Records the action in the managed action history (improvement #4).

func (*InMemoryBackend) AssociateEnvironmentOperationsRole

func (b *InMemoryBackend) AssociateEnvironmentOperationsRole(
	ctx context.Context,
	envName, role string,
) error

AssociateEnvironmentOperationsRole associates an operations IAM role with an environment.

func (*InMemoryBackend) CheckDNSAvailability

func (b *InMemoryBackend) CheckDNSAvailability(ctx context.Context, cnamePrefix string) (bool, string)

CheckDNSAvailability checks whether the specified CNAME prefix is available. Returns available=true when no existing environment in the request region uses that prefix.

func (*InMemoryBackend) ComposeEnvironments

func (b *InMemoryBackend) ComposeEnvironments(
	ctx context.Context, p ComposeEnvironmentsParams,
) ([]*Environment, error)

ComposeEnvironments creates or updates the environments described by the env.yaml manifests in the source bundles of the given application versions.

func (*InMemoryBackend) CreateApplication

func (b *InMemoryBackend) CreateApplication(
	ctx context.Context,
	name, description string,
	tags map[string]string,
) (*Application, error)

CreateApplication creates a new Elastic Beanstalk application.

func (*InMemoryBackend) CreateApplicationVersion

func (b *InMemoryBackend) CreateApplicationVersion(
	ctx context.Context,
	appName, versionLabel, description string,
	s3Bucket, s3Key string,
	tags map[string]string,
) (*ApplicationVersion, error)

CreateApplicationVersion creates a new application version.

func (*InMemoryBackend) CreateApplicationVersionWithParams

func (b *InMemoryBackend) CreateApplicationVersionWithParams(
	ctx context.Context,
	appName, versionLabel string,
	params ApplicationVersionParams,
) (*ApplicationVersion, error)

CreateApplicationVersionWithParams creates a new application version with source and processing state.

func (*InMemoryBackend) CreateApplicationWithParams

func (b *InMemoryBackend) CreateApplicationWithParams(
	ctx context.Context,
	name, description string,
	tags map[string]string,
	lifecycle *ApplicationResourceLifecycleParams,
) (*Application, error)

CreateApplicationWithParams creates a new application, optionally seeding its ResourceLifecycleConfig (real CreateApplicationInput member, api_op_CreateApplication.go -- previously accepted nowhere in this handler, see PARITY.md items_still_open). lifecycle may be nil.

func (*InMemoryBackend) CreateConfigurationTemplate

func (b *InMemoryBackend) CreateConfigurationTemplate(
	ctx context.Context,
	appName, templateName, description, solutionStack string,
	tags map[string]string,
) (*ConfigurationTemplate, error)

CreateConfigurationTemplate creates a new configuration template for an application.

func (*InMemoryBackend) CreateConfigurationTemplateWithParams added in v1.2.0

func (b *InMemoryBackend) CreateConfigurationTemplateWithParams(
	ctx context.Context,
	appName, templateName, description, solutionStack string,
	tags map[string]string,
	params ConfigurationTemplateParams,
) (*ConfigurationTemplate, error)

CreateConfigurationTemplateWithParams creates a new configuration template, additionally accepting PlatformArn and OptionSettings (improvement: these were previously accepted on the wire but silently dropped, so a template's OptionSettings could never be set at creation time or read back via DescribeConfigurationSettings).

func (*InMemoryBackend) CreateEnvironment

func (b *InMemoryBackend) CreateEnvironment(
	ctx context.Context,
	appName, envName, solutionStack, description string,
	tags map[string]string,
	params CreateEnvironmentParams,
) (*Environment, error)

CreateEnvironment creates a new Elastic Beanstalk environment.

func (*InMemoryBackend) CreatePlatformVersion

func (b *InMemoryBackend) CreatePlatformVersion(
	ctx context.Context,
	platformName, platformVersion string,
	tags map[string]string,
) (*PlatformVersion, error)

CreatePlatformVersion creates a new custom platform version.

func (*InMemoryBackend) CreateStorageLocation

func (b *InMemoryBackend) CreateStorageLocation(ctx context.Context) string

CreateStorageLocation returns the S3 bucket used for storing Elastic Beanstalk data. The bucket name is fixed per region and account, and creation is idempotent.

func (*InMemoryBackend) DeleteApplication

func (b *InMemoryBackend) DeleteApplication(ctx context.Context, name string, terminateEnvByForce bool) error

DeleteApplication removes an application and all associated versions and configuration templates. Real AWS: "You cannot delete an application that has a running environment" -- unless terminateEnvByForce is set, in which case running environments are terminated first.

func (*InMemoryBackend) DeleteApplicationVersion

func (b *InMemoryBackend) DeleteApplicationVersion(ctx context.Context, appName, versionLabel string) error

DeleteApplicationVersion removes an application version. Real AWS: "You cannot delete an application version that is associated with a running environment".

func (*InMemoryBackend) DeleteConfigurationTemplate

func (b *InMemoryBackend) DeleteConfigurationTemplate(ctx context.Context, appName, templateName string) error

DeleteConfigurationTemplate removes a configuration template.

func (*InMemoryBackend) DeleteEnvironmentConfiguration

func (b *InMemoryBackend) DeleteEnvironmentConfiguration(_ context.Context, _, _ string) error

DeleteEnvironmentConfiguration deletes the draft configuration associated with an environment. This is a no-op in the in-memory backend.

func (*InMemoryBackend) DeletePlatformVersion

func (b *InMemoryBackend) DeletePlatformVersion(ctx context.Context, platformARN string) (*PlatformVersion, error)

DeletePlatformVersion removes a platform version by ARN and returns the deleted version.

func (*InMemoryBackend) DescribeApplicationVersions

func (b *InMemoryBackend) DescribeApplicationVersions(
	ctx context.Context,
	appName string,
	versionLabels []string,
) []*ApplicationVersion

DescribeApplicationVersions returns application versions, optionally filtered. Results are sorted by VersionLabel for deterministic output.

func (*InMemoryBackend) DescribeApplications

func (b *InMemoryBackend) DescribeApplications(ctx context.Context, names []string) []*Application

DescribeApplications returns applications, optionally filtered by names. Results are sorted by ApplicationName for deterministic output.

func (*InMemoryBackend) DescribeConfigurationTemplates

func (b *InMemoryBackend) DescribeConfigurationTemplates(ctx context.Context, appName string) []*ConfigurationTemplate

DescribeConfigurationTemplates returns all configuration templates for an application (improvement #17).

func (*InMemoryBackend) DescribeDeletedEnvironments

func (b *InMemoryBackend) DescribeDeletedEnvironments(
	ctx context.Context,
	appName string,
	envNames, envIDs []string,
	since time.Time,
) []*Environment

DescribeDeletedEnvironments returns terminated environments deleted after since (zero means all).

func (*InMemoryBackend) DescribeEnvironmentHealth

func (b *InMemoryBackend) DescribeEnvironmentHealth(ctx context.Context, envName string) (string, string, error)

DescribeEnvironmentHealth returns the health and status of an environment by name.

func (*InMemoryBackend) DescribeEnvironmentManagedActionHistory

func (b *InMemoryBackend) DescribeEnvironmentManagedActionHistory(
	ctx context.Context,
	envName string,
) []*ManagedActionHistory

DescribeEnvironmentManagedActionHistory returns stored managed action history for an environment (improvement #4).

func (*InMemoryBackend) DescribeEnvironments

func (b *InMemoryBackend) DescribeEnvironments(
	ctx context.Context,
	appName string,
	envNames []string,
	envIDs []string,
) []*Environment

DescribeEnvironments returns environments, optionally filtered by app/environment names or IDs. Results are sorted by EnvironmentName for deterministic output.

func (*InMemoryBackend) DescribeEvents

func (b *InMemoryBackend) DescribeEvents(ctx context.Context, appName, envName string) []*EventRecord

DescribeEvents returns event records filtered by optional application and environment name. The most recent events are returned first (reverse insertion order).

func (*InMemoryBackend) DescribePlatformVersion

func (b *InMemoryBackend) DescribePlatformVersion(ctx context.Context, platformARN string) (*PlatformVersion, error)

DescribePlatformVersion returns a platform version by ARN.

func (*InMemoryBackend) DisassociateEnvironmentOperationsRole

func (b *InMemoryBackend) DisassociateEnvironmentOperationsRole(ctx context.Context, envName string) error

DisassociateEnvironmentOperationsRole removes the operations role from an environment.

func (*InMemoryBackend) HasConfigurationTemplate

func (b *InMemoryBackend) HasConfigurationTemplate(ctx context.Context, appName, templateName string) bool

HasConfigurationTemplate reports whether appName has a template named templateName.

func (*InMemoryBackend) ListPlatformVersions

func (b *InMemoryBackend) ListPlatformVersions(ctx context.Context) []*PlatformVersion

ListPlatformVersions returns all stored platform versions sorted by ARN.

func (*InMemoryBackend) ListTagsForResource

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

ListTagsForResource returns the tags for a resource identified by ARN. Tags are returned sorted by key for deterministic output.

func (*InMemoryBackend) Region

func (b *InMemoryBackend) Region() string

Region returns the AWS region this backend is configured for.

func (*InMemoryBackend) Reset

func (b *InMemoryBackend) Reset()

Reset clears all backend state, resetting to an empty store.

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

func (b *InMemoryBackend) SetAppConfig(cfg any)

SetAppConfig records the service.AppContext.Config for lazy sibling lookup.

func (*InMemoryBackend) SetClock

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

SetClock overrides the backend clock for deterministic lifecycle tests; nil restores time.Now.

func (*InMemoryBackend) SetLifecycleDelay

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

SetLifecycleDelay sets how long environments report Launching, Updating and Terminating. Zero (the default) settles instantly.

func (*InMemoryBackend) SetS3Backend

func (b *InMemoryBackend) SetS3Backend(r S3Reader)

SetS3Backend wires the S3 backend used to read source bundles.

func (*InMemoryBackend) Snapshot

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

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

func (*InMemoryBackend) SwapEnvironmentCNAMEs

func (b *InMemoryBackend) SwapEnvironmentCNAMEs(ctx context.Context, sourceEnvName, destEnvName string) error

SwapEnvironmentCNAMEs swaps the CNAME values between two environments (improvement #10).

func (*InMemoryBackend) TerminateEnvironment

func (b *InMemoryBackend) TerminateEnvironment(ctx context.Context, appName, envName string) (*Environment, error)

TerminateEnvironment marks an environment as Terminated and removes it from storage.

func (*InMemoryBackend) UpdateApplication

func (b *InMemoryBackend) UpdateApplication(ctx context.Context, name, description string) (*Application, error)

UpdateApplication updates an application's description.

func (*InMemoryBackend) UpdateApplicationResourceLifecycle

func (b *InMemoryBackend) UpdateApplicationResourceLifecycle(
	ctx context.Context,
	appName, serviceRole string,
) (*Application, error)

UpdateApplicationResourceLifecycle stores the resource lifecycle service role on the application (improvement #7).

func (*InMemoryBackend) UpdateApplicationResourceLifecycleWithParams

func (b *InMemoryBackend) UpdateApplicationResourceLifecycleWithParams(
	ctx context.Context,
	appName string,
	lifecycle ApplicationResourceLifecycleParams,
) (*Application, error)

UpdateApplicationResourceLifecycleWithParams applies lifecycle's fields to appName: ApplicationVersionLifecycleConfig's MaxAgeRule/MaxCountRule (real members, api_op_UpdateApplicationResourceLifecycle.go) were previously accepted nowhere -- see PARITY.md items_still_open.

func (*InMemoryBackend) UpdateApplicationVersion

func (b *InMemoryBackend) UpdateApplicationVersion(
	ctx context.Context,
	appName, versionLabel, description string,
) (*ApplicationVersion, error)

UpdateApplicationVersion updates an application version's description.

func (*InMemoryBackend) UpdateConfigurationTemplate

func (b *InMemoryBackend) UpdateConfigurationTemplate(
	ctx context.Context,
	appName, templateName, description string,
) (*ConfigurationTemplate, error)

UpdateConfigurationTemplate updates a configuration template's description.

func (*InMemoryBackend) UpdateConfigurationTemplateWithParams added in v1.2.0

func (b *InMemoryBackend) UpdateConfigurationTemplateWithParams(
	ctx context.Context,
	appName, templateName string,
	params UpdateConfigurationTemplateParams,
) (*ConfigurationTemplate, error)

UpdateConfigurationTemplateWithParams updates a configuration template's description and/or option settings (improvement: OptionSettings/ OptionsToRemove were previously accepted on the wire but silently dropped -- see CreateConfigurationTemplateWithParams).

func (*InMemoryBackend) UpdateEnvironment

func (b *InMemoryBackend) UpdateEnvironment(
	ctx context.Context,
	appName, envName, description, solutionStack string,
) (*Environment, error)

UpdateEnvironment updates an environment's description or solution stack.

func (*InMemoryBackend) UpdateEnvironmentWithParams

func (b *InMemoryBackend) UpdateEnvironmentWithParams(
	ctx context.Context,
	appName, envName string,
	params UpdateEnvironmentParams,
) (*Environment, error)

UpdateEnvironmentWithParams applies all mutable environment properties.

func (*InMemoryBackend) UpdateTagsForResource

func (b *InMemoryBackend) UpdateTagsForResource(
	ctx context.Context,
	resourceARN string,
	addTags, removeTags map[string]string,
) error

UpdateTagsForResource updates tags on a resource identified by ARN.

type ManagedActionHistory

type ManagedActionHistory struct {
	ActionID          string `json:"actionId"`
	ActionType        string `json:"actionType"`
	ActionDescription string `json:"actionDescription"`
	Status            string `json:"status"`
	FinishedTime      string `json:"finishedTime"`
}

ManagedActionHistory represents a record of a managed action that was applied (improvement #4).

type MaxAgeRule

type MaxAgeRule struct {
	Enabled            bool  `json:"enabled"`
	DeleteSourceFromS3 bool  `json:"deleteSourceFromS3,omitempty"`
	MaxAgeInDays       int32 `json:"maxAgeInDays,omitempty"`
}

MaxAgeRule mirrors types.MaxAgeRule (ApplicationVersionLifecycleConfig's age-based retention rule): restricts the length of time that application versions are retained for an application.

type MaxCountRule

type MaxCountRule struct {
	Enabled            bool  `json:"enabled"`
	DeleteSourceFromS3 bool  `json:"deleteSourceFromS3,omitempty"`
	MaxCount           int32 `json:"maxCount,omitempty"`
}

MaxCountRule mirrors types.MaxCountRule (ApplicationVersionLifecycleConfig's count-based retention rule): restricts the number of application versions that are retained for an application.

type OptionSetting

type OptionSetting struct {
	Namespace    string `json:"namespace"`
	OptionName   string `json:"optionName"`
	ResourceName string `json:"resourceName,omitempty"`
	Value        string `json:"value,omitempty"`
}

OptionSetting is a configured Elastic Beanstalk environment option.

type PlatformVersion

type PlatformVersion struct {
	Tags            map[string]string `json:"tags,omitempty"`
	PlatformArn     string            `json:"platformArn"`
	PlatformName    string            `json:"platformName"`
	PlatformVersion string            `json:"platformVersion"`
	PlatformStatus  string            `json:"platformStatus"`
	// contains filtered or unexported fields
}

PlatformVersion represents an Elastic Beanstalk platform version.

type Provider

type Provider struct{}

Provider implements service.Provider for the Elastic Beanstalk service.

func (*Provider) Init

Init initializes the Elastic Beanstalk backend and handler.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the logical name of the provider.

type S3Reader

type S3Reader interface {
	GetObject(ctx context.Context, input *awss3.GetObjectInput) (*awss3.GetObjectOutput, error)
}

S3Reader is the slice of S3 needed to read application source bundles.

type SourceBuildInformation

type SourceBuildInformation struct {
	SourceType       string `json:"sourceType,omitempty"`
	SourceRepository string `json:"sourceRepository,omitempty"`
	SourceLocation   string `json:"sourceLocation,omitempty"`
}

SourceBuildInformation identifies a CodeCommit source for an application version.

type UpdateConfigurationTemplateParams added in v1.2.0

type UpdateConfigurationTemplateParams struct {
	Description     string
	OptionSettings  []OptionSetting
	OptionsToRemove []OptionSetting
}

UpdateConfigurationTemplateParams holds the mutable fields accepted by UpdateConfigurationTemplate (real AWS's UpdateConfigurationTemplateInput: Description, OptionSettings, OptionsToRemove -- unlike UpdateEnvironment, there is no SolutionStackName/PlatformArn/TemplateName swap support).

type UpdateEnvironmentParams

type UpdateEnvironmentParams struct {
	SolutionStackName string
	PlatformARN       string
	TemplateName      string
	VersionLabel      string
	Description       string
	TierType          string
	TierName          string
	TierVersion       string
	OptionSettings    []OptionSetting
	OptionsToRemove   []OptionSetting
	EnvironmentLinks  []EnvironmentLink
}

UpdateEnvironmentParams holds state changes accepted by UpdateEnvironment.

Jump to

Keyboard shortcuts

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