amplify

package
v1.1.4 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

Amplify

Parity grade: A · SDK aws-sdk-go-v2/service/amplify@v1.40.0 · last audited 2026-07-13 (c252f66)

Coverage

Metric Value
Operations audited 37 (34 ok, 3 partial)
Feature families 2 (2 ok)
Known gaps 6
Deferred items 2
Resource leaks clean
Known gaps
  • App response is missing several fields real Amplify always returns: enableBranchAutoBuild, enableBasicAuth, environmentVariables, autoBranchCreationConfig/Patterns, basicAuthCredentials, buildSpec, cacheConfig, customHeaders, customRules, iamServiceRoleArn, productionBranch, repositoryCloneMethod, wafConfiguration. None of these are modeled by the backend at all (CreateApp/UpdateApp inputs don't accept them either). Deliberately out of scope for this sweep (would require a much larger App model + input surface); noted for a future pass. (bd: TBD)
  • Branch model similarly omits enableBasicAuth, enablePerformanceMode, enablePullRequestPreview, buildSpec, customHeaders/rules, framework, ttl, associatedResources, backendEnvironmentArn, sourceBranch, totalNumberOfJobs, pullRequestEnvironmentName. (bd: TBD)
  • Stage enum (services/amplify/models.go) defines STAGING, which is not a real Amplify Stage value (real values: PRODUCTION, BETA, DEVELOPMENT, EXPERIMENTAL, PULL_REQUEST -- see types/enums.go). Stage is passed through as an unvalidated string end to end (no CreateBranch/UpdateBranch validation), so this doesn't cause a wire-shape bug today, but the constant should read BETA/PULL_REQUEST to match reality and CreateBranch/UpdateBranch should reject invalid stage values with a BadRequestException like real Amplify does. (bd: TBD)
  • JobSummary.commitTime (required field in the real SDK) is not modeled -- StartJobInput.commitTime is accepted by real Amplify but this backend's StartJob signature has no commitTime parameter, so it's silently dropped and the field is always omitted from responses. (bd: TBD)
  • GetJob's steps list is always empty ([]any{}); no build-step model exists. This is an intentional simplification (no real build pipeline behind the emulator), not a bug, but worth revisiting if a consumer depends on step-level detail. (bd: TBD)
  • ListArtifacts always returns an empty page because nothing in this backend ever creates an Artifact record (the artifacts table and ArtifactID-keyed GetArtifactUrl path exist, but there is no producer). Low priority: artifacts model actual build output, which this emulator does not produce. (bd: TBD)
Deferred
  • Full App/Branch field parity (see gaps above)
  • Server-side enum validation (Platform/Stage/JobType) returning BadRequestException for invalid values -- real Amplify validates these; this backend accepts any string

More

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound is returned when a resource is not found.
	ErrNotFound = awserr.New("NotFoundException", awserr.ErrNotFound)
	// ErrAlreadyExists is returned when a resource already exists.
	ErrAlreadyExists = awserr.New("BadRequestException", awserr.ErrAlreadyExists)
)

Functions

This section is empty.

Types

type App

type App struct {
	Tags          *tags.Tags `json:"tags,omitzero"`
	CreateTime    time.Time  `json:"createTime"`
	UpdateTime    time.Time  `json:"updateTime"`
	AppID         string     `json:"appId"`
	ARN           string     `json:"appArn"`
	Name          string     `json:"name"`
	Description   string     `json:"description,omitzero"`
	Repository    string     `json:"repository,omitzero"`
	DefaultDomain string     `json:"defaultDomain,omitzero"`
	Platform      Platform   `json:"platform"`
}

App represents an Amplify application.

type Artifact

type Artifact struct {
	ArtifactID       string `json:"artifactId"`
	ArtifactType     string `json:"artifactType"`
	ArtifactFileName string `json:"artifactFileName"`
}

Artifact represents an Amplify build artifact.

type BackendEnvironment

type BackendEnvironment struct {
	CreateTime            time.Time `json:"createTime"`
	UpdateTime            time.Time `json:"updateTime"`
	EnvironmentName       string    `json:"environmentName"`
	BackendEnvironmentARN string    `json:"backendEnvironmentArn"`
	AppID                 string    `json:"appId"`
	StackName             string    `json:"stackName,omitzero"`
	DeploymentArtifacts   string    `json:"deploymentArtifacts,omitzero"`
}

