- Overview
- Active Directory
- Release Notes
- About the Active Directory activity package
- Project Compatibility
- Active Directory Scope
- Get Object Distinguished Name
- Get Object Properties
- Get Objects by Filter
- Get Objects by LDAP Filter
- Is Object Member of Group
- Move Object
- Rename Object
- Update Object Properties
- Add Computer To Group
- Computer Exists
- Create Computer
- Delete Computer
- Get Computer Status
- Get Computers in Group
- Join Computer to Domain
- Remove Computer From Group
- Set Computer Status
- Unjoin Computer From Domain
- Add Group To Group
- Create Group
- Delete Group
- Group Exists
- Remove Group From Group
- Add User To Group
- Change User Password
- Create User
- Delete User
- Force Password Change
- Get Password Expiration Date
- Get User Expiration Date
- Get User Groups
- Get User Status
- Get Users in Group
- Remove User From Group
- Set User Expiration Date
- Set User Status
- User Exists
- Validate User Credentials
- Create Organizational Unit
- Delete Organizational Unit
- Active Directory APIs
- Active Directory how-to guides
- Amazon Web Services
- Release Notes
- About the Amazon Web Services activity package
- Project Compatibility
- Permissions List
- Amazon Web Services Scope
- Configure Robot
- Create Instance
- Create Instance From Launch Template
- Get Instance by ID
- Get Instance List
- Reboot Instance
- Start Instance
- Stop Instance
- Terminate Instance
- Attach Volume To Instance
- Create Instance Snapshots
- Create Volume
- Create Volume Snapshot
- Delete Snapshot
- Delete Volume
- Detach Volume From Instance
- Get Instance Volumes
- Get Snapshot
- Get Volume
- Get Volume List
- Add User To Group
- Create Group
- Delete Group
- For Each Group
- Get Group
- Remove User From Group
- Update Group
- Add/Remove Inline Policy
- Attach/Detach Managed Policy
- Create Managed Policy
- Delete Managed Policy
- For Each Managed Policy
- Get IAM Identities Attached to a Managed Policy
- Get IAM Identity Inline Policies
- Get IAM Identity Managed Polices
- Get Managed Policy
- Update Managed Policy
- Add Role to Instance Profile
- Create Role
- Delete Role
- For Each Role
- Get Role
- Remove Role From Instance Profile
- Update Role
- Change User Password
- Create User
- Delete User
- For Each User
- For Each User Group
- For Each User in Group
- Get User
- Update User
- Configure Logging for Bucket
- Configure Public Access to Bucket
- Create Bucket
- Delete Bucket
- Delete Bucket Policy
- Empty Bucket
- Get Bucket
- Get Bucket List
- Get Bucket Policy
- Set Bucket Policy
- Update Bucket Properties
- Copy Object
- Delete Multiple Objects
- Delete Single Object
- Download Object to File
- For Each Object in Bucket
- Get Object
- Get Object ACL
- Set Object ACL
- Upload Object From File
- Upload Objects From Folder
- Run Power Shell Command
- Amazon Web Services APIs
- Amazon Web Services how-to guides
- Amazon WorkSpaces
- Release Notes
- About the Amazon WorkSpaces activity package
- Project Compatibility
- Amazon WorkSpaces APIs
- Provision and Manage Amazon WorkSpaces
- Azure
- Release Notes
- About the Azure activity package
- Project Compatibility
- Append to Blob
- Attach VM Data Disk
- Azure Scope
- Configure Robot
- Copy Blob
- Create Blob Container
- Create IP Configuration
- Create Network Interface
- Create NSG
- Create Resource Group
- Create Security Rule
- Create Storage Account
- Create Tables
- Create VM
- Delete Blob
- Delete Blob Container
- Delete IP Configuration
- Delete Network Interface
- Delete NSG
- Delete Resource Group
- Delete Rows
- Delete Storage Account
- Delete Security Rule
- Delete Table
- Delete VM
- Detach VM Data Disk
- Download Blob To File
- For Each Blob Container
- For Each Blob in Container
- For Each Network Interface
- For Each NSG
- For Each Row In Table
- For Each Security Alert
- Get Blob
- Get Blob Container
- Get Blob Containers List
- Get Blob List
- Get Disk
- Get Disk List
- Get RDP Files
- Get Resource Group
- Get Resource Group List
- Get Row
- Get Rows By Filter
- Get Secrets
- Get Storage Account
- Get Storage Account Key
- Get Storage Account List
- Get Network Interface
- Get NSG
- Get NSG Network Interface List
- Get Security Alert
- Get Security Rule
- Get Security Rule List
- Get Table
- Get Table List
- Get VM
- Get VM Custom Image
- Get VM Custom Image List
- Get VM Disk List
- Get VM Image By Publisher
- Get VM List
- Get VM NSG List
- Get VM Network Interface List
- Insert Rows
- Regenerate Storage Account Key
- Restart VM
- Run Script In VM
- Set Blob Tier
- Set Security Alert State
- Shutdown VM
- Start VM
- Stop VM
- Upload Blob From File
- Azure APIs
- Azure how-to guides
- Azure Active Directory
- Release Notes
- About the Azure Active Directory activity package
- Project Compatibility
- Add Group to Lifecycle Policy
- Add Member To Group
- Add Member To Role
- Add Owner To Group
- Assign License
- Azure AD Application Scope
- Azure AD Delegated Scope
- Create Assigned Group
- Create Lifecycle Policy
- Create User
- Delete Group
- Delete Lifecycle Policy
- Delete User
- For Each Direct Report
- For Each Group
- For Each Group in Group
- For Each Lifecycle Policy
- For Each Parent Group
- For Each Role
- For Each User
- For Each User Group
- For Each User In Group
- For Each User in Group Owners
- For Each User in Role
- For Each User Role
- Get Group By Id
- Get Group by Name
- Get Manager
- Get User
- Group Exists
- Is Group in Lifecycle Policy
- Is Member In Role
- Is Member of Group
- Is Owner Of Group
- Remove Group From Lifecycle Policy
- Remove License
- Remove Member From Group
- Remove Member From Role
- Remove Owner From Group
- Reset Password
- Set Manager
- Update Group
- Update Lifecycle Policy
- Update User
- User Exists
- Azure Active Directory APIs
- Azure Active Directory how-to guides
- Azure Windows Virtual Desktop
- Release Notes
- About the Azure Windows Virtual Desktop activity package
- Project Compatibility
- Windows Virtual Desktop Scope
- Create Host Pool
- Add Virtual Machine to Host Pool
- Update Host Pool
- Get Host Pool
- Delete Host Pool
- For Each Host Pool
- Get Session Host
- For Each Session Host
- Update Session Host
- Delete Session Host
- For Each User Session
- Disconnect User Session
- Delete User Session
- Send Message to User Session
- Get Application Group
- For Each Application Group
- Assign Users and Groups to Application Group
- Remove Users and Groups From Application Group
- Create Workspace
- Update Workspace
- Get Workspace
- For Each Workspace
- Delete Workspace
- Azure Windows Virtual Desktop APIs
- Citrix
- Release Notes
- About the Citrix activity package
- Project Compatibility
- Citrix Scope
- Get Server List
- Get Storage Repositories
- Add Tag to VM
- Add VM to Folder
- Remove Tag From VM
- Remove VM From Folder
- Delete All VM Snapshots
- Delete VM Snapshot
- Get VM Snapshot List
- Revert VM to Snapshot
- Take VM Snapshot
- Create VM From Template
- Delete VM
- Get Template List
- Get VM by UUID
- Get VM List
- Power Off VM
- Power On VM
- Rename VM
- Restart VM
- Resume VM
- Suspend VM
- Citrix APIs
- Citrix activities how-to guides
- Desktop triggers
- Exchange Server
- Google Cloud
- Release Notes
- About the Google Cloud activity package
- Project Compatibility
- Google Cloud Scope
- Create Bucket
- Update Bucket Properties
- Get Bucket
- For Each Bucket
- Delete Bucket
- Get Object
- Delete Object
- Copy Object
- Upload Object From File
- Download Object to File
- For Each Object in Bucket
- Create Instance
- Create Instance From Template
- Get Instance
- For Each Instance
- Start Instance
- Stop Instance
- Reset Instance
- Delete Instance
- Configure Robot
- Run Script on Instance
- Get Project
- For Each Project
- Create Role
- Delete Role
- For Each Grantable Role
- For Each Role
- Get Role
- Undelete Role
- Update Role
- Get IAM Policy
- Set IAM Policy
- Get Secret Data
- Google Cloud APIs
- Google Cloud how-to guides
- Hyper V
- NetIQ eDirectory
- Release Notes
- About the NetIQ eDirectory activity package
- Project Compatibility
- NetIQ EDirectory Scope
- Add Object To Group
- Delete Object
- Get Object Distinguished Name
- Get Object Properties
- Get Objects by Filter
- Get Objects by LDAP Filter
- Is Object Member of Group
- Move Object
- Remove Object From Group
- Rename Object
- Update Object Properties
- Add Computer To Group
- Computer Exists
- Delete Computer
- Create Computer
- Get Computer Status
- Remove Computer From Group
- Set Computer Status
- Add Group To Group
- Create Group
- Delete Group
- Get Computers in Group
- Get Users in Group
- Group Exists
- Remove Group From Group
- Create Organizational Unit
- Delete Organizational Unit
- Add User To Group
- Change User Password
- Create User
- Delete User
- Force Password Change
- Get Password Expiration Date
- Get User Expiration Date
- Get User Groups
- Get User Status
- Remove User From Group
- Set User Expiration Date
- Set User Status
- User Exists
- Validate User Credentials
- NetIQ eDirectory APIs
- System Center
- VMWare
- Release Notes
- About the VMware activity package
- Project Compatibility
- VMware Scope
- Get Datastore
- Get Datastore List
- Get Host
- Get Host List
- Delete All VM Snapshots
- Delete VM Snapshot
- Get VM Snapshot List
- Revert VM to Snapshot
- Take VM Snapshot
- Configure Robot
- Create VM From Template
- Convert Template to VM
- Convert VM to Template
- Customize VM
- Delete VM
- Get VM
- Get VM List
- Power Off VM
- Suspend VM
- Run Program in VM
- Restart VM
- Rename VM
- Power On VM
- Move VM To Folder
- Migrate VM
- Get Template List
- Export OVF Template
- Deploy OVF Template
- Assign Tag to VM
- Remove Tag From VM
- Assign Tag to Folder
- Remove Tag From Folder
- Create Folder
- Get Folder
- Rename Folder
- Move Folder
- Delete Folder
- Mount Tools Installer
- Unmount Tools Installer
- Upgrade Tools
- VMWare activities how-to guides
Provision and Manage Amazon WorkSpaces
The example below explains how to use Amazon WorkSpaces activities to automate provisioning and cost savings tasks. It presents activities such as Amazon Workspaces Scope, Create Workspace, For Each Workspace, Reboot Workspace, Stop Workspace, Update Workspace, or Remove Workspace. You can find these activities in the UiPath.AmazonWorkSpaces.Activities package.
The example contains two workflows:
Create_Workspace.xaml
Provisions a new WorkSpace for a given directory user by:
- preparing the tags to be associated with the WorkSpace, including a tag with key=
CreationDate
, to store the creation date info, because Amazon WorkSpaces API does not provide this value; - specifying the bundle, directory, username, running mode, tags, etc.
Manage_Workspaces.xaml
Performs IT management tasks for the WorkSpaces in a specified directory by:
- identifying and rebooting unhealthy WorkSpaces;
- stopping WorkSpaces that are available, but in a disconnected state (cost optimization);
-
identifying unused WorkSpaces and based on an inactivity period, taking one of these actions:
- sending a warning email to the user;
- permanently removing the WorkSpace (cost optimization).
This is how the first automation process, Create_Workspace.xaml, which connects to Amazon Web Services and creates a new WorkSpace, can be built:
-
Add the Amazon Workspace Scope activity to connect to Amazon Web Services and also to provide a scope for the Amazon WorkSpaces activities. Then specify either Access Keys (i.e.,
AccessKeyId
&SecretAccessKey
) or anIAMRole
(when the robot is running within an EC2 instance). In this example, we are connecting using Access Keys.Note: For more details about creating an AWS secret key, please read this article: Create an AWS access key. -
A new WorkSpace is provisioned using the Create Workspace activity.
This is how the second automation process, Manage_Workspaces.xaml, which retrieves all WorkSpaces in a specified directory, can be built:
- Follow the same instructions as in step 1 from Provision a WorkSpace.
-
Use the For Each Workspace activity with FilterBy set to
DirectoryId
. Then provide your directory ID in the FilterValue property.Note: The For Each Workspace activity supports filtering byDirectoryId
,BundleId
, andWorkspaceIds
.
For each WorkSpace matching the filter criteria, let’s check if one of the actions below should be performed.
Reboot an unhealthy WorkSpace
AWRKSState.UNHEALTHY
, reboot the WorkSpace by using the Reboot Workspace activity.
False
.
Stop a WorkSpace that is disconnected
Stop a WorkSpace that is disconnected for more than 30 minutes.
AutoStop
and the user is disconnected for more than MinutesSinceDisconnected
minutes, stop it by calling the Stop Workspace activity with WaitForCompletion set to False
.
Send a warning email
Send a warning email to the user if the WorkSpace has not been used in the past 30 days.
InactivityPeriodBeforeWarning
days, the user will receive an email saying the WorkSpace will be permanently removed in 7 days, i.e. InactivityPeriodBeforeRemoving - InactivityPeriodBeforeWarning = 37 – 30 = 7
.
Use the Send Outlook Mail Message activity to send the warning email.
In addition, to keep a record of the admin action performed, add a tag/tags to the WorkSpace. Use the Update Workspace activity to add such tags.
Permanently remove a WorkSpace
Remove a WorkSpace that has not been used in the last 37 days.
InactivityPeriodBeforeRemoving
days, it will be terminated. For this action, use the Remove Workspace activity with WaitForCompletion set to False
.
Permanently remove a WorkSpace that has never been used
Remove a WorkSpace that has never been used since its creation happening more than 37 days ago.
WorkSpace.LastKnownUserConnectionTimestamp = new DateTime()
(i.e. never used) and the WorkSpace has a tag that stores the creation date (because Amazon WorkSpaces API does not provide
this value).
creationDate <= Today.Date.AddDays(-InactivityPeriodBeforeRemoving)
, it will be permanently removed.
Run the process. The robot uses the Amazon WorkSpaces activities to automate your Amazon WorkSpaces tasks.