使用 Microsoft Flow 中的环境Using environments within Microsoft Flow

优势Benefits

环境具有如下优点:Environments provide the following benefits:

  • 数据区域性:可以在不同的区域创建绑定到相应地理位置的环境。Data locality: Environments can be created in different regions and they're bound to that geographic location. 在环境中创建流时,该流会路由到该地理位置的所有数据中心。When you create a flow in an environment, that flow is routed to all datacenters in that geographic location. 这也提供了一个性能优势。This also provides a performance benefit.

    如果用户位于欧洲,请在欧洲区域创建并使用环境。If your users are in Europe, create and use the environment in the Europe region. 如果用户位于美国,请在美国创建并使用环境。If your users are in the United States, create and use the environment in the U.S.

    重要

    如果删除环境,则也会删除该环境中的所有流。If you delete the environment, then all flows within that environment are also deleted. 这适用于在该环境中创建的任何项目,包括连接、网关、PowerApps 等。This applies to any items you create in that environment, including connections, gateways, PowerApps, and more.

  • 数据丢失防护:作为管理员,并不希望流先从内部位置(如 OneDrive for Business 或包含薪金信息的 SharePoint 列表)获取数据,再公开发布此类数据(如发布到 Twitter)。Data loss prevention: As an Administrator, you don't want flows that get data from an internal location (such as OneDrive for Business or a SharePoint list that contains salary information), and then post that data publicly (such as to Twitter). 借助数据丢失防护,可以控制哪些服务能够在 Microsoft Flow 部署中共享数据。Use data loss prevention to control which services can share data within your Microsoft Flow deployment.

    例如,可以将 SharePoint 和 OneDrive for Business 服务添加到仅限业务数据策略。For example, you can add the SharePoint and OneDrive for Business services to a business data only policy. 在此环境中创建的任何流都可以使用 SharePoint 和 OneDrive for Business 服务。Any flows created in this environment can use SharePoint and OneDrive for Business services. 不过,它们无法与未添加到仅限业务数据策略的其他服务共享数据。However, they won't be able to share data with other services that aren't included in the business data only policy.

    备注

    某些许可证(包括 P2 许可证)可以使用数据丢失防护。Data loss prevention is available with some license skus, including the P2 license.

  • 所有资源的隔离边界:任何流、网关、连接、自定义连接器等都驻留在特定环境中。Isolation boundary for all resources: Any flows, gateways, connections, custom connectors, and so on reside in a specific environment. 这些资源不存在于其他任何环境中。They don't exist in any other environments.

  • Common Data Service:若要创建将数据插入服务的流,可以采用下列方法:Common Data Service: Here are your options if you want to create a flow that inserts data into a service:

    • 将数据插入 Excel 文件,然后将 Excel 文件存储在云存储帐户(例如 OneDrive)中。Insert data into an Excel file, and store the Excel file in a cloud storage account, such as OneDrive.

    • 创建 SQL 数据库,再将数据存储到其中。Create a SQL Database, and then store your data in it.

    • 使用通用数据服务存储数据。Use the Common Data Service to store your data.

      每个环境最多可以在 Common Data Service 中对流使用 1 个数据库。Every environment can have a maximum of one database for your flows in the Common Data Service. Common Data Service 访问权限取决于已购买的许可证;免费许可证不随附 Common Data Service 访问权限。Access to the Common Data Service depends on the license you've purchased; the Common Data Service isn't included with the Free license.

限制Limitations

尽管环境具有许多优点,但也带来了新的限制。Although environments provide many benefits, they also introduce new limitations. 由于环境是隔离边界,因此永远无法使用跨环境引用资源的资源。The fact that environments are an isolation boundary means that you can never have resources that reference resources across environments. 例如,可能无法执行以下操作:先在一个环境中创建自定义连接器,再在另一个环境中创建使用此自定义连接器的流。For example, you may not create a custom connector in one environment and then create a flow that uses that custom connector in a different environment.

使用默认环境Use the default environment

所有用户都可以使用默认环境,任何用户都能在默认环境中创建流。The Default environment is shared by all users and any user can create flows in the Default environment.

提示

