appconfig

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 26 Imported by: 0

README

AppConfig

Parity grade: A · SDK aws-sdk-go-v2/service/appconfig@v1.43.11 · last audited 2026-07-12 (f86ef17b)

Coverage

Metric Value
Operations audited 45 (43 ok, 2 partial)
Feature families 2 (2 ok)
Known gaps 3
Deferred items 1
Resource leaks clean
Known gaps
  • GetExtension/DeleteExtension ignore the real API's optional version_number/version query params (extensions are versioned resources in AWS; this backend only keeps the current version). Fixing requires storing each UpdateExtension call as a new addressable version rather than mutating in place — a larger data-model change than warranted for this pass given Extensions are a lower-traffic family. File a bd issue if multi-version extension addressing is needed.
  • StartDeployment does not validate that ConfigurationVersion refers to an existing HostedConfigurationVersion/label before creating the deployment; real AWS returns ResourceNotFoundException for an unknown version. Low risk (deployment succeeds with an unvalidated version string) but worth a follow-up bd issue.
  • CreateHostedConfigurationVersion ignores the optional Latest-Version-Number request header (an optimistic-concurrency check some clients send); silently accepted rather than validated. Low-traffic corner case.
Deferred
  • Extension/ExtensionAssociation family only spot-checked (wire shapes for Create/Get/List/Delete verified accurate); the versioning gap above is the one open item.

More

Documentation

Overview

Package appconfig provides an in-memory stub for the AWS AppConfig service, which manages feature flags and application configuration.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrApplicationNotFound is returned when the requested application does not exist.
	ErrApplicationNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound)
	// ErrEnvironmentNotFound is returned when the requested environment does not exist.
	ErrEnvironmentNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound)
	// ErrConfigurationProfileNotFound is returned when the requested configuration profile does not exist.
	ErrConfigurationProfileNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound)
	// ErrHostedConfigVersionNotFound is returned when the requested hosted configuration version does not exist.
	ErrHostedConfigVersionNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound)
	// ErrDeploymentStrategyNotFound is returned when the requested deployment strategy does not exist.
	ErrDeploymentStrategyNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound)
	// ErrDeploymentNotFound is returned when the requested deployment does not exist.
	ErrDeploymentNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound)
	// ErrExtensionNotFound is returned when the requested extension does not exist.
	ErrExtensionNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound)
	// ErrExtensionAssociationNotFound is returned when the requested extension association does not exist.
	ErrExtensionAssociationNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound)
	// ErrExtensionAlreadyExists is returned when an extension with the same name already exists.
	ErrExtensionAlreadyExists = awserr.New("ConflictException", awserr.ErrAlreadyExists)
	// ErrBadRequest is returned when a required field is missing or invalid.
	ErrBadRequest = awserr.New("BadRequestException", awserr.ErrInvalidParameter)
	// ErrConflict is returned when a resource with the same name already exists.
	ErrConflict = awserr.New("ConflictException", awserr.ErrAlreadyExists)
	// ErrPayloadTooLarge is returned when a hosted configuration version exceeds the maximum size.
	ErrPayloadTooLarge = awserr.New("PayloadTooLargeException", awserr.ErrInvalidParameter)
)

Functions

This section is empty.

Types

type AccountSettings

type AccountSettings struct {
	DeletionProtection *DeletionProtectionSettings `json:"DeletionProtection,omitempty"`
}

AccountSettings holds account-level AppConfig settings.

type Application

type Application struct {
	CreatedAt   time.Time `json:"CreatedAt,omitzero"`
	UpdatedAt   time.Time `json:"UpdatedAt,omitzero"`
	ID          string    `json:"Id"`
	Name        string    `json:"Name"`
	Description string    `json:"Description,omitempty"`
}

Application represents an AppConfig application. JSON field names match the AWS AppConfig REST API (PascalCase).

type ConfigurationProfile

type ConfigurationProfile struct {
	ApplicationID    string      `json:"ApplicationId"`
	ID               string      `json:"Id"`
	Name             string      `json:"Name"`
	Description      string      `json:"Description,omitempty"`
	LocationURI      string      `json:"LocationUri"`
	Type             string      `json:"Type,omitempty"`
	RetrievalRoleArn string      `json:"RetrievalRoleArn,omitempty"`
	Validators       []Validator `json:"Validators,omitempty"`
}

