appstream

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: MIT Imports: 24 Imported by: 0

README

AppStream 2.0

Parity grade: A · SDK aws-sdk-go-v2/service/appstream@v1.64.5 · last audited 2026-08-23

Coverage

Metric Value
PARITY entries audited 44 (44 ok)
Feature families 14 (14 ok)
Known gaps none
Deferred items 0
Resource leaks clean

More

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound is returned when a resource does not exist.
	ErrNotFound = awserr.New(errResourceNotFound, awserr.ErrNotFound)
	// ErrAlreadyExists is returned when a resource already exists.
	ErrAlreadyExists = awserr.New(errResourceExists, awserr.ErrAlreadyExists)
	// ErrEntitlementAlreadyExists is returned by CreateEntitlement when an
	// entitlement for the same name/stack already exists. See
	// errEntitlementExists's doc comment.
	ErrEntitlementAlreadyExists = awserr.New(errEntitlementExists, awserr.ErrAlreadyExists)
	// ErrFleetNotStopped is returned when a fleet state transition is invalid
	// (e.g. starting a running fleet, stopping a stopped fleet, deleting a running fleet).
	ErrFleetNotStopped = awserr.New(errFleetNotStopped, awserr.ErrConflict)
	// ErrResourceInUse is returned when a resource cannot be deleted because it is in use.
	ErrResourceInUse = awserr.New(errResourceInUse, awserr.ErrConflict)
	// ErrSerialization is returned when a request doesn't satisfy an
	// operation's required input shape. Must precede awserr.ErrInvalidParameter
	// in errorCodeStatus's switch (same pattern as ErrFleetNotStopped/
	// ErrAlreadyExists there), since it also wraps that sentinel.
	ErrSerialization = awserr.New(errSerialization, awserr.ErrInvalidParameter)
)
View Source
var ErrNilAppContext = errors.New("appstream: nil app context")

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

Functions

This section is empty.

Types

type AccessEndpoint

type AccessEndpoint struct {
	EndpointType string
	VpceID       string
}

AccessEndpoint mirrors appstream@v1.64.5 types.AccessEndpoint: an interface VPC endpoint through which a stack or image builder may be accessed.

type AppBlock

type AppBlock struct {
	SetupScriptDetails     *ScriptDetails
	PostSetupScriptDetails *ScriptDetails
	CreatedTime            time.Time
	Tags                   map[string]string
	SourceS3Location       S3Location
	Name                   string
	Arn                    string
	Description            string
	DisplayName            string
	PackagingType          string
	State                  string
}

AppBlock holds AppStream 2.0 app block details.

type AppBlockBuilder

type AppBlockBuilder struct {
	CreatedTime                 time.Time
	EnableDefaultInternetAccess *bool
	Tags                        map[string]string
	Name                        string
	Arn                         string
	Description                 string
	Platform                    string
	InstanceType                string
	State                       string
	VpcConfig                   VpcConfig
}

AppBlockBuilder holds AppStream 2.0 app block builder details.

type AppBlockBuilderAppBlockAssociation

type AppBlockBuilderAppBlockAssociation struct {
	AppBlockBuilderName string
	AppBlockArn         string
	State               string
}

AppBlockBuilderAppBlockAssociation represents an AppBlockBuilder-AppBlock link.

type Application

type Application struct {
	CreatedTime      time.Time
	Tags             map[string]string
	Name             string
	Arn              string
	DisplayName      string
	Description      string
	LaunchPath       string
	AppBlockArn      string
	LaunchParameters string
	WorkingDirectory string
	Platforms        []string
	IconS3Location   S3Location
	InstanceFamilies []string
	Enabled          bool
}

Application holds AppStream 2.0 application details.

Enabled is always true: real AWS's doc comment on types.Application.Enabled says an application "can be disabled after image creation", but this backend has no image-creation pipeline that ever disables one, so every application it models is genuinely, unconditionally enabled.

type ApplicationFleetAssociation

type ApplicationFleetAssociation struct {
	ApplicationArn string
	FleetName      string
	State          string
}

ApplicationFleetAssociation represents an Application-Fleet link.

type ApplicationSettings

type ApplicationSettings struct {
	SettingsGroup string
	S3BucketName  string
	Enabled       bool
}

ApplicationSettings mirrors appstream@v1.64.5 types.ApplicationSettingsResponse: persistent application settings for a stack's streaming sessions. S3BucketName is derived, not stored -- real AWS creates one S3 bucket per account+Region the first time persistent application settings are enabled (doc comment on types.ApplicationSettingsResponse.S3BucketName), mirroring the UsageReportSubscription.S3BucketName naming convention already used by this backend.

type CertificateBasedAuthProperties added in v1.2.0

type CertificateBasedAuthProperties struct {
	CertificateAuthorityArn string
	Status                  string
}

CertificateBasedAuthProperties configures SAML 2.0 certificate-based authentication for a directory config.

type ContentRedirection

type ContentRedirection struct {
	HostToClient *UrlRedirectionConfig
}

ContentRedirection mirrors appstream@v1.64.5 types.ContentRedirection: content-redirection configuration for a stack's streaming sessions.

type CreateAppBlockOptions

type CreateAppBlockOptions struct {
	SetupScriptDetails     *ScriptDetails
	PostSetupScriptDetails *ScriptDetails
	Tags                   map[string]string
	SourceS3Location       S3Location
	DisplayName            string
	PackagingType          string
}

CreateAppBlockOptions carries CreateAppBlockInput's full member set (api_op_CreateAppBlock.go) beyond the identity fields that stay positional on CreateAppBlock.

type CreateFleetOptions

type CreateFleetOptions struct {
	DisableIMDSV1               *bool
	RootVolumeConfig            *VolumeConfig
	Tags                        map[string]string
	EnableDefaultInternetAccess *bool
	DomainJoinInfo              DomainJoinInfo
	SessionScriptS3Location     S3Location
	InstanceType                string
	StreamView                  string
	DisplayName                 string
	Description                 string
	Platform                    string
	FleetType                   string
	ImageName                   string
	ImageArn                    string
	IamRoleArn                  string
	VpcConfig                   VpcConfig
	UsbDeviceFilterStrings      []string
	DesiredInstances            int
	MaxUserDurationSecs         int
	DisconnectTimeoutSecs       int
	IdleDisconnectTimeoutSecs   int
	MaxSessionsPerInstance      int
	MaxConcurrentSessions       int
}

CreateFleetOptions carries CreateFleetInput's full member set (api_op_CreateFleet.go) beyond the identity/capacity fields that stay positional on CreateFleet, following this file's established ThemeUpdateOptions convention for wide option sets.

type CreateImageBuilderOptions

type CreateImageBuilderOptions struct {
	EnableDefaultInternetAccess *bool
	DisableIMDSV1               *bool
	RootVolumeConfig            *VolumeConfig
	Tags                        map[string]string
	DomainJoinInfo              DomainJoinInfo
	IamRoleArn                  string
	AppstreamAgentVersion       string
	VpcConfig                   VpcConfig
	AccessEndpoints             []AccessEndpoint
}

CreateImageBuilderOptions carries CreateImageBuilderInput's full member set (api_op_CreateImageBuilder.go) beyond the identity fields that stay positional on CreateImageBuilder.

type CreateStackOptions

