Skip to main content

WorkSpacesState

Struct WorkSpacesState 

Source
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: HashMap<String, Vec<Tag>>

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

Source

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

Source

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.

Source

pub fn terminate_workspaces( &mut self, requests: &[TerminateRequest], ) -> Vec<FailedTerminateWorkspaceRequest>

Terminate workspaces by IDs. Returns a list of failed termination requests.

Source

pub fn describe_workspace_directories( &self, directory_ids: Option<&[String]>, ) -> Vec<&WorkspaceDirectory>

Describe workspace directories.

Source

pub fn create_tags(&mut self, resource_id: &str, tags: &[Tag])

Create tags on a resource.

Source

pub fn describe_tags(&self, resource_id: &str) -> Vec<&Tag>

Describe tags for a resource.

Source

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.

Source

pub fn describe_workspace_images( &self, image_ids: Option<&[String]>, ) -> Vec<&WorkspaceImage>

Describe workspace images.

Source

pub fn describe_workspace_image_permissions( &self, image_id: &str, ) -> Result<Vec<String>, WorkSpacesError>

Describe workspace image permissions.

Source

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.

Source

pub fn describe_client_properties( &self, resource_ids: &[String], ) -> Vec<(String, ClientProperties)>

Describe client properties.

Source

pub fn modify_client_properties( &mut self, resource_id: &str, props: &ClientProperties, )

Modify client properties for a resource.

Source

pub fn modify_selfservice_permissions( &mut self, directory_id: &str, perms: &SelfservicePermissions, ) -> Result<(), WorkSpacesError>

Modify self-service permissions for a directory.

Source

pub fn modify_workspace_creation_properties( &mut self, directory_id: &str, props: &WorkspaceCreationProperties, ) -> Result<(), WorkSpacesError>

Modify workspace creation properties for a directory.

Source

pub fn register_workspace_directory( &mut self, directory_id: &str, account_id: &str, region: &str, ) -> Result<WorkspaceDirectory, WorkSpacesError>

Register a workspace directory.

Source

pub fn deregister_workspace_directory( &mut self, directory_id: &str, ) -> Result<(), WorkSpacesError>

Deregister a workspace directory.

Source

pub fn delete_tags(&mut self, resource_id: &str, tag_keys: &[String])

Delete tags from a resource.

Source

pub fn start_workspaces( &mut self, requests: &[StartRequest], ) -> Vec<FailedTerminateWorkspaceRequest>

Start workspaces.

Source

pub fn stop_workspaces( &mut self, requests: &[StopRequest], ) -> Vec<FailedTerminateWorkspaceRequest>

Stop workspaces.

Source

pub fn reboot_workspaces( &mut self, requests: &[RebootRequest], ) -> Vec<FailedTerminateWorkspaceRequest>

Reboot workspaces.

Source

pub fn rebuild_workspaces( &mut self, requests: &[RebuildRequest], ) -> Vec<FailedTerminateWorkspaceRequest>

Rebuild workspaces.

Source

pub fn restore_workspace( &mut self, workspace_id: &str, ) -> Result<(), WorkSpacesError>

Restore workspace.

Source

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.

Source

pub fn modify_workspace_state( &mut self, workspace_id: &str, workspace_state: &str, ) -> Result<(), WorkSpacesError>

Modify workspace state.

Source

pub fn describe_workspaces_connection_status( &self, workspace_ids: Option<&[String]>, ) -> Vec<(&str, &str)>

Describe workspaces connection status.

Source

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.

Source

pub fn describe_ip_groups(&self, group_ids: Option<&[String]>) -> Vec<&IpGroup>

Describe IP groups.

Source

pub fn delete_ip_group(&mut self, group_id: &str) -> Result<(), WorkSpacesError>

Delete an IP group.

Source

pub fn authorize_ip_rules( &mut self, group_id: &str, user_rules: Vec<IpRule>, ) -> Result<(), WorkSpacesError>

Authorize IP rules to an IP group.

Source

pub fn revoke_ip_rules( &mut self, group_id: &str, user_rules: &[String], ) -> Result<(), WorkSpacesError>

Revoke IP rules from an IP group.

Source

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

Source

pub fn associate_ip_groups( &mut self, directory_id: &str, group_ids: &[String], ) -> Result<(), WorkSpacesError>

Associate IP groups with a directory.

Source

pub fn disassociate_ip_groups( &mut self, directory_id: &str, group_ids: &[String], ) -> Result<(), WorkSpacesError>

Disassociate IP groups from a directory.

Source

pub fn create_connection_alias( &mut self, connection_string: &str, account_id: &str, ) -> ConnectionAlias

Create a connection alias.

Source

pub fn describe_connection_aliases( &self, alias_ids: Option<&[String]>, resource_id: Option<&str>, ) -> Vec<&ConnectionAlias>

Describe connection aliases.

Source

pub fn delete_connection_alias( &mut self, alias_id: &str, ) -> Result<(), WorkSpacesError>

Delete a connection alias.

Source

pub fn associate_connection_alias( &mut self, alias_id: &str, resource_id: &str, ) -> Result<String, WorkSpacesError>

Associate a connection alias with a resource.

Source

pub fn disassociate_connection_alias( &mut self, alias_id: &str, ) -> Result<(), WorkSpacesError>

Disassociate a connection alias.

Source

pub fn describe_connection_alias_permissions( &self, alias_id: &str, ) -> Result<Vec<&ConnectionAliasPermission>, WorkSpacesError>

Describe connection alias permissions.

Source

pub fn update_connection_alias_permission( &mut self, alias_id: &str, shared_account_id: &str, allow_association: bool, ) -> Result<(), WorkSpacesError>

Update connection alias permission.

Source

pub fn describe_workspace_bundles( &self, bundle_ids: Option<&[String]>, owner: Option<&str>, ) -> Vec<&WorkspaceBundle>

Describe workspace bundles.

Source

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.

Source

pub fn delete_workspace_bundle( &mut self, bundle_id: &str, ) -> Result<(), WorkSpacesError>

Delete a workspace bundle.

Source

pub fn delete_workspace_image( &mut self, image_id: &str, ) -> Result<(), WorkSpacesError>

Delete a workspace image.

Source

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.

Source

pub fn describe_workspaces_pools( &self, pool_ids: Option<&[String]>, ) -> Vec<&WorkspacesPool>

Describe WorkSpaces pools.

Source

pub fn terminate_workspaces_pool( &mut self, pool_id: &str, ) -> Result<WorkspacesPool, WorkSpacesError>

Terminate a WorkSpaces pool.

Source

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.

Source

pub fn start_workspaces_pool( &mut self, pool_id: &str, ) -> Result<(), WorkSpacesError>

Start a WorkSpaces pool.

Source

pub fn stop_workspaces_pool( &mut self, pool_id: &str, ) -> Result<(), WorkSpacesError>

Stop a WorkSpaces pool.

Trait Implementations§

Source§

impl Debug for WorkSpacesState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for WorkSpacesState

Source§

fn default() -> WorkSpacesState

Returns the “default value” for a type. Read more
Source§

impl From<&WorkSpacesState> for WorkSpacesStateView

Source§

fn from(state: &WorkSpacesState) -> Self

Converts to this type from the input type.
Source§

impl From<WorkSpacesStateView> for WorkSpacesState

Source§

fn from(view: WorkSpacesStateView) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

Source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more