ConfigurationProfile represents an AppConfig configuration profile.

type DeletionProtectionSettings

type DeletionProtectionSettings struct {
	Enabled                   *bool  `json:"Enabled,omitempty"`
	ProtectionPeriodInMinutes *int32 `json:"ProtectionPeriodInMinutes,omitempty"`
}

DeletionProtectionSettings represents the deletion protection configuration for an account.

type Deployment

type Deployment struct {
	StartedAt              time.Time `json:"StartedAt,omitzero"`
	CompletedAt            time.Time `json:"CompletedAt,omitzero"`
	ApplicationID          string    `json:"ApplicationId"`
	EnvironmentID          string    `json:"EnvironmentId"`
	ConfigurationProfileID string    `json:"ConfigurationProfileId"`
	DeploymentStrategyID   string    `json:"DeploymentStrategyId"`
	ConfigurationVersion   string    `json:"ConfigurationVersion"`
	State                  string    `json:"State"`
	TriggeredBy            string    `json:"TriggeredBy,omitempty"`
	Description            string    `json:"Description,omitempty"`
	PercentageComplete     float32   `json:"PercentageComplete,omitempty"`
	DeploymentNumber       int32     `json:"DeploymentNumber"`
}

Deployment represents an AppConfig deployment.

type DeploymentStrategy

type DeploymentStrategy struct {
	CreatedAt                   time.Time `json:"CreatedAt,omitzero"`
	UpdatedAt                   time.Time `json:"UpdatedAt,omitzero"`
	ID                          string    `json:"Id"`
	Name                        string    `json:"Name"`
	Description                 string    `json:"Description,omitempty"`
	GrowthType                  string    `json:"GrowthType"`
	ReplicateTo                 string    `json:"ReplicateTo"`
	DeploymentDurationInMinutes int32     `json:"DeploymentDurationInMinutes"`
	GrowthFactor                float32   `json:"GrowthFactor"`
	FinalBakeTimeInMinutes      int32     `json:"FinalBakeTimeInMinutes"`
}

DeploymentStrategy represents an AppConfig deployment strategy.

type Environment

type Environment struct {
	CreatedAt     time.Time `json:"CreatedAt,omitzero"`
	UpdatedAt     time.Time `json:"UpdatedAt,omitzero"`
	ApplicationID string    `json:"ApplicationId"`
	ID            string    `json:"Id"`
	Name          string    `json:"Name"`
	Description   string    `json:"Description,omitempty"`
	State         string    `json:"State"`
	Monitors      []Monitor `json:"Monitors,omitempty"`
}

Environment represents an AppConfig environment.

type Extension

type Extension struct {
	Actions       map[string][]ExtensionAction  `json:"Actions,omitempty"`
	Parameters    map[string]ExtensionParameter `json:"Parameters,omitempty"`
	Arn           string                        `json:"Arn"`
	Description   string                        `json:"Description,omitempty"`
	ID            string                        `json:"Id"`
	Name          string                        `json:"Name"`
	VersionNumber int32                         `json:"VersionNumber"`
}

Extension represents an AppConfig extension.

type ExtensionAction

type ExtensionAction struct {
	Name        string `json:"Name,omitempty"`
	Description string `json:"Description,omitempty"`
	RoleArn     string `json:"RoleArn,omitempty"`
	URI         string `json:"Uri,omitempty"`
}

ExtensionAction represents a single action in an AppConfig extension.

type ExtensionAssociation

type ExtensionAssociation struct {
	Parameters             map[string]string `json:"Parameters,omitempty"`
	Arn                    string            `json:"Arn"`
	ExtensionArn           string            `json:"ExtensionArn"`
	ID                     string            `json:"Id"`
	ResourceArn            string            `json:"ResourceArn"`
	ExtensionVersionNumber int32             `json:"ExtensionVersionNumber"`
}

ExtensionAssociation represents an association between an extension and an AppConfig resource.

type ExtensionParameter

type ExtensionParameter struct {
	Description string `json:"Description,omitempty"`
	Required    bool   `json:"Required,omitempty"`
}

ExtensionParameter describes a parameter accepted by an extension.

type Handler

type Handler struct {
	Backend StorageBackend
}

Handler is the Echo HTTP handler for AppConfig operations.

func NewHandler

func NewHandler(backend StorageBackend) *Handler