BackendEnvironment represents an Amplify backend environment.

type Branch

type Branch struct {
	Tags            *tags.Tags `json:"tags,omitzero"`
	CreateTime      time.Time  `json:"createTime"`
	UpdateTime      time.Time  `json:"updateTime"`
	AppID           string     `json:"appId"`
	BranchARN       string     `json:"branchArn"`
	BranchName      string     `json:"branchName"`
	Description     string     `json:"description,omitzero"`
	Stage           Stage      `json:"stage,omitzero"`
	EnableAutoBuild bool       `json:"enableAutoBuild"`
}

Branch represents an Amplify app branch.

type DomainAssociation

type DomainAssociation struct {
	AppID                            string       `json:"appId"`
	DomainName                       string       `json:"domainName"`
	ARN                              string       `json:"domainAssociationArn"`
	DomainStatus                     DomainStatus `json:"domainStatus"`
	StatusReason                     string       `json:"statusReason,omitzero"`
	CertificateVerificationDNSRecord string       `json:"certificateVerificationDNSRecord,omitzero"`
	SubDomains                       []SubDomain  `json:"subDomains"`
	EnableAutoSubDomain              bool         `json:"enableAutoSubDomain"`
}

DomainAssociation represents an Amplify custom domain association.

type DomainStatus

type DomainStatus string

DomainStatus represents the status of a domain association.

const (
	// DomainStatusCreating is the creating status.
	DomainStatusCreating DomainStatus = "CREATING"
	// DomainStatusPendingVerification is waiting for verification.
	DomainStatusPendingVerification DomainStatus = "PENDING_VERIFICATION"
	// DomainStatusAvailable is the available status.
	DomainStatusAvailable DomainStatus = "AVAILABLE"
	// DomainStatusFailed is the failed status.
	DomainStatusFailed DomainStatus = "FAILED"
)

type Handler

type Handler struct {
	Backend StorageBackend

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

Handler is the Echo HTTP handler for Amplify operations.

func NewHandler

func NewHandler(backend StorageBackend) *Handler

NewHandler creates a new Amplify 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 Amplify 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 Amplify operation from the request path.

func (*Handler) ExtractResource

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

ExtractResource extracts the app ID from the request path.

func (*Handler) GetSupportedOperations

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

GetSupportedOperations returns the list of supported Amplify operations.

func (*Handler) Handler

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

Handler returns the Echo handler function for Amplify 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) 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 Amplify API requests.

func (*Handler) Snapshot

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

Snapshot implements persistence.Persistable by delegating to the backend.

func (*Handler) StartWorker

func (h *Handler) StartWorker(ctx context.Context) error

StartWorker starts the background janitor if configured. It implements the worker-lifecycle hook of service.Registerable, so cli.go's generic startup dispatch starts it without any Amplify-specific wiring there.

func (*Handler) WithJanitor

func (h *Handler) WithJanitor(
	backend *InMemoryBackend,
	interval time.Duration,
	taskTimeout ...time.Duration,
) *Handler

WithJanitor attaches a background janitor to the handler. backend must be the concrete *InMemoryBackend backing this Handler -- the janitor needs direct access to the backend's tables and lock, which the StorageBackend interface (used for h.Backend so the handler stays mockable) does not expose.

type InMemoryBackend

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

InMemoryBackend is the in-memory implementation of StorageBackend.

Every resource collection is a *store.Table[T] registered on registry (see store_setup.go); branches, jobs, domains, and backendEnvironments were previously nested per-parent maps and are now flattened to a single Table keyed by a composite "parent|child" string with a companion byApp/byBranch store.Index for the "all children of parent X" lookups the nested maps used to answer directly. webhooksByApp was a reverse-lookup map (map[string][]string); it is now a store.Index on webhooks, not its own Table.

func NewInMemoryBackend

func NewInMemoryBackend(accountID, region string) *InMemoryBackend

NewInMemoryBackend creates a new in-memory Amplify backend.

func (*InMemoryBackend) CreateApp

