pub struct WorkSpacesState {Show 13 fields
pub workspaces: HashMap<String, Workspace>,
pub directories: HashMap<String, WorkspaceDirectory>,
pub tags: HashMap<String, Vec<Tag>>,
pub images: HashMap<String, WorkspaceImage>,
pub client_properties: HashMap<String, ClientProperties>,
pub selfservice_permissions: HashMap<String, SelfservicePermissions>,
pub workspace_creation_properties: HashMap<String, WorkspaceCreationProperties>,
pub image_permissions: HashMap<String, Vec<String>>,
pub ip_groups: HashMap<String, IpGroup>,
pub connection_aliases: HashMap<String, ConnectionAlias>,
pub connection_alias_permissions: HashMap<String, Vec<ConnectionAliasPermission>>,
pub bundles: HashMap<String, WorkspaceBundle>,
pub pools: HashMap<String, WorkspacesPool>,
}Expand description
In-memory state for the WorkSpaces service.
Fields§
§workspaces: HashMap<String, Workspace>Workspaces keyed by workspace ID.
directories: HashMap<String, WorkspaceDirectory>Directories keyed by directory ID.
Tags keyed by resource ARN.
images: HashMap<String, WorkspaceImage>Workspace images keyed by image ID.
client_properties: HashMap<String, ClientProperties>Client properties keyed by resource ID.
selfservice_permissions: HashMap<String, SelfservicePermissions>Self-service permissions keyed by directory ID.
workspace_creation_properties: HashMap<String, WorkspaceCreationProperties>Workspace creation properties keyed by directory ID.
image_permissions: HashMap<String, Vec<String>>Image permissions: image_id -> Vec<shared_account_id>
ip_groups: HashMap<String, IpGroup>IP groups keyed by group ID.
connection_aliases: HashMap<String, ConnectionAlias>Connection aliases keyed by alias ID.
connection_alias_permissions: HashMap<String, Vec<ConnectionAliasPermission>>Connection alias permissions: alias_id -> Vec
bundles: HashMap<String, WorkspaceBundle>Workspace bundles keyed by bundle ID.
pools: HashMap<String, WorkspacesPool>WorkSpaces pools keyed by pool ID.
Implementations§
Source§impl WorkSpacesState
impl WorkSpacesState
Sourcepub fn create_workspaces(
&mut self,
requests: &[WorkspaceRequest],
account_id: &str,
region: &str,
) -> (Vec<Workspace>, Vec<FailedCreateWorkspaceRequest>)
pub fn create_workspaces( &mut self, requests: &[WorkspaceRequest], account_id: &str, region: &str, ) -> (Vec<Workspace>, Vec<FailedCreateWorkspaceRequest>)
Create workspaces from a list of requests. Returns (successful_workspaces, failed_requests).
Sourcepub fn describe_workspaces(
&self,
workspace_ids: Option<&[String]>,
directory_id: Option<&str>,
user_name: Option<&str>,
) -> Vec<&Workspace>
pub fn describe_workspaces( &self, workspace_ids: Option<&[String]>, directory_id: Option<&str>, user_name: Option<&str>, ) -> Vec<&Workspace>
Describe workspaces, optionally filtered by workspace IDs, directory ID, or user name.
Sourcepub fn terminate_workspaces(
&mut self,
requests: &[TerminateRequest],
) -> Vec<FailedTerminateWorkspaceRequest>
pub fn terminate_workspaces( &mut self, requests: &[TerminateRequest], ) -> Vec<FailedTerminateWorkspaceRequest>
Terminate workspaces by IDs. Returns a list of failed termination requests.
Sourcepub fn describe_workspace_directories(
&self,
directory_ids: Option<&[String]>,
) -> Vec<&WorkspaceDirectory>
pub fn describe_workspace_directories( &self, directory_ids: Option<&[String]>, ) -> Vec<&WorkspaceDirectory>
Describe workspace directories.
Create tags on a resource.
Describe tags for a resource.
Sourcepub fn create_workspace_image(
&mut self,
name: &str,
description: &str,
workspace_id: &str,
account_id: &str,
tags: Option<&[Tag]>,
) -> Result<WorkspaceImage, WorkSpacesError>
pub fn create_workspace_image( &mut self, name: &str, description: &str, workspace_id: &str, account_id: &str, tags: Option<&[Tag]>, ) -> Result<WorkspaceImage, WorkSpacesError>
Create a workspace image from a workspace.
Sourcepub fn describe_workspace_images(
&self,
image_ids: Option<&[String]>,
) -> Vec<&WorkspaceImage>
pub fn describe_workspace_images( &self, image_ids: Option<&[String]>, ) -> Vec<&WorkspaceImage>
Describe workspace images.
Sourcepub fn describe_workspace_image_permissions(
&self,
image_id: &str,
) -> Result<Vec<String>, WorkSpacesError>
pub fn describe_workspace_image_permissions( &self, image_id: &str, ) -> Result<Vec<String>, WorkSpacesError>
Describe workspace image permissions.
Sourcepub fn update_workspace_image_permission(
&mut self,
image_id: &str,
shared_account_id: &str,
allow_copy_image: bool,
) -> Result<(), WorkSpacesError>
pub fn update_workspace_image_permission( &mut self, image_id: &str, shared_account_id: &str, allow_copy_image: bool, ) -> Result<(), WorkSpacesError>
Update workspace image permission.
Sourcepub fn describe_client_properties(
&self,
resource_ids: &[String],
) -> Vec<(String, ClientProperties)>
pub fn describe_client_properties( &self, resource_ids: &[String], ) -> Vec<(String, ClientProperties)>
Describe client properties.
Sourcepub fn modify_client_properties(
&mut self,
resource_id: &str,
props: &ClientProperties,
)
pub fn modify_client_properties( &mut self, resource_id: &str, props: &ClientProperties, )
Modify client properties for a resource.
Sourcepub fn modify_selfservice_permissions(
&mut self,
directory_id: &str,
perms: &SelfservicePermissions,
) -> Result<(), WorkSpacesError>
pub fn modify_selfservice_permissions( &mut self, directory_id: &str, perms: &SelfservicePermissions, ) -> Result<(), WorkSpacesError>
Modify self-service permissions for a directory.
Sourcepub fn modify_workspace_creation_properties(
&mut self,
directory_id: &str,
props: &WorkspaceCreationProperties,
) -> Result<(), WorkSpacesError>
pub fn modify_workspace_creation_properties( &mut self, directory_id: &str, props: &WorkspaceCreationProperties, ) -> Result<(), WorkSpacesError>
Modify workspace creation properties for a directory.
Sourcepub fn register_workspace_directory(
&mut self,
directory_id: &str,
account_id: &str,
region: &str,
) -> Result<WorkspaceDirectory, WorkSpacesError>
pub fn register_workspace_directory( &mut self, directory_id: &str, account_id: &str, region: &str, ) -> Result<WorkspaceDirectory, WorkSpacesError>
Register a workspace directory.
Sourcepub fn deregister_workspace_directory(
&mut self,
directory_id: &str,
) -> Result<(), WorkSpacesError>
pub fn deregister_workspace_directory( &mut self, directory_id: &str, ) -> Result<(), WorkSpacesError>
Deregister a workspace directory.
Delete tags from a resource.
Sourcepub fn start_workspaces(
&mut self,
requests: &[StartRequest],
) -> Vec<FailedTerminateWorkspaceRequest>
pub fn start_workspaces( &mut self, requests: &[StartRequest], ) -> Vec<FailedTerminateWorkspaceRequest>
Start workspaces.
Sourcepub fn stop_workspaces(
&mut self,
requests: &[StopRequest],
) -> Vec<FailedTerminateWorkspaceRequest>
pub fn stop_workspaces( &mut self, requests: &[StopRequest], ) -> Vec<FailedTerminateWorkspaceRequest>
Stop workspaces.
Sourcepub fn reboot_workspaces(
&mut self,
requests: &[RebootRequest],
) -> Vec<FailedTerminateWorkspaceRequest>
pub fn reboot_workspaces( &mut self, requests: &[RebootRequest], ) -> Vec<FailedTerminateWorkspaceRequest>
Reboot workspaces.
Sourcepub fn rebuild_workspaces(
&mut self,
requests: &[RebuildRequest],
) -> Vec<FailedTerminateWorkspaceRequest>
pub fn rebuild_workspaces( &mut self, requests: &[RebuildRequest], ) -> Vec<FailedTerminateWorkspaceRequest>
Rebuild workspaces.
Sourcepub fn restore_workspace(
&mut self,
workspace_id: &str,
) -> Result<(), WorkSpacesError>
pub fn restore_workspace( &mut self, workspace_id: &str, ) -> Result<(), WorkSpacesError>
Restore workspace.
Sourcepub fn modify_workspace_properties(
&mut self,
workspace_id: &str,
running_mode: Option<&str>,
root_volume_size_gib: Option<i32>,
user_volume_size_gib: Option<i32>,
compute_type_name: Option<&str>,
running_mode_auto_stop_timeout_in_minutes: Option<i32>,
) -> Result<(), WorkSpacesError>
pub fn modify_workspace_properties( &mut self, workspace_id: &str, running_mode: Option<&str>, root_volume_size_gib: Option<i32>, user_volume_size_gib: Option<i32>, compute_type_name: Option<&str>, running_mode_auto_stop_timeout_in_minutes: Option<i32>, ) -> Result<(), WorkSpacesError>
Modify workspace properties.
Sourcepub fn modify_workspace_state(
&mut self,
workspace_id: &str,
workspace_state: &str,
) -> Result<(), WorkSpacesError>
pub fn modify_workspace_state( &mut self, workspace_id: &str, workspace_state: &str, ) -> Result<(), WorkSpacesError>
Modify workspace state.
Sourcepub fn describe_workspaces_connection_status(
&self,
workspace_ids: Option<&[String]>,
) -> Vec<(&str, &str)>
pub fn describe_workspaces_connection_status( &self, workspace_ids: Option<&[String]>, ) -> Vec<(&str, &str)>
Describe workspaces connection status.
Sourcepub fn create_ip_group(
&mut self,
group_name: &str,
group_desc: Option<&str>,
user_rules: Vec<IpRule>,
account_id: &str,
) -> IpGroup
pub fn create_ip_group( &mut self, group_name: &str, group_desc: Option<&str>, user_rules: Vec<IpRule>, account_id: &str, ) -> IpGroup
Create an IP group.
Sourcepub fn describe_ip_groups(&self, group_ids: Option<&[String]>) -> Vec<&IpGroup>
pub fn describe_ip_groups(&self, group_ids: Option<&[String]>) -> Vec<&IpGroup>
Describe IP groups.
Sourcepub fn delete_ip_group(&mut self, group_id: &str) -> Result<(), WorkSpacesError>
pub fn delete_ip_group(&mut self, group_id: &str) -> Result<(), WorkSpacesError>
Delete an IP group.
Authorize IP rules to an IP group.
Sourcepub fn revoke_ip_rules(
&mut self,
group_id: &str,
user_rules: &[String],
) -> Result<(), WorkSpacesError>
pub fn revoke_ip_rules( &mut self, group_id: &str, user_rules: &[String], ) -> Result<(), WorkSpacesError>
Revoke IP rules from an IP group.
Sourcepub fn update_rules_of_ip_group(
&mut self,
group_id: &str,
user_rules: Vec<IpRule>,
) -> Result<(), WorkSpacesError>
pub fn update_rules_of_ip_group( &mut self, group_id: &str, user_rules: Vec<IpRule>, ) -> Result<(), WorkSpacesError>
Update rules of an IP group (replace all rules).
Sourcepub fn associate_ip_groups(
&mut self,
directory_id: &str,
group_ids: &[String],
) -> Result<(), WorkSpacesError>
pub fn associate_ip_groups( &mut self, directory_id: &str, group_ids: &[String], ) -> Result<(), WorkSpacesError>
Associate IP groups with a directory.
Sourcepub fn disassociate_ip_groups(
&mut self,
directory_id: &str,
group_ids: &[String],
) -> Result<(), WorkSpacesError>
pub fn disassociate_ip_groups( &mut self, directory_id: &str, group_ids: &[String], ) -> Result<(), WorkSpacesError>
Disassociate IP groups from a directory.
Sourcepub fn create_connection_alias(
&mut self,
connection_string: &str,
account_id: &str,
) -> ConnectionAlias
pub fn create_connection_alias( &mut self, connection_string: &str, account_id: &str, ) -> ConnectionAlias
Create a connection alias.
Sourcepub fn describe_connection_aliases(
&self,
alias_ids: Option<&[String]>,
resource_id: Option<&str>,
) -> Vec<&ConnectionAlias>
pub fn describe_connection_aliases( &self, alias_ids: Option<&[String]>, resource_id: Option<&str>, ) -> Vec<&ConnectionAlias>
Describe connection aliases.
Sourcepub fn delete_connection_alias(
&mut self,
alias_id: &str,
) -> Result<(), WorkSpacesError>
pub fn delete_connection_alias( &mut self, alias_id: &str, ) -> Result<(), WorkSpacesError>
Delete a connection alias.
Sourcepub fn associate_connection_alias(
&mut self,
alias_id: &str,
resource_id: &str,
) -> Result<String, WorkSpacesError>
pub fn associate_connection_alias( &mut self, alias_id: &str, resource_id: &str, ) -> Result<String, WorkSpacesError>
Associate a connection alias with a resource.
Sourcepub fn disassociate_connection_alias(
&mut self,
alias_id: &str,
) -> Result<(), WorkSpacesError>
pub fn disassociate_connection_alias( &mut self, alias_id: &str, ) -> Result<(), WorkSpacesError>
Disassociate a connection alias.
Sourcepub fn describe_connection_alias_permissions(
&self,
alias_id: &str,
) -> Result<Vec<&ConnectionAliasPermission>, WorkSpacesError>
pub fn describe_connection_alias_permissions( &self, alias_id: &str, ) -> Result<Vec<&ConnectionAliasPermission>, WorkSpacesError>
Describe connection alias permissions.
Sourcepub fn update_connection_alias_permission(
&mut self,
alias_id: &str,
shared_account_id: &str,
allow_association: bool,
) -> Result<(), WorkSpacesError>
pub fn update_connection_alias_permission( &mut self, alias_id: &str, shared_account_id: &str, allow_association: bool, ) -> Result<(), WorkSpacesError>
Update connection alias permission.
Sourcepub fn describe_workspace_bundles(
&self,
bundle_ids: Option<&[String]>,
owner: Option<&str>,
) -> Vec<&WorkspaceBundle>
pub fn describe_workspace_bundles( &self, bundle_ids: Option<&[String]>, owner: Option<&str>, ) -> Vec<&WorkspaceBundle>
Describe workspace bundles.
Sourcepub fn create_workspace_bundle(
&mut self,
bundle_name: &str,
bundle_description: Option<&str>,
image_id: &str,
compute_type: &str,
user_storage: i32,
root_storage: Option<i32>,
account_id: &str,
) -> Result<WorkspaceBundle, WorkSpacesError>
pub fn create_workspace_bundle( &mut self, bundle_name: &str, bundle_description: Option<&str>, image_id: &str, compute_type: &str, user_storage: i32, root_storage: Option<i32>, account_id: &str, ) -> Result<WorkspaceBundle, WorkSpacesError>
Create a workspace bundle.
Sourcepub fn delete_workspace_bundle(
&mut self,
bundle_id: &str,
) -> Result<(), WorkSpacesError>
pub fn delete_workspace_bundle( &mut self, bundle_id: &str, ) -> Result<(), WorkSpacesError>
Delete a workspace bundle.
Sourcepub fn delete_workspace_image(
&mut self,
image_id: &str,
) -> Result<(), WorkSpacesError>
pub fn delete_workspace_image( &mut self, image_id: &str, ) -> Result<(), WorkSpacesError>
Delete a workspace image.
Sourcepub fn create_workspaces_pool(
&mut self,
pool_name: &str,
description: Option<&str>,
bundle_id: &str,
directory_id: &str,
account_id: &str,
region: &str,
) -> WorkspacesPool
pub fn create_workspaces_pool( &mut self, pool_name: &str, description: Option<&str>, bundle_id: &str, directory_id: &str, account_id: &str, region: &str, ) -> WorkspacesPool
Create a WorkSpaces pool.
Sourcepub fn describe_workspaces_pools(
&self,
pool_ids: Option<&[String]>,
) -> Vec<&WorkspacesPool>
pub fn describe_workspaces_pools( &self, pool_ids: Option<&[String]>, ) -> Vec<&WorkspacesPool>
Describe WorkSpaces pools.
Sourcepub fn terminate_workspaces_pool(
&mut self,
pool_id: &str,
) -> Result<WorkspacesPool, WorkSpacesError>
pub fn terminate_workspaces_pool( &mut self, pool_id: &str, ) -> Result<WorkspacesPool, WorkSpacesError>
Terminate a WorkSpaces pool.
Sourcepub fn update_workspaces_pool(
&mut self,
pool_id: &str,
description: Option<&str>,
bundle_id: Option<&str>,
directory_id: Option<&str>,
) -> Result<WorkspacesPool, WorkSpacesError>
pub fn update_workspaces_pool( &mut self, pool_id: &str, description: Option<&str>, bundle_id: Option<&str>, directory_id: Option<&str>, ) -> Result<WorkspacesPool, WorkSpacesError>
Update a WorkSpaces pool.
Sourcepub fn start_workspaces_pool(
&mut self,
pool_id: &str,
) -> Result<(), WorkSpacesError>
pub fn start_workspaces_pool( &mut self, pool_id: &str, ) -> Result<(), WorkSpacesError>
Start a WorkSpaces pool.
Sourcepub fn stop_workspaces_pool(
&mut self,
pool_id: &str,
) -> Result<(), WorkSpacesError>
pub fn stop_workspaces_pool( &mut self, pool_id: &str, ) -> Result<(), WorkSpacesError>
Stop a WorkSpaces pool.
Trait Implementations§
Source§impl Debug for WorkSpacesState
impl Debug for WorkSpacesState
Source§impl Default for WorkSpacesState
impl Default for WorkSpacesState
Source§fn default() -> WorkSpacesState
fn default() -> WorkSpacesState
Source§impl From<&WorkSpacesState> for WorkSpacesStateView
impl From<&WorkSpacesState> for WorkSpacesStateView
Source§fn from(state: &WorkSpacesState) -> Self
fn from(state: &WorkSpacesState) -> Self
Source§impl From<WorkSpacesStateView> for WorkSpacesState
impl From<WorkSpacesStateView> for WorkSpacesState
Source§fn from(view: WorkSpacesStateView) -> Self
fn from(view: WorkSpacesStateView) -> Self
Auto Trait Implementations§
impl Freeze for WorkSpacesState
impl RefUnwindSafe for WorkSpacesState
impl Send for WorkSpacesState
impl Sync for WorkSpacesState
impl Unpin for WorkSpacesState
impl UnsafeUnpin for WorkSpacesState
impl UnwindSafe for WorkSpacesState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more