type CreateStackOptions struct {
	ApplicationSettings         *ApplicationSettings
	ContentRedirection          *ContentRedirection
	StreamingExperienceSettings *StreamingExperienceSettings
	Tags                        map[string]string
	RedirectURL                 string
	FeedbackURL                 string
	DisplayName                 string
	Description                 string
	EmbedHostDomains            []string
	UserSettings                []UserSetting
	StorageConnectors           []StorageConnector
	AccessEndpoints             []AccessEndpoint
}

CreateStackOptions carries CreateStackInput's full member set (api_op_CreateStack.go) beyond the identity fields that stay positional on CreateStack. AgentAccessConfig (types.AgentAccessConfig) is deliberately absent: its nested ScreenResolution/AgentAccessSetting/ScreenImageFormat shape is real CreateStackInput surface with an honest source, but wiring it through was out of scope for this pass -- it stays a genuine (not fabricated) gap, tracked in PARITY.md rather than closed here.

type DirectoryConfig

type DirectoryConfig struct {
	CreatedTime                          time.Time
	ServiceAccountCredentials            ServiceAccountCredentials
	CertificateBasedAuthProperties       CertificateBasedAuthProperties
	DirectoryName                        string
	Arn                                  string
	OrganizationalUnitDistinguishedNames []string
}

DirectoryConfig holds Active Directory connection details.

type DomainJoinInfo

type DomainJoinInfo struct {
	DirectoryName                       string
	OrganizationalUnitDistinguishedName string
}

DomainJoinInfo mirrors appstream@v1.64.5 types.DomainJoinInfo: the AD domain a fleet or image builder joins on launch.

type EntitledApplication

type EntitledApplication struct {
	ApplicationIdentifier string
}

EntitledApplication is an application visible to an entitled user.

type Entitlement

type Entitlement struct {
	CreatedTime    time.Time
	LastModifiedAt time.Time
	Name           string
	StackName      string
	Description    string
	AppVisibility  string
	Attributes     []EntitlementAttribute
}

Entitlement controls application access based on user attributes.

type EntitlementAttribute

type EntitlementAttribute struct {
	Name  string `json:"Name"`
	Value string `json:"Value"`
}

EntitlementAttribute is a name-value pair used for entitlement matching.

type ExportImageTask

type ExportImageTask struct {
	CreatedDate       time.Time
	TagSpecifications map[string]string
	TaskID            string
	ImageArn          string
	AmiName           string
	AmiDescription    string
	AmiID             string
	State             string
}

ExportImageTask represents a task exporting a WorkSpaces Applications image to an EC2 AMI.

type Fleet

type Fleet struct {
	CreatedTime                 time.Time
	DisableIMDSV1               *bool
	RootVolumeConfig            *VolumeConfig
	Tags                        map[string]string
	EnableDefaultInternetAccess *bool
	DomainJoinInfo              DomainJoinInfo
	SessionScriptS3Location     S3Location
	Description                 string
	Platform                    string
	Name                        string
	Arn                         string
	DisplayName                 string
	StreamView                  string
	InstanceType                string
	FleetType                   string
	State                       string
	ImageName                   string
	ImageArn                    string
	IamRoleArn                  string
	VpcConfig                   VpcConfig
	UsbDeviceFilterStrings      []string
	DesiredInstances            int
	MaxUserDurationSecs         int
	DisconnectTimeoutSecs       int
	IdleDisconnectTimeoutSecs   int
	MaxSessionsPerInstance      int
	MaxConcurrentSessions       int
}

Fleet holds AppStream 2.0 fleet details.

type Handler

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

Handler serves AppStream 2.0 JSON operations.

func NewHandler

func NewHandler(b StorageBackend) *Handler

NewHandler creates an AppStream 2.0 handler backed by b.

func (*Handler) ExtractOperation

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

ExtractOperation extracts the AppStream action from the CBOR operation path or, for the legacy protocol, the X-Amz-Target header.

func (*Handler) ExtractResource

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

ExtractResource returns an empty string (AppStream identifies resources by name in body).

func (*Handler) GetSupportedOperations

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

GetSupportedOperations returns all implemented operation names.

func (*Handler) Handler

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

Handler returns the Echo handler function. It dispatches rpc-v2-cbor requests to handleCBOR and everything else through the legacy X-Amz-Target/awsjson1.1 path.

func (*Handler) MatchPriority

func (h *Handler) MatchPriority() int

MatchPriority returns header matching priority.

func (*Handler) Name

func (h *Handler) Name() string

Name returns the service name.

func (*Handler) Reset

func (h *Handler) Reset()

Reset clears backend state.

func (*Handler) Restore

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

Restore restores the backend state from a snapshot.

func (*Handler) RouteMatcher

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

RouteMatcher matches AppStream 2.0 requests on either wire protocol: the legacy X-Amz-Target header (awsjson1.1, still used by older pinned SDKs, the Terraform provider, and gopherstack's own unit tests) or the rpc-v2-cbor path used by aws-sdk-go-v2/service/appstream >= v1.64.5.

func (*Handler) Snapshot

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

Snapshot returns a serialized snapshot of the backend state.

type Image

type Image struct {
	CreatedTime  time.Time
	Tags         map[string]string
	Name         string
	Arn          string
	Description  string
	Platform     string
	Visibility   string
	State        string
	BaseImageArn string
}

Image holds AppStream 2.0 image details.

type ImageBuilder

type ImageBuilder struct {
	CreatedTime                 time.Time
	DisableIMDSV1               *bool
	RootVolumeConfig            *VolumeConfig
	Tags                        map[string]string
	EnableDefaultInternetAccess *bool
	DomainJoinInfo              DomainJoinInfo
	Name                        string
	Arn                         string
	Description                 string
	Platform                    string
	InstanceType                string
	State                       string
	ImageName                   string
	IamRoleArn                  string
	AppstreamAgentVersion       string
	VpcConfig                   VpcConfig
	AccessEndpoints             []AccessEndpoint
}

ImageBuilder holds AppStream 2.0 image builder details.

type ImagePermissions

type ImagePermissions struct {
	AllowFleet        bool
	AllowImageBuilder bool
}

ImagePermissions controls how an image may be used.

type InMemoryBackend

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

InMemoryBackend implements StorageBackend using in-memory maps.

Every resource collection that is a map[string]*T is a *store.Table[T] (see store_setup.go), registered once on registry so Reset/Snapshot/ Restore collapse to one registry call each instead of one hand-written block per map (see pkgs/store's package doc, Phase 3.3 of the datalayer refactor). stacks, fleets, appBlocks, appBlockBuilders, applications, directoryConfigs, images, imageBuilders, exportTasks, and sessions were already flat and keyed by their own real identity field, so each registers directly with no composite key. entitlements and users were already keyed by a composite string (entitlementKey/userKey) built from two real fields each already carries (Name+StackName, UserName+AuthenticationType), so both also register directly -- the composite key is just their keyFn. themes is keyed directly by its own StackName field (one theme per stack). imagePermissions previously had no identity field of its own (it was always looked up by an external imageName); it gained a real (not hidden -- this type is purely internal, never marshaled as an AWS wire shape) Name field for this purpose, see storedImagePermissions in images.go.

associations, appBlockBuilderAssoc, appFleetAssoc, entitlementApps, softwareAssoc, and userStackAssoc are many-to-many association sets (map[string]map[string]bool); tags is map[string]map[string]string. None of these have a *T value store.Table could key on, so all seven remain plain maps, persisted directly by persistence.go (see its doc comment). usageReport is a single scalar record (not a map at all), so it also stays a plain field.

func NewInMemoryBackend

func NewInMemoryBackend(accountID, region string) *InMemoryBackend

NewInMemoryBackend constructs a new InMemoryBackend.

func (*InMemoryBackend) AccountID

func (b *InMemoryBackend) AccountID() string

AccountID returns the account ID.

func (*InMemoryBackend) AssociateAppBlockBuilderAppBlock

func (b *InMemoryBackend) AssociateAppBlockBuilderAppBlock(
	builderName, appBlockID string,
) (*AppBlockBuilderAppBlockAssociation, error)

AssociateAppBlockBuilderAppBlock links a builder to an app block and returns the association. appBlockID accepts either the app block Name or its Arn -- real AWS's AssociateAppBlockBuilderAppBlock request carries the AppBlockArn. The real AssociateAppBlockBuilderAppBlockOutput carries the AppBlockBuilderAppBlockAssociation itself (deserializeCBOR_AssociateAppBlockBuilderAppBlockOutput in the pinned appstream SDK's deserializers.go), not an empty envelope.

func (*InMemoryBackend) AssociateApplicationFleet

func (b *InMemoryBackend) AssociateApplicationFleet(appID, fleetName string) (*ApplicationFleetAssociation, error)

AssociateApplicationFleet links an application to a fleet and returns the association. appID accepts either the application Name or its Arn -- real AWS's AssociateApplicationFleet request carries the ApplicationArn. The real AssociateApplicationFleetOutput carries the ApplicationFleetAssociation itself (deserializeCBOR_AssociateApplicationFleetOutput in the pinned appstream SDK's deserializers.go), not an empty envelope.