func (b *InMemoryBackend) CreateApp(
	name, description, repository, platform string,
	tagMap map[string]string,
) (*App, error)

CreateApp creates a new Amplify application.

func (*InMemoryBackend) CreateBackendEnvironment

func (b *InMemoryBackend) CreateBackendEnvironment(
	appID, environmentName, stackName, deploymentArtifacts string,
) (*BackendEnvironment, error)

CreateBackendEnvironment creates a new backend environment for an app.

func (*InMemoryBackend) CreateBranch

func (b *InMemoryBackend) CreateBranch(
	appID, branchName, description, stage string,
	enableAutoBuild bool,
	tagMap map[string]string,
) (*Branch, error)

CreateBranch creates a new branch for an Amplify application.

func (*InMemoryBackend) CreateDeployment

func (b *InMemoryBackend) CreateDeployment(appID, branchName string) (string, string, error)

CreateDeployment creates a pre-signed upload URL for a manual deployment.

func (*InMemoryBackend) CreateDomainAssociation

func (b *InMemoryBackend) CreateDomainAssociation(
	appID, domainName string,
	subDomains []SubDomainSetting,
	enableAutoSubDomain bool,
) (*DomainAssociation, error)

CreateDomainAssociation creates a custom domain association for an app.

func (*InMemoryBackend) CreateWebhook

func (b *InMemoryBackend) CreateWebhook(appID, branchName, description string) (*Webhook, error)

CreateWebhook creates a new webhook for an app branch.

func (*InMemoryBackend) DeleteApp

func (b *InMemoryBackend) DeleteApp(appID string) error

DeleteApp deletes an Amplify application by ID.

func (*InMemoryBackend) DeleteBackendEnvironment

func (b *InMemoryBackend) DeleteBackendEnvironment(
	appID, environmentName string,
) (*BackendEnvironment, error)

DeleteBackendEnvironment deletes a backend environment.

func (*InMemoryBackend) DeleteBranch

func (b *InMemoryBackend) DeleteBranch(appID, branchName string) error

DeleteBranch deletes a branch from an Amplify application.

func (*InMemoryBackend) DeleteDomainAssociation

func (b *InMemoryBackend) DeleteDomainAssociation(
	appID, domainName string,
) (*DomainAssociation, error)

DeleteDomainAssociation deletes a domain association.

func (*InMemoryBackend) DeleteJob

func (b *InMemoryBackend) DeleteJob(appID, branchName, jobID string) (*Job, error)

DeleteJob deletes a job record.

func (*InMemoryBackend) DeleteWebhook

func (b *InMemoryBackend) DeleteWebhook(webhookID string) (*Webhook, error)

DeleteWebhook deletes a webhook.

func (*InMemoryBackend) GenerateAccessLogs

func (b *InMemoryBackend) GenerateAccessLogs(
	appID, domainName, startTime, endTime string,
) (string, error)

GenerateAccessLogs generates a presigned URL for access logs.

func (*InMemoryBackend) GetApp

func (b *InMemoryBackend) GetApp(appID string) (*App, error)

GetApp returns an Amplify application by ID.

func (*InMemoryBackend) GetArtifactURL

func (b *InMemoryBackend) GetArtifactURL(artifactID string) (string, string, error)

GetArtifactURL returns the download URL for an artifact.

func (*InMemoryBackend) GetBackendEnvironment

func (b *InMemoryBackend) GetBackendEnvironment(
	appID, environmentName string,
) (*BackendEnvironment, error)

GetBackendEnvironment returns a backend environment.

func (*InMemoryBackend) GetBranch

func (b *InMemoryBackend) GetBranch(appID, branchName string) (*Branch, error)

GetBranch returns a branch for an Amplify application.

func (*InMemoryBackend) GetDomainAssociation

func (b *InMemoryBackend) GetDomainAssociation(
	appID, domainName string,
) (*DomainAssociation, error)

GetDomainAssociation returns a domain association.

func (*InMemoryBackend) GetJob

func (b *InMemoryBackend) GetJob(appID, branchName, jobID string) (*Job, error)

GetJob returns a job by ID.

func (*InMemoryBackend) GetWebhook

func (b *InMemoryBackend) GetWebhook(webhookID string) (*Webhook, error)

GetWebhook returns a webhook by ID.