NewHandler creates a new AppConfig 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 returns the operation name based on the parsed path and HTTP method.

func (*Handler) ExtractResource

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

ExtractResource extracts the primary resource ID from the URL path.

func (*Handler) GetSupportedOperations

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

GetSupportedOperations returns the list of supported operations.

func (*Handler) Handler

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

Handler returns the Echo handler function for AppConfig operations.

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) 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 matching AppConfig REST API requests.

func (*Handler) Snapshot

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

Snapshot implements persistence.Persistable by delegating to the backend. Handler previously had no Snapshot/Restore of its own -- and neither did InMemoryBackend -- so cli.go's generic setupPersistence (which type-asserts the registered service.Registerable, i.e. the Handler, for a Snapshot/Restore pair) never picked AppConfig up at all: dead wiring, with no persistence underneath it either. This delegation (matching the cleanrooms/codecommit/emr/workmail pattern) is what wires AppConfig into persistence for the first time.

type HostedConfigurationVersion

type HostedConfigurationVersion struct {
	CreatedAt              time.Time `json:"CreatedAt,omitzero"`
	ApplicationID          string    `json:"ApplicationId"`
	ConfigurationProfileID string    `json:"ConfigurationProfileId"`
	ContentType            string    `json:"ContentType"`
	Description            string    `json:"Description,omitempty"`
	VersionLabel           string    `json:"VersionLabel,omitempty"`
	Content                []byte    `json:"-"`
	VersionNumber          int32     `json:"VersionNumber"`
}

HostedConfigurationVersion represents a hosted configuration version.

type InMemoryBackend

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

InMemoryBackend implements StorageBackend for AppConfig using a store.Registry of store.Table-backed resource collections.

applications, deploymentStrategies, extensions, and extensionAssociations are flat, top-level collections keyed by their own real identity field (ID), matching the services/sesv2 / services/dax / services/datasync clean-direct-register template.

