

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

# 邀请个人账号加入行为图表
<a name="accounts-invited-members-add-individual"></a>

可以手动指定要邀请为行为图提供数据的成员账户。

------
#### [ Console ]

**使用 Detective 控制台手动选择要邀请的成员账户。**

1. 通过 [https://console.aws.amazon.com/detective/](https://console.aws.amazon.com/detective/) 打开 Amazon Detective 控制台。

1. 在 Detective 导航窗格中，选择**账户管理**。

1. 选择**操作**。然后选择**邀请账户**。

1. 在**添加账户**下，选择**添加个人账户**。

1. 要将成员账户添加到邀请列表，请执行以下步骤。

   1. 选择**添加账户**。

   1. 在**AWS 账户 ID** 中，输入 AWS 账户 ID。

   1. 对于**电子邮件地址**，输入根用户账户的电子邮件地址。

1. 要从列表中删除某个账户，请为该账户选择**删除**。

1. 在**个性化邀请电子邮件**下，添加要包含在邀请电子邮件中的自定义内容。

   例如，可以使用该区域提供联系信息。或者使用它来提醒成员账户，他们需要将所需的 IAM 策略附加到其用户或角色，然后才能接受邀请。

1. **成员账户 IAM 策略**包含成员账户所需 IAM 策略的文本。电子邮件邀请中包含此策略文本。要复制策略文本，请选择**复制**。

1. 选择**邀请**。

------
#### [ Detective API/AWS CLI ]

你可以使用 Detective API 或 AWS Command Line Interface 邀请成员账号将其数据贡献到行为图中。要获取要在请求中使用的行为图的 ARN，请使用 [https://docs.aws.amazon.com/detective/latest/APIReference/API_ListGraphs.html](https://docs.aws.amazon.com/detective/latest/APIReference/API_ListGraphs.html) 操作。

**邀请成员账号访问行为图（Detective API， AWS CLI）**
+ **Detective API：**使用 [https://docs.aws.amazon.com/detective/latest/APIReference/API_CreateMembers.html](https://docs.aws.amazon.com/detective/latest/APIReference/API_CreateMembers.html) 操作。您必须提供图 ARN。为每个账户指定账户标识符和根用户电子邮件地址。

  如果不想向成员账户发送邀请电子邮件，请将 `DisableEmailNotification` 设置为 true。默认 `DisableEmailNotification` 为 false。

  如果要发送邀请电子邮件，则可以选择提供自定义文本添加到邀请电子邮件中。
+ **AWS CLI：**在命令行处，运行 `create-members` 命令。

  ```
  aws detective create-members --accounts AccountId=<AWS account ID>,EmailAddress=<root user email address> --graph-arn <behavior graph ARN> --message "<Custom message text>"
  ```

  **示例**

  ```
  aws detective create-members --accounts AccountId=444455556666,EmailAddress=mmajor@example.com AccountId=123456789012,EmailAddress=jstiles@example.com --graph-arn arn:aws:detective:us-east-1:111122223333:graph:123412341234 --message "This is Paul Santos. I need to add your account to the data we use for security investigation in Amazon Detective. If you have any questions, contact me at psantos@example.com."
  ```

  要表示不向成员账户发送邀请电子邮件，请包含`--disable-email-notification`。

  ```
  aws detective create-members --accounts AccountId=<AWS account ID>,EmailAddress=<root user email address> --graph-arn <behavior graph ARN> --disable-email-notification
  ```

  **示例**

  ```
  aws detective create-members --accounts AccountId=444455556666,EmailAddress=mmajor@example.com AccountId=123456789012,EmailAddress=jstiles@example.com --graph-arn arn:aws:detective:us-east-1:111122223333:graph:123412341234 --disable-email-notification
  ```

------