func (*InMemoryBackend) ListApps

func (b *InMemoryBackend) ListApps(nextToken string, maxResults int) ([]*App, string, error)

ListApps returns Amplify applications with optional pagination.

func (*InMemoryBackend) ListArtifacts

func (b *InMemoryBackend) ListArtifacts(
	appID, _, _, nextToken string,
	maxResults int,
) ([]*Artifact, string, error)

ListArtifacts lists artifacts for a job.

func (*InMemoryBackend) ListBackendEnvironments

func (b *InMemoryBackend) ListBackendEnvironments(
	appID, nextToken string,
	maxResults int,
) ([]*BackendEnvironment, string, error)

ListBackendEnvironments lists backend environments for an app.

func (*InMemoryBackend) ListBranches

func (b *InMemoryBackend) ListBranches(
	appID, nextToken string,
	maxResults int,
) ([]*Branch, string, error)

ListBranches returns branches for an Amplify application with optional pagination.

func (*InMemoryBackend) ListDomainAssociations

func (b *InMemoryBackend) ListDomainAssociations(
	appID, nextToken string,
	maxResults int,
) ([]*DomainAssociation, string, error)

ListDomainAssociations lists domain associations for an app.

func (*InMemoryBackend) ListJobs

func (b *InMemoryBackend) ListJobs(
	appID, branchName, nextToken string,
	maxResults int,
) ([]*Job, string, error)

ListJobs lists all jobs for a branch.

func (*InMemoryBackend) ListTagsForResource

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

ListTagsForResource returns all tags for an Amplify resource identified by ARN.

func (*InMemoryBackend) ListWebhooks

func (b *InMemoryBackend) ListWebhooks(
	appID, nextToken string,
	maxResults int,
) ([]*Webhook, string, error)

ListWebhooks lists webhooks for an app.

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

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

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

func (*InMemoryBackend) StartDeployment

func (b *InMemoryBackend) StartDeployment(
	appID, branchName, jobID, sourceURL string,
) (*Job, error)

StartDeployment starts a deployment from a pre-uploaded artifact.

func (*InMemoryBackend) StartJob

func (b *InMemoryBackend) StartJob(
	appID, branchName, jobType, commitID, commitMsg string,
) (*Job, error)

StartJob creates and starts a new deployment job for a branch.

func (*InMemoryBackend) StopJob

func (b *InMemoryBackend) StopJob(appID, branchName, jobID string) (*Job, error)

StopJob cancels a running job.

func (*InMemoryBackend) TagResource

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

TagResource adds or updates tags on an Amplify resource identified by ARN.

func (*InMemoryBackend) UntagResource

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

UntagResource removes tags from an Amplify resource identified by ARN.

func (*InMemoryBackend) UpdateApp

func (b *InMemoryBackend) UpdateApp(
	appID, name, description, repository, platform string,
) (*App, error)

UpdateApp updates an existing Amplify application.

func (*InMemoryBackend) UpdateBranch

func (b *InMemoryBackend) UpdateBranch(
	appID, branchName, description, stage string,
	enableAutoBuild bool,
) (*Branch, error)

UpdateBranch updates an existing Amplify branch.

func (*InMemoryBackend) UpdateDomainAssociation

func (b *InMemoryBackend) UpdateDomainAssociation(
	appID, domainName string,
	subDomains []SubDomainSetting,
	enableAutoSubDomain bool,
) (*DomainAssociation, error)

UpdateDomainAssociation updates a domain association.

func (*InMemoryBackend) UpdateWebhook

func (b *InMemoryBackend) UpdateWebhook(
	webhookID, branchName, description string,
) (*Webhook, error)

UpdateWebhook updates a webhook.

type Janitor

type Janitor struct {
	Backend  *InMemoryBackend
	Interval time.Duration
	// TaskTimeout bounds each individual janitor task. When non-zero, each task
	// runs with a child context that expires after this duration, preventing a
	// stalled operation from blocking the janitor loop indefinitely.
	TaskTimeout time.Duration
}

Janitor is the Amplify background worker that advances jobs and domain associations out of their transient starting states.

