lightsail

package
v1.2.0 Latest Latest
Warning

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

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

Documentation

Overview

Package lightsail emulates the Amazon Lightsail control-plane API (aws-sdk-go-v2/service/lightsail, protocol awsjson1.1 -- a single POST / dispatched by X-Amz-Target: Lightsail_20161128.<Op>, not REST). See PARITY.md for the full pre-implementation audit this package was built from.

Every Lightsail resource kind is modeled INDEPENDENTLY of this repo's real services/ec2, services/rds, services/elb, services/elbv2 state (see PARITY.md section 5.2): Lightsail's own wire shapes carry no VPC/subnet/ security-group/AMI concepts, and the real product hides its backing infrastructure entirely, so an honest emulator only needs to reproduce what is OBSERVABLE through these 161 ops.

Index

Constants

View Source
const (
	OperationStatusNotStarted = "NotStarted"
	OperationStatusStarted    = "Started"
	OperationStatusFailed     = "Failed"
	OperationStatusCompleted  = "Completed"
	OperationStatusSucceeded  = "Succeeded"
)

OperationStatus wire values (types.OperationStatus) -- exactly 5, per PARITY.md section 2.

View Source
const (
	ResourceTypeContainerService           = "ContainerService"
	ResourceTypeInstance                   = "Instance"
	ResourceTypeStaticIP                   = "StaticIp"
	ResourceTypeKeyPair                    = "KeyPair"
	ResourceTypeInstanceSnapshot           = "InstanceSnapshot"
	ResourceTypeDomain                     = "Domain"
	ResourceTypePeeredVpc                  = "PeeredVpc"
	ResourceTypeLoadBalancer               = "LoadBalancer"
	ResourceTypeLoadBalancerTLSCertificate = "LoadBalancerTlsCertificate"
	ResourceTypeDisk                       = "Disk"
	ResourceTypeDiskSnapshot               = "DiskSnapshot"
	ResourceTypeRelationalDatabase         = "RelationalDatabase"
	ResourceTypeRelationalDatabaseSnapshot = "RelationalDatabaseSnapshot"
	ResourceTypeExportSnapshotRecord       = "ExportSnapshotRecord"
	ResourceTypeCloudFormationStackRecord  = "CloudFormationStackRecord"
	ResourceTypeAlarm                      = "Alarm"
	ResourceTypeContactMethod              = "ContactMethod"
	ResourceTypeDistribution               = "Distribution"
	ResourceTypeCertificate                = "Certificate"
	ResourceTypeBucket                     = "Bucket"
)

ResourceType wire values (types.ResourceType) -- 20 values, PARITY.md section 5.1.

View Source
const (
	InstanceStateCodePending      = 0
	InstanceStateCodeRunning      = 16
	InstanceStateCodeShuttingDown = 32
	InstanceStateCodeTerminated   = 48
	InstanceStateCodeStopping     = 64
	InstanceStateCodeStopped      = 80
)

InstanceState numeric codes -- see models.go's Instance doc comment: an UNCONFIRMED, EC2-style convention, since this SDK module publishes no typed enum or numeric mapping for Lightsail instance state at all.

View Source
const (
	InstanceStateNamePending      = "pending"
	InstanceStateNameRunning      = "running"
	InstanceStateNameShuttingDown = "shutting-down"
	InstanceStateNameTerminated   = "terminated"
	InstanceStateNameStopping     = "stopping"
	InstanceStateNameStopped      = "stopped"
)
View Source
const (
	DiskStatePending   = "pending"
	DiskStateError     = "error"
	DiskStateAvailable = "available"
	DiskStateInUse     = "in-use"
	DiskStateUnknown   = "unknown"
)

DiskState wire values (types.DiskState) -- a real typed 5-value SDK enum.

View Source
const (
	SnapshotStatePending   = "pending"
	SnapshotStateError     = "error"
	SnapshotStateCompleted = "completed"
	SnapshotStateAvailable = "available"
	SnapshotStateUnknown   = "unknown"
)

DiskSnapshotState / InstanceSnapshotState wire values.

View Source
const (
	AutoMountStatusFailed     = "Failed"
	AutoMountStatusPending    = "Pending"
	AutoMountStatusMounted    = "Mounted"
	AutoMountStatusNotMounted = "NotMounted"
)

AutoMountStatus wire values (types.AutoMountStatus, 4 values). This emulator has no real guest OS to mount anything inside (PARITY.md 4.2), so AttachDisk with AutoMounting=true tracks straight to Mounted as bookkeeping only, never real guest-side mount detection.

View Source
const (
	AddOnTypeAutoSnapshot       = "AutoSnapshot"
	AddOnTypeStopInstanceOnIdle = "StopInstanceOnIdle"
)

AddOnType wire values (2 values).

View Source
const (
	AutoSnapshotStatusSuccess    = "Success"
	AutoSnapshotStatusFailed     = "Failed"
	AutoSnapshotStatusInProgress = "InProgress"
	AutoSnapshotStatusNotFound   = "NotFound"
)

AutoSnapshotStatus wire values.

View Source
const (
	LoadBalancerStateActive         = "active"
	LoadBalancerStateProvisioning   = "provisioning"
	LoadBalancerStateActiveImpaired = "active_impaired"
	LoadBalancerStateFailed         = "failed"
	LoadBalancerStateUnknown        = "unknown"
)

LoadBalancerState wire values (5 values).

View Source
const (
	LoadBalancerProtocolHTTPHTTPS = "HTTP_HTTPS"
	LoadBalancerProtocolHTTP      = "HTTP"
)

LoadBalancerProtocol wire values (2 values -- Lightsail LBs are a single-listener simplification, PARITY.md 4.4).

View Source
const (
	InstanceHealthInitial     = "initial"
	InstanceHealthHealthy     = "healthy"
	InstanceHealthUnhealthy   = "unhealthy"
	InstanceHealthUnused      = "unused"
	InstanceHealthDraining    = "draining"
	InstanceHealthUnavailable = "unavailable"
)

InstanceHealthState wire values (6 values).

View Source
const (
	CertificateStatusPendingValidation  = "PENDING_VALIDATION"
	CertificateStatusIssued             = "ISSUED"
	CertificateStatusInactive           = "INACTIVE"
	CertificateStatusExpired            = "EXPIRED"
	CertificateStatusValidationTimedOut = "VALIDATION_TIMED_OUT"
	CertificateStatusRevoked            = "REVOKED"
	CertificateStatusFailed             = "FAILED"
)

LoadBalancerTlsCertificateStatus / CertificateStatus wire values (7 values, shared shape between family M and family V).

View Source
const (
	RelationalDatabaseStateCreating  = "creating"
	RelationalDatabaseStateAvailable = "available"
	RelationalDatabaseStateModifying = "modifying"
	RelationalDatabaseStateBackingUp = "backing-up"
	RelationalDatabaseStateDeleting  = "deleting"
	RelationalDatabaseStateStarting  = "starting"
	RelationalDatabaseStateStopping  = "stopping"
	RelationalDatabaseStateStopped   = "stopped"
	RelationalDatabaseStateRebooting = "rebooting"
)

RelationalDatabaseState -- NO typed SDK enum exists anywhere in this module (PARITY.md 4.3); these string values are an honest, UNCONFIRMED convention following general AWS RDS-family behavior, not sourced from this SDK.

View Source
const (
	PasswordVersionCurrent  = "CURRENT"
	PasswordVersionPrevious = "PREVIOUS"
	PasswordVersionPending  = "PENDING"
)

RelationalDatabasePasswordVersion wire values (3 values).

View Source
const (
	ContainerServiceStatePending   = "PENDING"
	ContainerServiceStateReady     = "READY"
	ContainerServiceStateRunning   = "RUNNING"
	ContainerServiceStateUpdating  = "UPDATING"
	ContainerServiceStateDeleting  = "DELETING"
	ContainerServiceStateDisabled  = "DISABLED"
	ContainerServiceStateDeploying = "DEPLOYING"
)

ContainerServiceState wire values (7 values, PARITY.md 4.5).

View Source
const (
	ContainerServiceDetailCreatingSystemResources       = "CREATING_SYSTEM_RESOURCES"
	ContainerServiceDetailCreatingNetworkInfrastructure = "CREATING_NETWORK_INFRASTRUCTURE"
	ContainerServiceDetailProvisioningCertificate       = "PROVISIONING_CERTIFICATE"
	ContainerServiceDetailProvisioningService           = "PROVISIONING_SERVICE"
	ContainerServiceDetailCreatingDeployment            = "CREATING_DEPLOYMENT"
	ContainerServiceDetailEvaluatingHealthCheck         = "EVALUATING_HEALTH_CHECK"
	ContainerServiceDetailActivatingDeployment          = "ACTIVATING_DEPLOYMENT"
	ContainerServiceDetailCertificateLimitExceeded      = "CERTIFICATE_LIMIT_EXCEEDED"
	ContainerServiceDetailUnknownError                  = "UNKNOWN_ERROR"
)

ContainerServiceStateDetailCode wire values (9 values, populated only during PENDING/DEPLOYING/UPDATING, PARITY.md 4.5).

View Source
const (
	ContainerDeploymentStateActivating = "ACTIVATING"
	ContainerDeploymentStateActive     = "ACTIVE"
	ContainerDeploymentStateInactive   = "INACTIVE"
	ContainerDeploymentStateFailed     = "FAILED"
)

ContainerServiceDeploymentState wire values (4 values, tracked per-deployment via CurrentDeployment/NextDeployment).

View Source
const (
	BucketStateOK      = "OK"
	BucketStateUnknown = "Unknown"
)

BucketState.Code -- free-form *string with exactly 2 documented example values in its own SDK comment ("OK"/"Unknown", PARITY.md 4.6).

View Source
const (
	ObjectVersioningEnabled      = "Enabled"
	ObjectVersioningSuspended    = "Suspended"
	ObjectVersioningNeverEnabled = "NeverEnabled"
)

ObjectVersioning wire values (3 documented values, PARITY.md 4.6).

View Source
const (
	AccessKeyStatusActive   = "Active"
	AccessKeyStatusInactive = "Inactive"
)

AccessKey Status (types.StatusType).

View Source
const (
	AlarmStateOK               = "OK"
	AlarmStateAlarm            = "ALARM"
	AlarmStateInsufficientData = "INSUFFICIENT_DATA"
)

AlarmState wire values (3 values).

View Source
const (
	ContactMethodStatusPendingVerification = "PendingVerification"
	ContactMethodStatusValid               = "Valid"
	ContactMethodStatusInvalid             = "Invalid"
)

ContactMethodStatus wire values (3 values, PARITY.md 4.8). Verification is never real email/SMS delivery in this emulator -- see alarms_contacts.go.

View Source
const (
	ContactProtocolEmail = "Email"
	ContactProtocolSMS   = "SMS"
)