func (*InMemoryBackend) AssociateApplicationToEntitlement

func (b *InMemoryBackend) AssociateApplicationToEntitlement(appID, entitlementName, stackName string) error

AssociateApplicationToEntitlement links an application to an entitlement.

func (*InMemoryBackend) AssociateFleet

func (b *InMemoryBackend) AssociateFleet(fleetName, stackName string) error

AssociateFleet links a fleet and a stack.

func (*InMemoryBackend) AssociateSoftwareToImageBuilder

func (b *InMemoryBackend) AssociateSoftwareToImageBuilder(imageBuilderName string, software []string) error

AssociateSoftwareToImageBuilder adds software packages to an image builder.

func (*InMemoryBackend) BatchAssociateUserStack

func (b *InMemoryBackend) BatchAssociateUserStack(
	associations []UserStackAssociation,
) ([]UserStackAssociationError, error)

BatchAssociateUserStack links users to stacks.

func (*InMemoryBackend) BatchDisassociateUserStack

func (b *InMemoryBackend) BatchDisassociateUserStack(
	associations []UserStackAssociation,
) ([]UserStackAssociationError, error)

BatchDisassociateUserStack unlinks users from stacks.

func (*InMemoryBackend) CopyImage

func (b *InMemoryBackend) CopyImage(
	sourceName, destName, destRegion, description string,
) (*Image, error)

CopyImage duplicates an image with a new name.

func (*InMemoryBackend) CreateAppBlock

func (b *InMemoryBackend) CreateAppBlock(name, description string, opts CreateAppBlockOptions) (*AppBlock, error)

CreateAppBlock creates an app block. SourceS3Location is required on the real wire (api_op_CreateAppBlock.go); the handler rejects a request without one before reaching here.

func (*InMemoryBackend) CreateAppBlockBuilder

func (b *InMemoryBackend) CreateAppBlockBuilder(
	name, description, platform, instanceType string,
	vpcConfig VpcConfig,
	tags map[string]string,
	enableDefaultInternetAccess *bool,
) (*AppBlockBuilder, error)

CreateAppBlockBuilder creates an app block builder. vpcConfig is required on the real wire (appstream@v1.64.5 api_op_CreateAppBlockBuilder.go:64, types.AppBlockBuilder.VpcConfig also "This member is required" at types/types.go:248); the handler rejects a request with no VpcConfig before reaching here.

func (*InMemoryBackend) CreateAppBlockBuilderStreamingURL

func (b *InMemoryBackend) CreateAppBlockBuilderStreamingURL(
	name string,
	validitySeconds int64,
) (string, time.Time, error)

CreateAppBlockBuilderStreamingURL returns a streaming URL for the builder along with its expiry time. validitySeconds <= 0 falls back to the real AWS default of 3600 seconds.

func (*InMemoryBackend) CreateApplication

func (b *InMemoryBackend) CreateApplication(
	name, displayName, description, launchPath, appBlockArn string,
	platforms []string, iconS3Location S3Location, instanceFamilies []string,
	tags map[string]string, launchParameters, workingDirectory string,
) (*Application, error)

CreateApplication creates a new application. iconS3Location and instanceFamilies are required members (api_op_CreateApplication.go:47,53). IconS3Location.S3Key is only conditionally required by the shared S3Location shape, but that condition is satisfied here: it is required specifically "for IconS3Location (Actions: CreateApplication and UpdateApplication)" (appstream@v1.64.5 types/types.go:1434-1451).

func (*InMemoryBackend) CreateDirectoryConfig

func (b *InMemoryBackend) CreateDirectoryConfig(
	name string,
	ouDNs []string,
	cred ServiceAccountCredentials,
	certAuth CertificateBasedAuthProperties,
) (*DirectoryConfig, error)

CreateDirectoryConfig creates a new directory configuration.

func (*InMemoryBackend) CreateEntitlement

func (b *InMemoryBackend) CreateEntitlement(
	name, stackName, description, appVisibility string,
	attributes []EntitlementAttribute,
) (*Entitlement, error)

CreateEntitlement creates a new entitlement.

func (*InMemoryBackend) CreateExportImageTask

func (b *InMemoryBackend) CreateExportImageTask(
	imageName, amiName, amiDescription, iamRoleArn string,
	tagSpecifications map[string]string,
) (*ExportImageTask, error)

CreateExportImageTask creates a task exporting imageName to an EC2 AMI. Real AWS's CreateExportImageTaskInput requires ImageName, AmiName, and IamRoleArn (no S3 destination -- this is an AMI export, not an S3 export); TagSpecifications and AmiDescription are optional. This in-memory backend completes the export synchronously, minting a deterministic AMI ID.

func (*InMemoryBackend) CreateFleet

func (b *InMemoryBackend) CreateFleet(name string, opts CreateFleetOptions) (*Fleet, error)

CreateFleet creates a new fleet.

func (*InMemoryBackend) CreateImageBuilder

func (b *InMemoryBackend) CreateImageBuilder(
	name, description, platform, instanceType string,
	opts CreateImageBuilderOptions,
) (*ImageBuilder, error)

CreateImageBuilder creates a new image builder.

func (*InMemoryBackend) CreateImageBuilderStreamingURL

func (b *InMemoryBackend) CreateImageBuilderStreamingURL(
	name string,
	validitySeconds int64,
) (string, time.Time, error)

CreateImageBuilderStreamingURL returns a streaming URL for an image builder along with its expiry time. validitySeconds <= 0 falls back to the real AWS default of 3600 seconds.

func (*InMemoryBackend) CreateImportedImage

func (b *InMemoryBackend) CreateImportedImage(name, description string, tags map[string]string) (*Image, error)

CreateImportedImage creates a new image (e.g. imported from S3).

func (*InMemoryBackend) CreateStack

func (b *InMemoryBackend) CreateStack(name string, opts CreateStackOptions) (*Stack, error)