StartJob/StartDeployment only ever set a job's Status to RUNNING, and CreateDomainAssociation only ever sets a domain's DomainStatus to PENDING_VERIFICATION -- real Amplify eventually finishes the build / verifies the certificate on its own, but nothing else in this backend ever mutates those fields again (StopJob/DeleteDomainAssociation require an explicit caller action). Without this janitor a job or domain association would sit in its transient state forever, and any client polling GetJob/ListJobs or GetDomainAssociation/ListDomainAssociations to wait for completion would spin indefinitely.

func NewJanitor

func NewJanitor(backend *InMemoryBackend, interval time.Duration) *Janitor

NewJanitor creates a new Amplify Janitor for the given backend. A zero interval falls back to defaultAmplifyJanitorInterval.

func (*Janitor) Run

func (j *Janitor) Run(ctx context.Context)

Run runs the janitor loop until ctx is cancelled.

func (*Janitor) SweepOnce

func (j *Janitor) SweepOnce(ctx context.Context)

SweepOnce runs a single janitor pass. Exposed for testing.

type Job

type Job struct {
	JobID      string    `json:"jobId"`
	JobARN     string    `json:"jobArn"`
	CommitID   string    `json:"commitId,omitzero"`
	CommitMsg  string    `json:"commitMessage,omitzero"`
	Status     JobStatus `json:"status"`
	Type       JobType   `json:"jobType"`
	StartTime  time.Time `json:"startTime"`
	EndTime    time.Time `json:"endTime,omitzero"`
	AppID      string    `json:"appId"`
	BranchName string    `json:"branchName"`
}

Job represents an Amplify deployment job.

type JobStatus

type JobStatus string

JobStatus represents the status of a deployment job.

const (
	// JobStatusPending is the pending status.
	JobStatusPending JobStatus = "PENDING"
	// JobStatusProvisioning is the provisioning status.
	JobStatusProvisioning JobStatus = "PROVISIONING"
	// JobStatusRunning is the running status.
	JobStatusRunning JobStatus = "RUNNING"
	// JobStatusFailed is the failed status.
	JobStatusFailed JobStatus = "FAILED"
	// JobStatusSucceed is the succeed status.
	JobStatusSucceed JobStatus = "SUCCEED"
	// JobStatusCancelling is the cancelling status.
	JobStatusCancelling JobStatus = "CANCELLING"
	// JobStatusCancelled is the cancelled status.
	JobStatusCancelled JobStatus = "CANCELLED"
)

type JobType

type JobType string

JobType represents the type of deployment job.

const (
	// JobTypeRelease is a manual release job.
	JobTypeRelease JobType = "RELEASE"
	// JobTypeRetry is a retry job.
	JobTypeRetry JobType = "RETRY"
	// JobTypeManual is a direct-upload deployment.
	JobTypeManual JobType = "MANUAL"
	// JobTypeWebHook is a webhook-triggered job.
	JobTypeWebHook JobType = "WEB_HOOK"
)

type Platform

type Platform string

Platform represents the Amplify app platform type.

const (
	// PlatformWEB is a static web app.
	PlatformWEB Platform = "WEB"
	// PlatformWEBCOMPUTE is a web app with server-side rendering (SSR).
	PlatformWEBCOMPUTE Platform = "WEB_COMPUTE"
	// PlatformWEBDYNAMIC is a dynamic web app.
	PlatformWEBDYNAMIC Platform = "WEB_DYNAMIC"
)

type Provider

type Provider struct{}

Provider implements service.Provider for the Amplify service.

func (*Provider) Init

Init initializes the Amplify service backend and handler.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the logical name of the provider.

type Stage

type Stage string

Stage represents the branch deployment stage.

const (
	// StageProduction is the production stage.
	StageProduction Stage = "PRODUCTION"
	// StageStaging is the staging stage.
	StageStaging Stage = "STAGING"
	// StageDevelopment is the development stage.
	StageDevelopment Stage = "DEVELOPMENT"
	// StageExperimental is the experimental stage.
	StageExperimental Stage = "EXPERIMENTAL"
)