ContactProtocol wire values (2 values).

View Source
const (
	RecordStateStarted   = "STARTED"
	RecordStateSucceeded = "SUCCEEDED"
	RecordStateFailed    = "FAILED"
)

RecordState wire values (used by ExportSnapshotRecord/ CloudFormationStackRecord).

View Source
const (
	GUISessionStatusSettingUp = "settingUpInstance"
	GUISessionStatusReady     = "ready"
	GUISessionStatusStopped   = "stopped"
	GUISessionStatusFailed    = "failedStartingGUISession"
)

GUI session status values (Status enum -- includes settingUpInstance/ failedStartingGUISession/failedStoppingGUISession per PARITY.md family AA, plus "ready"/"stopped" for the steady states).

View Source
const (
	InstancePlatformLinuxUnix = "LINUX_UNIX"
	InstancePlatformWindows   = "WINDOWS"
)

InstancePlatform wire values (types.InstancePlatform, 2 values).

View Source
const (
	OperationTypeCreateInstance = "CreateInstance"
)
View Source
const (
	OperationTypeEnableAddOn = "EnableAddOn"
)
View Source
const PortStateOpen = "open"

PortStateOpen is the only PortState value this backend ever reports -- the real port state for Lightsail instances is always "open" per the SDK's own doc comment (PARITY.md 4.1).

Variables

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

ErrNilAppContext is returned by Provider.Init when appCtx is nil.

Functions

This section is empty.

Types

type AccessKey

type AccessKey struct {
	CreatedAt       time.Time
	AccessKeyID     string
	SecretAccessKey string
	Status          string
}

AccessKey mirrors types.AccessKey. SecretAccessKey is returned in full only on CreateBucketAccessKey and never again (PARITY.md 4.6, same write-once pattern as CreateKeyPair).

type AddOn

type AddOn struct {
	Name                  string
	Status                string
	SnapshotTimeOfDay     string
	NextSnapshotTimeOfDay string
	Duration              string
	Threshold             string
}

AddOn mirrors types.AddOn -- a live add-on attached to an Instance or Disk (AddOnType has exactly 2 values, PARITY.md family F).

type AddOnRequest

type AddOnRequest struct {
	Type                        string
	AutoSnapshotTimeOfDay       string
	StopInstanceOnIdleDuration  string
	StopInstanceOnIdleThreshold string
}

