Documentation
¶
Index ¶
- Variables
- type AccountModification
- type BundleComputeType
- type BundleResourceAssociation
- type BundleStorage
- type FailedRequest
- type Handler
- func (h *Handler) ExtractOperation(c *echo.Context) string
- func (h *Handler) ExtractResource(c *echo.Context) string
- func (h *Handler) GetSupportedOperations() []string
- func (h *Handler) Handler() echo.HandlerFunc
- func (h *Handler) MatchPriority() int
- func (h *Handler) Name() string
- func (h *Handler) Reset()
- func (h *Handler) Restore(ctx context.Context, data []byte) error
- func (h *Handler) RouteMatcher() service.Matcher
- func (h *Handler) Snapshot(ctx context.Context) []byte
- type ImageResourceAssociation
- type InMemoryBackend
- func (b *InMemoryBackend) AcceptAccountLinkInvitation(linkID string) (*storedAccountLink, error)
- func (b *InMemoryBackend) AccountID() string
- func (b *InMemoryBackend) AssociateConnectionAlias(aliasID, resourceID string) (string, error)
- func (b *InMemoryBackend) AssociateIpGroups(directoryID string, groupIDs []string) error
- func (b *InMemoryBackend) AssociateWorkspaceApplication(workspaceID, applicationID string) error
- func (b *InMemoryBackend) AuthorizeIpRules(groupID string, rules []ipRuleItem) error
- func (b *InMemoryBackend) CopyWorkspaceImage(name, sourceImageID, _, description string, tags map[string]string) (string, error)
- func (b *InMemoryBackend) CreateAccountLinkInvitation(targetAccountID string) (*storedAccountLink, error)
- func (b *InMemoryBackend) CreateConnectClientAddIn(name, resourceID, url string) (string, error)
- func (b *InMemoryBackend) CreateConnectionAlias(connectionString string, tags map[string]string) (string, error)
- func (b *InMemoryBackend) CreateIpGroup(groupName, groupDesc string, userRules []ipRuleItem, tags map[string]string) (string, error)
- func (b *InMemoryBackend) CreateStandbyWorkspace(_ context.Context, spec StandbyWorkspaceSpec) (*PendingStandbyWorkspace, error)
- func (b *InMemoryBackend) CreateTags(resourceID string, tags map[string]string) error
- func (b *InMemoryBackend) CreateUpdatedWorkspaceImage(sourceImageID, name, description string, tags map[string]string) (string, error)
- func (b *InMemoryBackend) CreateWorkspace(ctx context.Context, spec *WorkspaceCreationSpec) (*Workspace, error)
- func (b *InMemoryBackend) CreateWorkspaceBundle(name, description, imageID, computeType string, tags map[string]string) (*storedCustomBundle, error)
- func (b *InMemoryBackend) CreateWorkspaceImage(name, description, _ string, tags map[string]string) (*storedImage, error)
- func (b *InMemoryBackend) CreateWorkspacesPool(poolName, bundleID, directoryID, description, runningMode string, ...) (*storedPool, error)
- func (b *InMemoryBackend) DeleteAccountLinkInvitation(linkID string) (*storedAccountLink, error)
- func (b *InMemoryBackend) DeleteClientBranding(resourceID string, platforms []string) error
- func (b *InMemoryBackend) DeleteConnectClientAddIn(addInID, _ string) error
- func (b *InMemoryBackend) DeleteConnectionAlias(aliasID string) error
- func (b *InMemoryBackend) DeleteIPGroup(groupID string) error
- func (b *InMemoryBackend) DeleteTags(resourceID string, tagKeys []string) error
- func (b *InMemoryBackend) DeleteWorkspaceBundle(bundleID string) error
- func (b *InMemoryBackend) DeleteWorkspaceImage(imageID string) error
- func (b *InMemoryBackend) DeployWorkspaceApplications(workspaceID string, _ bool) ([]map[string]string, error)
- func (b *InMemoryBackend) DeregisterWorkspaceDirectory(directoryID string) error
- func (b *InMemoryBackend) DescribeAccount() storedAccountConfig
- func (b *InMemoryBackend) DescribeAccountModifications(nextToken string) ([]AccountModification, string, error)
- func (b *InMemoryBackend) DescribeApplicationAssociations(applicationID string, _ []string, _ int32, _ string) ([]map[string]string, string, error)
- func (b *InMemoryBackend) DescribeApplications(appIDs []string, _ int32, _ string) ([]*storedApplication, string, error)
- func (b *InMemoryBackend) DescribeBundleAssociations(bundleID string, resourceTypes []string) ([]BundleResourceAssociation, error)
- func (b *InMemoryBackend) DescribeClientBranding(resourceID string) (map[string]map[string]any, error)
- func (b *InMemoryBackend) DescribeClientProperties(resourceIDs []string) (map[string]storedClientProps, error)
- func (b *InMemoryBackend) DescribeConnectClientAddIns(resourceID string, _ int32, _ string) ([]*storedConnectAddIn, string, error)
- func (b *InMemoryBackend) DescribeConnectionAliasPermissions(aliasID string, _ int32, _ string) (string, []connAliasPermission, string, error)
- func (b *InMemoryBackend) DescribeConnectionAliases(aliasIDs []string, resourceID string, _ int32, _ string) ([]*storedConnAlias, string, error)
- func (b *InMemoryBackend) DescribeCustomWorkspaceImageImport(imageID string) (*storedImage, error)
- func (b *InMemoryBackend) DescribeImageAssociations(imageID string, resourceTypes []string) ([]ImageResourceAssociation, error)
- func (b *InMemoryBackend) DescribeIpGroups(groupIDs []string, _ int32, _ string) ([]*storedIpGroup, string, error)
- func (b *InMemoryBackend) DescribeTags(resourceID string) (map[string]string, error)
- func (b *InMemoryBackend) DescribeWorkspaceAssociations(workspaceID string, _ []string) ([]map[string]string, error)
- func (b *InMemoryBackend) DescribeWorkspaceBundles(_ context.Context, bundleIDs []string, owner string, nextToken string) ([]*WorkspaceBundle, string, error)
- func (b *InMemoryBackend) DescribeWorkspaceDirectories(_ context.Context, directoryIDs []string, nextToken string) ([]*WorkspaceDirectory, string, error)
- func (b *InMemoryBackend) DescribeWorkspaceImagePermissions(imageID string) (string, map[string]bool, error)
- func (b *InMemoryBackend) DescribeWorkspaceImages(imageIDs []string, _ string, _ int32, _ string) ([]*storedImage, string, error)
- func (b *InMemoryBackend) DescribeWorkspaces(ctx context.Context, workspaceIDs, directoryIDs, userIDs, bundleIDs []string, ...) ([]*Workspace, string, error)
- func (b *InMemoryBackend) DescribeWorkspacesPoolSessions(poolID, _ string, _ int32, _ string) ([]*storedPoolSession, string, error)
- func (b *InMemoryBackend) DescribeWorkspacesPools(poolIDs []string, _ int32, _ string) ([]*storedPool, string, error)
- func (b *InMemoryBackend) DisassociateConnectionAlias(aliasID string) error
- func (b *InMemoryBackend) DisassociateIpGroups(directoryID string, groupIDs []string) error
- func (b *InMemoryBackend) DisassociateWorkspaceApplication(workspaceID, applicationID string) error
- func (b *InMemoryBackend) GetAccountLink(linkID string) (*storedAccountLink, error)
- func (b *InMemoryBackend) GetWorkspacesConnectionStatus(workspaceIDs []string) ([]*WorkspaceConnectionStatus, error)
- func (b *InMemoryBackend) ImportClientBranding(resourceID string, platforms map[string]map[string]any) error
- func (b *InMemoryBackend) ImportCustomWorkspaceImage(name, description string) (*storedImage, error)
- func (b *InMemoryBackend) ImportWorkspaceImage(ec2ImageID, name, description string, tags map[string]string) (string, error)
- func (b *InMemoryBackend) ListAccountLinks(statusFilter string, _ int32, _ string) ([]*storedAccountLink, string, error)
- func (b *InMemoryBackend) ListAvailableManagementCidrRanges(constraint string, maxResults int32, nextToken string) ([]string, string, error)
- func (b *InMemoryBackend) MigrateWorkspace(sourceWorkspaceID, bundleID string) (sourceID, targetID string, err error)
- func (b *InMemoryBackend) ModifyAccount(dedicatedTenancyCidr, dedicatedTenancySupport string) error
- func (b *InMemoryBackend) ModifyCertificateBasedAuthProperties(directoryID string, props map[string]string) error
- func (b *InMemoryBackend) ModifyClientProperties(resourceID, reconnectEnabled string) error
- func (b *InMemoryBackend) ModifyEndpointEncryptionMode(directoryID, mode string) error
- func (b *InMemoryBackend) ModifySamlProperties(directoryID string, props map[string]string) error
- func (b *InMemoryBackend) ModifySelfservicePermissions(directoryID string, props map[string]string) error
- func (b *InMemoryBackend) ModifyStreamingProperties(directoryID string, props map[string]string) error
- func (b *InMemoryBackend) ModifyWorkspaceAccessProperties(directoryID string, props map[string]string) error
- func (b *InMemoryBackend) ModifyWorkspaceCreationProperties(directoryID string, props map[string]string) error
- func (b *InMemoryBackend) ModifyWorkspaceProperties(workspaceID string, props WorkspaceProperties) error
- func (b *InMemoryBackend) ModifyWorkspaceState(workspaceID, state string) error
- func (b *InMemoryBackend) RebootWorkspaces(workspaceIDs []string) ([]FailedRequest, error)
- func (b *InMemoryBackend) RebuildWorkspaces(workspaceIDs []string) ([]FailedRequest, error)
- func (b *InMemoryBackend) Region() string
- func (b *InMemoryBackend) RegisterWorkspaceDirectory(directoryID string, subnetIDs []string) error
- func (b *InMemoryBackend) RejectAccountLinkInvitation(linkID string) (*storedAccountLink, error)
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) RestoreWorkspace(workspaceID string) error
- func (b *InMemoryBackend) RevokeIpRules(groupID string, ipRules []string) error
- func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
- func (b *InMemoryBackend) StartWorkspaces(workspaceIDs []string) ([]FailedRequest, error)
- func (b *InMemoryBackend) StartWorkspacesPool(poolID string) error
- func (b *InMemoryBackend) StopWorkspaces(workspaceIDs []string) ([]FailedRequest, error)
- func (b *InMemoryBackend) StopWorkspacesPool(poolID string) error
- func (b *InMemoryBackend) TerminateWorkspaces(workspaceIDs []string) ([]FailedRequest, error)
- func (b *InMemoryBackend) TerminateWorkspacesPool(poolID string) error
- func (b *InMemoryBackend) TerminateWorkspacesPoolSession(sessionID string) error
- func (b *InMemoryBackend) UpdateConnectClientAddIn(addInID, _, name, url string) error
- func (b *InMemoryBackend) UpdateConnectionAliasPermission(aliasID, accountID string, allowAssociation bool) error
- func (b *InMemoryBackend) UpdateRulesOfIpGroup(groupID string, rules []ipRuleItem) error
- func (b *InMemoryBackend) UpdateWorkspaceBundle(bundleID, imageID string) error
- func (b *InMemoryBackend) UpdateWorkspaceImagePermission(imageID, sharedAccountID string, allowCopy bool) error
- func (b *InMemoryBackend) UpdateWorkspacesPool(poolID, description, bundleID, directoryID, runningMode string, ...) (*storedPool, error)
- type PendingStandbyWorkspace
- type Provider
- type StandbyWorkspaceSpec
- type StorageBackend
- type Workspace
- type WorkspaceBundle
- type WorkspaceConnectionStatus
- type WorkspaceCreationSpec
- type WorkspaceDirectory
- type WorkspaceProperties
Constants ¶
This section is empty.
Variables ¶
var ( // ErrWorkspaceNotFound is returned when a workspace does not exist. ErrWorkspaceNotFound = awserr.New(errResourceNotFound, awserr.ErrNotFound) // ErrInvalidParameter is returned on invalid input. ErrInvalidParameter = awserr.New(errInvalidParameterValues, awserr.ErrInvalidParameter) )
var ErrNilAppContext = errors.New("workspaces: nil app context")
ErrNilAppContext is returned when Init is called with a nil AppContext.
Functions ¶
This section is empty.
Types ¶
type AccountModification ¶ added in v1.2.0
type AccountModification struct {
StartTime time.Time
ModificationState string
DedicatedTenancySupport string
DedicatedTenancyManagementCidrRange string
}
AccountModification records one completed change to the account's BYOL (Bring Your Own License) configuration, matching the real AccountModification SDK type (ErrorCode/ErrorMessage are omitted here: ModifyAccount in this backend always succeeds once it validates, so no failure path populates them).
type BundleComputeType ¶
type BundleComputeType struct {
Name string
}
BundleComputeType holds the compute type name for a bundle.
type BundleResourceAssociation ¶ added in v1.2.0
type BundleResourceAssociation struct {
Created time.Time
LastUpdatedTime time.Time
AssociatedResourceID string
AssociatedResourceType string
BundleID string
State string
StateReasonErrorCode string
StateReasonErrorMessage string
}
BundleResourceAssociation describes an application association for a bundle, matching the real BundleResourceAssociation SDK type. See ImageResourceAssociation -- same "always empty in this emulator" rationale.
type BundleStorage ¶
type BundleStorage struct {
Capacity int32
}
BundleStorage holds storage capacity for a bundle.
type FailedRequest ¶
FailedRequest holds error information for a failed workspace bulk operation.
type Handler ¶
type Handler struct {
Backend StorageBackend
// contains filtered or unexported fields
}
Handler handles WorkSpaces HTTP requests.
func (*Handler) ExtractOperation ¶
ExtractOperation extracts the operation name from the X-Amz-Target header.
func (*Handler) ExtractResource ¶
ExtractResource extracts the resource identifier from the request.
func (*Handler) GetSupportedOperations ¶
GetSupportedOperations returns the list of supported operations.
func (*Handler) Handler ¶
func (h *Handler) Handler() echo.HandlerFunc
Handler returns the Echo handler function.
func (*Handler) MatchPriority ¶
MatchPriority returns the routing priority.
func (*Handler) RouteMatcher ¶
RouteMatcher returns a matcher that accepts WorkSpaces target header requests.
func (*Handler) Snapshot ¶
Snapshot implements persistence.Persistable by delegating to the backend. Handler previously had no Snapshot/Restore of its own, so cli.go's generic setupPersistence (which type-asserts the registered service.Registerable, i.e. the Handler, for a Snapshot/Restore pair) never picked WorkSpaces up even though InMemoryBackend already implemented persistence.Persistable -- dead wiring. Adding this delegation (matching the codecommit/codepipeline/ emr pattern) is what actually wires WorkSpaces into persistence.
type ImageResourceAssociation ¶ added in v1.2.0
type ImageResourceAssociation struct {
Created time.Time
LastUpdatedTime time.Time
AssociatedResourceID string
AssociatedResourceType string
ImageID string
State string
StateReasonErrorCode string
StateReasonErrorMessage string
}
ImageResourceAssociation describes an application association for an image, matching the real ImageResourceAssociation SDK type. A freshly emulated account always returns an empty list from DescribeImageAssociations since there is no public API to create this kind of association (see DescribeImageAssociations doc comment in images.go) -- this type exists so the wire shape is correct if that ever changes.
type InMemoryBackend ¶
type InMemoryBackend struct {
// contains filtered or unexported fields
}
InMemoryBackend implements StorageBackend using in-memory maps.
Phase 3.3: every map[string]*T resource field is a *store.Table[T] registered on b.registry (see store_setup.go); registry.SnapshotAll / RestoreAll / ResetAll now drive Reset/Snapshot/Restore below (see persistence.go) instead of per-map hand-written boilerplate. tags, directoryIpGroups, imagePermissions, clientProperties, and appAssociations are left as plain maps -- their values are not *T (a map, a scalar, or a set), so there is no identity for store.Table to key on; see the field comments below and persistence.go's doc comment for which of these were persisted before this refactor and remain so.
func NewInMemoryBackend ¶
func NewInMemoryBackend(accountID, region string) *InMemoryBackend
NewInMemoryBackend constructs a new InMemoryBackend.
func (*InMemoryBackend) AcceptAccountLinkInvitation ¶
func (b *InMemoryBackend) AcceptAccountLinkInvitation(linkID string) (*storedAccountLink, error)
AcceptAccountLinkInvitation accepts an account link.
func (*InMemoryBackend) AccountID ¶
func (b *InMemoryBackend) AccountID() string
AccountID returns the account ID.
func (*InMemoryBackend) AssociateConnectionAlias ¶
func (b *InMemoryBackend) AssociateConnectionAlias(aliasID, resourceID string) (string, error)
AssociateConnectionAlias associates an alias with a resource.
func (*InMemoryBackend) AssociateIpGroups ¶
func (b *InMemoryBackend) AssociateIpGroups( directoryID string, groupIDs []string, ) error
AssociateIpGroups associates IP groups with a directory.
func (*InMemoryBackend) AssociateWorkspaceApplication ¶
func (b *InMemoryBackend) AssociateWorkspaceApplication(workspaceID, applicationID string) error
AssociateWorkspaceApplication associates an application with a workspace.
func (*InMemoryBackend) AuthorizeIpRules ¶
func (b *InMemoryBackend) AuthorizeIpRules( groupID string, rules []ipRuleItem, ) error
AuthorizeIpRules appends rules to an IP group.
func (*InMemoryBackend) CopyWorkspaceImage ¶
func (b *InMemoryBackend) CopyWorkspaceImage( name, sourceImageID, _, description string, tags map[string]string, ) (string, error)
CopyWorkspaceImage copies an image.
func (*InMemoryBackend) CreateAccountLinkInvitation ¶
func (b *InMemoryBackend) CreateAccountLinkInvitation( targetAccountID string, ) (*storedAccountLink, error)
CreateAccountLinkInvitation creates an account link invitation.
func (*InMemoryBackend) CreateConnectClientAddIn ¶
func (b *InMemoryBackend) CreateConnectClientAddIn(name, resourceID, url string) (string, error)
CreateConnectClientAddIn creates a new Connect client add-in.
func (*InMemoryBackend) CreateConnectionAlias ¶
func (b *InMemoryBackend) CreateConnectionAlias( connectionString string, tags map[string]string, ) (string, error)
CreateConnectionAlias creates a new connection alias.
func (*InMemoryBackend) CreateIpGroup ¶
func (b *InMemoryBackend) CreateIpGroup( groupName, groupDesc string, userRules []ipRuleItem, tags map[string]string, ) (string, error)
CreateIpGroup creates a new IP group and returns its ID.
func (*InMemoryBackend) CreateStandbyWorkspace ¶ added in v1.2.0
func (b *InMemoryBackend) CreateStandbyWorkspace( _ context.Context, spec StandbyWorkspaceSpec, ) (*PendingStandbyWorkspace, error)
CreateStandbyWorkspace creates a single standby WorkSpace and returns it in PENDING state. Returns InvalidParameterValuesException when spec.DirectoryID is not registered, matching the same per-item runtime validation as CreateWorkspace. The real StandbyWorkspace request shape carries no UserName/BundleId (see StandbyWorkspaceSpec) -- those fields belong to the primary WorkSpace, which may live in a different region's backend that this in-memory store cannot see, so the created record has no way to inherit them; PendingCreateStandbyWorkspacesRequest's real shape doesn't surface BundleId at all, and its UserName is left empty for the same reason.
func (*InMemoryBackend) CreateTags ¶
func (b *InMemoryBackend) CreateTags(resourceID string, tags map[string]string) error
CreateTags applies tags to a workspace resource ID. Returns InvalidParameterValuesException if tag key/value limits are exceeded or if applying the tags would exceed the 50-tag limit per resource.
func (*InMemoryBackend) CreateUpdatedWorkspaceImage ¶
func (b *InMemoryBackend) CreateUpdatedWorkspaceImage( sourceImageID, name, description string, tags map[string]string, ) (string, error)
CreateUpdatedWorkspaceImage creates an updated version of an existing image.
func (*InMemoryBackend) CreateWorkspace ¶
func (b *InMemoryBackend) CreateWorkspace( ctx context.Context, spec *WorkspaceCreationSpec, ) (*Workspace, error)
CreateWorkspace creates a new WorkSpace and returns it. Returns InvalidParameterValuesException when spec.DirectoryID is not registered.
func (*InMemoryBackend) CreateWorkspaceBundle ¶
func (b *InMemoryBackend) CreateWorkspaceBundle( name, description, imageID, computeType string, tags map[string]string, ) (*storedCustomBundle, error)
CreateWorkspaceBundle creates a custom bundle.
func (*InMemoryBackend) CreateWorkspaceImage ¶
func (b *InMemoryBackend) CreateWorkspaceImage( name, description, _ string, tags map[string]string, ) (*storedImage, error)
CreateWorkspaceImage creates an image from a workspace.
func (*InMemoryBackend) CreateWorkspacesPool ¶
func (b *InMemoryBackend) CreateWorkspacesPool( poolName, bundleID, directoryID, description, runningMode string, desiredUserSessions int32, tags map[string]string, ) (*storedPool, error)
CreateWorkspacesPool creates a new workspace pool.
func (*InMemoryBackend) DeleteAccountLinkInvitation ¶
func (b *InMemoryBackend) DeleteAccountLinkInvitation(linkID string) (*storedAccountLink, error)
DeleteAccountLinkInvitation deletes an account link.
func (*InMemoryBackend) DeleteClientBranding ¶
func (b *InMemoryBackend) DeleteClientBranding(resourceID string, platforms []string) error
DeleteClientBranding removes branding data for specific platforms.
func (*InMemoryBackend) DeleteConnectClientAddIn ¶
func (b *InMemoryBackend) DeleteConnectClientAddIn(addInID, _ string) error
DeleteConnectClientAddIn removes a Connect client add-in.
func (*InMemoryBackend) DeleteConnectionAlias ¶
func (b *InMemoryBackend) DeleteConnectionAlias(aliasID string) error
DeleteConnectionAlias removes a connection alias.
func (*InMemoryBackend) DeleteIPGroup ¶
func (b *InMemoryBackend) DeleteIPGroup( groupID string, ) error
DeleteIPGroup removes an IP group by ID.
func (*InMemoryBackend) DeleteTags ¶
func (b *InMemoryBackend) DeleteTags(resourceID string, tagKeys []string) error
DeleteTags removes tags from a workspace resource ID.
func (*InMemoryBackend) DeleteWorkspaceBundle ¶
func (b *InMemoryBackend) DeleteWorkspaceBundle(bundleID string) error
DeleteWorkspaceBundle removes a custom bundle.
func (*InMemoryBackend) DeleteWorkspaceImage ¶
func (b *InMemoryBackend) DeleteWorkspaceImage(imageID string) error
DeleteWorkspaceImage removes an image.
func (*InMemoryBackend) DeployWorkspaceApplications ¶
func (b *InMemoryBackend) DeployWorkspaceApplications( workspaceID string, _ bool, ) ([]map[string]string, error)
DeployWorkspaceApplications deploys applications on a workspace (no-op in memory).
func (*InMemoryBackend) DeregisterWorkspaceDirectory ¶
func (b *InMemoryBackend) DeregisterWorkspaceDirectory(directoryID string) error
DeregisterWorkspaceDirectory deregisters a directory. Returns InvalidResourceStateException when any WorkSpaces are still registered to the directory, matching real AWS: "If any WorkSpaces are registered to this directory, you must remove them before you can deregister the directory" -- this backend never auto-cascade-deletes WorkSpaces on deregister, since real AWS doesn't either.
func (*InMemoryBackend) DescribeAccount ¶
func (b *InMemoryBackend) DescribeAccount() storedAccountConfig
DescribeAccount returns account configuration.
func (*InMemoryBackend) DescribeAccountModifications ¶ added in v1.2.0
func (b *InMemoryBackend) DescribeAccountModifications( nextToken string, ) ([]AccountModification, string, error)
DescribeAccountModifications returns the history of BYOL configuration changes recorded by ModifyAccount, most recent first (matching real AWS ordering), paginated. The real DescribeAccountModificationsInput has no MaxResults field (only NextToken), unlike most other paginated ops in this service -- so this backend applies its own fixed internal page size.
func (*InMemoryBackend) DescribeApplicationAssociations ¶
func (b *InMemoryBackend) DescribeApplicationAssociations( applicationID string, _ []string, _ int32, _ string, ) ([]map[string]string, string, error)
DescribeApplicationAssociations returns workspace associations for an application.
func (*InMemoryBackend) DescribeApplications ¶
func (b *InMemoryBackend) DescribeApplications( appIDs []string, _ int32, _ string, ) ([]*storedApplication, string, error)
DescribeApplications returns stored applications, filtered by IDs.
func (*InMemoryBackend) DescribeBundleAssociations ¶ added in v1.2.0
func (b *InMemoryBackend) DescribeBundleAssociations( bundleID string, resourceTypes []string, ) ([]BundleResourceAssociation, error)
DescribeBundleAssociations returns application associations for a bundle. See DescribeImageAssociations in images.go: real AWS exposes no public API to create a bundle<->application association, so a freshly emulated account always has an empty list. This still performs the real required-field and existence validation a live call would enforce.
func (*InMemoryBackend) DescribeClientBranding ¶
func (b *InMemoryBackend) DescribeClientBranding( resourceID string, ) (map[string]map[string]any, error)
DescribeClientBranding returns branding data for a resource.
func (*InMemoryBackend) DescribeClientProperties ¶
func (b *InMemoryBackend) DescribeClientProperties( resourceIDs []string, ) (map[string]storedClientProps, error)
DescribeClientProperties returns client properties for resource IDs.
func (*InMemoryBackend) DescribeConnectClientAddIns ¶
func (b *InMemoryBackend) DescribeConnectClientAddIns( resourceID string, _ int32, _ string, ) ([]*storedConnectAddIn, string, error)
DescribeConnectClientAddIns returns add-ins for a resource.
func (*InMemoryBackend) DescribeConnectionAliasPermissions ¶
func (b *InMemoryBackend) DescribeConnectionAliasPermissions( aliasID string, _ int32, _ string, ) (string, []connAliasPermission, string, error)
DescribeConnectionAliasPermissions returns shared-account permissions for an alias.
func (*InMemoryBackend) DescribeConnectionAliases ¶
func (b *InMemoryBackend) DescribeConnectionAliases( aliasIDs []string, resourceID string, _ int32, _ string, ) ([]*storedConnAlias, string, error)
DescribeConnectionAliases returns connection aliases filtered by IDs or resource.
func (*InMemoryBackend) DescribeCustomWorkspaceImageImport ¶
func (b *InMemoryBackend) DescribeCustomWorkspaceImageImport(imageID string) (*storedImage, error)
DescribeCustomWorkspaceImageImport returns import state for a custom image.
func (*InMemoryBackend) DescribeImageAssociations ¶ added in v1.2.0
func (b *InMemoryBackend) DescribeImageAssociations( imageID string, resourceTypes []string, ) ([]ImageResourceAssociation, error)
DescribeImageAssociations returns application associations for an image. Real AWS's WorkSpaces Application Manager exposes no public API to create an image<->application association (only AssociateWorkspaceApplication, which associates an application directly with a WorkSpace, and DeployWorkspaceApplications, neither of which touch an image or bundle) -- so a freshly emulated account always has an empty association list. This still performs the real required-field and existence validation a live call would enforce, matching the pattern used by RestoreWorkspace for an otherwise-no-op operation.
func (*InMemoryBackend) DescribeIpGroups ¶
func (b *InMemoryBackend) DescribeIpGroups( groupIDs []string, _ int32, _ string, ) ([]*storedIpGroup, string, error)
DescribeIpGroups returns IP groups, optionally filtered by IDs.
func (*InMemoryBackend) DescribeTags ¶
func (b *InMemoryBackend) DescribeTags(resourceID string) (map[string]string, error)
DescribeTags returns tags for a workspace resource ID.
func (*InMemoryBackend) DescribeWorkspaceAssociations ¶
func (b *InMemoryBackend) DescribeWorkspaceAssociations( workspaceID string, _ []string, ) ([]map[string]string, error)
DescribeWorkspaceAssociations returns application associations for a workspace.
func (*InMemoryBackend) DescribeWorkspaceBundles ¶
func (b *InMemoryBackend) DescribeWorkspaceBundles( _ context.Context, bundleIDs []string, owner string, nextToken string, ) ([]*WorkspaceBundle, string, error)
DescribeWorkspaceBundles returns workspace bundles, optionally filtered by IDs or owner. When no owner is specified, returns both Amazon-owned and account-owned custom bundles. When owner is "Amazon", returns only Amazon-owned bundles. When owner is an account ID, returns custom bundles for that account. Results are sorted by BundleID and paginated (max 25 per page, matching AWS).
func (*InMemoryBackend) DescribeWorkspaceDirectories ¶
func (b *InMemoryBackend) DescribeWorkspaceDirectories( _ context.Context, directoryIDs []string, nextToken string, ) ([]*WorkspaceDirectory, string, error)
DescribeWorkspaceDirectories returns workspace directories matching the given filters. Only directories that have been registered via RegisterWorkspaceDirectory are returned. Results are sorted by DirectoryID and paginated (max 50 per page, matching AWS).
func (*InMemoryBackend) DescribeWorkspaceImagePermissions ¶
func (b *InMemoryBackend) DescribeWorkspaceImagePermissions( imageID string, ) (string, map[string]bool, error)
DescribeWorkspaceImagePermissions returns sharing permissions for an image.
func (*InMemoryBackend) DescribeWorkspaceImages ¶
func (b *InMemoryBackend) DescribeWorkspaceImages( imageIDs []string, _ string, _ int32, _ string, ) ([]*storedImage, string, error)
DescribeWorkspaceImages returns workspace images, optionally filtered by IDs.
func (*InMemoryBackend) DescribeWorkspaces ¶
func (b *InMemoryBackend) DescribeWorkspaces( ctx context.Context, workspaceIDs, directoryIDs, userIDs, bundleIDs []string, limit int32, nextToken string, ) ([]*Workspace, string, error)
DescribeWorkspaces returns workspaces matching the given filters. Results are sorted by WorkspaceId and paginated (max 25 per page, matching AWS).
func (*InMemoryBackend) DescribeWorkspacesPoolSessions ¶
func (b *InMemoryBackend) DescribeWorkspacesPoolSessions( poolID, _ string, _ int32, _ string, ) ([]*storedPoolSession, string, error)
DescribeWorkspacesPoolSessions returns sessions for a pool.
func (*InMemoryBackend) DescribeWorkspacesPools ¶
func (b *InMemoryBackend) DescribeWorkspacesPools( poolIDs []string, _ int32, _ string, ) ([]*storedPool, string, error)
DescribeWorkspacesPools returns pools, optionally filtered by IDs.
func (*InMemoryBackend) DisassociateConnectionAlias ¶
func (b *InMemoryBackend) DisassociateConnectionAlias(aliasID string) error
DisassociateConnectionAlias removes the resource association from an alias.
func (*InMemoryBackend) DisassociateIpGroups ¶
func (b *InMemoryBackend) DisassociateIpGroups( directoryID string, groupIDs []string, ) error
DisassociateIpGroups removes IP group associations from a directory.
func (*InMemoryBackend) DisassociateWorkspaceApplication ¶
func (b *InMemoryBackend) DisassociateWorkspaceApplication( workspaceID, applicationID string, ) error
DisassociateWorkspaceApplication removes an application association from a workspace.
func (*InMemoryBackend) GetAccountLink ¶
func (b *InMemoryBackend) GetAccountLink(linkID string) (*storedAccountLink, error)
GetAccountLink retrieves an account link by ID.
func (*InMemoryBackend) GetWorkspacesConnectionStatus ¶
func (b *InMemoryBackend) GetWorkspacesConnectionStatus( workspaceIDs []string, ) ([]*WorkspaceConnectionStatus, error)
GetWorkspacesConnectionStatus returns connection status for the given workspace IDs. If no IDs are provided, returns status for all workspaces. AVAILABLE workspaces report DISCONNECTED (not yet connected in this emulator); STOPPED workspaces report NOT_CONNECTED, matching real AWS behaviour for offline workspaces.
func (*InMemoryBackend) ImportClientBranding ¶
func (b *InMemoryBackend) ImportClientBranding( resourceID string, platforms map[string]map[string]any, ) error
ImportClientBranding stores branding data for a resource.
func (*InMemoryBackend) ImportCustomWorkspaceImage ¶
func (b *InMemoryBackend) ImportCustomWorkspaceImage( name, description string, ) (*storedImage, error)
ImportCustomWorkspaceImage imports a custom workspace image.
func (*InMemoryBackend) ImportWorkspaceImage ¶
func (b *InMemoryBackend) ImportWorkspaceImage( ec2ImageID, name, description string, tags map[string]string, ) (string, error)
ImportWorkspaceImage imports an EC2 image as a workspace image.
func (*InMemoryBackend) ListAccountLinks ¶
func (b *InMemoryBackend) ListAccountLinks( statusFilter string, _ int32, _ string, ) ([]*storedAccountLink, string, error)
ListAccountLinks returns account links, optionally filtered by status.
func (*InMemoryBackend) ListAvailableManagementCidrRanges ¶ added in v1.2.0
func (b *InMemoryBackend) ListAvailableManagementCidrRanges( constraint string, maxResults int32, nextToken string, ) ([]string, string, error)
ListAvailableManagementCidrRanges returns candidate BYOL management network CIDR ranges contained within constraint, paginated. ManagementCidrRangeConstraint is a required field on the real API (smithy `required` trait) and must be a syntactically valid IPv4 CIDR block; both are validated here.
func (*InMemoryBackend) MigrateWorkspace ¶
func (b *InMemoryBackend) MigrateWorkspace( sourceWorkspaceID, bundleID string, ) (sourceID, targetID string, err error)
MigrateWorkspace migrates a workspace to a new bundle.
func (*InMemoryBackend) ModifyAccount ¶
func (b *InMemoryBackend) ModifyAccount( dedicatedTenancyCidr, dedicatedTenancySupport string, ) error
ModifyAccount updates account configuration and records the change as a completed AccountModification, matching real AWS's DescribeAccountModifications (which surfaces the history of BYOL configuration changes). This backend applies the change synchronously, so ModificationState is always COMPLETED -- there is no PENDING window to model.
func (*InMemoryBackend) ModifyCertificateBasedAuthProperties ¶
func (b *InMemoryBackend) ModifyCertificateBasedAuthProperties( directoryID string, props map[string]string, ) error
ModifyCertificateBasedAuthProperties stores certificate auth properties for a directory.
func (*InMemoryBackend) ModifyClientProperties ¶
func (b *InMemoryBackend) ModifyClientProperties(resourceID, reconnectEnabled string) error
ModifyClientProperties sets client properties for a resource.
func (*InMemoryBackend) ModifyEndpointEncryptionMode ¶
func (b *InMemoryBackend) ModifyEndpointEncryptionMode(directoryID, mode string) error
ModifyEndpointEncryptionMode stores the endpoint encryption mode for a directory.
func (*InMemoryBackend) ModifySamlProperties ¶
func (b *InMemoryBackend) ModifySamlProperties(directoryID string, props map[string]string) error
ModifySamlProperties stores SAML properties for a directory.
func (*InMemoryBackend) ModifySelfservicePermissions ¶
func (b *InMemoryBackend) ModifySelfservicePermissions( directoryID string, props map[string]string, ) error
ModifySelfservicePermissions stores self-service permissions for a directory.
func (*InMemoryBackend) ModifyStreamingProperties ¶
func (b *InMemoryBackend) ModifyStreamingProperties( directoryID string, props map[string]string, ) error
ModifyStreamingProperties stores streaming properties for a directory.
func (*InMemoryBackend) ModifyWorkspaceAccessProperties ¶
func (b *InMemoryBackend) ModifyWorkspaceAccessProperties( directoryID string, props map[string]string, ) error
ModifyWorkspaceAccessProperties stores workspace access properties for a directory.
func (*InMemoryBackend) ModifyWorkspaceCreationProperties ¶
func (b *InMemoryBackend) ModifyWorkspaceCreationProperties( directoryID string, props map[string]string, ) error
ModifyWorkspaceCreationProperties stores workspace creation properties for a directory.
func (*InMemoryBackend) ModifyWorkspaceProperties ¶
func (b *InMemoryBackend) ModifyWorkspaceProperties( workspaceID string, props WorkspaceProperties, ) error
ModifyWorkspaceProperties updates and persists mutable properties of a WorkSpace. Returns InvalidParameterValuesException for unknown compute type names or running modes.
func (*InMemoryBackend) ModifyWorkspaceState ¶
func (b *InMemoryBackend) ModifyWorkspaceState(workspaceID, state string) error
ModifyWorkspaceState updates the administrative state of a WorkSpace.
func (*InMemoryBackend) RebootWorkspaces ¶
func (b *InMemoryBackend) RebootWorkspaces(workspaceIDs []string) ([]FailedRequest, error)
RebootWorkspaces reboots the given workspaces, returning failures for unknown IDs.
func (*InMemoryBackend) RebuildWorkspaces ¶
func (b *InMemoryBackend) RebuildWorkspaces(workspaceIDs []string) ([]FailedRequest, error)
RebuildWorkspaces rebuilds the given workspaces, returning failures for unknown IDs.
func (*InMemoryBackend) Region ¶
func (b *InMemoryBackend) Region() string
Region returns the region.
func (*InMemoryBackend) RegisterWorkspaceDirectory ¶
func (b *InMemoryBackend) RegisterWorkspaceDirectory(directoryID string, subnetIDs []string) error
RegisterWorkspaceDirectory registers a directory and stores subnet IDs. Returns ResourceAlreadyExistsException when the directory is already registered, matching real AWS: you cannot re-register an already-registered directory.
func (*InMemoryBackend) RejectAccountLinkInvitation ¶
func (b *InMemoryBackend) RejectAccountLinkInvitation(linkID string) (*storedAccountLink, error)
RejectAccountLinkInvitation rejects an account link.
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) RestoreWorkspace ¶
func (b *InMemoryBackend) RestoreWorkspace(workspaceID string) error
RestoreWorkspace restores a WorkSpace from its most recent snapshot. This backend does not model snapshots, so the operation is otherwise a no-op beyond existence validation, matching real AWS's ResourceNotFoundException for unknown WorkspaceIds.
func (*InMemoryBackend) RevokeIpRules ¶
func (b *InMemoryBackend) RevokeIpRules( groupID string, ipRules []string, ) error
RevokeIpRules removes rules (by IpRule string) from an IP group.
func (*InMemoryBackend) Snapshot ¶
func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
Snapshot serializes the backend state to JSON. It implements persistence.Persistable.
func (*InMemoryBackend) StartWorkspaces ¶
func (b *InMemoryBackend) StartWorkspaces(workspaceIDs []string) ([]FailedRequest, error)
StartWorkspaces starts the given workspaces, transitioning STOPPED workspaces to AVAILABLE.
func (*InMemoryBackend) StartWorkspacesPool ¶
func (b *InMemoryBackend) StartWorkspacesPool(poolID string) error
StartWorkspacesPool transitions a pool to RUNNING.
func (*InMemoryBackend) StopWorkspaces ¶
func (b *InMemoryBackend) StopWorkspaces(workspaceIDs []string) ([]FailedRequest, error)
StopWorkspaces stops the given workspaces, transitioning them to STOPPED state.
func (*InMemoryBackend) StopWorkspacesPool ¶
func (b *InMemoryBackend) StopWorkspacesPool(poolID string) error
StopWorkspacesPool transitions a pool to STOPPED.
func (*InMemoryBackend) TerminateWorkspaces ¶
func (b *InMemoryBackend) TerminateWorkspaces(workspaceIDs []string) ([]FailedRequest, error)
TerminateWorkspaces terminates (deletes) the given workspaces, returning failures for unknown IDs.
func (*InMemoryBackend) TerminateWorkspacesPool ¶
func (b *InMemoryBackend) TerminateWorkspacesPool(poolID string) error
TerminateWorkspacesPool removes a pool.
func (*InMemoryBackend) TerminateWorkspacesPoolSession ¶
func (b *InMemoryBackend) TerminateWorkspacesPoolSession(sessionID string) error
TerminateWorkspacesPoolSession removes a pool session.
func (*InMemoryBackend) UpdateConnectClientAddIn ¶
func (b *InMemoryBackend) UpdateConnectClientAddIn( addInID, _, name, url string, ) error
UpdateConnectClientAddIn updates a Connect client add-in.
func (*InMemoryBackend) UpdateConnectionAliasPermission ¶
func (b *InMemoryBackend) UpdateConnectionAliasPermission( aliasID, accountID string, allowAssociation bool, ) error
UpdateConnectionAliasPermission sets the shared-account permission for an alias.
func (*InMemoryBackend) UpdateRulesOfIpGroup ¶
func (b *InMemoryBackend) UpdateRulesOfIpGroup( groupID string, rules []ipRuleItem, ) error
UpdateRulesOfIpGroup replaces all rules in an IP group.
func (*InMemoryBackend) UpdateWorkspaceBundle ¶
func (b *InMemoryBackend) UpdateWorkspaceBundle(bundleID, imageID string) error
UpdateWorkspaceBundle updates the image of a custom bundle.
func (*InMemoryBackend) UpdateWorkspaceImagePermission ¶
func (b *InMemoryBackend) UpdateWorkspaceImagePermission( imageID, sharedAccountID string, allowCopy bool, ) error
UpdateWorkspaceImagePermission sets the sharing permission for an image.
func (*InMemoryBackend) UpdateWorkspacesPool ¶
func (b *InMemoryBackend) UpdateWorkspacesPool( poolID, description, bundleID, directoryID, runningMode string, desiredUserSessions int32, ) (*storedPool, error)
UpdateWorkspacesPool updates pool fields. Fields left at their zero value (empty string / zero int) are left unchanged, matching the real API's "only specified fields are updated" partial-update semantics.
type PendingStandbyWorkspace ¶ added in v1.2.0
PendingStandbyWorkspace holds the identity of a newly created standby WorkSpace, matching the real PendingCreateStandbyWorkspacesRequest shape.
type Provider ¶
type Provider struct{}
Provider implements service.Provider for Amazon WorkSpaces.
func (*Provider) Init ¶
func (p *Provider) Init(ctx *service.AppContext) (service.Registerable, error)
Init initializes the WorkSpaces service backend and handler.
type StandbyWorkspaceSpec ¶ added in v1.2.0
type StandbyWorkspaceSpec struct {
Tags map[string]string
DirectoryID string
PrimaryWorkspaceID string
DataReplication string
VolumeEncryptionKey string
}
StandbyWorkspaceSpec holds the fields for creating a single standby WorkSpace, matching the real StandbyWorkspace request shape (DirectoryId, PrimaryWorkspaceId, DataReplication, Tags, VolumeEncryptionKey -- no UserName/BundleId, unlike WorkspaceCreationSpec).
type StorageBackend ¶
type StorageBackend interface {
CreateWorkspace(ctx context.Context, spec *WorkspaceCreationSpec) (*Workspace, error)
DescribeWorkspaces(
ctx context.Context,
workspaceIDs, directoryID, userID, bundleID []string,
limit int32, nextToken string,
) ([]*Workspace, string, error)
GetWorkspacesConnectionStatus(workspaceIDs []string) ([]*WorkspaceConnectionStatus, error)
ModifyWorkspaceProperties(workspaceID string, props WorkspaceProperties) error
ModifyWorkspaceState(workspaceID, state string) error
RebootWorkspaces(workspaceIDs []string) ([]FailedRequest, error)
RebuildWorkspaces(workspaceIDs []string) ([]FailedRequest, error)
StartWorkspaces(workspaceIDs []string) ([]FailedRequest, error)
StopWorkspaces(workspaceIDs []string) ([]FailedRequest, error)
TerminateWorkspaces(workspaceIDs []string) ([]FailedRequest, error)
CreateTags(resourceID string, tags map[string]string) error
DeleteTags(resourceID string, tagKeys []string) error
DescribeTags(resourceID string) (map[string]string, error)
DescribeWorkspaceBundles(
ctx context.Context,
bundleIDs []string,
owner string,
nextToken string,
) ([]*WorkspaceBundle, string, error)
DescribeWorkspaceDirectories(
ctx context.Context,
directoryIDs []string,
nextToken string,
) ([]*WorkspaceDirectory, string, error)
// IP Groups
CreateIpGroup(
groupName, groupDesc string,
userRules []ipRuleItem,
tags map[string]string,
) (string, error)
DescribeIpGroups(
groupIDs []string,
maxResults int32,
nextToken string,
) ([]*storedIpGroup, string, error)
DeleteIPGroup(groupID string) error
AuthorizeIpRules(groupID string, rules []ipRuleItem) error
RevokeIpRules(groupID string, ipRules []string) error
UpdateRulesOfIpGroup(groupID string, rules []ipRuleItem) error
AssociateIpGroups(directoryID string, groupIDs []string) error
DisassociateIpGroups(directoryID string, groupIDs []string) error
// Connection Aliases
CreateConnectionAlias(connectionString string, tags map[string]string) (string, error)
DescribeConnectionAliases(
aliasIDs []string, resourceID string, limit int32, nextToken string,
) ([]*storedConnAlias, string, error)
DeleteConnectionAlias(aliasID string) error
AssociateConnectionAlias(aliasID, resourceID string) (string, error)
DisassociateConnectionAlias(aliasID string) error
DescribeConnectionAliasPermissions(
aliasID string, maxResults int32, nextToken string,
) (string, []connAliasPermission, string, error)
UpdateConnectionAliasPermission(aliasID, accountID string, allowAssociation bool) error
// Custom Bundles
CreateWorkspaceBundle(
name, description, imageID, computeType string,
tags map[string]string,
) (*storedCustomBundle, error)
DeleteWorkspaceBundle(bundleID string) error
UpdateWorkspaceBundle(bundleID, imageID string) error
DescribeBundleAssociations(
bundleID string, resourceTypes []string,
) ([]BundleResourceAssociation, error)
// Images
CopyWorkspaceImage(
name, sourceImageID, sourceRegion, description string,
tags map[string]string,
) (string, error)
CreateWorkspaceImage(
name, description, workspaceID string,
tags map[string]string,
) (*storedImage, error)
DeleteWorkspaceImage(imageID string) error
ImportWorkspaceImage(
ec2ImageID, name, description string,
tags map[string]string,
) (string, error)
ImportCustomWorkspaceImage(name, description string) (*storedImage, error)
CreateUpdatedWorkspaceImage(
sourceImageID, name, description string,
tags map[string]string,
) (string, error)
DescribeWorkspaceImages(
imageIDs []string,
imageType string,
maxResults int32,
nextToken string,
) ([]*storedImage, string, error)
DescribeWorkspaceImagePermissions(imageID string) (string, map[string]bool, error)
UpdateWorkspaceImagePermission(imageID, sharedAccountID string, allowCopy bool) error
DescribeCustomWorkspaceImageImport(imageID string) (*storedImage, error)
DescribeImageAssociations(
imageID string, resourceTypes []string,
) ([]ImageResourceAssociation, error)
// Pools
CreateWorkspacesPool(
poolName, bundleID, directoryID, description, runningMode string,
desiredUserSessions int32,
tags map[string]string,
) (*storedPool, error)
DescribeWorkspacesPools(
poolIDs []string,
limit int32,
nextToken string,
) ([]*storedPool, string, error)
StartWorkspacesPool(poolID string) error
StopWorkspacesPool(poolID string) error
TerminateWorkspacesPool(poolID string) error
UpdateWorkspacesPool(
poolID, description, bundleID, directoryID, runningMode string,
desiredUserSessions int32,
) (*storedPool, error)
DescribeWorkspacesPoolSessions(
poolID, userID string,
limit int32,
nextToken string,
) ([]*storedPoolSession, string, error)
TerminateWorkspacesPoolSession(sessionID string) error
// Directories
RegisterWorkspaceDirectory(directoryID string, subnetIDs []string) error
DeregisterWorkspaceDirectory(directoryID string) error
// Account
DescribeAccount() storedAccountConfig
ModifyAccount(dedicatedTenancyCidr, dedicatedTenancySupport string) error
ModifyEndpointEncryptionMode(directoryID, mode string) error
DescribeAccountModifications(
nextToken string,
) ([]AccountModification, string, error)
ListAvailableManagementCidrRanges(
constraint string, maxResults int32, nextToken string,
) ([]string, string, error)
// Connect Client Add-Ins
CreateConnectClientAddIn(name, resourceID, url string) (string, error)
DeleteConnectClientAddIn(addInID, resourceID string) error
DescribeConnectClientAddIns(
resourceID string,
maxResults int32,
nextToken string,
) ([]*storedConnectAddIn, string, error)
UpdateConnectClientAddIn(addInID, resourceID, name, url string) error
// Client Branding
ImportClientBranding(resourceID string, platforms map[string]map[string]any) error
DescribeClientBranding(resourceID string) (map[string]map[string]any, error)
DeleteClientBranding(resourceID string, platforms []string) error
// Client Properties
DescribeClientProperties(resourceIDs []string) (map[string]storedClientProps, error)
ModifyClientProperties(resourceID, reconnectEnabled string) error
// Directory modify ops
ModifyCertificateBasedAuthProperties(directoryID string, props map[string]string) error
ModifySamlProperties(directoryID string, props map[string]string) error
ModifySelfservicePermissions(directoryID string, props map[string]string) error
ModifyStreamingProperties(directoryID string, props map[string]string) error
ModifyWorkspaceAccessProperties(directoryID string, props map[string]string) error
ModifyWorkspaceCreationProperties(directoryID string, props map[string]string) error
// Account Links
CreateAccountLinkInvitation(targetAccountID string) (*storedAccountLink, error)
AcceptAccountLinkInvitation(linkID string) (*storedAccountLink, error)
RejectAccountLinkInvitation(linkID string) (*storedAccountLink, error)
DeleteAccountLinkInvitation(linkID string) (*storedAccountLink, error)
GetAccountLink(linkID string) (*storedAccountLink, error)
ListAccountLinks(
statusFilter string,
maxResults int32,
nextToken string,
) ([]*storedAccountLink, string, error)
// Applications
AssociateWorkspaceApplication(workspaceID, applicationID string) error
DisassociateWorkspaceApplication(workspaceID, applicationID string) error
DeployWorkspaceApplications(workspaceID string, force bool) ([]map[string]string, error)
DescribeWorkspaceAssociations(
workspaceID string,
associatedResourceTypes []string,
) ([]map[string]string, error)
DescribeApplicationAssociations(
applicationID string, associatedResourceTypes []string, maxResults int32, nextToken string,
) ([]map[string]string, string, error)
DescribeApplications(
appIDs []string,
maxResults int32,
nextToken string,
) ([]*storedApplication, string, error)
// Workspace-level ops
MigrateWorkspace(sourceWorkspaceID, bundleID string) (sourceID, targetID string, err error)
RestoreWorkspace(workspaceID string) error
CreateStandbyWorkspace(
ctx context.Context, spec StandbyWorkspaceSpec,
) (*PendingStandbyWorkspace, error)
AccountID() string
Region() string
Reset()
Snapshot(ctx context.Context) []byte
Restore(ctx context.Context, data []byte) error
}
StorageBackend is the interface for WorkSpaces storage operations.
type Workspace ¶
type Workspace struct {
Properties *WorkspaceProperties
Tags map[string]string
WorkspaceID string
DirectoryID string
UserName string
BundleID string
State string
ComputerName string
SubnetID string
VolumeEncryptionKey string
ErrorCode string
ErrorMessage string
UserVolumeEncryptionEnabled bool
RootVolumeEncryptionEnabled bool
}
Workspace holds full WorkSpace details.
type WorkspaceBundle ¶
type WorkspaceBundle struct {
ComputeType BundleComputeType
BundleID string
Name string
Owner string
Description string
ImageID string
UserStorage BundleStorage
RootStorage BundleStorage
}
WorkspaceBundle holds WorkSpace bundle details.
type WorkspaceConnectionStatus ¶
type WorkspaceConnectionStatus struct {
ConnectionStateCheckTimestamp time.Time
LastKnownUserConnectionTimestamp time.Time
WorkspaceID string
ConnectionState string
}
WorkspaceConnectionStatus holds connection status for a WorkSpace, matching the real WorkspaceConnectionStatus SDK type's four fields (ConnectionState, ConnectionStateCheckTimestamp, LastKnownUserConnectionTimestamp, WorkspaceId) -- LastKnownUserConnectionTimestamp stays the zero time since this backend models no actual client connection activity.
type WorkspaceCreationSpec ¶
type WorkspaceCreationSpec struct {
Properties *WorkspaceProperties
Tags map[string]string
UserName string
DirectoryID string
BundleID string
SubnetID string
VolumeEncryptionKey string
UserVolumeEncryptionEnabled bool
RootVolumeEncryptionEnabled bool
}
WorkspaceCreationSpec holds all fields for creating a workspace.
type WorkspaceDirectory ¶
type WorkspaceDirectory struct {
DirectoryID string
DirectoryName string
DirectoryType string
Alias string
State string
SubnetIDs []string
}
WorkspaceDirectory holds WorkSpace directory details.
type WorkspaceProperties ¶
type WorkspaceProperties struct {
ComputeTypeName string `json:"ComputeTypeName,omitempty"`
RunningMode string `json:"RunningMode,omitempty"`
RootVolumeSizeGib int32 `json:"RootVolumeSizeGib,omitempty"`
RunningModeAutoStopTimeoutInMinutes int32 `json:"RunningModeAutoStopTimeoutInMinutes,omitempty"`
UserVolumeSizeGib int32 `json:"UserVolumeSizeGib,omitempty"`
}
WorkspaceProperties holds mutable WorkSpace properties.
Source Files
¶
- account.go
- account_links.go
- application_associations.go
- bundles.go
- client_branding.go
- connect_client_addins.go
- connection_aliases.go
- directories.go
- errors.go
- handler.go
- handler_account.go
- handler_account_links.go
- handler_application_associations.go
- handler_bundles.go
- handler_client_branding.go
- handler_connect_client_addins.go
- handler_connection_aliases.go
- handler_directories.go
- handler_images.go
- handler_ip_groups.go
- handler_pools.go
- handler_snapshots.go
- handler_tags.go
- handler_workspace_properties.go
- handler_workspaces.go
- images.go
- interfaces.go
- ip_groups.go
- models.go
- persistence.go
- pools.go
- provider.go
- store.go
- store_setup.go
- tags.go
- workspace_properties.go
- workspaces.go