type StorageBackend

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

	CreateApp(
		name, description, repository, platform string,
		tagMap map[string]string,
	) (*App, error)
	GetApp(appID string) (*App, error)
	ListApps(nextToken string, maxResults int) ([]*App, string, error)
	DeleteApp(appID string) error
	UpdateApp(appID, name, description, repository, platform string) (*App, error)
	CreateBranch(
		appID, branchName, description, stage string,
		enableAutoBuild bool,
		tagMap map[string]string,
	) (*Branch, error)
	GetBranch(appID, branchName string) (*Branch, error)
	ListBranches(appID, nextToken string, maxResults int) ([]*Branch, string, error)
	DeleteBranch(appID, branchName string) error
	UpdateBranch(
		appID, branchName, description, stage string,
		enableAutoBuild bool,
	) (*Branch, error)
	TagResource(resourceARN string, tagMap map[string]string) error
	UntagResource(resourceARN string, tagKeys []string) error
	ListTagsForResource(resourceARN string) (map[string]string, error)
	// Jobs
	StartJob(appID, branchName, jobType, commitID, commitMsg string) (*Job, error)
	StopJob(appID, branchName, jobID string) (*Job, error)
	GetJob(appID, branchName, jobID string) (*Job, error)
	ListJobs(appID, branchName, nextToken string, maxResults int) ([]*Job, string, error)
	DeleteJob(appID, branchName, jobID string) (*Job, error)
	CreateDeployment(appID, branchName string) (string, string, error)
	StartDeployment(appID, branchName, jobID, sourceURL string) (*Job, error)
	// Domains
	CreateDomainAssociation(
		appID, domainName string, subDomains []SubDomainSetting, enableAutoSubDomain bool,
	) (*DomainAssociation, error)
	UpdateDomainAssociation(
		appID, domainName string, subDomains []SubDomainSetting, enableAutoSubDomain bool,
	) (*DomainAssociation, error)
	DeleteDomainAssociation(appID, domainName string) (*DomainAssociation, error)
	GetDomainAssociation(appID, domainName string) (*DomainAssociation, error)
	ListDomainAssociations(
		appID, nextToken string,
		maxResults int,
	) ([]*DomainAssociation, string, error)
	// Webhooks
	CreateWebhook(appID, branchName, description string) (*Webhook, error)
	UpdateWebhook(webhookID, branchName, description string) (*Webhook, error)
	DeleteWebhook(webhookID string) (*Webhook, error)
	GetWebhook(webhookID string) (*Webhook, error)
	ListWebhooks(appID, nextToken string, maxResults int) ([]*Webhook, string, error)
	// Backend environments
	CreateBackendEnvironment(
		appID, environmentName, stackName, deploymentArtifacts string,
	) (*BackendEnvironment, error)
	GetBackendEnvironment(appID, environmentName string) (*BackendEnvironment, error)
	DeleteBackendEnvironment(appID, environmentName string) (*BackendEnvironment, error)
	ListBackendEnvironments(
		appID, nextToken string,
		maxResults int,
	) ([]*BackendEnvironment, string, error)
	// Logs and artifacts
	GenerateAccessLogs(appID, domainName, startTime, endTime string) (string, error)
	GetArtifactURL(artifactID string) (string, string, error)
	ListArtifacts(
		appID, _, _, nextToken string,
		maxResults int,
	) ([]*Artifact, string, error)
}

StorageBackend defines the interface for Amplify storage operations.

type SubDomain

type SubDomain struct {
	SubDomainSetting SubDomainSetting `json:"subDomainSetting"`
	DNSRecord        string           `json:"dnsRecord,omitzero"`
	Verified         bool             `json:"verified"`
}

SubDomain represents a configured subdomain.

type SubDomainSetting

type SubDomainSetting struct {
	Prefix     string `json:"prefix"`
	BranchName string `json:"branchName"`
}

SubDomainSetting represents a subdomain setting.

type Webhook

type Webhook struct {
	CreateTime  time.Time `json:"createTime"`
	UpdateTime  time.Time `json:"updateTime"`
	WebhookID   string    `json:"webhookId"`
	WebhookARN  string    `json:"webhookArn"`
	AppID       string    `json:"appId"`
	BranchName  string    `json:"branchName"`
	Description string    `json:"description,omitzero"`
	WebhookURL  string    `json:"webhookUrl"`
}

Webhook represents an Amplify webhook.

Jump to

Keyboard shortcuts

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