选择您的 Cookie 首选项

我们使用必要 Cookie 和类似工具提供我们的网站和服务。我们使用性能 Cookie 收集匿名统计数据,以便我们可以了解客户如何使用我们的网站并进行改进。必要 Cookie 无法停用,但您可以单击“自定义”或“拒绝”来拒绝性能 Cookie。

如果您同意,AWS 和经批准的第三方还将使用 Cookie 提供有用的网站功能、记住您的首选项并显示相关内容,包括相关广告。要接受或拒绝所有非必要 Cookie,请单击“接受”或“拒绝”。要做出更详细的选择,请单击“自定义”。

使用 AWS Organizations 创建组织

聚焦模式

本页内容

使用 AWS Organizations 创建组织 - AWS Organizations

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

您可以将您的 AWS 账户作为管理账户来创建组织。创建组织时,您可以选择组织是支持所有功能(推荐),还是只支持整合账单功能。默认情况下,您创建的组织会支持所有功能。

创建组织

可通过以下两种方式创建组织:使用AWS Management Console或者通过使用 AWS CLI 或其中一个 SDK API。

最小权限

要使用您当前的AWS 账户创建组织,您必须具有以下权限:

  • organizations:CreateOrganization

  • iam:CreateServiceLinkedRole

    您可以将此权限限制为仅服务委托人 organizations.amazonaws.com

创建 组织
  1. 登录 AWS Organizations 控制台。您必须以 IAM 用户的身份登录,担任 IAM 角色;或在组织的管理账户中以根用户的身份登录(不推荐)。

  2. 默认情况下,组织在创建时已启用所有功能。但是,您可以选择以下步骤之一:

    • 要创建已启用所有功能的组织,请在介绍页面上选择 Create an organization (创建组织)

    • 要创建仅具有整合账单功能的组织,请在介绍页面 Create an organization (创建组织) 中,选择 consolidated billing features (整合账单功能),然后在确认对话框中,选择 Create an organization (创建组织)

    如果您意外选择了错误的选项,您可以立即转到 Settings (设置) 页面,然后选择 Delete organization (删除组织) 并重新开始。

  3. 组织已创建,并且会显示AWS 账户页面。唯一存在的账户是您的管理账户,它当前存储在根组织部门(OU)中。

    如果需要,Organizations 会自动向与管理账户关联的地址发送验证电子邮件。在您接收到验证电子邮件之前可能会有一段延迟。在 24 小时内验证您的电子邮件地址。有关更多信息,请参阅 AWS Organizations 的电子邮件地址验证。您可以在不验证管理账户电子邮件地址的情况下创建账户以添加到组织中。但是,要邀请现有账户,您必须先完成电子邮件验证。

    注意

    如果此账户之前验证了其电子邮件地址,则当您使用该账户创建组织时,验证不会再次发生。

创建 组织
  1. 登录 AWS Organizations 控制台。您必须以 IAM 用户的身份登录,担任 IAM 角色;或在组织的管理账户中以根用户的身份登录(不推荐)。

  2. 默认情况下,组织在创建时已启用所有功能。但是,您可以选择以下步骤之一:

    • 要创建已启用所有功能的组织,请在介绍页面上选择 Create an organization (创建组织)

    • 要创建仅具有整合账单功能的组织,请在介绍页面 Create an organization (创建组织) 中,选择 consolidated billing features (整合账单功能),然后在确认对话框中,选择 Create an organization (创建组织)

    如果您意外选择了错误的选项,您可以立即转到 Settings (设置) 页面,然后选择 Delete organization (删除组织) 并重新开始。

  3. 组织已创建,并且会显示AWS 账户页面。唯一存在的账户是您的管理账户,它当前存储在根组织部门(OU)中。

    如果需要,Organizations 会自动向与管理账户关联的地址发送验证电子邮件。在您接收到验证电子邮件之前可能会有一段延迟。在 24 小时内验证您的电子邮件地址。有关更多信息,请参阅 AWS Organizations 的电子邮件地址验证。您可以在不验证管理账户电子邮件地址的情况下创建账户以添加到组织中。但是,要邀请现有账户,您必须先完成电子邮件验证。

    注意

    如果此账户之前验证了其电子邮件地址,则当您使用该账户创建组织时,验证不会再次发生。

以下代码示例演示如何使用 CreateOrganization

.NET
AWS SDK for .NET
注意

在 GitHub 上查看更多内容。查找完整示例,学习如何在 AWS 代码示例存储库中进行设置和运行。

using System; using System.Threading.Tasks; using Amazon.Organizations; using Amazon.Organizations.Model; /// <summary> /// Creates an organization in AWS Organizations. /// </summary> public class CreateOrganization { /// <summary> /// Creates an Organizations client object and then uses it to create /// a new organization with the default user as the administrator, and /// then displays information about the new organization. /// </summary> public static async Task Main() { IAmazonOrganizations client = new AmazonOrganizationsClient(); var response = await client.CreateOrganizationAsync(new CreateOrganizationRequest { FeatureSet = "ALL", }); Organization newOrg = response.Organization; Console.WriteLine($"Organization: {newOrg.Id} Main Accoount: {newOrg.MasterAccountId}"); } }
  • 有关 API 的详细信息,请参阅《AWS SDK for .NET API 参考》中的 CreateOrganization

CLI
AWS CLI

示例 1:创建新组织

Bill 想使用账户 111111111111 中的凭证创建一个组织。以下示例显示该账户成为新组织中的主账户。由于他没有指定功能集,因此,新组织默认为在根上启用所有功能并启用服务控制策略。