CreateStack creates a new stack.

func (*InMemoryBackend) CreateStreamingURL

func (b *InMemoryBackend) CreateStreamingURL(
	stackName, fleetName, userID string,
	validitySeconds int64,
) (string, time.Time, error)

CreateStreamingURL creates a session and returns a streaming URL along with its expiry time. validitySeconds <= 0 falls back to the real AWS default of 60 seconds.

func (*InMemoryBackend) CreateThemeForStack

func (b *InMemoryBackend) CreateThemeForStack(
	stackName string,
	faviconS3Location, organizationLogoS3Location S3Location,
	themeStyling, titleText string,
	footerLinks []ThemeFooterLink,
) (*Theme, error)

CreateThemeForStack creates a theme for a stack. FaviconS3Location, OrganizationLogoS3Location, ThemeStyling and TitleText are required members of CreateThemeForStackInput (api_op_CreateThemeForStack.go:29-59).

func (*InMemoryBackend) CreateUpdatedImage

func (b *InMemoryBackend) CreateUpdatedImage(imageName, newImageName, description string) (*Image, error)

CreateUpdatedImage creates a new image based on an existing one with updates applied.

func (*InMemoryBackend) CreateUsageReportSubscription

func (b *InMemoryBackend) CreateUsageReportSubscription() (*UsageReportSubscription, error)

CreateUsageReportSubscription creates a usage report subscription.

Real CreateUsageReportSubscriptionInput takes no parameters (aws-sdk-go-v2 appstream@v1.64.5 api_op_CreateUsageReportSubscription.go) -- AWS derives both the schedule (always DAILY) and the S3 bucket server-side rather than accepting them from the caller.

func (*InMemoryBackend) CreateUser

func (b *InMemoryBackend) CreateUser(userName, firstName, lastName, authType string) (*User, error)

CreateUser creates a new UserPool user.

func (*InMemoryBackend) DeleteAppBlock

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

DeleteAppBlock removes an app block. Returns ErrResourceInUse if any application still references it via AppBlockArn (DeleteAppBlock models ResourceInUseException; CreateApplication's AppBlockArn is the only real reference to an app block this backend tracks).

func (*InMemoryBackend) DeleteAppBlockBuilder

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

DeleteAppBlockBuilder removes an app block builder.

func (*InMemoryBackend) DeleteApplication

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

DeleteApplication removes an application.

func (*InMemoryBackend) DeleteDirectoryConfig

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

DeleteDirectoryConfig removes a directory configuration.

func (*InMemoryBackend) DeleteEntitlement

func (b *InMemoryBackend) DeleteEntitlement(name, stackName string) error

DeleteEntitlement removes an entitlement.

func (*InMemoryBackend) DeleteFleet

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

DeleteFleet removes a fleet. Returns ErrResourceInUse if fleet is running.

func (*InMemoryBackend) DeleteImage

func (b *InMemoryBackend) DeleteImage(name string) (*Image, error)

DeleteImage removes an image and returns the deleted image. Real AWS's DeleteImageOutput carries the deleted Image (deserializeCBOR_DeleteImageOutput in the pinned appstream SDK's deserializers.go), not an empty envelope.

"You cannot delete an image when it is in use" (api_op_DeleteImage.go doc comment); a fleet still referencing this image by name or ARN counts as in use, matching DeleteImage's modeled ResourceInUseException.

func (*InMemoryBackend) DeleteImageBuilder

func (b *InMemoryBackend) DeleteImageBuilder(name string) (*ImageBuilder, error)

DeleteImageBuilder removes an image builder and returns the deleted image builder. Real AWS's DeleteImageBuilderOutput carries the deleted ImageBuilder (deserializeCBOR_DeleteImageBuilderOutput in the pinned appstream SDK's deserializers.go), not an empty envelope or a stripped-down Name/ImageName-only shape.

func (*InMemoryBackend) DeleteImagePermissions

func (b *InMemoryBackend) DeleteImagePermissions(imageName, accountID string) error

DeleteImagePermissions removes sharing permissions for a specific account.

func (*InMemoryBackend) DeleteStack

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

DeleteStack removes a stack. Returns ErrResourceInUse if any fleet is associated with the stack.

func (*InMemoryBackend) DeleteThemeForStack

func (b *InMemoryBackend) DeleteThemeForStack(stackName string) error

DeleteThemeForStack removes a stack theme.

func (*InMemoryBackend) DeleteUsageReportSubscription

func (b *InMemoryBackend) DeleteUsageReportSubscription() error

DeleteUsageReportSubscription removes the usage report subscription.

func (*InMemoryBackend) DeleteUser

func (b *InMemoryBackend) DeleteUser(userName, authType string) error

DeleteUser removes a user.

func (*InMemoryBackend) DescribeAppBlockBuilderAppBlockAssociations

func (b *InMemoryBackend) DescribeAppBlockBuilderAppBlockAssociations(
	builderName, appBlockID string,
) ([]*AppBlockBuilderAppBlockAssociation, error)