如果是预览版用户,则所有现有流都位于默认环境中。If you're a Preview user, all existing flows reside in the default environment. 预览版用户是指在 Microsoft Flow 公开发布 (GA) 之前使用它的人。A Preview user is someone who was using Microsoft Flow before its release to General Availability (GA).

管理中心The admin center

管理员使用管理中心来创建和管理环境。Administrators use the admin center to create and manage environments. 可通过以下两种方法打开管理中心:Here are the two ways to open the admin center:

选项 1:选择“设置”Option 1: Select Settings

  1. 登录 flow.microsoft.comSign in to flow.microsoft.com.

  2. 选择“设置”齿轮,再从列表中选择“管理中心”:Select the Settings gear, and choose Admin Center from the list:

    设置和管理员门户

  3. 此时将打开管理员中心。The administrator center opens.

选项 2:打开 admin.flow.microsoft.comOption 2: Open admin.flow.microsoft.com

转到 admin.flow.microsoft.com,并使用工作帐户登录。Go to admin.flow.microsoft.com, and sign-in with your work account.

创建环境Create an environment

  1. 在“Microsoft Flow 管理员中心”,选择“环境”。In the Microsoft Flow admin center, select Environments. 此时,将看到全部现有环境:环境You'll see all existing environments: Environments

  2. 选择“新建环境”,再输入必填信息:Select New environment and then provide the required information:

    属性Property 说明Description
    环境名称Environment Name 输入环境的名称,例如 Human ResourcesEurope flowsEnter the name of your environment, such as Human Resources, or Europe flows.
    区域Region 选择托管环境的位置。Choose the location to host your environment. 为了获得最佳性能,请使用最靠近用户的区域。For the best performance, use a region closest to your users.
    环境类型Environment Type 根据许可证选择环境类型:“生产”或“试用”。Choose an environment type based upon your license: Production or Trial.

    环境设置

  3. 单击“创建环境”。Click Create environment.

  4. 现在,可以根据需要单击“创建数据库”或“跳过”。You now have an option to Create database or Skip.

  5. 如果选择“创建数据库”,将看到为数据库设置“货币”和“语言”的提示。If you choose to Create Database, you will be prompted for a Currency and Language for the Database. 此外,还可以选择部署示例应用和数据。In addition, you can also choose to have sample apps and data deployed.

    数据库配置设置

现在,可以将用户添加到环境中。You can now add users to the environment.

管理现有环境Manage your existing environments

  1. 在“Microsoft Flow 管理员中心”,选择“环境”:In the Microsoft Flow admin center, select Environments:

    环境菜单项

  2. 选择一个环境,打开其属性。Select an environment to open its properties.

  3. 转到“详细信息”选项卡,查看环境的其他相关信息,包括环境的创建者、地理位置等:Use the Details tab to view additional information about an environment, including who created the environment, its geographic location, and more:

    “详细信息”选项卡

  4. 选择“安全性”。Select Security.

    如果在前述步骤中未选择“创建数据库”,“环境角色”中有以下两个选项:“环境管理员”和“环境创建者”:If you did not select Create Database in previous steps, in Environment roles, there're two options: Environment Admin and Environment Maker:

    管理员角色

    创建者可以在环境中新建资源,如流、数据连接和网关。A Maker can create new resources such as flows, data connections, and gateways in an environment.

    备注

    用户无需是创建者,也能在环境中编辑资源。A user doesn't need to be a Maker to edit resources in an environment. 每个创建者都会向不是环境创建者的用户授予权限,以决定谁可以编辑他/她的资源。Each Maker determines who can edit her or his resources by granting permissions to users who aren't environment Makers.

    管理员可以创建数据丢失防护策略,并执行其他管理任务,如创建环境、向环境添加用户、分配管理员/创建者特权。An Admin can create data loss prevention policies and perform other administrative tasks, such as create environments, add users to environments, and assign admin/maker privileges.

    1. 依次选择“环境创建者”角色和“用户”:创建者角色Select the Environment Maker role, and then select Users: maker role
    2. 输入要为创建者角色指定的名称、电子邮件地址或用户组。Enter a name, email address, or user group that you'd like to give the Maker role.
    3. 选择“保存”。Select Save.
  5. 在“安全性”中,选择“用户角色”:Within Security, select User Roles:

    用户角色

    此时将列出所有现有角色,包括编辑或删除角色的选项。Any existing roles are listed, including the options to edit or delete the role.

    选择“新建角色”来创建新角色。Select New role to create a new role.

  6. 在“安全性”中,选择“权限集”:Within Security, select Permission Sets:

    权限设置

    此时,将看到全部现有权限集,以及角色编辑或删除选项。You'll see all existing permission sets and options to edit or delete roles.

    选择“新建权限集”,以新建权限集。Select New permission set to create a new permission set.

  7. 如果未选择“创建数据库”来存储数据,此数据库属于 Common Data Service。If you did choose to Create Database, to store your data, this database is part of the Common Data Service. 单击“安全性”选项卡时,将会看到转到“Dynamics 365 实例管理中心”的提示,以便在其中应用基于角色的安全性。When you click on the Security tab you will be prompted to navigate to the Dynamics 365 instance management center where role-based security can be applied. Dynamics 安全性设置dynamics security settings

  8. 从环境/实例中的用户列表选择用户。Select the user from the list of users in the environment / instance. Dynamics 安全性设置dynamics security settings

  9. 向用户分配角色。Assign the role to the user.

    向用户分配角色