AddOnRequest mirrors types.AddOnRequest -- an input-only shape (never stored directly; EnableAddOn/CreateInstances/CreateDisk convert it into a live AddOn via addons.go's applyAddOnRequestLocked).

type Alarm

type Alarm struct {
	CreatedAt             time.Time
	Tags                  *tags.Tags
	Location              ResourceLocation
	TreatMissingData      string
	SupportCode           string
	MonitoredResourceName string
	MonitoredResourceArn  string
	Statistic             string
	Unit                  string
	State                 string
	Name                  string
	ComparisonOperator    string
	MetricName            string
	Arn                   string
	NotificationTriggers  []string
	ContactProtocols      []string
	Threshold             float64
	EvaluationPeriods     int32
	DatapointsToAlarm     int32
	NotificationEnabled   bool
}

Alarm mirrors types.Alarm.

type AttachedDisk

type AttachedDisk struct {
	Path     string
	SizeInGb int32
}

AttachedDisk mirrors types.AttachedDisk.

type AutoSnapshotDetails

type AutoSnapshotDetails struct {
	Date              string
	Status            string
	CreatedAt         time.Time
	FromAttachedDisks []AttachedDisk
}

AutoSnapshotDetails mirrors types.AutoSnapshotDetails -- one dated entry in an instance/disk's AutoSnapshot add-on history (GetAutoSnapshots).

type Blueprint

type Blueprint struct {
	BlueprintID string
	Name        string
	Group       string
	Type        string
	Platform    string
	Description string
	Version     string
	VersionCode string
	AppCategory string
	MinPower    int32
	IsActive    bool
}

Blueprint mirrors types.Blueprint.

type Bucket

type Bucket struct {
	CreatedAt              time.Time
	Tags                   *tags.Tags
	Location               ResourceLocation
	BundleID               string
	State                  string
	StateMessage           string
	ObjectVersioning       string
	URL                    string
	Name                   string
	SupportCode            string
	Arn                    string
	ReadonlyAccessAccounts []string
	AccessKeys             []AccessKey
	AbleToUpdateBundle     bool
}

Bucket mirrors types.Bucket -- Lightsail's own object storage, distinct from and NOT backed by this repo's real services/s3 (PARITY.md 4.6). ResourceType is deliberately a plain string field (not a typed constant reused from elsewhere) since the SDK's own Bucket.ResourceType is genuinely a *string, not the typed ResourceType enum most other resources use -- a confirmed wire-shape asymmetry preserved faithfully.

type BucketBundle

type BucketBundle struct {
	BundleID             string
	Name                 string
	Price                float32
	StoragePerMonthInGb  int32
	TransferPerMonthInGb int32
	IsActive             bool
}

BucketBundle mirrors types.BucketBundle.

type Bundle

type Bundle struct {
	BundleID               string
	Name                   string
	InstanceType           string
	SupportedAppCategories []string
	SupportedPlatforms     []string
	CPUCount               int32
	Power                  int32
	DiskSizeInGb           int32
	PublicIPv4AddressCount int32
	RAMSizeInGb            float32
	Price                  float32
	TransferPerMonthInGb   int32
	IsActive               bool
}

Bundle mirrors types.Bundle.

type Certificate

type Certificate struct {
	CreatedAt               time.Time
	IssuedAt                time.Time
	NotBefore               time.Time
	NotAfter                time.Time
	Tags                    *tags.Tags
	Name                    string
	Arn                     string
	DomainName              string
	Status                  string
	SubjectAlternativeNames []string
}

Certificate mirrors types.CertificateSummary/types.Certificate -- CDN/distribution-facing (family V), distinct from the LB-TLS-certificate family (M) and from real ACM. CertificateProvider has exactly 1 value (LetsEncrypt, PARITY.md 4.7).

type CloudFormationBackend

type CloudFormationBackend interface {
	CreateStackFromLightsail(stackName string, instanceNames []string) (stackID string, err error)
}

CloudFormationBackend lets CreateCloudFormationStack hand off to a real services/cloudformation stack-creation call -- the one confirmed genuine cross-service link in this surface (PARITY.md 5.2 point 4). Optional: a nil backend (the default) means CreateCloudFormationStack still records a real CloudFormationStackRecord and Operation, just without an actual backing stack -- an honest, documented scoped-down behavior rather than a fabricated stack ARN.

type CloudFormationStackRecord

type CloudFormationStackRecord struct {
	Name              string
	Arn               string
	State             string
	DestinationInfoID string
	CreatedAt         time.Time
	Location          ResourceLocation
	SourceInstances   []string
}

CloudFormationStackRecord mirrors types.CloudFormationStackRecord -- created by CreateCloudFormationStack, the one confirmed genuine cross-service handoff in this surface (PARITY.md 5.2 point 4): it hands off to a real services/cloudformation stack when wired (see exportcfn.go).

type ContactMethod

type ContactMethod struct {
	CreatedAt       time.Time
	Tags            *tags.Tags
	Location        ResourceLocation
	Protocol        string
	ContactEndpoint string
	Status          string
	Arn             string
	SupportCode     string
}

ContactMethod mirrors types.ContactMethod -- keyed by Protocol (there is no separate Name concept; ContactProtocol has exactly 2 values, Email/SMS, PARITY.md 4.8).

type ContainerDefinition

type ContainerDefinition struct {
	Environment map[string]string
	Ports       map[string]string
	Image       string
	Command     []string
}

ContainerDefinition mirrors types.Container.

type ContainerImage

type ContainerImage struct {
	CreatedAt time.Time
	Image     string
	Digest    string
}

ContainerImage mirrors types.ContainerImage -- RegisterContainerImage versions per label (":container-service-1.mystaticsite.3" convention, PARITY.md 4.5).

type ContainerService

type ContainerService struct {
	CreatedAt          time.Time
	Tags               *tags.Tags
	NextImageVersion   map[string]int
	NextDeployment     *ContainerServiceDeployment
	CurrentDeployment  *ContainerServiceDeployment
	PublicDomainNames  map[string][]string
	Location           ResourceLocation
	StateDetailCode    string
	URL                string
	PrincipalArn       string
	PrivateDomainName  string
	StateDetailMessage string
	Name               string
	State              string
	PowerID            string
	Power              string
	Arn                string
	Images             []ContainerImage
	Scale              int32
	IsDisabled         bool
}

ContainerService mirrors types.ContainerService -- see PARITY.md 4.5: the most structurally complex family. This backend models the full ContainerServiceState/ContainerServiceStateDetailCode/ ContainerServiceDeploymentState state-machine bookkeeping (see containers.go's doc comment for the explicit real-vs-bookkeeping-only decision) without actually running images via pkgs/container.

type ContainerServiceDeployment

type ContainerServiceDeployment struct {
	CreatedAt      time.Time
	Containers     map[string]ContainerDefinition
	PublicEndpoint *ContainerServiceEndpoint
	State          string
	Version        int32
}

ContainerServiceDeployment mirrors types.ContainerServiceDeployment.

type ContainerServiceEndpoint

type ContainerServiceEndpoint struct {
	ContainerName string
	ContainerPort int32
}

ContainerServiceEndpoint mirrors types.ContainerServiceEndpoint.

type ContainerServicePowerSeed

type ContainerServicePowerSeed struct {
	PowerID     string
	Name        string
	CPUCount    float32
	RAMSizeInGb float32
	Price       float32
	IsActive    bool
}

ContainerServicePowerSeed mirrors types.ContainerServicePower.

type CreateInstancesFromSnapshotRequest

type CreateInstancesFromSnapshotRequest struct {
	Tags                 map[string]string
	AvailabilityZone     string
	BundleID             string
	InstanceSnapshotName string
	KeyPairName          string
	IPAddressType        string
	InstanceNames        []string
	AddOns               []AddOnRequest
}

CreateInstancesFromSnapshotRequest bundles CreateInstancesFromSnapshot's input fields.

type CreateInstancesRequest

type CreateInstancesRequest struct {
	Tags             map[string]string
	AvailabilityZone string
	BlueprintID      string
	BundleID         string
	KeyPairName      string
	IPAddressType    string
	Names            []string
	AddOns           []AddOnRequest
}

CreateInstancesRequest bundles CreateInstances' input fields.

type Disk

type Disk struct {
	CreatedAt       time.Time
	Tags            *tags.Tags
	Location        ResourceLocation
	AttachedTo      string
	Arn             string
	AttachmentState string
	AutoMountStatus string
	Path            string
	State           string
	SupportCode     string
	Name            string
	AddOns          []AddOn
	AutoSnapshots   []AutoSnapshotDetails
	SizeInGb        int32
	Iops            int32
	GbInUse         int32
	IsSystemDisk    bool
	IsAttached      bool
}

Disk mirrors types.Disk. DiskState IS a real typed SDK enum (pending/ error/available/in-use/unknown, PARITY.md 4.2) -- unlike InstanceState, this one genuinely drives an available<->in-use transition on AttachDisk/DetachDisk.

type DiskSnapshot

type DiskSnapshot struct {
	CreatedAt          time.Time
	Tags               *tags.Tags
	Location           ResourceLocation
	State              string
	Progress           string
	FromDiskName       string
	FromDiskArn        string
	FromInstanceName   string
	FromInstanceArn    string
	Name               string
	SupportCode        string
	Arn                string
	SizeInGb           int32
	IsFromAutoSnapshot bool
}

DiskSnapshot mirrors types.DiskSnapshot. DiskSnapshotState has 4 values (pending/completed/error/unknown, PARITY.md 4.2).

type Distribution

type Distribution struct {
	CreatedAt              time.Time
	Tags                   *tags.Tags
	Origin                 DistributionOrigin
	Location               ResourceLocation
	IPAddressType          string
	DomainName             string
	OriginPublicDNS        string
	CertificateName        string
	Name                   string
	ViewerMinTLSVersion    string
	Status                 string
	BundleID               string
	SupportCode            string
	Arn                    string
	AlternativeDomainNames []string
	IsEnabled              bool
	AbleToUpdateBundle     bool
}

Distribution mirrors types.LightsailDistribution. Location.RegionName is ALWAYS "us-east-1" regardless of the backend's configured region -- a real, doc-comment-quoted AWS behavior (PARITY.md 4.7), not an assumption.

type DistributionBundle

type DistributionBundle struct {
	BundleID             string
	Name                 string
	Price                float32
	TransferPerMonthInGb int32
	IsActive             bool
}

DistributionBundle mirrors types.DistributionBundle.

type DistributionOrigin

type DistributionOrigin struct {
	Name           string
	RegionName     string
	ProtocolPolicy string
}

DistributionOrigin mirrors types.Origin.

type Domain

type Domain struct {
	CreatedAt   time.Time
	Tags        *tags.Tags
	Location    ResourceLocation
	Name        string
	Arn         string
	SupportCode string
	Entries     []DomainEntry
}

Domain mirrors types.Domain -- CONFIRMED a GLOBAL resource (Domain.Arn's own SDK doc comment gives the literal example "arn:aws:lightsail:global:...", PARITY.md 4.7/5.1).

type DomainEntry

type DomainEntry struct {
	Options map[string]string
	ID      string
	Name    string
	Type    string
	Target  string
	IsAlias bool
}

DomainEntry mirrors types.DomainEntry. Type is a plain string (A/AAAA/ CNAME/MX/NS/SOA/SRV/TXT per the SDK's own doc comment, not a typed enum, PARITY.md 4.7).

type ExportSnapshotRecord

type ExportSnapshotRecord struct {
	Name               string
	Arn                string
	State              string
	SourceName         string
	SourceArn          string
	SourceResourceType string
	CreatedAt          time.Time
	Location           ResourceLocation
}

ExportSnapshotRecord mirrors types.ExportSnapshotRecord -- created by ExportSnapshot (family K), the real Lightsail-to-EC2 migration path.

type GUISession

type GUISession struct {
	ResourceName string
	Status       string
	URL          string
}

GUISession mirrors the per-resource session state CreateGUISessionAccessDetails/ StartGUISession/StopGUISession (family AA) track.

type Handler

type Handler struct {
	Backend *InMemoryBackend
}

Handler is the HTTP handler for the Amazon Lightsail API.

func NewHandler

func NewHandler(backend *InMemoryBackend) *Handler

NewHandler creates a new Lightsail 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 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 operation name from the X-Amz-Target header.

func (*Handler) ExtractResource

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

ExtractResource extracts the primary resource identifier from the request body -- whichever of this service's common name/id field names is present, matching services/directconnect's extractFirstResourceByKeys pattern.

func (*Handler) GetSupportedOperations

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

GetSupportedOperations returns every operation this handler routes -- all 161 operations on the aws-sdk-go-v2/service/lightsail client, per sdk_completeness_test.go's empty exception list.

func (*Handler) Handler

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

Handler returns the Echo handler function for Lightsail requests.

func (*Handler) MatchPriority

func (h *Handler) MatchPriority() int

MatchPriority returns the routing priority -- matched by an exact X-Amz-Target prefix, the same tier DynamoDB/directconnect/mgn use.

func (*Handler) Name

func (h *Handler) Name() string

Name returns the service name.

func (*Handler) Reset

func (h *Handler) Reset()

Reset clears all stored state in the backend.

func (*Handler) Restore

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

Restore implements persistence.Persistable by delegating to the backend.

func (*Handler) RouteMatcher

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

RouteMatcher returns a matcher that reports true iff the request carries this service's exact X-Amz-Target prefix.

func (*Handler) Snapshot

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

Snapshot implements persistence.Persistable by delegating to the backend.

type HostKeyAttributes

type HostKeyAttributes struct {
	NotValidBefore    time.Time
	NotValidAfter     time.Time
	WitnessedAt       time.Time
	Algorithm         string
	FingerprintSHA1   string
	FingerprintSHA256 string
	PublicKey         string
}

HostKeyAttributes mirrors types.HostKeyAttributes -- SSH/RDP host key fingerprints reported by GetInstanceAccessDetails.

type InMemoryBackend

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

InMemoryBackend is the in-memory store for Amazon Lightsail. A single coarse lock guards every collection: Lightsail ops routinely cross resource boundaries (AttachInstancesToLoadBalancer reads+writes both a LoadBalancer and the Instances it references; CreateCloudFormationStack reads InstanceEntry sources while writing a new record), and Operation bookkeeping alone touches nearly every table on every mutating call -- see .claude/memories/pkgs-catalog.md's locking rule.

func NewInMemoryBackend

func NewInMemoryBackend(ctx context.Context, accountID, region string) *InMemoryBackend

NewInMemoryBackend creates a new in-memory Amazon Lightsail backend.

func (*InMemoryBackend) AccountID

func (b *InMemoryBackend) AccountID() string

AccountID returns the account ID for this backend.

func (*InMemoryBackend) AllocateStaticIP

func (b *InMemoryBackend) AllocateStaticIP(name string) (*Operation, error)

AllocateStaticIP allocates a new, unattached static IP.

func (*InMemoryBackend) AttachCertificateToDistribution

func (b *InMemoryBackend) AttachCertificateToDistribution(
	distributionName, certificateName string,
) (*Operation, error)

AttachCertificateToDistribution attaches an ISSUED certificate to the named distribution.

func (*InMemoryBackend) AttachDisk

func (b *InMemoryBackend) AttachDisk(diskName, instanceName, diskPath string, autoMounting bool) (*Operation, error)

AttachDisk attaches the named disk to instanceName at diskPath, honoring autoMounting as bookkeeping-only state (no real guest OS to mount inside this emulator, PARITY.md 4.2).

func (*InMemoryBackend) AttachInstancesToLoadBalancer

func (b *InMemoryBackend) AttachInstancesToLoadBalancer(name string, instanceNames []string) ([]Operation, error)

AttachInstancesToLoadBalancer attaches instanceNames to the named load balancer, seeding each attached instance's InstanceHealthSummary "initial" (mirroring real target-health onboarding, PARITY.md 4.4) then advancing it to "healthy" after asyncTransitionDelay.

func (*InMemoryBackend) AttachLoadBalancerTLSCertificate

func (b *InMemoryBackend) AttachLoadBalancerTLSCertificate(
	loadBalancerName, certificateName string,
) ([]Operation, error)

AttachLoadBalancerTLSCertificate attaches an ISSUED certificate to its load balancer.

func (*InMemoryBackend) AttachStaticIP

func (b *InMemoryBackend) AttachStaticIP(name, instanceName string) (*Operation, error)

AttachStaticIP attaches the named static IP to instanceName.

func (*InMemoryBackend) Close

func (b *InMemoryBackend) Close()

Close stops all scheduled state-transition timers so none outlives the backend. Safe to call multiple times.

func (*InMemoryBackend) CloseInstancePublicPorts

func (b *InMemoryBackend) CloseInstancePublicPorts(name string, rule InstancePortInfo) (*Operation, error)

CloseInstancePublicPorts removes the firewall rule matching rule's FromPort/ToPort/Protocol from the named instance.

func (*InMemoryBackend) CopySnapshot

func (b *InMemoryBackend) CopySnapshot(
	sourceRegion, sourceResourceName, targetSnapshotName string,
) ([]Operation, error)

CopySnapshot copies an existing instance or disk snapshot (sourceResourceName is polymorphic) to a new snapshot named targetSnapshotName -- the only explicitly cross-region op in this whole surface (PARITY.md family J). This repo models each AWS region as its own separate InMemoryBackend instance, so a genuine cross-PROCESS copy from a different region's backend is not reachable from here without dedicated wiring this pass does not add; this backend honors sourceRegion only when it names THIS backend's own region (or is empty), and otherwise returns a validation error naming the limitation explicitly rather than silently mis-copying or fabricating a record -- a documented, honest scoped-down behavior, not a fabricated cross-region result.

func (*InMemoryBackend) CreateBucket

func (b *InMemoryBackend) CreateBucket(
	name, bundleID string,
	enableObjectVersioning bool,
	userTags map[string]string,
) ([]Operation, error)

CreateBucket creates a new Lightsail-native storage bucket.

func (*InMemoryBackend) CreateBucketAccessKey

func (b *InMemoryBackend) CreateBucketAccessKey(bucketName string) (*AccessKey, []Operation, error)

CreateBucketAccessKey creates a new access key for the named bucket, returning the secret in full exactly once (never retrievable again, PARITY.md 4.6 -- same write-once pattern as CreateKeyPair).

func (*InMemoryBackend) CreateCertificate

func (b *InMemoryBackend) CreateCertificate(
	name, domainName string,
	sans []string,
	userTags map[string]string,
) ([]Operation, error)

CreateCertificate creates a new CDN-facing Certificate, starting a real Let's-Encrypt-style validation timeline (PARITY.md 4.7): PENDING_VALIDATION -> ISSUED after asyncTransitionDelay.

func (*InMemoryBackend) CreateCloudFormationStack

func (b *InMemoryBackend) CreateCloudFormationStack(instances []InstanceEntry) ([]Operation, error)

CreateCloudFormationStack converts exported instance snapshots into a CloudFormationStackRecord, handing off to a real services/cloudformation stack when SetCloudFormationBackend wired one -- see this file's doc comment. Without a wired backend, this still records a real CloudFormationStackRecord/Operation, just without a backing stack ARN (an honest, documented scoped-down behavior).

func (*InMemoryBackend) CreateContactMethod

func (b *InMemoryBackend) CreateContactMethod(
	protocol, contactEndpoint string,
	userTags map[string]string,
) ([]Operation, error)

CreateContactMethod creates or replaces the contact method for protocol (there is no separate Name concept -- protocol IS the identity, PARITY.md 4.8).

func (*InMemoryBackend) CreateContainerService

func (b *InMemoryBackend) CreateContainerService(
	name, power string, scale int32, deployment *ContainerServiceDeployment,
	publicDomainNames map[string][]string, userTags map[string]string,
) (*ContainerService, error)

CreateContainerService creates a new ContainerService in PENDING state, optionally with an initial Deployment.

func (*InMemoryBackend) CreateContainerServiceDeployment

func (b *InMemoryBackend) CreateContainerServiceDeployment(
	name string, containers map[string]ContainerDefinition, publicEndpoint *ContainerServiceEndpoint,
) (*ContainerService, error)

CreateContainerServiceDeployment creates a new pending deployment for the named service, superseding its current one once ACTIVATING completes (PARITY.md 4.5: at most one deployment ACTIVE at a time).

func (*InMemoryBackend) CreateContainerServiceRegistryLogin

func (b *InMemoryBackend) CreateContainerServiceRegistryLogin() (string, string, string, time.Time)

CreateContainerServiceRegistryLogin returns ephemeral, clearly-synthetic registry credentials for the account's Lightsail-managed private registry -- never claimed as real ECR-issued credentials.

func (*InMemoryBackend) CreateDisk

func (b *InMemoryBackend) CreateDisk(
	name, availabilityZone string, sizeInGb int32, addOns []AddOnRequest, userTags map[string]string,
) ([]Operation, error)

CreateDisk creates a new, unattached Disk.

func (*InMemoryBackend) CreateDiskFromSnapshot

func (b *InMemoryBackend) CreateDiskFromSnapshot(
	name, availabilityZone, snapshotName string, sizeInGb int32,
	addOns []AddOnRequest, userTags map[string]string,
) ([]Operation, error)

CreateDiskFromSnapshot creates a new Disk restored from an existing DiskSnapshot.

func (*InMemoryBackend) CreateDiskSnapshot

func (b *InMemoryBackend) CreateDiskSnapshot(
	diskName, instanceName, snapshotName string,
	userTags map[string]string,
) ([]Operation, error)

CreateDiskSnapshot creates a DiskSnapshot of diskName, or of instanceName's system disk when diskName is empty (PARITY.md family J).

func (*InMemoryBackend) CreateDistribution

func (b *InMemoryBackend) CreateDistribution(
	name, bundleID, originName, ipAddressType, certificateName string, userTags map[string]string,
) ([]Operation, error)

CreateDistribution creates a new Distribution -- modeled global but its Location.RegionName is always literally "us-east-1" regardless of this backend's own configured region (PARITY.md 4.7).

func (*InMemoryBackend) CreateDomain

func (b *InMemoryBackend) CreateDomain(name string, userTags map[string]string) (*Operation, error)

CreateDomain creates a new Domain (a GLOBAL resource).

func (*InMemoryBackend) CreateDomainEntry

func (b *InMemoryBackend) CreateDomainEntry(domainName string, entry DomainEntry) (*Operation, error)

CreateDomainEntry adds a DNS record entry to the named domain.

func (*InMemoryBackend) CreateGUISessionAccessDetails

func (b *InMemoryBackend) CreateGUISessionAccessDetails(resourceName string) (*GUISession, error)

CreateGUISessionAccessDetails creates (or returns the existing) GUI session for resourceName (Lightsail for Research, PARITY.md family AA).

func (*InMemoryBackend) CreateInstanceSnapshot

func (b *InMemoryBackend) CreateInstanceSnapshot(
	instanceName, snapshotName string,
	userTags map[string]string,
) ([]Operation, error)

CreateInstanceSnapshot captures a point-in-time InstanceSnapshot of the named instance's attached disks (FromAttachedDisks: Path/SizeInGb only -- no real disk content, PARITY.md 4.1).

func (*InMemoryBackend) CreateInstances

func (b *InMemoryBackend) CreateInstances(req CreateInstancesRequest) ([]Operation, error)

CreateInstances creates one Instance per req.Names, each starting pending and transitioning to running after asyncTransitionDelay -- returns one Operation per instance (PARITY.md family B: CreateInstances is a batch op sharing the singular OperationType "CreateInstance").

func (*InMemoryBackend) CreateInstancesFromSnapshot

func (b *InMemoryBackend) CreateInstancesFromSnapshot(req CreateInstancesFromSnapshotRequest) ([]Operation, error)

CreateInstancesFromSnapshot restores req.InstanceNames from an existing InstanceSnapshot, carrying its BlueprintId forward.

func (*InMemoryBackend) CreateKeyPair

func (b *InMemoryBackend) CreateKeyPair(
	name string,
	userTags map[string]string,
) (*KeyPair, *Operation, string, string, error)

CreateKeyPair generates a new named key pair, returning the public KeyPair metadata plus its private/public key material -- returned in full exactly once (PARITY.md family G); this backend never stores the private material for a non-default key pair afterward.

func (*InMemoryBackend) CreateLoadBalancer

func (b *InMemoryBackend) CreateLoadBalancer(
	name string, instancePort int32, healthCheckPath, ipAddressType, tlsPolicyName string, userTags map[string]string,
) ([]Operation, error)

CreateLoadBalancer creates a new single-listener LoadBalancer.

func (*InMemoryBackend) CreateLoadBalancerTLSCertificate

func (b *InMemoryBackend) CreateLoadBalancerTLSCertificate(
	loadBalancerName, certificateName, domainName string, alternativeNames []string, userTags map[string]string,
) ([]Operation, error)

CreateLoadBalancerTLSCertificate creates a new TLS certificate scoped to loadBalancerName, starting a real ACM-like validation timeline (PARITY.md 4.4): PENDING_VALIDATION -> ISSUED after asyncTransitionDelay.

func (*InMemoryBackend) CreateRelationalDatabase

func (b *InMemoryBackend) CreateRelationalDatabase(
	name, masterDatabaseName, masterUsername, masterUserPassword,
	blueprintID, bundleID, availabilityZone string, publiclyAccessible bool,
	userTags map[string]string,
) ([]Operation, error)

CreateRelationalDatabase creates a new managed database. The Engine value is NOT restricted to "mysql" -- this SDK module's typed enum documents itself as open/expandable (PARITY.md 4.3), so a caller-supplied non-mysql engine string is accepted rather than rejected on the strength of Values() listing only one value.

func (*InMemoryBackend) CreateRelationalDatabaseFromSnapshot

func (b *InMemoryBackend) CreateRelationalDatabaseFromSnapshot(
	name, snapshotName, availabilityZone, bundleID string, publiclyAccessible bool, userTags map[string]string,
) ([]Operation, error)

CreateRelationalDatabaseFromSnapshot restores a new database from an existing RelationalDatabaseSnapshot.

func (*InMemoryBackend) CreateRelationalDatabaseSnapshot

func (b *InMemoryBackend) CreateRelationalDatabaseSnapshot(
	dbName, snapshotName string,
	userTags map[string]string,
) ([]Operation, error)

CreateRelationalDatabaseSnapshot creates a snapshot of the named database.

func (*InMemoryBackend) DeleteAlarm

func (b *InMemoryBackend) DeleteAlarm(name string) ([]Operation, error)

DeleteAlarm deletes the named alarm.

func (*InMemoryBackend) DeleteAutoSnapshot

func (b *InMemoryBackend) DeleteAutoSnapshot(resourceName, date string) ([]Operation, error)

DeleteAutoSnapshot removes the dated AutoSnapshot entry for resourceName.

func (*InMemoryBackend) DeleteBucket

func (b *InMemoryBackend) DeleteBucket(name string, forceDelete bool) ([]Operation, error)

DeleteBucket deletes the named bucket.

func (*InMemoryBackend) DeleteBucketAccessKey

func (b *InMemoryBackend) DeleteBucketAccessKey(bucketName, accessKeyID string) ([]Operation, error)

DeleteBucketAccessKey deletes the named bucket's access key.

func (*InMemoryBackend) DeleteCertificate

func (b *InMemoryBackend) DeleteCertificate(name string) ([]Operation, error)

DeleteCertificate deletes the named certificate.

func (*InMemoryBackend) DeleteContactMethod

func (b *InMemoryBackend) DeleteContactMethod(protocol string) ([]Operation, error)

DeleteContactMethod deletes the contact method for protocol.

func (*InMemoryBackend) DeleteContainerImage

func (b *InMemoryBackend) DeleteContainerImage(serviceName, image string) error

DeleteContainerImage deletes the named image from the named service.

func (*InMemoryBackend) DeleteContainerService

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

DeleteContainerService deletes the named container service.

func (*InMemoryBackend) DeleteDisk

func (b *InMemoryBackend) DeleteDisk(name string) ([]Operation, error)

DeleteDisk deletes the named disk.

func (*InMemoryBackend) DeleteDiskSnapshot

func (b *InMemoryBackend) DeleteDiskSnapshot(name string) ([]Operation, error)

DeleteDiskSnapshot deletes the named disk snapshot.

func (*InMemoryBackend) DeleteDistribution

func (b *InMemoryBackend) DeleteDistribution(name string) (*Operation, error)

DeleteDistribution deletes the named distribution.

func (*InMemoryBackend) DeleteDomain

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

DeleteDomain deletes the named domain.

func (*InMemoryBackend) DeleteDomainEntry

func (b *InMemoryBackend) DeleteDomainEntry(domainName string, entry DomainEntry) (*Operation, error)

DeleteDomainEntry removes the DNS record entry matching entry's Name/Type/Target from the named domain.

func (*InMemoryBackend) DeleteInstance

func (b *InMemoryBackend) DeleteInstance(name string) ([]Operation, error)

DeleteInstance deletes the named instance.

func (*InMemoryBackend) DeleteInstanceSnapshot

func (b *InMemoryBackend) DeleteInstanceSnapshot(name string) ([]Operation, error)

DeleteInstanceSnapshot deletes the named instance snapshot.

func (*InMemoryBackend) DeleteKeyPair

func (b *InMemoryBackend) DeleteKeyPair(name string) (*Operation, error)

DeleteKeyPair deletes the named key pair.

func (*InMemoryBackend) DeleteKnownHostKeys

func (b *InMemoryBackend) DeleteKnownHostKeys(name string) ([]Operation, error)

DeleteKnownHostKeys clears the named instance's tracked SSH host key fingerprints (e.g. after a restore/rebuild changed them).

func (*InMemoryBackend) DeleteLoadBalancer

func (b *InMemoryBackend) DeleteLoadBalancer(name string) ([]Operation, error)

DeleteLoadBalancer deletes the named load balancer.

func (*InMemoryBackend) DeleteLoadBalancerTLSCertificate

func (b *InMemoryBackend) DeleteLoadBalancerTLSCertificate(
	loadBalancerName, certificateName string,
) ([]Operation, error)

DeleteLoadBalancerTLSCertificate deletes the named LB TLS certificate.

func (*InMemoryBackend) DeleteRelationalDatabase

func (b *InMemoryBackend) DeleteRelationalDatabase(
	name, finalSnapshotName string,
	skipFinalSnapshot bool,
) ([]Operation, error)

DeleteRelationalDatabase deletes the named database, optionally taking a final snapshot first.

func (*InMemoryBackend) DeleteRelationalDatabaseSnapshot

func (b *InMemoryBackend) DeleteRelationalDatabaseSnapshot(name string) ([]Operation, error)

DeleteRelationalDatabaseSnapshot deletes the named database snapshot.

func (*InMemoryBackend) DetachCertificateFromDistribution

func (b *InMemoryBackend) DetachCertificateFromDistribution(distributionName string) (*Operation, error)

DetachCertificateFromDistribution detaches whatever certificate is attached to the named distribution.

func (*InMemoryBackend) DetachDisk

func (b *InMemoryBackend) DetachDisk(diskName string) (*Operation, error)

DetachDisk detaches the named disk from whatever instance it is attached to.

func (*InMemoryBackend) DetachInstancesFromLoadBalancer

func (b *InMemoryBackend) DetachInstancesFromLoadBalancer(name string, instanceNames []string) ([]Operation, error)

DetachInstancesFromLoadBalancer detaches instanceNames from the named load balancer.

func (*InMemoryBackend) DetachStaticIP

func (b *InMemoryBackend) DetachStaticIP(name string) (*Operation, error)

DetachStaticIP detaches the named static IP from whatever instance it is attached to.

func (*InMemoryBackend) DisableAddOn

func (b *InMemoryBackend) DisableAddOn(resourceName, addOnType string) ([]Operation, error)

DisableAddOn removes addOnType from resourceName (Instance or Disk).

func (*InMemoryBackend) DownloadDefaultKeyPair

func (b *InMemoryBackend) DownloadDefaultKeyPair() (time.Time, string, string, error)

DownloadDefaultKeyPair returns this account/region's singleton default key pair, lazily creating it on first call -- the one KeyPair whose private material stays retrievable indefinitely (PARITY.md 4.1), unlike every other CreateKeyPair-created key.

func (*InMemoryBackend) EnableAddOn

func (b *InMemoryBackend) EnableAddOn(resourceName string, req AddOnRequest) ([]Operation, error)

EnableAddOn enables/updates req on resourceName (Instance or Disk).

func (*InMemoryBackend) ExportSnapshot

func (b *InMemoryBackend) ExportSnapshot(sourceSnapshotName string) ([]Operation, error)

ExportSnapshot creates an ExportSnapshotRecord for sourceSnapshotName (either an instance or disk snapshot -- polymorphic, same lookup as CopySnapshot).

func (*InMemoryBackend) GetActiveNames

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

GetActiveNames returns every resource name currently in use account-wide -- Lightsail enforces global name uniqueness across ALL resource kinds (PARITY.md family BB), which this backend's activeNames index directly backs.

func (*InMemoryBackend) GetAlarms

func (b *InMemoryBackend) GetAlarms(name, monitoredResourceName string) ([]*Alarm, error)

GetAlarms returns alarms, optionally filtered by name and/or monitoredResourceName.

func (*InMemoryBackend) GetAutoSnapshots

func (b *InMemoryBackend) GetAutoSnapshots(resourceName string) ([]AutoSnapshotDetails, string, error)

GetAutoSnapshots returns resourceName's AutoSnapshot history and resource kind (Instance or Disk). resourceType.

func (*InMemoryBackend) GetBlueprints

func (b *InMemoryBackend) GetBlueprints(appCategory string, includeInactive bool) []Blueprint

GetBlueprints returns the seed Blueprint catalog, optionally filtered by appCategory and IncludeInactive.

func (*InMemoryBackend) GetBucketAccessKeys

func (b *InMemoryBackend) GetBucketAccessKeys(bucketName string) ([]AccessKey, error)

GetBucketAccessKeys returns the named bucket's access keys (metadata only -- SecretAccessKey is never included here, matching real AWS's write-once-readable secret, PARITY.md 4.6).

func (*InMemoryBackend) GetBucketBundles

func (b *InMemoryBackend) GetBucketBundles(includeInactive bool) []BucketBundle

GetBucketBundles returns the seed bucket bundle catalog.

func (*InMemoryBackend) GetBucketMetricData

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

GetBucketMetricData returns a real, well-formed, EMPTY MetricData response -- one of the six honestly-unfakeable telemetry ops (PARITY.md 4.10).

func (*InMemoryBackend) GetBuckets

func (b *InMemoryBackend) GetBuckets(name string) ([]*Bucket, error)

GetBuckets returns the named bucket, or every bucket if name is empty.

func (*InMemoryBackend) GetBundles

func (b *InMemoryBackend) GetBundles(appCategory string, includeInactive bool) []Bundle

GetBundles returns the seed Bundle catalog, optionally filtered by appCategory and IncludeInactive.

func (*InMemoryBackend) GetCertificates

func (b *InMemoryBackend) GetCertificates(name string, token string) (page.Page[*Certificate], error)

GetCertificates returns every certificate, optionally filtered by name, paginated.

func (*InMemoryBackend) GetCloudFormationStackRecords

func (b *InMemoryBackend) GetCloudFormationStackRecords(token string) (page.Page[*CloudFormationStackRecord], error)

GetCloudFormationStackRecords returns every CloudFormation stack record, paginated.

func (*InMemoryBackend) GetContactMethods

func (b *InMemoryBackend) GetContactMethods(protocols []string) ([]*ContactMethod, error)

GetContactMethods returns contact methods, optionally filtered by protocols.

func (*InMemoryBackend) GetContainerImages

func (b *InMemoryBackend) GetContainerImages(serviceName string) ([]ContainerImage, error)

GetContainerImages returns the named service's registered images.

func (*InMemoryBackend) GetContainerLog

func (b *InMemoryBackend) GetContainerLog(serviceName, _ string) error

GetContainerLog returns a real, well-formed, EMPTY log event page for the named service/container -- this backend runs no real container, so there is no genuine log output to report (same honesty rationale as GetRelationalDatabaseLogEvents). containerName is accepted (matching the real op's input shape) but unused: with no real per-container log stream to select between, there is nothing to filter by.

func (*InMemoryBackend) GetContainerServiceDeployments

func (b *InMemoryBackend) GetContainerServiceDeployments(name string) ([]ContainerServiceDeployment, error)

GetContainerServiceDeployments returns the named service's deployment history (current + next, if any) -- this backend does not retain deployments superseded before the current/next pair (an honest, scoped history depth, not a fabricated full log).

func (*InMemoryBackend) GetContainerServiceMetricData

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

GetContainerServiceMetricData returns a real, well-formed, EMPTY MetricData response -- one of the six honestly-unfakeable telemetry ops (PARITY.md 4.10).

func (*InMemoryBackend) GetContainerServicePowers

func (b *InMemoryBackend) GetContainerServicePowers() []ContainerServicePowerSeed

GetContainerServicePowers returns the seed container-service power tiers.

func (*InMemoryBackend) GetContainerServices

func (b *InMemoryBackend) GetContainerServices(name string) ([]*ContainerService, error)

GetContainerServices returns the named container service, or every container service if name is empty.

func (*InMemoryBackend) GetCostEstimate

func (b *InMemoryBackend) GetCostEstimate(resourceName string) error

GetCostEstimate returns a real, well-formed, EMPTY cost-estimate response for resourceName -- a real cost estimate requires real usage-based billing logic this emulator has no grounds to fabricate (PARITY.md 4.10's cost-estimate-adjacent risk, same rationale as the six MetricData ops).

func (*InMemoryBackend) GetDisk

func (b *InMemoryBackend) GetDisk(name string) (*Disk, error)

GetDisk returns the named disk.

func (*InMemoryBackend) GetDiskSnapshot

func (b *InMemoryBackend) GetDiskSnapshot(name string) (*DiskSnapshot, error)

GetDiskSnapshot returns the named disk snapshot.

func (*InMemoryBackend) GetDiskSnapshots

func (b *InMemoryBackend) GetDiskSnapshots(token string) (page.Page[*DiskSnapshot], error)

GetDiskSnapshots returns every disk snapshot, paginated.

func (*InMemoryBackend) GetDisks

func (b *InMemoryBackend) GetDisks(token string) (page.Page[*Disk], error)

GetDisks returns every disk, paginated.

func (*InMemoryBackend) GetDistributionBundles

func (b *InMemoryBackend) GetDistributionBundles() []DistributionBundle

GetDistributionBundles returns the seed distribution bundle catalog.

func (*InMemoryBackend) GetDistributionLatestCacheReset

func (b *InMemoryBackend) GetDistributionLatestCacheReset(name string) (time.Time, error)

GetDistributionLatestCacheReset returns the named distribution's most recent cache reset time, or a NotFoundException if it has never been reset -- a real state (never fabricated), not always "just now".

func (*InMemoryBackend) GetDistributionMetricData

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

GetDistributionMetricData returns a real, well-formed, EMPTY MetricData response -- one of the six honestly-unfakeable telemetry ops (PARITY.md 4.10).

func (*InMemoryBackend) GetDistributions

func (b *InMemoryBackend) GetDistributions(name, token string) (page.Page[*Distribution], error)

GetDistributions returns every distribution, optionally filtered by name, paginated.

func (*InMemoryBackend) GetDomain

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

GetDomain returns the named domain.

func (*InMemoryBackend) GetDomains

func (b *InMemoryBackend) GetDomains(token string) (page.Page[*Domain], error)

GetDomains returns every domain, paginated.

func (*InMemoryBackend) GetExportSnapshotRecords

func (b *InMemoryBackend) GetExportSnapshotRecords(token string) (page.Page[*ExportSnapshotRecord], error)

GetExportSnapshotRecords returns every export snapshot record, paginated.

func (*InMemoryBackend) GetInstance

func (b *InMemoryBackend) GetInstance(name string) (*Instance, error)

GetInstance returns the named instance.

func (*InMemoryBackend) GetInstanceAccessDetails

func (b *InMemoryBackend) GetInstanceAccessDetails(name, protocol string) (*InstanceAccessDetails, error)

GetInstanceAccessDetails returns connection details for the named instance. SSH PrivateKey material is only returned when the instance uses this backend's own default key pair (the one case a real private key is still retrievable, PARITY.md 4.1/G) -- otherwise it is empty, matching CreateKeyPair's write-once-readable private key never being retained. Windows instances get an RDP Password this backend itself generates and remembers per-instance (see models.go's Instance.windowsPassword doc comment) rather than any claim of decrypting real AWS-side data.

func (*InMemoryBackend) GetInstanceMetricData

func (b *InMemoryBackend) GetInstanceMetricData(instanceName string) error

GetInstanceMetricData returns a real, well-formed, EMPTY MetricData response -- one of the six honestly-unfakeable telemetry ops (PARITY.md 4.10): this emulator has no real CPU/network load to report, and inventing plausible datapoints would be exactly the fabrication parity-principles.md forbids. This is a deliberate honesty choice, not an unfinished stub -- the op is fully routed, validates the instance exists, and returns a genuinely empty (never fake) series.

func (*InMemoryBackend) GetInstancePortStates

func (b *InMemoryBackend) GetInstancePortStates(name string) ([]InstancePortInfo, error)

GetInstancePortStates returns the named instance's configured firewall rules, each hardcoded PortStateOpen -- PortState's own SDK doc comment says the port state is always open (PARITY.md 4.1).

func (*InMemoryBackend) GetInstanceSnapshot

func (b *InMemoryBackend) GetInstanceSnapshot(name string) (*InstanceSnapshot, error)

GetInstanceSnapshot returns the named instance snapshot.

func (*InMemoryBackend) GetInstanceSnapshots

func (b *InMemoryBackend) GetInstanceSnapshots(token string) (page.Page[*InstanceSnapshot], error)

GetInstanceSnapshots returns every instance snapshot, paginated.

func (*InMemoryBackend) GetInstanceState

func (b *InMemoryBackend) GetInstanceState(name string) (int32, string, error)

GetInstanceState returns the named instance's free-form InstanceState{Code, Name} -- see models.go's Instance doc comment.

func (*InMemoryBackend) GetInstances

func (b *InMemoryBackend) GetInstances(token string) (page.Page[*Instance], error)

GetInstances returns every instance, paginated.

func (*InMemoryBackend) GetKeyPair

func (b *InMemoryBackend) GetKeyPair(name string) (*KeyPair, error)

GetKeyPair returns the named key pair's public metadata.

func (*InMemoryBackend) GetKeyPairs

func (b *InMemoryBackend) GetKeyPairs(includeDefault bool, token string) (page.Page[*KeyPair], error)

GetKeyPairs returns every key pair, optionally including the default key pair, paginated.

func (*InMemoryBackend) GetLoadBalancer

func (b *InMemoryBackend) GetLoadBalancer(name string) (*LoadBalancer, error)

GetLoadBalancer returns the named load balancer.

func (*InMemoryBackend) GetLoadBalancerMetricData

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

GetLoadBalancerMetricData returns a real, well-formed, EMPTY MetricData response -- one of the six honestly-unfakeable telemetry ops (PARITY.md 4.10).

func (*InMemoryBackend) GetLoadBalancerTLSCertificates

func (b *InMemoryBackend) GetLoadBalancerTLSCertificates(
	loadBalancerName string,
) ([]*LoadBalancerTLSCertificate, error)

GetLoadBalancerTLSCertificates returns every TLS certificate scoped to loadBalancerName.

func (*InMemoryBackend) GetLoadBalancerTLSPolicies

func (b *InMemoryBackend) GetLoadBalancerTLSPolicies(token string) (page.Page[LoadBalancerTLSPolicy], error)

GetLoadBalancerTLSPolicies returns the seed TLS policy catalog, paginated.

func (*InMemoryBackend) GetLoadBalancers

func (b *InMemoryBackend) GetLoadBalancers(token string) (page.Page[*LoadBalancer], error)

GetLoadBalancers returns every load balancer, paginated.

func (*InMemoryBackend) GetOperation

func (b *InMemoryBackend) GetOperation(id string) (*Operation, error)

GetOperation returns the Operation with the given id.

func (*InMemoryBackend) GetOperations

func (b *InMemoryBackend) GetOperations(token string) (page.Page[*Operation], error)

GetOperations returns every Operation, paginated.

func (*InMemoryBackend) GetOperationsForResource

func (b *InMemoryBackend) GetOperationsForResource(resourceName, token string) (page.Page[*Operation], error)

GetOperationsForResource returns every Operation recorded against resourceName, paginated.

func (*InMemoryBackend) GetRegions

func (b *InMemoryBackend) GetRegions() []RegionSeed

GetRegions returns the seed Region catalog, SDK-derived from types.RegionName's own enum values (see this file's doc comment).

func (*InMemoryBackend) GetRelationalDatabase

func (b *InMemoryBackend) GetRelationalDatabase(name string) (*RelationalDatabase, error)

GetRelationalDatabase returns the named database.

func (*InMemoryBackend) GetRelationalDatabaseBlueprints

func (b *InMemoryBackend) GetRelationalDatabaseBlueprints() []RelationalDatabaseBlueprint

GetRelationalDatabaseBlueprints returns the seed RDS blueprint catalog.

func (*InMemoryBackend) GetRelationalDatabaseBundles

func (b *InMemoryBackend) GetRelationalDatabaseBundles(includeInactive bool) []RelationalDatabaseBundle

GetRelationalDatabaseBundles returns the seed RDS bundle catalog.

func (*InMemoryBackend) GetRelationalDatabaseEvents

func (b *InMemoryBackend) GetRelationalDatabaseEvents(name, token string) (page.Page[RelationalDatabaseEvent], error)

GetRelationalDatabaseEvents returns the named database's recorded events, paginated.

func (*InMemoryBackend) GetRelationalDatabaseLogEvents

func (b *InMemoryBackend) GetRelationalDatabaseLogEvents(name, logStreamName string) error

GetRelationalDatabaseLogEvents returns a real, well-formed, EMPTY log event page for the named database/log stream -- this emulator runs no real MySQL server to produce genuine log lines from, so returning plausible-looking fabricated log text would violate parity-principles.md exactly like the metric-data ops (PARITY.md 4.10's sibling risk).

func (*InMemoryBackend) GetRelationalDatabaseLogStreams

func (b *InMemoryBackend) GetRelationalDatabaseLogStreams(name string) ([]string, error)

GetRelationalDatabaseLogStreams returns the seed log-stream-name catalog (PARITY.md 4.3: no real catalog is published in this SDK module).

func (*InMemoryBackend) GetRelationalDatabaseMasterUserPassword

func (b *InMemoryBackend) GetRelationalDatabaseMasterUserPassword(name, passwordVersion string) (string, error)

GetRelationalDatabaseMasterUserPassword genuinely decrypts (returns) the real master password material this backend stores, by PasswordVersion (PARITY.md 4.3): CURRENT is db.MasterUserPassword, PREVIOUS is the value before the most recent UpdateRelationalDatabase rotation (empty if none occurred), PENDING is not modeled (this backend applies password changes immediately, never queues one) and falls back to CURRENT.

func (*InMemoryBackend) GetRelationalDatabaseMetricData

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

GetRelationalDatabaseMetricData returns a real, well-formed, EMPTY MetricData response -- one of the six honestly-unfakeable telemetry ops (PARITY.md 4.10).

func (*InMemoryBackend) GetRelationalDatabaseParameters

func (b *InMemoryBackend) GetRelationalDatabaseParameters(
	name, token string,
) (page.Page[RelationalDatabaseParameter], error)

GetRelationalDatabaseParameters returns the named database's parameter list, paginated.

func (*InMemoryBackend) GetRelationalDatabaseSnapshot

func (b *InMemoryBackend) GetRelationalDatabaseSnapshot(name string) (*RelationalDatabaseSnapshot, error)

GetRelationalDatabaseSnapshot returns the named database snapshot.

func (*InMemoryBackend) GetRelationalDatabaseSnapshots

func (b *InMemoryBackend) GetRelationalDatabaseSnapshots(token string) (page.Page[*RelationalDatabaseSnapshot], error)

GetRelationalDatabaseSnapshots returns every database snapshot, paginated.

func (*InMemoryBackend) GetRelationalDatabases

func (b *InMemoryBackend) GetRelationalDatabases(token string) (page.Page[*RelationalDatabase], error)

GetRelationalDatabases returns every database, paginated.

func (*InMemoryBackend) GetSetupHistory

func (b *InMemoryBackend) GetSetupHistory(resourceName, token string) (page.Page[*SetupHistoryEntry], error)

GetSetupHistory returns SetupHistory entries for resourceName, paginated.

func (*InMemoryBackend) GetStaticIP

func (b *InMemoryBackend) GetStaticIP(name string) (*StaticIP, error)

GetStaticIP returns the named static IP.

func (*InMemoryBackend) GetStaticIPs

func (b *InMemoryBackend) GetStaticIPs(token string) (page.Page[*StaticIP], error)

GetStaticIPs returns every static IP, paginated.

func (*InMemoryBackend) ImportKeyPair

func (b *InMemoryBackend) ImportKeyPair(name, publicKeyBase64 string) (*Operation, error)

ImportKeyPair registers a caller-supplied public key. This backend never receives (and so never stores) private key material for an imported key.

func (*InMemoryBackend) IsVpcPeered

func (b *InMemoryBackend) IsVpcPeered() bool

IsVpcPeered reports whether the account-wide VPC connection is peered.

func (*InMemoryBackend) OpenInstancePublicPorts

func (b *InMemoryBackend) OpenInstancePublicPorts(name string, rule InstancePortInfo) (*Operation, error)

OpenInstancePublicPorts adds one firewall rule to the named instance.

func (*InMemoryBackend) PeerVpc

func (b *InMemoryBackend) PeerVpc() (*Operation, error)

PeerVpc peers the account-wide implicit Lightsail<->default-EC2-VPC connection (a single boolean, not a named resource, PARITY.md family X).

func (*InMemoryBackend) PutAlarm

func (b *InMemoryBackend) PutAlarm(
	name, comparisonOperator, metricName, monitoredResourceName, statistic, unit, treatMissingData string,
	threshold float64, evaluationPeriods, datapointsToAlarm int32,
	contactProtocols, notificationTriggers []string, notificationEnabled bool, userTags map[string]string,
) ([]Operation, error)

PutAlarm creates or updates the named alarm against monitoredResourceName.

func (*InMemoryBackend) PutInstancePublicPorts

func (b *InMemoryBackend) PutInstancePublicPorts(name string, rules []InstancePortInfo) (*Operation, error)

PutInstancePublicPorts replaces the entire firewall rule set on the named instance in one call.

func (*InMemoryBackend) RebootInstance

func (b *InMemoryBackend) RebootInstance(name string) ([]Operation, error)

RebootInstance reboots the named instance (a no-op state-wise -- it stays running -- but records a real Operation).

func (*InMemoryBackend) RebootRelationalDatabase

func (b *InMemoryBackend) RebootRelationalDatabase(name string) ([]Operation, error)

RebootRelationalDatabase reboots the named database.

func (*InMemoryBackend) Region

func (b *InMemoryBackend) Region() string

Region returns the AWS region this backend is configured for.

func (*InMemoryBackend) RegisterContainerImage

func (b *InMemoryBackend) RegisterContainerImage(serviceName, label, digest string) (*ContainerImage, error)

RegisterContainerImage registers digest under a Lightsail-managed, monotonically-versioned label (":container-service-1.mystaticsite.3" convention, PARITY.md 4.5) for the named service.

func (*InMemoryBackend) ReleaseStaticIP

func (b *InMemoryBackend) ReleaseStaticIP(name string) (*Operation, error)

ReleaseStaticIP releases (deletes) the named static IP.

func (*InMemoryBackend) Reset

func (b *InMemoryBackend) Reset()

Reset clears all stored state.

func (*InMemoryBackend) ResetDistributionCache

func (b *InMemoryBackend) ResetDistributionCache(name string) (*Operation, time.Time, error)

ResetDistributionCache resets the named distribution's cache, recording the reset time.

func (*InMemoryBackend) Restore

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

Restore loads backend state from a JSON snapshot.

func (*InMemoryBackend) SendContactMethodVerification

func (b *InMemoryBackend) SendContactMethodVerification(protocol string) ([]Operation, error)

SendContactMethodVerification marks the contact method for protocol Valid -- this backend never sends a real email/SMS message (PARITY.md 4.8: an honest first pass models the status transition as caller-driven, clearly documented as not performing real delivery).

func (*InMemoryBackend) SetCloudFormationBackend

func (b *InMemoryBackend) SetCloudFormationBackend(cfn CloudFormationBackend)

SetCloudFormationBackend wires the real services/cloudformation stack creator for CreateCloudFormationStack -- see CloudFormationBackend's doc comment. Called from cli.go's wireLightsailCloudFormation.

func (*InMemoryBackend) SetIPAddressType

func (b *InMemoryBackend) SetIPAddressType(resourceName, resourceType, ipAddressType string) ([]Operation, error)

SetIPAddressType sets ipAddressType on the named resource -- shared across Instance/LoadBalancer/Distribution via the ResourceType discriminator (PARITY.md family L).

func (*InMemoryBackend) SetResourceAccessForBucket

func (b *InMemoryBackend) SetResourceAccessForBucket(resourceName, bucketName, access string) ([]Operation, error)

SetResourceAccessForBucket grants or revokes resourceName's (an Instance or ContainerService) access to the named bucket.

func (*InMemoryBackend) SetupInstanceHTTPS

func (b *InMemoryBackend) SetupInstanceHTTPS(
	instanceName, certificateProvider string, domainNames []string,
) ([]Operation, error)

SetupInstanceHTTPS records a Bitnami-style HTTPS auto-configuration attempt as an audited SetupHistory entry (PARITY.md family C) rather than a boolean flag. This backend cannot honestly perform real Let's Encrypt issuance against a caller-owned DNS name, so ExecutionDetails records a single, clearly-synthetic "succeeded" step -- the audited-history SHAPE is real, its content is a documented simplification, not a fabricated external validation result.

func (*InMemoryBackend) Snapshot

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

Snapshot serialises the backend state to JSON.

func (*InMemoryBackend) StartGUISession

func (b *InMemoryBackend) StartGUISession(resourceName string) (*Operation, error)

StartGUISession starts (or restarts) the GUI session for resourceName.

func (*InMemoryBackend) StartInstance

func (b *InMemoryBackend) StartInstance(name string) ([]Operation, error)

StartInstance transitions the named instance from stopped to running.

func (*InMemoryBackend) StartRelationalDatabase

func (b *InMemoryBackend) StartRelationalDatabase(name string) ([]Operation, error)

StartRelationalDatabase transitions the named database from stopped to available.

func (*InMemoryBackend) StopGUISession

func (b *InMemoryBackend) StopGUISession(resourceName string) (*Operation, error)

StopGUISession stops the GUI session for resourceName.

func (*InMemoryBackend) StopInstance

func (b *InMemoryBackend) StopInstance(name string) ([]Operation, error)

StopInstance transitions the named instance from running to stopped.

func (*InMemoryBackend) StopRelationalDatabase

func (b *InMemoryBackend) StopRelationalDatabase(name, snapshotName string) ([]Operation, error)

StopRelationalDatabase transitions the named database from available to stopped, optionally taking a snapshot first.

func (*InMemoryBackend) TagResource

func (b *InMemoryBackend) TagResource(resourceName, _ string, newTags map[string]string) ([]Operation, error)

TagResource tags resourceName (ResourceArn is accepted but this backend resolves purely by ResourceName, the wire spec's actually-required field, PARITY.md 5.1).

func (*InMemoryBackend) TagResourceByARN

func (b *InMemoryBackend) TagResourceByARN(arnStr string, newTags map[string]string) error

TagResourceByARN and UntagResourceByARN are the ARN-first adapters cli.go's wireTaggingLightsail calls (resourcegroupstaggingapi's own convention is ARN-first, the reverse of this service's own ResourceName-first wire ops, PARITY.md 5.1) -- both resolve arn back to a ResourceName via arnToNameLocked, then delegate to the real TagResource/UntagResource resolution path above.

func (*InMemoryBackend) TaggedResources

func (b *InMemoryBackend) TaggedResources() []TaggedEntry

TaggedResources returns every taggable resource's current ARN and tags, across all 16 taggable kinds (of the 20 ResourceType values -- tagsNotSupportedKinds' 4 excluded, see its doc comment).

func (*InMemoryBackend) TestAlarm

func (b *InMemoryBackend) TestAlarm(name, state string) ([]Operation, error)

TestAlarm forces the named alarm to state -- a pure caller-driven state set for exercising notification wiring, not a real metric evaluation (PARITY.md 4.8).

func (*InMemoryBackend) UnpeerVpc

func (b *InMemoryBackend) UnpeerVpc() (*Operation, error)

UnpeerVpc unpeers the account-wide implicit VPC connection.

func (*InMemoryBackend) UntagResource

func (b *InMemoryBackend) UntagResource(resourceName, _ string, tagKeys []string) ([]Operation, error)

UntagResource removes tagKeys from resourceName.

func (*InMemoryBackend) UntagResourceByARN

func (b *InMemoryBackend) UntagResourceByARN(arnStr string, tagKeys []string) error

func (*InMemoryBackend) UpdateBucket

func (b *InMemoryBackend) UpdateBucket(
	name, versioning string,
	readonlyAccessAccounts []string,
) (*Bucket, []Operation, error)

UpdateBucket updates the named bucket's versioning/readonly-access-accounts.

func (*InMemoryBackend) UpdateBucketBundle

func (b *InMemoryBackend) UpdateBucketBundle(name, bundleID string) ([]Operation, error)

UpdateBucketBundle changes the named bucket's bundle tier.

func (*InMemoryBackend) UpdateContainerService

func (b *InMemoryBackend) UpdateContainerService(
	name string, isDisabled *bool, power string, scale int32, publicDomainNames map[string][]string,
) (*ContainerService, error)

UpdateContainerService updates the named service's Power/Scale/ IsDisabled/PublicDomainNames.

func (*InMemoryBackend) UpdateDistribution

func (b *InMemoryBackend) UpdateDistribution(name, certificateName string, isEnabled *bool) (*Operation, error)

UpdateDistribution updates the named distribution's IsEnabled/ CertificateName -- other CacheBehavior fields are accepted and stored verbatim without independently acting on cache behavior (this emulator does not proxy real traffic through a Distribution).

func (*InMemoryBackend) UpdateDistributionBundle

func (b *InMemoryBackend) UpdateDistributionBundle(name, bundleID string) (*Operation, error)

UpdateDistributionBundle changes the named distribution's bundle tier.

func (*InMemoryBackend) UpdateDomainEntry

func (b *InMemoryBackend) UpdateDomainEntry(domainName string, entry DomainEntry) ([]Operation, error)

UpdateDomainEntry updates (or, if unmatched, appends) the DNS record entry with entry's Id on the named domain.

func (*InMemoryBackend) UpdateInstanceMetadataOptions

func (b *InMemoryBackend) UpdateInstanceMetadataOptions(name string, opts InstanceMetadataOptions) (*Operation, error)

UpdateInstanceMetadataOptions updates the named instance's IMDS knobs.

func (*InMemoryBackend) UpdateLoadBalancerAttribute

func (b *InMemoryBackend) UpdateLoadBalancerAttribute(name, attributeName, attributeValue string) ([]Operation, error)

UpdateLoadBalancerAttribute updates one named attribute on the load balancer -- HealthCheckPath and HTTPSRedirectionEnabled are modeled directly; every other attribute name (SessionStickinessEnabled etc.) is stored verbatim in ConfigurationOptions-equivalent bookkeeping without this backend independently acting on it (an honest scoped-down behavior: its wire value is retained and echoed back, never silently dropped).

func (*InMemoryBackend) UpdateRelationalDatabase

func (b *InMemoryBackend) UpdateRelationalDatabase(
	name string, masterUserPassword, preferredBackupWindow, preferredMaintenanceWindow, caCertificateIdentifier string,
	enableBackupRetention, disableBackupRetention, publiclyAccessible *bool,
) ([]Operation, error)

UpdateRelationalDatabase applies caller-supplied updates to the named database.

func (*InMemoryBackend) UpdateRelationalDatabaseParameters

func (b *InMemoryBackend) UpdateRelationalDatabaseParameters(
	name string,
	params []RelationalDatabaseParameter,
) ([]Operation, error)

UpdateRelationalDatabaseParameters updates one or more of the named database's modifiable parameters.

type Instance

type Instance struct {
	CreatedAt        time.Time
	Tags             *tags.Tags
	Location         ResourceLocation
	BlueprintName    string
	SSHKeyName       string
	BundleID         string
	PrivateIPAddress string
	PublicIPAddress  string
	IPAddressType    string
	Username         string

	StateName            string
	BlueprintID          string
	SupportCode          string
	Name                 string
	Arn                  string
	MetadataOptions      InstanceMetadataOptions
	IPv6Addresses        []string
	HostKeys             []HostKeyAttributes
	AutoSnapshots        []AutoSnapshotDetails
	Ports                []InstancePortInfo
	AddOns               []AddOn
	CPUCount             int32
	RAMSizeInGb          float32
	DiskSizeInGb         int32
	MonthlyTransfer      int32
	StateCode            int32
	IsStaticIP           bool
	KnownHostKeysDeleted bool
	// contains filtered or unexported fields
}

Instance mirrors types.Instance. StateCode/StateName back the free-form InstanceState{Code, Name} the SDK exposes -- there is no typed SDK enum (PARITY.md 4.1); the numeric codes below are the conventional EC2-style mapping (0=pending,16=running,32=shutting-down,48=terminated,64=stopping, 80=stopped), an UNCONFIRMED, non-SDK-sourced assumption ported from EC2's own real convention, not a Lightsail-documented fact.

type InstanceAccessDetails

type InstanceAccessDetails struct {
	InstanceName string
	Username     string
	IPAddress    string
	Protocol     string
	PrivateKey   string
	CertKey      string
	Password     string
	ExpiresAt    time.Time
	HostKeys     []HostKeyAttributes
}

InstanceAccessDetails is the ephemeral response GetInstanceAccessDetails builds -- never stored, since real access credentials are issued fresh per request (PARITY.md family C).

type InstanceEntry

type InstanceEntry struct {
	SourceName       string
	AvailabilityZone string
	InstanceType     string
	PortInfoSource   string
	UserData         string
}

InstanceEntry mirrors types.InstanceEntry -- CreateCloudFormationStack's per-instance input.

type InstanceMetadataOptions

type InstanceMetadataOptions struct {
	State                   string
	HTTPTokens              string
	HTTPEndpoint            string
	HTTPProtocolIpv6        string
	HTTPPutResponseHopLimit int32
}

InstanceMetadataOptions mirrors types.InstanceMetadataOptions (IMDS knobs, UpdateInstanceMetadataOptions).

type InstancePortInfo

type InstancePortInfo struct {
	Protocol        string
	AccessFrom      string
	AccessType      string
	CommonName      string
	AccessDirection string
	Cidrs           []string
	Ipv6Cidrs       []string
	CidrListAliases []string
	FromPort        int32
	ToPort          int32
}

InstancePortInfo mirrors types.InstancePortInfo -- one configured firewall rule (PutInstancePublicPorts/Open.../Close...). PortState's own SDK doc comment says "The port state for Lightsail instances is always open" (PARITY.md 4.1), so this backend never models a closed state for a configured rule -- GetInstancePortStates hardcodes PortStateOpen for every entry here rather than a real closed sub-state.

type InstanceSnapshot

type InstanceSnapshot struct {
	CreatedAt          time.Time
	Tags               *tags.Tags
	Location           ResourceLocation
	State              string
	Progress           string
	FromInstanceName   string
	FromInstanceArn    string
	FromBlueprintID    string
	FromBundleID       string
	Name               string
	SupportCode        string
	Arn                string
	FromAttachedDisks  []AttachedDisk
	SizeInGb           int32
	IsFromAutoSnapshot bool
}

InstanceSnapshot mirrors types.InstanceSnapshot.

type KeyPair

type KeyPair struct {
	CreatedAt   time.Time
	Tags        *tags.Tags
	Location    ResourceLocation
	Name        string
	Arn         string
	SupportCode string
	Fingerprint string
}

KeyPair mirrors types.KeyPair -- public metadata only. Private key material (PrivateKeyBase64/PublicKeyBase64) is returned exactly once by CreateKeyPair/ImportKeyPair/DownloadDefaultKeyPair and never stored here (PARITY.md 4.1).

type LoadBalancer

type LoadBalancer struct {
	CreatedAt               time.Time
	Tags                    *tags.Tags
	InstanceHealth          map[string]instanceHealth
	Location                ResourceLocation
	State                   string
	Arn                     string
	IPAddressType           string
	TLSPolicyName           string
	HealthCheckPath         string
	Name                    string
	DNSName                 string
	Protocol                string
	SupportCode             string
	AttachedInstances       []string
	PublicPorts             []int32
	TLSCertificateNames     []string
	InstancePort            int32
	HTTPSRedirectionEnabled bool
}

LoadBalancer mirrors types.LoadBalancer -- a simplified single-listener ALB analogue (LoadBalancerProtocol has exactly 2 values, PARITY.md family L). InstanceHealthSummary tracks one InstanceHealthState per attached instance.

type LoadBalancerTLSCertificate

type LoadBalancerTLSCertificate struct {
	CreatedAt               time.Time
	NotAfter                time.Time
	NotBefore               time.Time
	IssuedAt                time.Time
	Tags                    *tags.Tags
	Location                ResourceLocation
	Status                  string
	SerialNumber            string
	SupportCode             string
	Subject                 string
	Issuer                  string
	Name                    string
	DomainName              string
	LoadBalancerName        string
	Arn                     string
	SubjectAlternativeNames []string
	IsAttached              bool
}

LoadBalancerTLSCertificate mirrors types.LoadBalancerTlsCertificate.

type LoadBalancerTLSPolicy

type LoadBalancerTLSPolicy struct {
	Name        string
	Description string
	Protocols   []string
	Ciphers     []string
	IsDefault   bool
}

LoadBalancerTLSPolicy mirrors types.LoadBalancerTlsPolicy.

type Operation

type Operation struct {
	CreatedAt       time.Time
	StatusChangedAt time.Time
	Location        ResourceLocation
	ID              string
	Type            string
	Status          string
	ResourceName    string
	ResourceType    string
	Details         string
	ErrorCode       string
	ErrorDetails    string
	IsTerminal      bool
}

Operation mirrors types.Operation -- see PARITY.md section 2: nearly every mutating op returns one or more of these, and callers poll GetOperation/GetOperations/GetOperationsForResource (family Z) to observe a real NotStarted/Started -> Succeeded/Failed transition, never a synchronously-fabricated terminal status.

type Provider

type Provider struct{}

Provider implements service.Provider for Amazon Lightsail.

func (*Provider) Init

Init initializes the Lightsail service backend and handler.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the provider name.

type RegionSeed

type RegionSeed struct {
	Name              string
	DisplayName       string
	Description       string
	ContinentCode     string
	AvailabilityZones []string
}

RegionSeed mirrors types.Region.

type RelationalDatabase

type RelationalDatabase struct {
	CreatedAt                  time.Time
	LatestRestorableTime       time.Time
	Tags                       *tags.Tags
	Parameters                 map[string]RelationalDatabaseParameter
	Location                   ResourceLocation
	BundleID                   string
	SecondaryAvailabilityZone  string
	MasterUsername             string
	MasterUserPassword         string
	PreviousMasterUserPassword string
	PreferredBackupWindow      string
	PreferredMaintenanceWindow string
	ParameterApplyStatus       string
	BlueprintID                string
	Name                       string
	CaCertificateIdentifier    string
	MasterDatabaseName         string
	EngineVersion              string
	Engine                     string
	State                      string
	Arn                        string
	SupportCode                string
	Events                     []RelationalDatabaseEvent
	RAMSizeInGb                float32
	DiskSizeInGb               int32
	CPUCount                   int32
	PubliclyAccessible         bool
	BackupRetentionEnabled     bool
}

RelationalDatabase mirrors types.RelationalDatabase. State is a bare *string on the wire -- NO typed RelationalDatabaseState enum exists anywhere in this SDK module (PARITY.md 4.3); the values below (creating/ available/modifying/backing-up/deleting/starting/stopping/stopped/ rebooting) are an honest, non-SDK-sourced convention following general AWS RDS-family behavior, flagged as UNCONFIRMED for Lightsail specifically. RelationalDatabaseEngine's only SDK-known value is "mysql" (PARITY.md 4.3), but Engine is stored as a plain string here and this backend does not reject a caller-supplied non-mysql engine, since the SDK enum documents itself as open/expandable.

type RelationalDatabaseBlueprint

type RelationalDatabaseBlueprint struct {
	BlueprintID              string
	Engine                   string
	EngineDescription        string
	EngineVersion            string
	EngineVersionDescription string
	IsEngineDefault          bool
}

RelationalDatabaseBlueprint mirrors types.RelationalDatabaseBlueprint.

type RelationalDatabaseBundle

type RelationalDatabaseBundle struct {
	BundleID             string
	Name                 string
	CPUCount             int32
	DiskSizeInGb         int32
	RAMSizeInGb          float32
	Price                float32
	TransferPerMonthInGb int32
	IsActive             bool
	IsEncrypted          bool
}

RelationalDatabaseBundle mirrors types.RelationalDatabaseBundle.

type RelationalDatabaseEvent

type RelationalDatabaseEvent struct {
	Message         string
	Resource        string
	CreatedAt       time.Time
	EventCategories []string
}

RelationalDatabaseEvent mirrors types.RelationalDatabaseEvent.

type RelationalDatabaseParameter

type RelationalDatabaseParameter struct {
	ParameterName  string
	ParameterValue string
	Description    string
	AllowedValues  string
	DataType       string
	ApplyType      string
	ApplyMethod    string
	IsModifiable   bool
}

RelationalDatabaseParameter mirrors types.RelationalDatabaseParameter.

type RelationalDatabaseSnapshot

type RelationalDatabaseSnapshot struct {
	CreatedAt                         time.Time
	Tags                              *tags.Tags
	Location                          ResourceLocation
	FromRelationalDatabaseName        string
	Engine                            string
	EngineVersion                     string
	Name                              string
	FromRelationalDatabaseArn         string
	FromRelationalDatabaseBlueprintID string
	FromRelationalDatabaseBundleID    string
	State                             string
	SupportCode                       string
	Arn                               string
	SizeInGb                          int32
}

RelationalDatabaseSnapshot mirrors types.RelationalDatabaseSnapshot.

type ResourceLocation

type ResourceLocation struct {
	AvailabilityZone string
	RegionName       string
}

ResourceLocation mirrors types.ResourceLocation.

type SetupExecutionDetail

type SetupExecutionDetail struct {
	DateTime       time.Time
	Name           string
	Command        string
	Status         string
	Version        string
	StandardOutput string
	StandardError  string
}

SetupExecutionDetail mirrors types.SetupExecutionDetails.

type SetupHistoryEntry

type SetupHistoryEntry struct {
	CreatedAt           time.Time
	Location            ResourceLocation
	OperationID         string
	ResourceName        string
	Status              string
	CertificateProvider string
	InstanceName        string
	DomainNames         []string
	ExecutionDetails    []SetupExecutionDetail
}

SetupHistoryEntry mirrors types.SetupHistory.

type StaticIP

type StaticIP struct {
	Name        string
	Arn         string
	SupportCode string
	IPAddress   string
	AttachedTo  string
	CreatedAt   time.Time
	Location    ResourceLocation
	IsAttached  bool
}

StaticIP mirrors types.StaticIp -- a simplified Elastic-IP analogue scoped only to attach/detach against a named Instance (PARITY.md 4.1).

type TaggedEntry

type TaggedEntry struct {
	Tags map[string]string
	ARN  string
}

TaggedEntry is one resource's ARN and current tag map, for the resourcegroupstaggingapi cross-service bridge (cli.go's wireTaggingLightsail).

Jump to

Keyboard shortcuts

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