- 概述
- Active Directory
- Amazon Web Services
- 发行说明
- 关于“Amazon Web Services”活动包
- 项目兼容性
- 权限列表
- 亚马逊网页服务作用域
- 配置机器人
- 创建实例
- 从启动模板中创建实例
- 按 ID 获取实例
- 获取实例列表
- 重新启动实例
- 启动实例
- 停止实例
- 终止实例
- 将卷附加到实例
- 创建实例快照
- 创建卷
- 创建卷快照
- 删除快照
- 删除卷
- 从实例中分离卷
- 获取实例卷
- 获取快照
- 获取卷
- 获取卷列表
- 向组中添加用户
- 创建组
- 删除组
- 遍历组
- 获取组
- 从组中删除用户
- 更新组
- 添加/删除内联策略
- 附加/分离托管策略
- 创建托管策略
- 删除托管策略
- 遍历托管策略
- 获取附加到托管策略的 IAM 身份
- 获取 IAM 身份内联策略
- 获取 IAM 身份托管策略
- 获取托管策略
- 更新托管策略
- 将角色添加到实例配置文件
- 创建角色
- 删除角色
- 遍历角色
- 获取角色
- 从实例配置文件中删除角色
- 更新角色
- 更改用户密码
- 创建用户
- 删除用户
- 遍历用户
- 遍历用户组
- 遍历组中的用户
- 获取用户
- 更新用户
- 配置存储桶的日志记录
- 配置存储桶的公共访问权限
- 创建存储桶
- 删除存储桶
- 删除存储桶策略
- 空存储桶
- 获取存储桶
- 获取存储桶列表
- 获取存储桶策略
- 设置存储桶策略
- 更新存储桶属性
- 复制对象
- 删除多个对象
- 删除单个对象
- 将对象下载到文件
- 针对存储桶中的各个对象
- 获取对象
- 获取对象 ACL
- 设置对象 ACL
- 从文件中上传对象
- 从文件夹中上传对象
- 运行 PowerShell 命令
- 亚马逊网页服务 API
- Amazon Web Services 操作指南
- Amazon WorkSpaces
- Azure
- 发行说明
- 关于 Azure 活动包
- 项目兼容性
- 附加到 Blob
- 附加虚拟机数据磁盘
- Azure 范围
- 配置机器人
- 复制 Blob
- 创建 Blob 容器
- 创建 IP 配置
- 创建网络接口
- 创建网络安全组
- 创建资源组
- 创建安全规则
- 创建存储帐户
- 创建表格
- 创建虚拟机
- 删除 Blob
- 删除 Blob 容器
- 删除 IP 配置
- 删除网络接口
- 删除网络安全组
- 删除资源组
- 删除行
- 删除密钥
- 删除安全规则
- 删除存储帐户
- 删除表格
- 删除虚拟机
- 分离虚拟机数据磁盘
- 将 Blob 下载到文件
- 对于每个 Blob 容器
- 对于容器中的每个 Blob
- 用于每个网络接口
- 用于每个网络安全组
- 对于表格中的每一行
- 用于每个安全警示
- 获取 Blob
- 获取 Blob 容器
- 获取 Blob 容器列表
- 获取 Blob 列表
- 获取磁盘
- 获取磁盘列表
- 获取 RDP 文件
- 获取资源组
- 获取资源组列表
- 获取行
- 按筛选器获取行
- 获取密码
- 获取存储帐户
- 获取存储帐户密钥
- 获取存储帐户列表
- 获取网络接口
- 获取网络安全组
- 获取网络安全组网络接口列表
- 获取安全警示
- 获取安全规则
- 获取安全规则列表
- 获取表格
- 获取表格列表
- 获取虚拟机
- 获取自定义虚拟机映像
- 获取自定义虚拟机映像列表
- 获取虚拟机磁盘列表
- 按发布者获取虚拟机映像
- 获取虚拟机列表
- 获取虚拟机网络安全组列表
- 获取虚拟机网络接口列表
- 插入行
- 重新生成存储帐户密钥
- 重新启动虚拟机
- 在虚拟机中运行脚本
- 设置 Blob 层
- 设置安全警示状态
- 关闭虚拟机
- 启动虚拟机
- 停止虚拟机
- 从文件上传 Blob
- Azure API
- Azure 操作指南
- Azure Active Directory
- 发行说明
- 关于 Azure Active Directory 活动
- 项目兼容性
- 列出组中的所有组
- 列出所有记录
- 列出生命周期策略
- 列出用户
- 列出组
- 获取组成员增量
- 获取用户角色
- 列出用户的所有组
- 列出角色中的用户
- 列出组中的用户
- 列出组的所有者
- 列出目录角色
- 列出直接下属
- 已将用户添加到组中
- 从组中删除的用户
- 向生命周期策略添加组
- 向组中添加成员
- 向角色添加成员
- 向组中添加所有者
- 分配许可证
- Azure AD 应用程序作用域
- Azure AD 委派作用域
- 创建分配组
- 创建生命周期策略
- 创建用户
- 删除组
- 删除生命周期策略
- 删除用户
- 适用于每个直接下属
- 遍历组
- 遍历组中的子组
- 遍历生命周期策略
- 遍历父组
- 遍历角色
- 遍历用户
- 遍历用户组
- 遍历组中的用户
- 遍历组所有者中的用户
- 遍历角色中的用户
- 遍历用户角色
- 按 ID 获取组
- 按名称获取组
- 获取管理器
- 获取用户
- 存在组
- 是生命周期策略中的组
- 是角色中的成员
- 是组的成员
- 是组所有者
- 从生命周期策略中删除组
- 删除许可证
- 从组中删除成员
- 从角色中删除成员
- 从组中删除所有者
- 重置密码
- 设置管理器
- 更新组
- 更新生命周期策略
- 更新用户
- 存在用户
- Azure Active Directory API
- Azure Active Directory 操作指南
- Azure Windows Virtual Desktop
- Citrix
- 桌面触发器
- Exchange Server
- Google Cloud
- Hyper V
- NetIQ eDirectory
- 系统中心
- VMware
配置和管理 Amazon WorkSpaces 实例,包括工作区创建、重新启动计划、为节省成本而停止和删除。
下面的示例说明了如何使用 Amazon WorkSpaces 活动来自动执行配置和成本节省任务。它会显示Amazon Workspaces 作用域、创建工作区、遍历工作区、重新启动工作区、停止工作区、更新工作区或删除工作区等活动。您可以在“UiPath.AmazonWorkSpaces.Activities ”包中找到这些活动。
该示例包含两个工作流:
Create_Workspace.xaml
通过以下方式为给定目录用户配置新的 WorkSpace:
- 准备要与 WorkSpace 关联的标签,包括键为
CreationDate的标签,以存储创建日期信息,因为 Amazon WorkSpaces API 不提供此值; - 指定捆绑包、目录、用户名、运行模式、标签等。
Manage_Workspaces.xaml
通过以下方式为指定目录中的 WorkSpaces 执行 IT 管理任务:
- 识别并重新启动运行状况不佳的 WorkSpace;
- 停止可用但处于断开连接状态的 WorkSpaces (成本优化);
- 识别未使用的 WorkSpace,并根据非活动期采取以下操作之一:
- 向用户发送警告电子邮件;
- 永久删除 WorkSpace (成本优化)。
配置 WorkSpace
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.备注:有关创建 AWS 密钥的更多详细信息,请阅读此文:创建 AWS 访问密钥。
-
A new WorkSpace is provisioned using the Create Workspace activity.
管理 WorkSpaces
This is how the second automation process, Manage_Workspaces.xaml, which retrieves all WorkSpaces in a specified directory, can be built:
-
请按照配置 WorkSpace中步骤 1 中的相同说明进行操作。
-
Use the For Each Workspace activity with FilterBy set to
DirectoryId. Then provide your directory ID in the FilterValue property.备注:The For Each Workspace activity supports filtering by
DirectoryId,BundleId, andWorkspaceIds.
对于与筛选条件匹配的每个 WorkSpace,我们检查是否应执行以下操作之一。
重新启动运行状况不佳的 WorkSpace
If the state of the WorkSpace is AWRKSState.UNHEALTHY, reboot the WorkSpace by using the Reboot Workspace activity.
Since this activity can take a long time, it is recommended to set the value of the WaitForCompletion property to False.
停止已断开连接的 WorkSpace
停止断开连接超过 30 分钟的 WorkSpace。
If the running mode of the WorkSpace is AutoStop and the user is disconnected for more than MinutesSinceDisconnected minutes, stop it by calling the Stop Workspace activity with WaitForCompletion set to False.
发送警告电子邮件
如果 WorkSpace 在过去 30 天内未使用过,则向用户发送警告电子邮件。
如果在过去 InactivityPeriodBeforeWarning 天内未使用 WorkSpace,用户将收到一封电子邮件,说明将在 7 天内永久删除该 WorkSpace,即 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.
永久删除 WorkSpace
删除过去 37 天内未使用的 WorkSpace。
If the WorkSpace was not used in the past InactivityPeriodBeforeRemoving days, it will be terminated. For this action, use the Remove Workspace activity with WaitForCompletion set to False.
永久删除从未使用过的 WorkSpace
删除自创建超过 37 天以来从未使用过的 WorkSpace。
仅当 WorkSpace.LastKnownUserConnectionTimestamp = new DateTime() (即 从未使用过),并且 WorkSpace 具有存储创建日期的标签(因为 Amazon WorkSpaces API 不提供此值)。
如果 WorkSpace 从未使用过且为 creationDate <= Today.Date.AddDays(-InactivityPeriodBeforeRemoving),则它将被永久删除。
Run the process. The robot uses the Amazon WorkSpaces activities to automate your Amazon WorkSpaces tasks.