备注

分配到这些环境角色的用户或组不会自动获取对环境数据库(若有)的访问权限,此类权限必须由数据库所有者单独授予。Users or groups assigned to these environment roles are not automatically given access to the environment’s database (if it exists) and must be given access separately by a Database owner.

数据库安全性Database security

能否创建和修改数据库架构,以及能否连接到在环境中预配的数据库内存储的数据,取决于数据库的用户角色和权限集。The ability to create and modify a database schema and to connect to the data stored within a database that is provisioned in your environment is controlled by the database's user roles and permission sets. 可以在“安全性”选项卡的“用户角色”和“权限集”部分中,管理环境数据库的用户角色和权限集。You can manage the user roles and permission sets for your environment's database from the User roles and Permission sets section of the Security tab.

向用户分配角色

常见问题Frequently asked questions

我能否在环境之间移动流?Can I move a flow between environments?

能,可以将流从一个环境导出,再导入另一个环境中。Yes, flows can be exported from one environment and imported into another environment.

哪种许可证包括通用数据服务?Which license includes the Common Data Service?

只有 Microsoft PowerApps 计划 2 包括使用通用数据服务创建数据库的权限。Only Microsoft PowerApps Plan 2 includes rights to create databases with the Common Data Service. 但是,所有付费计划(Microsoft Flow 计划 1 和 2、Microsoft PowerApps 计划 1 和 2)都有使用通用数据服务的权限。However, all paid plans (Microsoft Flow plans 1 and 2, and Microsoft PowerApps plans 1 and 2) have the rights to use the Common Data Service.

请访问 Microsoft Flow 定价页,选择适合自己的计划。Choose a plan that's right for you by visiting the Microsoft Flow pricing page.

请参阅计费常见问题解答文档,了解与计费相关的常见问题解答。See the Billing questions document for answers to frequently asked questions about billing.

能否在环境外使用通用数据服务?Can the Common Data Service be used outside of an environment?

否。No. 通用数据服务需要一个环境。The Common Data Service requires an environment. 阅读详细信息Read more about it.

哪些区域包括 Microsoft Flow?What regions include Microsoft Flow?

Microsoft Flow 支持 Office 365 支持的大多数区域。如需了解更多详情,请参阅区域概述Microsoft Flow supports most regions that Office 365 supports, see the regions overview for more details.

创建用户自己的自定义环境需要什么?What's needed to create my own custom environment?

具有 Microsoft Flow Plan 2 许可证的所有用户都可以创建自己的环境。All users with the Microsoft Flow Plan 2 license can create their own environments. 虽然所有 Microsoft Flow 用户都可以使用由 Plan 2 管理员创建的环境,但无法创建自己的环境。All Microsoft Flow users can use environments created by Plan 2 administrators, but they cannot create their own environments.