

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

# 使用管理待处理账户邀请 AWS Organizations
<a name="orgs_manage_accounts_manage-invites"></a>

登录到管理账户后，您可以查看组织中的所有关联 AWS 账户 并取消任何待处理（未结）邀请。为此，请完成以下步骤。

**最小权限**  
要管理组织的待处理邀请，您必须拥有以下权限：  
`organizations:DescribeOrganization` – 仅当使用 Organizations 控制台时才需要
`organizations:ListHandshakesForOrganization` 
`organizations:CancelHandshake`

------
#### [ AWS 管理控制台 ]

**查看或取消从您的组织发送到其他账户的邀请**

1. 登录 [AWS Organizations 控制台](https://console.aws.amazon.com/organizations/v2)。您必须以 IAM 用户的身份登录，担任 IAM 角色；或在组织的管理账户中以根用户的身份登录（[不推荐](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials)）。

1. 导航到 **[Invitations (邀请)](https://console.aws.amazon.com/organizations/v2/home/accounts/invitations)** 页面。

   此页面显示从您的组织发送的所有邀请及其当前状态。

   如果看不到邀请，请检查受邀账户是否为其他组织的管理账户。只有成员账户和独立账户才能收到邀请。管理账户无法收到邀请。

   如果您想邀请的账户是其他组织中的管理账户，建议您将该账户设为独立账户。
**注意**  
已接受、已取消和已拒绝的邀请将继续在列表中显示 30 天。之后，这些邀请将被删除，不再在列表中显示。

1. 选择要取消的邀请旁边的单选按钮 ![\[Blue circular icon with a white checkmark symbol in the center.\]](http://docs.aws.amazon.com/zh_cn/organizations/latest/userguide/images/radio-button-selected.png)，然后选择 **Cancel invitation (取消邀请)**。如果单选按钮呈灰色，则无法取消该邀请。

   邀请的状态将从 **Open (待接受)** 更改为 **Canceled (已取消)**。

   AWS 向账户所有者发送一封电子邮件，说明您取消了邀请。除非您发送新邀请，否则账户无法再加入组织。

------
#### [ AWS CLI & AWS SDKs ]

**查看或取消从您的组织发送到其他账户的邀请**  
您可以使用以下命令来查看或取消邀请：
+ AWS CLI: [list-handshakes-for-organization](https://docs.aws.amazon.com/cli/latest/reference/organizations/list-handshakes-for-organization.html)，[取消握手](https://docs.aws.amazon.com/cli/latest/reference/organizations/cancel-handshake.html) 
+ 以下示例显示了此组织向其他账户发送的邀请。

  ```
  $ aws organizations list-handshakes-for-organization
  {
      "Handshakes": [
          {
              "Action": "INVITE",
              "Arn": "arn:aws:organizations::111111111111:handshake/o-exampleorgid/invite/h-examplehandshakeid111",
              "ExpirationTimestamp": 1482952459.257,
              "Id": "h-examplehandshakeid111",
              "Parties": [
                  {
                      "Id": "o-exampleorgid",
                      "Type": "ORGANIZATION"
                  },
                  {
                      "Id": "juan@example.com",
                      "Type": "EMAIL"
                  }
              ],
              "RequestedTimestamp": 1481656459.257,
              "Resources": [
                  {
                      "Resources": [
                          {
                              "Type": "MASTER_EMAIL",
                              "Value": "bill@amazon.com"
                          },
                          {
                              "Type": "MASTER_NAME",
                              "Value": "Management Account"
                          },
                          {
                              "Type": "ORGANIZATION_FEATURE_SET",
                              "Value": "FULL"
                          }
                      ],
                      "Type": "ORGANIZATION",
                      "Value": "o-exampleorgid"
                  },
                  {
                      "Type": "EMAIL",
                      "Value": "juan@example.com"
                  },
                  {
                      "Type":"NOTES",
                      "Value":"This is an invitation to Juan's account to join Bill's organization."
                  }
              ],
              "State": "OPEN"
          },
          {
              "Action": "INVITE",
              "State":"ACCEPTED",
              "Arn": "arn:aws:organizations::111111111111:handshake/o-exampleorgid/invite/h-examplehandshakeid111",
              "ExpirationTimestamp": 1.471797437427E9,
              "Id": "h-examplehandshakeid222",
              "Parties": [
                  {
                      "Id": "o-exampleorgid",
                      "Type": "ORGANIZATION"
                  },
                  {
                      "Id": "anika@example.com",
                      "Type": "EMAIL"
                  }
              ],
              "RequestedTimestamp": 1.469205437427E9,
              "Resources": [
                  {
                      "Resources": [
                          {
                              "Type":"MASTER_EMAIL",
                               "Value":"bill@example.com"
                          },
                          {
                              "Type":"MASTER_NAME",
                              "Value":"Management Account"
                          }
                      ],
                      "Type":"ORGANIZATION",
                      "Value":"o-exampleorgid"
                  },
                  {
                      "Type":"EMAIL",
                      "Value":"anika@example.com"
                  },
                  {
                      "Type":"NOTES",
                      "Value":"This is an invitation to Anika's account to join Bill's organization."
                  }
              ]
          }
      ]
  }
  ```

  以下示例说明如何取消对账户的邀请。

  ```
  $ aws organizations cancel-handshake --handshake-id h-examplehandshakeid111
  {
      "Handshake": {
          "Id": "h-examplehandshakeid111",
          "State":"CANCELED",
          "Action": "INVITE",
          "Arn": "arn:aws:organizations::111111111111:handshake/o-exampleorgid/invite/h-examplehandshakeid111",
          "Parties": [
              {
                  "Id": "o-exampleorgid",
                  "Type": "ORGANIZATION"
              },
              {
                  "Id": "susan@example.com",
                  "Type": "EMAIL"
              }
          ],
          "Resources": [
              {
                  "Type": "ORGANIZATION",
                  "Value": "o-exampleorgid",
                  "Resources": [
                      {
                          "Type": "MASTER_EMAIL",
                          "Value": "bill@example.com"
                      },
                      {
                          "Type": "MASTER_NAME",
                          "Value": "Management Account"
                      },
                      {
                          "Type": "ORGANIZATION_FEATURE_SET",
                          "Value": "CONSOLIDATED_BILLING"
                      }
                  ]
              },
              {
                  "Type": "EMAIL",
                  "Value": "anika@example.com"
              },
              {
                  "Type": "NOTES",
                  "Value": "This is a request for Susan's account to join Bob's organization."
              }
          ],
          "RequestedTimestamp": 1.47008383521E9,
          "ExpirationTimestamp": 1.47137983521E9
      }
  }
  ```
+ AWS SDKs: [ListHandshakesForOrganization](https://docs.aws.amazon.com/organizations/latest/APIReference/API_ListHandshakesForOrganization.html), [CancelHandshake](https://docs.aws.amazon.com/organizations/latest/APIReference/API_CancelHandshake.html)

------