DescribeAppBlockBuilderAppBlockAssociations lists builder-appblock associations. appBlockID accepts either the app block Name or its Arn, matching AssociateAppBlockBuilderAppBlock. A non-matching filter yields an empty result (real AWS's Describe op has no ResourceNotFoundException).

func (*InMemoryBackend) DescribeAppBlockBuilders

func (b *InMemoryBackend) DescribeAppBlockBuilders(names []string) ([]*AppBlockBuilder, error)

DescribeAppBlockBuilders returns builders, optionally filtered by name.

func (*InMemoryBackend) DescribeAppBlocks

func (b *InMemoryBackend) DescribeAppBlocks(arns []string) ([]*AppBlock, error)

DescribeAppBlocks returns app blocks, optionally filtered by ARN.

func (*InMemoryBackend) DescribeAppLicenseUsage

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

DescribeAppLicenseUsage returns license usage records. This backend tracks no BYOL/license-included application state, so the real (not fabricated) answer is always an empty list -- matching what real AWS returns for an account with no licensed application usage to report.

func (*InMemoryBackend) DescribeApplicationFleetAssociations

func (b *InMemoryBackend) DescribeApplicationFleetAssociations(
	appID, fleetName string,
) ([]*ApplicationFleetAssociation, error)

DescribeApplicationFleetAssociations returns application-fleet links. appID accepts either the application Name or its Arn, matching AssociateApplicationFleet. A non-matching filter yields an empty result (real AWS's Describe op has no ResourceNotFoundException).

func (*InMemoryBackend) DescribeApplications

func (b *InMemoryBackend) DescribeApplications(arns []string) ([]*Application, error)

DescribeApplications returns applications, optionally filtered by ARN.

func (*InMemoryBackend) DescribeDirectoryConfigs

func (b *InMemoryBackend) DescribeDirectoryConfigs(names []string) ([]*DirectoryConfig, error)

DescribeDirectoryConfigs returns directory configs, optionally filtered by name.

func (*InMemoryBackend) DescribeEntitlements

func (b *InMemoryBackend) DescribeEntitlements(name, stackName string) ([]*Entitlement, error)

DescribeEntitlements returns entitlements for a stack, optionally filtered by name.

func (*InMemoryBackend) DescribeFleets

func (b *InMemoryBackend) DescribeFleets(names []string) ([]*Fleet, error)

DescribeFleets returns fleets, optionally filtered by names.

func (*InMemoryBackend) DescribeImageBuilders

func (b *InMemoryBackend) DescribeImageBuilders(names []string) ([]*ImageBuilder, error)

DescribeImageBuilders returns image builders, optionally filtered by name.

func (*InMemoryBackend) DescribeImagePermissions

func (b *InMemoryBackend) DescribeImagePermissions(
	imageName string, sharedAwsAccountIDs []string,
) ([]*SharedImagePermissions, error)

DescribeImagePermissions returns sharing permissions for an image.

func (*InMemoryBackend) DescribeImages

func (b *InMemoryBackend) DescribeImages(names []string, visibilityType string) ([]*Image, error)

DescribeImages returns images, optionally filtered by name or ARN. DescribeImages returns images, optionally filtered by name/ARN and by visibility type. Every image this backend creates has Visibility "PRIVATE" -- it never models AWS-provided base images or images shared from another account -- so visibilityType "PUBLIC" or "SHARED" always yields an empty result.

func (*InMemoryBackend) DescribeSessions

func (b *InMemoryBackend) DescribeSessions(
	stackName, fleetName, userID, authenticationType string,
	limit int, nextToken string,
) ([]*Session, string, error)

DescribeSessions returns sessions filtered by stack, fleet, user, and/or authentication type. Every session this backend creates (CreateStreamingURL) has AuthenticationType "API" -- it never models SAML or userpool-originated sessions -- so a non-"API" authenticationType filter always yields an empty result. InstanceId isn't modeled at all (this backend has no streaming-instance concept) and so isn't filterable.

func (*InMemoryBackend) DescribeSoftwareAssociations

func (b *InMemoryBackend) DescribeSoftwareAssociations(resource string) ([]SoftwareAssociation, error)

DescribeSoftwareAssociations returns software associated with an image builder or image.

func (*InMemoryBackend) DescribeStacks

func (b *InMemoryBackend) DescribeStacks(names []string) ([]*Stack, error)

DescribeStacks returns stacks, optionally filtered by names.

func (*InMemoryBackend) DescribeThemeForStack

func (b *InMemoryBackend) DescribeThemeForStack(stackName string) (*Theme, error)

DescribeThemeForStack returns the theme for a stack.

func (*InMemoryBackend) DescribeUsageReportSubscriptions

func (b *InMemoryBackend) DescribeUsageReportSubscriptions() ([]*UsageReportSubscription, error)

DescribeUsageReportSubscriptions returns the usage report subscription.

func (*InMemoryBackend) DescribeUserStackAssociations

func (b *InMemoryBackend) DescribeUserStackAssociations(
	stackName, userName, authType string,
) ([]*UserStackAssociation, error)

DescribeUserStackAssociations returns user-stack links, optionally filtered.

func (*InMemoryBackend) DescribeUsers

func (b *InMemoryBackend) DescribeUsers(authType string) ([]*User, error)

DescribeUsers returns users, optionally filtered by authentication type.

func (*InMemoryBackend) DisableUser

func (b *InMemoryBackend) DisableUser(userName, authType string) error

DisableUser disables a user.

func (*InMemoryBackend) DisassociateAppBlockBuilderAppBlock

func (b *InMemoryBackend) DisassociateAppBlockBuilderAppBlock(builderName, appBlockID string) error

DisassociateAppBlockBuilderAppBlock removes a builder-appblock link. appBlockID accepts either the app block Name or its Arn, matching AssociateAppBlockBuilderAppBlock.

func (*InMemoryBackend) DisassociateApplicationFleet

func (b *InMemoryBackend) DisassociateApplicationFleet(appID, fleetName string) error

DisassociateApplicationFleet removes an application-fleet link. appID accepts either the application Name or its Arn, matching AssociateApplicationFleet.

func (*InMemoryBackend) DisassociateApplicationFromEntitlement

func (b *InMemoryBackend) DisassociateApplicationFromEntitlement(appID, entitlementName, stackName string) error

DisassociateApplicationFromEntitlement removes an application-entitlement link.

func (*InMemoryBackend) DisassociateFleet

func (b *InMemoryBackend) DisassociateFleet(fleetName, stackName string) error

DisassociateFleet unlinks a fleet and a stack.

func (*InMemoryBackend) DisassociateSoftwareFromImageBuilder

func (b *InMemoryBackend) DisassociateSoftwareFromImageBuilder(imageBuilderName string, software []string) error

DisassociateSoftwareFromImageBuilder removes software packages from an image builder.

func (*InMemoryBackend) DrainSessionInstance

func (b *InMemoryBackend) DrainSessionInstance(sessionID string) error

DrainSessionInstance removes a session.

func (*InMemoryBackend) EnableUser

func (b *InMemoryBackend) EnableUser(userName, authType string) error

EnableUser re-enables a user.

func (*InMemoryBackend) ExpireSession

func (b *InMemoryBackend) ExpireSession(sessionID string) error

ExpireSession marks a session as expired (and removes it).

func (*InMemoryBackend) GetExportImageTask

func (b *InMemoryBackend) GetExportImageTask(taskID string) (*ExportImageTask, error)

GetExportImageTask retrieves an export task by ID.

func (*InMemoryBackend) ListAssociatedFleets

func (b *InMemoryBackend) ListAssociatedFleets(stackName string) ([]string, error)

ListAssociatedFleets returns fleet names associated with a stack.

func (*InMemoryBackend) ListAssociatedStacks

func (b *InMemoryBackend) ListAssociatedStacks(fleetName string) ([]string, error)

ListAssociatedStacks returns stack names associated with a fleet.

func (*InMemoryBackend) ListEntitledApplications

func (b *InMemoryBackend) ListEntitledApplications(entitlementName, stackName string) ([]*EntitledApplication, error)

ListEntitledApplications returns applications associated with an entitlement.

func (*InMemoryBackend) ListExportImageTasks

func (b *InMemoryBackend) ListExportImageTasks(maxResults int32, nextToken string) ([]*ExportImageTask, string, error)

ListExportImageTasks returns a page of export tasks ordered by TaskID. Real AWS also accepts a generic Filters parameter (opaque Name/Values pairs whose matching semantics are not part of the published service model); this emulator does not evaluate it, only MaxResults/NextToken pagination.

func (*InMemoryBackend) ListTagsForResource

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

ListTagsForResource returns tags for an AppStream resource ARN.

func (*InMemoryBackend) Region

func (b *InMemoryBackend) Region() string

Region returns the region.

func (*InMemoryBackend) Reset

func (b *InMemoryBackend) Reset()

Reset clears all state. Snapshot/Restore (and resetRawMaps, shared with Restore's version-mismatch path) live in persistence.go, alongside backendSnapshot, since both need the same registry/raw-map inventory this method resets.

func (*InMemoryBackend) Restore

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

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

func (*InMemoryBackend) SetClock

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

SetClock overrides the backend's clock. For deterministic tests only.

func (*InMemoryBackend) Snapshot

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

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

func (*InMemoryBackend) StartAppBlockBuilder

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

StartAppBlockBuilder transitions a builder to RUNNING.

func (*InMemoryBackend) StartFleet

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

StartFleet transitions a fleet to RUNNING.

func (*InMemoryBackend) StartImageBuilder

func (b *InMemoryBackend) StartImageBuilder(
	name, appstreamAgentVersion string,
) error

StartImageBuilder transitions an image builder to RUNNING. Real AWS's StartImageBuilderOutput carries only the ImageBuilder shape -- no streaming URL; callers must fetch one separately via CreateImageBuilderStreamingURL.

func (*InMemoryBackend) StartSoftwareDeploymentToImageBuilder

func (b *InMemoryBackend) StartSoftwareDeploymentToImageBuilder(imageBuilderName string) error

StartSoftwareDeploymentToImageBuilder triggers a deployment (no-op for in-memory).

func (*InMemoryBackend) StopAppBlockBuilder

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

StopAppBlockBuilder transitions a builder to STOPPED. Idempotent: stopping an already-stopped builder succeeds (real AWS's StopAppBlockBuilder has no state-conflict exception -- only ConcurrentModificationException, OperationNotPermittedException, and ResourceNotFoundException).

func (*InMemoryBackend) StopFleet

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

StopFleet transitions a fleet to STOPPED. Idempotent: stopping an already-stopped fleet succeeds (real AWS's StopFleet has no state-conflict exception -- only ResourceNotFoundException and ConcurrentModificationException).

func (*InMemoryBackend) StopImageBuilder

func (b *InMemoryBackend) StopImageBuilder(name string) (*ImageBuilder, error)

StopImageBuilder transitions an image builder to STOPPED. Idempotent: stopping an already-stopped builder succeeds (real AWS's StopImageBuilder has no state-conflict exception -- only ConcurrentModificationException, OperationNotPermittedException, and ResourceNotFoundException).

func (*InMemoryBackend) TagResource

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

TagResource applies tags to an AppStream resource ARN.

func (*InMemoryBackend) TaggedResources added in v1.3.1

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

TaggedResources returns every AppStream resource ARN that currently has at least one tag applied via TagResource.

func (*InMemoryBackend) UntagResource

func (b *InMemoryBackend) UntagResource(arn string, keys []string) error

UntagResource removes tags from an AppStream resource ARN.

func (*InMemoryBackend) UpdateAppBlockBuilder

func (b *InMemoryBackend) UpdateAppBlockBuilder(
	name, description, instanceType string,
	vpcConfig *VpcConfig,
	enableDefaultInternetAccess *bool,
) (*AppBlockBuilder, error)

UpdateAppBlockBuilder updates mutable builder fields. A nil vpcConfig leaves the existing VPC configuration unchanged (matches real UpdateAppBlockBuilderInput.VpcConfig, which is optional).

func (*InMemoryBackend) UpdateApplication

func (b *InMemoryBackend) UpdateApplication(
	name, displayName, description, launchPath, launchParameters, workingDirectory string,
) (*Application, error)

UpdateApplication updates mutable application fields.

func (*InMemoryBackend) UpdateDirectoryConfig

func (b *InMemoryBackend) UpdateDirectoryConfig(
	name string,
	ouDNs []string,
	cred ServiceAccountCredentials,
	certAuth CertificateBasedAuthProperties,
) (*DirectoryConfig, error)

UpdateDirectoryConfig updates the OUs, service account credentials, and/or certificate-based auth properties of a directory configuration. Each optional group is only overwritten when the caller supplies a non-empty value, matching this backend's existing "empty means unchanged" Update* convention.

func (*InMemoryBackend) UpdateEntitlement

func (b *InMemoryBackend) UpdateEntitlement(
	name, stackName, description, appVisibility string,
	attributes []EntitlementAttribute,
) (*Entitlement, error)

UpdateEntitlement updates mutable entitlement fields.

func (*InMemoryBackend) UpdateFleet

func (b *InMemoryBackend) UpdateFleet(name string, opts UpdateFleetOptions) (*Fleet, error)

UpdateFleet updates mutable fields of an existing fleet.

func (*InMemoryBackend) UpdateImagePermissions

func (b *InMemoryBackend) UpdateImagePermissions(
	imageName, accountID string,
	allowFleet, allowImageBuilder bool,
) error

UpdateImagePermissions sets sharing permissions for a specific account.

func (*InMemoryBackend) UpdateStack

func (b *InMemoryBackend) UpdateStack(name string, opts UpdateStackOptions) (*Stack, error)

UpdateStack updates mutable fields of an existing stack.

func (*InMemoryBackend) UpdateThemeForStack

func (b *InMemoryBackend) UpdateThemeForStack(stackName string, opts ThemeUpdateOptions) (*Theme, error)

UpdateThemeForStack updates the theme for a stack. Every field on opts besides StackName is optional on the real wire (UpdateThemeForStackInput, api_op_UpdateThemeForStack.go:29-64) -- omitted means unchanged. AttributesToDelete is applied after every set field so a delete always wins over a same-request set.

type Provider

type Provider struct{}

Provider implements service.Provider for Amazon AppStream 2.0.

func (*Provider) Init

Init initializes the AppStream 2.0 service backend and handler.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the provider name.

type S3Location added in v1.3.1

type S3Location struct {
	S3Bucket string
	S3Key    string
}

S3Location mirrors appstream@v1.64.5 types.S3Location: an S3 bucket/key pair. S3Key is only conditionally required depending on which field it's used for (types/types.go:1434-1451) -- for IconS3Location on CreateApplication and UpdateApplication, both members are required.

type ScriptDetails

type ScriptDetails struct {
	ScriptS3Location     S3Location
	ExecutablePath       string
	ExecutableParameters string
	TimeoutInSeconds     int
}

ScriptDetails mirrors appstream@v1.64.5 types.ScriptDetails: the setup or post-setup script for a CUSTOM/APPSTREAM2 packaging-type app block.

type ServiceAccountCredentials added in v1.2.0

type ServiceAccountCredentials struct {
	AccountName     string
	AccountPassword string
}

ServiceAccountCredentials are the AD service-account credentials a fleet or image builder uses to join a directory.

type Session

type Session struct {
	StartTime          time.Time
	MaxExpirationTime  time.Time
	ID                 string
	FleetName          string
	StackName          string
	UserID             string
	State              string
	ConnectionState    string
	AuthenticationType string
}

Session represents an active AppStream streaming session.

MaxExpirationTime is derived, not stored: real AWS defines it as StartTime plus the owning fleet's MaxUserDurationInSeconds (SDK doc comment on types.Session.MaxExpirationTime, appstream@v1.64.5 types/types.go:1540-1546). It is left zero when the owning fleet can no longer be found (deleted mid-session); callers must check IsZero before emitting it.

type SharedImagePermissions

type SharedImagePermissions struct {
	ImagePermissions *ImagePermissions
	SharedAccountID  string
}

SharedImagePermissions represents per-account sharing for an image.

type SoftwareAssociation

type SoftwareAssociation struct {
	ImageBuilderName string
	Software         string
}

SoftwareAssociation links a software package to an image builder.

type Stack

type Stack struct {
	ApplicationSettings         *ApplicationSettings
	ContentRedirection          *ContentRedirection
	StreamingExperienceSettings *StreamingExperienceSettings
	CreatedTime                 time.Time
	Tags                        map[string]string
	Name                        string
	Arn                         string
	DisplayName                 string
	Description                 string
	RedirectURL                 string
	FeedbackURL                 string
	EmbedHostDomains            []string
	UserSettings                []UserSetting
	StorageConnectors           []StorageConnector
	AccessEndpoints             []AccessEndpoint
}

Stack holds AppStream 2.0 stack details.

type StorageBackend

type StorageBackend interface {
	// Stacks
	CreateStack(name string, opts CreateStackOptions) (*Stack, error)
	DescribeStacks(names []string) ([]*Stack, error)
	UpdateStack(name string, opts UpdateStackOptions) (*Stack, error)
	DeleteStack(name string) error

	// Fleets
	CreateFleet(name string, opts CreateFleetOptions) (*Fleet, error)
	DescribeFleets(names []string) ([]*Fleet, error)
	UpdateFleet(name string, opts UpdateFleetOptions) (*Fleet, error)
	DeleteFleet(name string) error
	StartFleet(name string) error
	StopFleet(name string) error

	// Fleet associations
	AssociateFleet(fleetName, stackName string) error
	DisassociateFleet(fleetName, stackName string) error
	ListAssociatedFleets(stackName string) ([]string, error)
	ListAssociatedStacks(fleetName string) ([]string, error)

	// Tags
	TagResource(arn string, tags map[string]string) error
	UntagResource(arn string, keys []string) error
	ListTagsForResource(arn string) (map[string]string, error)

	// AppBlocks
	CreateAppBlock(name, description string, opts CreateAppBlockOptions) (*AppBlock, error)
	DeleteAppBlock(name string) error
	DescribeAppBlocks(arns []string) ([]*AppBlock, error)

	// AppBlockBuilders
	CreateAppBlockBuilder(
		name, description, platform, instanceType string,
		vpcConfig VpcConfig,
		tags map[string]string,
		enableDefaultInternetAccess *bool,
	) (*AppBlockBuilder, error)
	DeleteAppBlockBuilder(name string) error
	DescribeAppBlockBuilders(names []string) ([]*AppBlockBuilder, error)
	StartAppBlockBuilder(name string) error
	StopAppBlockBuilder(name string) error
	UpdateAppBlockBuilder(
		name, description, instanceType string,
		vpcConfig *VpcConfig,
		enableDefaultInternetAccess *bool,
	) (*AppBlockBuilder, error)
	CreateAppBlockBuilderStreamingURL(name string, validitySeconds int64) (string, time.Time, error)

	// AppBlockBuilder-AppBlock associations. appBlockID accepts either the
	// app block Name or its Arn (real AWS's request carries AppBlockArn).
	AssociateAppBlockBuilderAppBlock(builderName, appBlockID string) (*AppBlockBuilderAppBlockAssociation, error)
	DisassociateAppBlockBuilderAppBlock(builderName, appBlockID string) error
	DescribeAppBlockBuilderAppBlockAssociations(
		builderName, appBlockID string,
	) ([]*AppBlockBuilderAppBlockAssociation, error)

	// Applications
	CreateApplication(name, displayName, description, launchPath, appBlockArn string,
		platforms []string, iconS3Location S3Location, instanceFamilies []string,
		tags map[string]string, launchParameters, workingDirectory string) (*Application, error)
	DeleteApplication(name string) error
	DescribeApplications(arns []string) ([]*Application, error)
	UpdateApplication(name, displayName, description, launchPath, launchParameters, workingDirectory string,
	) (*Application, error)
	DescribeAppLicenseUsage() ([]map[string]string, error)

	// Application-Fleet associations. appID accepts either the application
	// Name or its Arn (real AWS's request carries ApplicationArn).
	AssociateApplicationFleet(appID, fleetName string) (*ApplicationFleetAssociation, error)
	DisassociateApplicationFleet(appID, fleetName string) error
	DescribeApplicationFleetAssociations(appID, fleetName string) ([]*ApplicationFleetAssociation, error)

	// Entitlements
	CreateEntitlement(name, stackName, description, appVisibility string,
		attributes []EntitlementAttribute) (*Entitlement, error)
	DeleteEntitlement(name, stackName string) error
	DescribeEntitlements(name, stackName string) ([]*Entitlement, error)
	UpdateEntitlement(name, stackName, description, appVisibility string,
		attributes []EntitlementAttribute) (*Entitlement, error)
	AssociateApplicationToEntitlement(appID, entitlementName, stackName string) error
	DisassociateApplicationFromEntitlement(appID, entitlementName, stackName string) error
	ListEntitledApplications(entitlementName, stackName string) ([]*EntitledApplication, error)

	// DirectoryConfigs
	CreateDirectoryConfig(
		name string,
		ouDNs []string,
		cred ServiceAccountCredentials,
		certAuth CertificateBasedAuthProperties,
	) (*DirectoryConfig, error)

	DeleteDirectoryConfig(name string) error
	DescribeDirectoryConfigs(names []string) ([]*DirectoryConfig, error)
	UpdateDirectoryConfig(
		name string,
		ouDNs []string,
		cred ServiceAccountCredentials,
		certAuth CertificateBasedAuthProperties,
	) (*DirectoryConfig, error)

	// Images
	CopyImage(sourceName, destName, destRegion, description string) (*Image, error)
	CreateImportedImage(name, description string, tags map[string]string) (*Image, error)
	CreateUpdatedImage(imageName, newImageName, description string) (*Image, error)
	DeleteImage(name string) (*Image, error)
	DescribeImages(names []string, visibilityType string) ([]*Image, error)
	UpdateImagePermissions(imageName, accountID string, allowFleet, allowImageBuilder bool) error
	DeleteImagePermissions(imageName, accountID string) error
	DescribeImagePermissions(imageName string, sharedAwsAccountIDs []string) ([]*SharedImagePermissions, error)

	// ImageBuilders
	CreateImageBuilder(name, description, platform, instanceType string,
		opts CreateImageBuilderOptions) (*ImageBuilder, error)
	DeleteImageBuilder(name string) (*ImageBuilder, error)
	DescribeImageBuilders(names []string) ([]*ImageBuilder, error)
	StartImageBuilder(name, appstreamAgentVersion string) error
	StopImageBuilder(name string) (*ImageBuilder, error)
	CreateImageBuilderStreamingURL(name string, validitySeconds int64) (string, time.Time, error)

	// Software associations
	AssociateSoftwareToImageBuilder(imageBuilderName string, software []string) error
	DisassociateSoftwareFromImageBuilder(imageBuilderName string, software []string) error
	DescribeSoftwareAssociations(resource string) ([]SoftwareAssociation, error)
	StartSoftwareDeploymentToImageBuilder(imageBuilderName string) error

	// ExportImageTasks
	CreateExportImageTask(
		imageName, amiName, amiDescription, iamRoleArn string,
		tagSpecifications map[string]string,
	) (*ExportImageTask, error)
	GetExportImageTask(taskID string) (*ExportImageTask, error)
	ListExportImageTasks(maxResults int32, nextToken string) ([]*ExportImageTask, string, error)

	// UsageReportSubscriptions
	CreateUsageReportSubscription() (*UsageReportSubscription, error)
	DeleteUsageReportSubscription() error
	DescribeUsageReportSubscriptions() ([]*UsageReportSubscription, error)

	// Themes
	CreateThemeForStack(
		stackName string,
		faviconS3Location, organizationLogoS3Location S3Location,
		themeStyling, titleText string,
		footerLinks []ThemeFooterLink,
	) (*Theme, error)
	DeleteThemeForStack(stackName string) error
	DescribeThemeForStack(stackName string) (*Theme, error)
	UpdateThemeForStack(stackName string, opts ThemeUpdateOptions) (*Theme, error)

	// Users
	CreateUser(userName, firstName, lastName, authType string) (*User, error)
	DeleteUser(userName, authType string) error
	DescribeUsers(authType string) ([]*User, error)
	DisableUser(userName, authType string) error
	EnableUser(userName, authType string) error

	// UserStack associations
	BatchAssociateUserStack(associations []UserStackAssociation) ([]UserStackAssociationError, error)
	BatchDisassociateUserStack(associations []UserStackAssociation) ([]UserStackAssociationError, error)
	DescribeUserStackAssociations(stackName, userName, authType string) ([]*UserStackAssociation, error)

	// Sessions
	DescribeSessions(
		stackName, fleetName, userID, authenticationType string,
		limit int, nextToken string,
	) ([]*Session, string, error)
	DrainSessionInstance(sessionID string) error
	ExpireSession(sessionID string) error
	CreateStreamingURL(stackName, fleetName, userID string, validitySeconds int64) (string, time.Time, error)

	AccountID() string
	Region() string
	Reset()
	Snapshot(ctx context.Context) []byte
	Restore(ctx context.Context, data []byte) error
}

StorageBackend is the interface for AppStream 2.0 storage operations.

type StorageConnector

type StorageConnector struct {
	ConnectorType              string
	ResourceIdentifier         string
	Domains                    []string
	DomainsRequireAdminConsent []string
}

StorageConnector mirrors appstream@v1.64.5 types.StorageConnector: a configured storage integration (home folders, Google Drive, OneDrive) for a stack.

type StreamingExperienceSettings

type StreamingExperienceSettings struct {
	PreferredProtocol string
}

StreamingExperienceSettings mirrors appstream@v1.64.5 types.StreamingExperienceSettings: the preferred streaming protocol for a stack.

type TaggedEntry added in v1.3.1

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

TaggedEntry pairs a resource ARN with its tags.

type Theme

type Theme struct {
	CreatedTime                time.Time
	StackName                  string
	State                      string
	ThemeStyling               string
	ThemeTitleText             string
	ThemeFaviconURL            string
	ThemeOrganizationLogoURL   string
	FaviconS3Location          S3Location
	OrganizationLogoS3Location S3Location
	ThemeFooterLinks           []ThemeFooterLink
}

Theme holds visual customisation for a stack.

type ThemeFooterLink struct {
	DisplayName   string
	FooterLinkURL string
}

ThemeFooterLink mirrors appstream@v1.64.5 types.ThemeFooterLink: a link displayed in the streaming application catalog page footer.

type ThemeUpdateOptions added in v1.5.0

type ThemeUpdateOptions struct {
	FaviconS3Location          *S3Location
	OrganizationLogoS3Location *S3Location
	TitleText                  *string
	FooterLinks                []ThemeFooterLink
	ThemeStyling               string
	State                      string
	AttributesToDelete         []string
}

ThemeUpdateOptions carries UpdateThemeForStackInput's optional members (api_op_UpdateThemeForStack.go:29-64) -- only StackName is required on the real wire; every field here means "leave unchanged" when unset. A nil FaviconS3Location/OrganizationLogoS3Location/TitleText means the caller did not supply it; a nil FooterLinks means unset, a non-nil (possibly empty) FooterLinks replaces the list wholesale. AttributesToDelete is applied after every set field so a delete always wins over a same-request set (matches this repo's rekognition UpdateStreamProcessor convention).

type UpdateFleetOptions

type UpdateFleetOptions struct {
	DisableIMDSV1               *bool
	RootVolumeConfig            *VolumeConfig
	EnableDefaultInternetAccess *bool
	DomainJoinInfo              DomainJoinInfo
	SessionScriptS3Location     S3Location
	InstanceType                string
	IamRoleArn                  string
	Platform                    string
	DisplayName                 string
	Description                 string
	StreamView                  string
	ImageName                   string
	ImageArn                    string
	VpcConfig                   VpcConfig
	UsbDeviceFilterStrings      []string
	AttributesToDelete          []string
	DesiredInstances            int
	MaxUserDurationSecs         int
	DisconnectTimeoutSecs       int
	IdleDisconnectTimeoutSecs   int
	MaxSessionsPerInstance      int
	MaxConcurrentSessions       int
}

UpdateFleetOptions carries UpdateFleetInput's full member set (api_op_UpdateFleet.go). Every field means "leave unchanged" when zero/empty, matching this file's ThemeUpdateOptions convention, except AttributesToDelete (real FleetAttribute enum values, types/enums.go), which is applied after every set field so a delete always wins over a same-request set.

type UpdateStackOptions

type UpdateStackOptions struct {
	ApplicationSettings         *ApplicationSettings
	ContentRedirection          *ContentRedirection
	StreamingExperienceSettings *StreamingExperienceSettings
	DeleteStorageConnectors     *bool
	RedirectURL                 string
	FeedbackURL                 string
	DisplayName                 string
	Description                 string
	EmbedHostDomains            []string
	UserSettings                []UserSetting
	StorageConnectors           []StorageConnector
	AccessEndpoints             []AccessEndpoint
	AttributesToDelete          []string
}

UpdateStackOptions carries UpdateStackInput's full member set (api_op_UpdateStack.go) that this backend wires through (see CreateStackOptions for the AgentAccessConfig scope note). Every field means "leave unchanged" when nil/zero, matching ThemeUpdateOptions; AttributesToDelete (real StackAttribute enum values, types/enums.go) is applied after every set field so a delete always wins over a same-request set. DeleteStorageConnectors mirrors the real (deprecated in favor of AttributesToDelete, but still modeled) UpdateStackInput member.

type UrlRedirectionConfig

type UrlRedirectionConfig struct {
	Enabled     *bool
	AllowedUrls []string
	DeniedUrls  []string
}

UrlRedirectionConfig mirrors appstream@v1.64.5 types.UrlRedirectionConfig: bidirectional URL redirection rules between the streaming session and the local client.

type UsageReportSubscription

type UsageReportSubscription struct {
	S3BucketName string
	Schedule     string
}

UsageReportSubscription represents an AppStream usage report subscription.

type User

type User struct {
	CreatedTime        time.Time
	UserName           string
	Arn                string
	FirstName          string
	LastName           string
	AuthenticationType string
	Status             string
	Enabled            bool
}

User is an AppStream UserPool user.

Real AppStream has no separate Email member on CreateUserInput or types.User -- UserName IS the user's email address (aws-sdk-go-v2 appstream@v1.64.5 api_op_CreateUser.go's UserName doc: "The email address of the user").

type UserSetting

type UserSetting struct {
	Action     string
	Permission string
	// MaximumLength is 0 when unset (real AWS only accepts it for the two
	// clipboard actions).
	MaximumLength int
}

UserSetting mirrors appstream@v1.64.5 types.UserSetting: whether a streaming-session action (clipboard, file transfer, printing, ...) is enabled for a stack's users.

type UserStackAssociation

type UserStackAssociation struct {
	UserName              string
	StackName             string
	AuthenticationType    string
	SendEmailNotification bool
}

UserStackAssociation links a user to a stack.

type UserStackAssociationError

type UserStackAssociationError struct {
	UserStackAssociation *UserStackAssociation
	ErrorCode            string
	ErrorMessage         string
}

UserStackAssociationError records a failed batch association.

type VolumeConfig

type VolumeConfig struct {
	VolumeSizeInGb int
}

VolumeConfig mirrors appstream@v1.64.5 types.VolumeConfig: the root volume size (GB) for a fleet or image builder instance.

type VpcConfig

type VpcConfig struct {
	SecurityGroupIDs []string
	SubnetIDs        []string
}

VpcConfig mirrors appstream@v1.64.5 types.VpcConfig: the VPC subnets and security groups an app block builder (or fleet/image builder) runs in.

Jump to

Keyboard shortcuts

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