environments and configProfiles were previously nested two levels deep (outer key = applicationID; inner key = the resource's own ID). Both Environment.ID and ConfigurationProfile.ID are generated by the same globally-random newResourceID() every other resource in this backend uses (not parent-scoped), so -- per the opsworks/datasync "globally-unique ID, bare-ID lookups" precedent -- each registers DIRECTLY on its own ID, with a companion byApp *store.Index (grouping entries by ApplicationID) added additively for the per-application List/cascade-delete operations the nested maps used to answer directly. A second byAppName *store.Index (composite "applicationID|name" key) replaces the old environmentsByName/configProfilesByName nested reverse maps for the per-application name-uniqueness checks.

hostedConfigVersions and deployments were previously nested three levels deep (outer key = applicationID; middle key = profileID/environmentID; inner key = an int32 VersionNumber/DeploymentNumber). Unlike the resource IDs above, VersionNumber and DeploymentNumber are per-parent counters -- unique only within their owning profile/environment, not globally -- so per the composite-key rule each flattens to one *store.Table keyed by a composite "applicationID|parentID|number" string (see hcvKey/deploymentKey below), with companion *store.Index values grouping entries by profile/env (List operations) and by application (DeleteApplication's cascade delete). hostedConfigVersions additionally carries a byLabel *store.Index replacing the old versionLabelIndex raw map: VersionLabel uniqueness is answered by the index instead of a parallel set.

Left as plain maps (not store.Table-backed):

  • tags (map[string]map[string]string): its values are plain string maps, not *T, so it does not fit store.Table's keyed-by-identity-value shape.
  • versionCounters, deploymentCounters (map[string]map[string]int32): their values are int32, not *T. Both must survive Snapshot/Restore (see persistence.go) since they are the source of truth for the next version/deployment number -- reconstructing them from the tables' current contents would under-count after any delete.
  • accountSettings is a single struct, not a map at all.

func NewInMemoryBackend

func NewInMemoryBackend(accountID, region string) *InMemoryBackend

NewInMemoryBackend creates a new InMemoryBackend for AppConfig.

func (*InMemoryBackend) CreateApplication

func (b *InMemoryBackend) CreateApplication(name, description string) (*Application, error)

CreateApplication creates a new AppConfig application.

func (*InMemoryBackend) CreateConfigurationProfile

func (b *InMemoryBackend) CreateConfigurationProfile(
	applicationID, name, description, locationURI, profileType, retrievalRoleArn string,
	validators []Validator,
) (*ConfigurationProfile, error)

CreateConfigurationProfile creates a new configuration profile.

func (*InMemoryBackend) CreateDeploymentStrategy

func (b *InMemoryBackend) CreateDeploymentStrategy(
	name, description string,
	deploymentDuration, bakeTime int32,
	growthFactor float32,
	growthType, replicateTo string,
) (*DeploymentStrategy, error)

CreateDeploymentStrategy creates a new deployment strategy.

func (*InMemoryBackend) CreateEnvironment

func (b *InMemoryBackend) CreateEnvironment(
	applicationID, name, description string,
	monitors []Monitor,
) (*Environment, error)

CreateEnvironment creates a new environment within an application.

func (*InMemoryBackend) CreateExtension

func (b *InMemoryBackend) CreateExtension(
	name, description string,
	actions map[string][]ExtensionAction,
	parameters map[string]ExtensionParameter,
) (*Extension, error)

CreateExtension creates a new AppConfig extension.

func (*InMemoryBackend) CreateExtensionAssociation

func (b *InMemoryBackend) CreateExtensionAssociation(
	extensionIdentifier, resourceIdentifier string,
	parameters map[string]string,
	extensionVersionNumber *int32,
) (*ExtensionAssociation, error)

CreateExtensionAssociation creates an association between an extension and a resource.

func (*InMemoryBackend) CreateHostedConfigurationVersion

func (b *InMemoryBackend) CreateHostedConfigurationVersion(
	applicationID, profileID, contentType, description, versionLabel string,
	content []byte,
) (*HostedConfigurationVersion, error)

CreateHostedConfigurationVersion creates a hosted configuration version.

func (*InMemoryBackend) DeleteApplication

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

DeleteApplication deletes an application by ID.

func (*InMemoryBackend) DeleteConfigurationProfile

func (b *InMemoryBackend) DeleteConfigurationProfile(applicationID, profileID string) error

DeleteConfigurationProfile deletes a configuration profile.

func (*InMemoryBackend) DeleteDeploymentStrategy

func (b *InMemoryBackend) DeleteDeploymentStrategy(strategyID string) error

DeleteDeploymentStrategy deletes a deployment strategy.

func (*InMemoryBackend) DeleteEnvironment

func (b *InMemoryBackend) DeleteEnvironment(applicationID, environmentID string) error

DeleteEnvironment deletes an environment.

func (*InMemoryBackend) DeleteExtension

func (b *InMemoryBackend) DeleteExtension(extensionIdentifier string) error

DeleteExtension deletes an extension by identifier (ID or name).

func (*InMemoryBackend) DeleteExtensionAssociation

func (b *InMemoryBackend) DeleteExtensionAssociation(extensionAssociationID string) error

DeleteExtensionAssociation deletes an extension association by ID.

func (*InMemoryBackend) DeleteHostedConfigurationVersion

func (b *InMemoryBackend) DeleteHostedConfigurationVersion(
	applicationID, profileID string,
	versionNumber int32,
) error

DeleteHostedConfigurationVersion deletes a hosted configuration version.

func (*InMemoryBackend) GetAccountSettings

func (b *InMemoryBackend) GetAccountSettings() (*AccountSettings, error)

GetAccountSettings returns the account-level AppConfig settings.

func (*InMemoryBackend) GetApplication

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

GetApplication retrieves an application by ID.

func (*InMemoryBackend) GetConfiguration

func (b *InMemoryBackend) GetConfiguration(
	application, environment, configuration string,
) (*HostedConfigurationVersion, error)

GetConfiguration retrieves the latest deployed configuration for the given application, environment, and configuration profile (deprecated API).

func (*InMemoryBackend) GetConfigurationProfile

func (b *InMemoryBackend) GetConfigurationProfile(
	applicationID, profileID string,
) (*ConfigurationProfile, error)

GetConfigurationProfile retrieves a configuration profile.

func (*InMemoryBackend) GetDeployment

func (b *InMemoryBackend) GetDeployment(
	applicationID, environmentID string,
	deploymentNumber int32,
) (*Deployment, error)

GetDeployment retrieves a deployment.

func (*InMemoryBackend) GetDeploymentStrategy

func (b *InMemoryBackend) GetDeploymentStrategy(strategyID string) (*DeploymentStrategy, error)

GetDeploymentStrategy retrieves a deployment strategy by ID.

func (*InMemoryBackend) GetEnvironment

func (b *InMemoryBackend) GetEnvironment(
	applicationID, environmentID string,
) (*Environment, error)

GetEnvironment retrieves an environment by application and environment ID.

func (*InMemoryBackend) GetExtension

func (b *InMemoryBackend) GetExtension(extensionIdentifier string) (*Extension, error)

GetExtension retrieves an extension by identifier (ID or name).

func (*InMemoryBackend) GetExtensionAssociation

func (b *InMemoryBackend) GetExtensionAssociation(
	extensionAssociationID string,
) (*ExtensionAssociation, error)

GetExtensionAssociation retrieves an extension association by ID.

func (*InMemoryBackend) GetHostedConfigurationVersion

func (b *InMemoryBackend) GetHostedConfigurationVersion(
	applicationID, profileID string,
	versionNumber int32,
) (*HostedConfigurationVersion, error)

GetHostedConfigurationVersion retrieves a hosted configuration version.

func (*InMemoryBackend) ListApplications

func (b *InMemoryBackend) ListApplications(
	nextToken string,
	maxResults int,
) ([]Application, string)

ListApplications returns paginated applications.

func (*InMemoryBackend) ListConfigurationProfiles

func (b *InMemoryBackend) ListConfigurationProfiles(
	applicationID, nextToken string,
	maxResults int,
) ([]ConfigurationProfile, string, error)

ListConfigurationProfiles returns paginated profiles for an application.

func (*InMemoryBackend) ListDeploymentStrategies

func (b *InMemoryBackend) ListDeploymentStrategies(
	nextToken string,
	maxResults int,
) ([]DeploymentStrategy, string)

ListDeploymentStrategies returns paginated deployment strategies.

func (*InMemoryBackend) ListDeployments

func (b *InMemoryBackend) ListDeployments(
	applicationID, environmentID, nextToken string,
	maxResults int,
) ([]Deployment, string, error)

ListDeployments returns paginated deployments for an environment.

func (*InMemoryBackend) ListEnvironments

func (b *InMemoryBackend) ListEnvironments(
	applicationID, nextToken string,
	maxResults int,
) ([]Environment, string, error)

ListEnvironments returns paginated environments for an application.

func (*InMemoryBackend) ListExtensionAssociations

func (b *InMemoryBackend) ListExtensionAssociations(
	nextToken, extensionIdentifier, resourceIdentifier string,
	maxResults int,
) ([]ExtensionAssociation, string)

ListExtensionAssociations returns paginated extension associations, optionally filtered by extensionIdentifier (ARN prefix) and/or resourceIdentifier (ARN prefix).

func (*InMemoryBackend) ListExtensions

func (b *InMemoryBackend) ListExtensions(
	nextToken string,
	maxResults int,
	nameFilter string,
	versionNumber int32,
) ([]Extension, string)

ListExtensions returns paginated extensions, optionally filtered by name and/or version number.

func (*InMemoryBackend) ListHostedConfigurationVersions

func (b *InMemoryBackend) ListHostedConfigurationVersions(
	applicationID, profileID, nextToken, versionLabel string, maxResults int,
) ([]HostedConfigurationVersion, string, error)

ListHostedConfigurationVersions returns paginated versions for a profile, optionally filtered by versionLabel.

func (*InMemoryBackend) ListTagsForResource

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

ListTagsForResource returns the tags for the given resource ARN.

func (*InMemoryBackend) PaginationSecret

func (b *InMemoryBackend) PaginationSecret() string

PaginationSecret returns the HMAC secret for pagination tokens.

func (*InMemoryBackend) Restore

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

Restore deserializes backend state from a snapshot. It implements persistence.Persistable.

func (*InMemoryBackend) Snapshot

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

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

func (*InMemoryBackend) StartDeployment

func (b *InMemoryBackend) StartDeployment(
	applicationID, environmentID, configProfileID, strategyID, configVersion, description string,
) (*Deployment, error)

StartDeployment starts a deployment.

func (*InMemoryBackend) StopDeployment

func (b *InMemoryBackend) StopDeployment(
	applicationID, environmentID string,
	deploymentNumber int32,
) error

StopDeployment stops an in-progress deployment.

func (*InMemoryBackend) TagResource

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

TagResource adds or replaces tags on the given resource ARN.

func (*InMemoryBackend) UntagResource

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

UntagResource removes the specified tag keys from the given resource ARN.

func (*InMemoryBackend) UpdateAccountSettings

func (b *InMemoryBackend) UpdateAccountSettings(
	deletionProtection *DeletionProtectionSettings,
) (*AccountSettings, error)

UpdateAccountSettings updates account-level AppConfig settings.

func (*InMemoryBackend) UpdateApplication

func (b *InMemoryBackend) UpdateApplication(
	applicationID string, name, description *string,
) (*Application, error)

UpdateApplication updates an application's name and description. A nil name/description means the request omitted that field, and AWS AppConfig leaves an omitted field unchanged rather than clearing it (only an explicit, present value -- including "" -- overwrites).

func (*InMemoryBackend) UpdateConfigurationProfile

func (b *InMemoryBackend) UpdateConfigurationProfile(
	applicationID, profileID string,
	name, description, retrievalRoleArn *string,
	validators *[]Validator,
) (*ConfigurationProfile, error)

UpdateConfigurationProfile updates a configuration profile. A nil name/description/retrievalRoleArn/validators means the request omitted that field, and AWS AppConfig leaves an omitted field unchanged rather than clearing it.

func (*InMemoryBackend) UpdateDeploymentStrategy

func (b *InMemoryBackend) UpdateDeploymentStrategy(
	strategyID, name string,
	description *string,
	deploymentDuration, bakeTime int32,
	growthFactor float32,
) (*DeploymentStrategy, error)

UpdateDeploymentStrategy updates a deployment strategy. A nil description means the request omitted that field, and AWS AppConfig leaves an omitted field unchanged rather than clearing it.

func (*InMemoryBackend) UpdateEnvironment

func (b *InMemoryBackend) UpdateEnvironment(
	applicationID, environmentID string,
	name, description *string,
	monitors *[]Monitor,
) (*Environment, error)

UpdateEnvironment updates an environment's name, description, and monitors. A nil name/description/monitors means the request omitted that field, and AWS AppConfig leaves an omitted field unchanged rather than clearing it.

func (*InMemoryBackend) UpdateExtension

func (b *InMemoryBackend) UpdateExtension(
	extensionIdentifier string,
	description *string,
	actions map[string][]ExtensionAction,
	parameters map[string]ExtensionParameter,
) (*Extension, error)

UpdateExtension updates an extension's description, actions, and parameters. A nil description means the request omitted that field, and AWS AppConfig leaves an omitted field unchanged rather than clearing it.

func (*InMemoryBackend) UpdateExtensionAssociation

func (b *InMemoryBackend) UpdateExtensionAssociation(
	extensionAssociationID string,
	parameters map[string]string,
) (*ExtensionAssociation, error)

UpdateExtensionAssociation updates an extension association's parameters.

func (*InMemoryBackend) ValidateConfiguration

func (b *InMemoryBackend) ValidateConfiguration(applicationID, profileID, _ string) error

ValidateConfiguration validates a configuration version against its validators. In this implementation, all well-formed configurations are considered valid. The configurationVersion parameter is accepted for API compatibility but not evaluated.

type Monitor

type Monitor struct {
	AlarmArn     string `json:"AlarmArn"`
	AlarmRoleArn string `json:"AlarmRoleArn,omitempty"`
}

Monitor represents an Amazon CloudWatch alarm used to monitor an AppConfig environment.

type Provider

type Provider struct{}

Provider implements service.Provider for the AppConfig service.

func (*Provider) Init

Init initialises the AppConfig backend and handler.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the service provider name.

type StorageBackend

type StorageBackend interface {
	// PaginationSecret returns the HMAC secret used to sign pagination tokens.
	PaginationSecret() string

	// Snapshot and Restore implement persistence.Persistable. Handler
	// delegates to them (see persistence.go) so cli.go's generic
	// setupPersistence picks AppConfig up.
	Snapshot(ctx context.Context) []byte
	Restore(ctx context.Context, data []byte) error

	// CreateApplication creates a new AppConfig application.
	CreateApplication(name, description string) (*Application, error)
	// GetApplication retrieves an application by ID.
	GetApplication(applicationID string) (*Application, error)
	// ListApplications returns paginated applications.
	ListApplications(nextToken string, maxResults int) ([]Application, string)
	// UpdateApplication updates an application's name and description. A nil
	// name/description means the field was omitted from the request and must
	// be left unchanged (real UpdateApplicationInput.Name/Description are
	// optional *string members; only a present, non-nil member overwrites
	// the existing value -- see AWS AppConfig's UpdateApplication contract).
	UpdateApplication(applicationID string, name, description *string) (*Application, error)
	// DeleteApplication deletes an application by ID.
	DeleteApplication(applicationID string) error

	// CreateEnvironment creates a new environment within an application.
	CreateEnvironment(
		applicationID, name, description string,
		monitors []Monitor,
	) (*Environment, error)
	// GetEnvironment retrieves an environment by application and environment ID.
	GetEnvironment(applicationID, environmentID string) (*Environment, error)
	// ListEnvironments returns paginated environments for an application.
	ListEnvironments(applicationID, nextToken string, maxResults int) ([]Environment, string, error)
	// UpdateEnvironment updates an environment's name, description, and
	// monitors. A nil name/description leaves the field unchanged (see
	// UpdateApplication doc); a nil monitors leaves the existing monitor
	// list unchanged, while a non-nil (possibly empty) slice replaces it,
	// matching UpdateEnvironmentInput's optional Monitors member.
	UpdateEnvironment(
		applicationID, environmentID string,
		name, description *string,
		monitors *[]Monitor,
	) (*Environment, error)
	// DeleteEnvironment deletes an environment.
	DeleteEnvironment(applicationID, environmentID string) error

	// CreateConfigurationProfile creates a new configuration profile.
	CreateConfigurationProfile(
		applicationID, name, description, locationURI, profileType, retrievalRoleArn string,
		validators []Validator,
	) (*ConfigurationProfile, error)
	// GetConfigurationProfile retrieves a configuration profile.
	GetConfigurationProfile(applicationID, profileID string) (*ConfigurationProfile, error)
	// ListConfigurationProfiles returns paginated profiles for an application.
	ListConfigurationProfiles(
		applicationID, nextToken string,
		maxResults int,
	) ([]ConfigurationProfile, string, error)
	// UpdateConfigurationProfile updates a configuration profile. Nil
	// name/description/retrievalRoleArn leave the field unchanged; a nil
	// validators leaves the existing validator list unchanged, while a
	// non-nil (possibly empty) slice replaces it -- matching
	// UpdateConfigurationProfileInput's optional members.
	UpdateConfigurationProfile(
		applicationID, profileID string,
		name, description, retrievalRoleArn *string,
		validators *[]Validator,
	) (*ConfigurationProfile, error)
	// DeleteConfigurationProfile deletes a configuration profile.
	DeleteConfigurationProfile(applicationID, profileID string) error

	// CreateHostedConfigurationVersion creates a hosted configuration version.
	CreateHostedConfigurationVersion(
		applicationID, profileID, contentType, description, versionLabel string,
		content []byte,
	) (*HostedConfigurationVersion, error)
	// GetHostedConfigurationVersion retrieves a hosted configuration version.
	GetHostedConfigurationVersion(
		applicationID, profileID string,
		versionNumber int32,
	) (*HostedConfigurationVersion, error)
	// ListHostedConfigurationVersions returns paginated versions for a profile.
	ListHostedConfigurationVersions(
		applicationID, profileID, nextToken, versionLabel string,
		maxResults int,
	) ([]HostedConfigurationVersion, string, error)
	// DeleteHostedConfigurationVersion deletes a hosted configuration version.
	DeleteHostedConfigurationVersion(applicationID, profileID string, versionNumber int32) error

	// CreateDeploymentStrategy creates a new deployment strategy.
	CreateDeploymentStrategy(
		name, description string,
		deploymentDuration, bakeTime int32,
		growthFactor float32,
		growthType, replicateTo string,
	) (*DeploymentStrategy, error)
	// GetDeploymentStrategy retrieves a deployment strategy by ID.
	GetDeploymentStrategy(strategyID string) (*DeploymentStrategy, error)
	// ListDeploymentStrategies returns paginated deployment strategies.
	ListDeploymentStrategies(nextToken string, maxResults int) ([]DeploymentStrategy, string)
	// UpdateDeploymentStrategy updates a deployment strategy. A nil
	// description leaves the field unchanged (real
	// UpdateDeploymentStrategyInput.Description is an optional *string
	// member); name has no counterpart in the real API and is applied only
	// when non-empty, matching this backend's pre-existing behavior.
	UpdateDeploymentStrategy(
		strategyID, name string,
		description *string,
		deploymentDuration, bakeTime int32,
		growthFactor float32,
	) (*DeploymentStrategy, error)
	// DeleteDeploymentStrategy deletes a deployment strategy.
	DeleteDeploymentStrategy(strategyID string) error

	// StartDeployment starts a deployment.
	StartDeployment(
		applicationID, environmentID, configProfileID, strategyID, configVersion, description string,
	) (*Deployment, error)
	// GetDeployment retrieves a deployment by application, environment, and deployment number.
	GetDeployment(applicationID, environmentID string, deploymentNumber int32) (*Deployment, error)
	// ListDeployments returns paginated deployments for an environment.
	ListDeployments(
		applicationID, environmentID, nextToken string,
		maxResults int,
	) ([]Deployment, string, error)
	// StopDeployment stops an in-progress deployment.
	StopDeployment(applicationID, environmentID string, deploymentNumber int32) error

	// ListTagsForResource returns the tags for a resource by ARN.
	ListTagsForResource(resourceArn string) (map[string]string, error)
	// TagResource adds or updates tags on a resource.
	TagResource(resourceArn string, tags map[string]string) error
	// UntagResource removes tags from a resource.
	UntagResource(resourceArn string, tagKeys []string) error

	// CreateExtension creates a new AppConfig extension.
	CreateExtension(
		name, description string,
		actions map[string][]ExtensionAction,
		parameters map[string]ExtensionParameter,
	) (*Extension, error)
	// GetExtension retrieves an extension by identifier (ID or name).
	GetExtension(extensionIdentifier string) (*Extension, error)
	// ListExtensions returns paginated extensions, optionally filtered by name and/or version.
	ListExtensions(
		nextToken string,
		maxResults int,
		nameFilter string,
		versionNumber int32,
	) ([]Extension, string)
	// UpdateExtension updates an extension's description, actions, and
	// parameters. A nil description leaves the field unchanged (real
	// UpdateExtensionInput.Description is an optional *string member).
	UpdateExtension(
		extensionIdentifier string,
		description *string,
		actions map[string][]ExtensionAction,
		parameters map[string]ExtensionParameter,
	) (*Extension, error)
	// DeleteExtension deletes an extension by identifier (ID or name).
	DeleteExtension(extensionIdentifier string) error

	// CreateExtensionAssociation creates an association between an extension and a resource.
	CreateExtensionAssociation(
		extensionIdentifier, resourceIdentifier string,
		parameters map[string]string,
		extensionVersionNumber *int32,
	) (*ExtensionAssociation, error)
	// GetExtensionAssociation retrieves an extension association by ID.
	GetExtensionAssociation(extensionAssociationID string) (*ExtensionAssociation, error)
	// ListExtensionAssociations returns paginated extension associations.
	ListExtensionAssociations(
		nextToken, extensionIdentifier, resourceIdentifier string,
		maxResults int,
	) ([]ExtensionAssociation, string)
	// UpdateExtensionAssociation updates an extension association's parameters.
	UpdateExtensionAssociation(
		extensionAssociationID string,
		parameters map[string]string,
	) (*ExtensionAssociation, error)
	// DeleteExtensionAssociation deletes an extension association by ID.
	DeleteExtensionAssociation(extensionAssociationID string) error

	// GetAccountSettings returns the account-level AppConfig settings.
	GetAccountSettings() (*AccountSettings, error)
	// UpdateAccountSettings updates account-level AppConfig settings.
	UpdateAccountSettings(deletionProtection *DeletionProtectionSettings) (*AccountSettings, error)

	// GetConfiguration retrieves the latest deployed configuration (deprecated API).
	GetConfiguration(
		application, environment, configuration string,
	) (*HostedConfigurationVersion, error)
	// ValidateConfiguration validates a configuration version against its validators.
	ValidateConfiguration(applicationID, profileID, configurationVersion string) error
}

StorageBackend defines the operations supported by the AppConfig in-memory backend.

type Validator

type Validator struct {
	Type    string `json:"Type"`    // JSON_SCHEMA or LAMBDA
	Content string `json:"Content"` // JSON schema doc or Lambda ARN
}

Validator represents a validator for a configuration profile.

Jump to

Keyboard shortcuts

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