aws organizations create-organization

输出包括一个组织对象,其中包含有关新组织的详细信息:

{ "Organization": { "AvailablePolicyTypes": [ { "Status": "ENABLED", "Type": "SERVICE_CONTROL_POLICY" } ], "MasterAccountId": "111111111111", "MasterAccountArn": "arn:aws:organizations::111111111111:account/o-exampleorgid/111111111111", "MasterAccountEmail": "bill@example.com", "FeatureSet": "ALL", "Id": "o-exampleorgid", "Arn": "arn:aws:organizations::111111111111:organization/o-exampleorgid" } }

示例 2:创建仅启用整合账单功能的新组织

以下示例创建仅支持整合账单功能的组织:

aws organizations create-organization --feature-set CONSOLIDATED_BILLING

输出包括一个组织对象,其中包含有关新组织的详细信息:

{ "Organization": { "Arn": "arn:aws:organizations::111111111111:organization/o-exampleorgid", "AvailablePolicyTypes": [], "Id": "o-exampleorgid", "MasterAccountArn": "arn:aws:organizations::111111111111:account/o-exampleorgid/111111111111", "MasterAccountEmail": "bill@example.com", "MasterAccountId": "111111111111", "FeatureSet": "CONSOLIDATED_BILLING" } }

有关更多信息,请参阅《AWS Organizations 用户指南》中的“创建组织”。

  • 有关 API 详细信息,请参阅《AWS CLI 命令参考》中的 CreateOrganization

以下代码示例演示如何使用 CreateOrganization

.NET
AWS SDK for .NET
注意

在 GitHub 上查看更多内容。查找完整示例,学习如何在 AWS 代码示例存储库中进行设置和运行。

using System; using System.Threading.Tasks; using Amazon.Organizations; using Amazon.Organizations.Model; /// <summary> /// Creates an organization in AWS Organizations. /// </summary> public class CreateOrganization { /// <summary> /// Creates an Organizations client object and then uses it to create /// a new organization with the default user as the administrator, and /// then displays information about the new organization. /// </summary> public static async Task Main() { IAmazonOrganizations client = new AmazonOrganizationsClient(); var response = await client.CreateOrganizationAsync(new CreateOrganizationRequest { FeatureSet = "ALL", }); Organization newOrg = response.Organization; Console.WriteLine($"Organization: {newOrg.Id} Main Accoount: {newOrg.MasterAccountId}"); } }
  • 有关 API 的详细信息,请参阅《AWS SDK for .NET API 参考》中的 CreateOrganization

CLI
AWS CLI

示例 1:创建新组织

Bill 想使用账户 111111111111 中的凭证创建一个组织。以下示例显示该账户成为新组织中的主账户。由于他没有指定功能集,因此,新组织默认为在根上启用所有功能并启用服务控制策略。

aws organizations create-organization

输出包括一个组织对象,其中包含有关新组织的详细信息:

{ "Organization": { "AvailablePolicyTypes": [ { "Status": "ENABLED", "Type": "SERVICE_CONTROL_POLICY" } ], "MasterAccountId": "111111111111", "MasterAccountArn": "arn:aws:organizations::111111111111:account/o-exampleorgid/111111111111", "MasterAccountEmail": "bill@example.com", "FeatureSet": "ALL", "Id": "o-exampleorgid", "Arn": "arn:aws:organizations::111111111111:organization/o-exampleorgid" } }

示例 2:创建仅启用整合账单功能的新组织

以下示例创建仅支持整合账单功能的组织:

aws organizations create-organization --feature-set CONSOLIDATED_BILLING

输出包括一个组织对象,其中包含有关新组织的详细信息:

{ "Organization": { "Arn": "arn:aws:organizations::111111111111:organization/o-exampleorgid", "AvailablePolicyTypes": [], "Id": "o-exampleorgid", "MasterAccountArn": "arn:aws:organizations::111111111111:account/o-exampleorgid/111111111111", "MasterAccountEmail": "bill@example.com", "MasterAccountId": "111111111111", "FeatureSet": "CONSOLIDATED_BILLING" } }

有关更多信息,请参阅《AWS Organizations 用户指南》中的“创建组织”。

  • 有关 API 详细信息,请参阅《AWS CLI 命令参考》中的 CreateOrganization

AWS SDK for .NET
注意

在 GitHub 上查看更多内容。查找完整示例,学习如何在 AWS 代码示例存储库中进行设置和运行。

using System; using System.Threading.Tasks; using Amazon.Organizations; using Amazon.Organizations.Model; /// <summary> /// Creates an organization in AWS Organizations. /// </summary> public class CreateOrganization { /// <summary> /// Creates an Organizations client object and then uses it to create /// a new organization with the default user as the administrator, and /// then displays information about the new organization. /// </summary> public static async Task Main() { IAmazonOrganizations client = new AmazonOrganizationsClient(); var response = await client.CreateOrganizationAsync(new CreateOrganizationRequest { FeatureSet = "ALL", }); Organization newOrg = response.Organization; Console.WriteLine($"Organization: {newOrg.Id} Main Accoount: {newOrg.MasterAccountId}"); } }
  • 有关 API 的详细信息,请参阅《AWS SDK for .NET API 参考》中的 CreateOrganization

创建组织之后,您可以通过以下方式从管理账户中向您的组织添加账户:

隐私网站条款Cookie 首选项
© 2025, Amazon Web Services, Inc. 或其附属公司。保留所有权利。