

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

# 与其他账户共享模型
<a name="share-model-share"></a>

[满足先决条件](share-model-prereq.md)后，您可以共享模型。选择与您的首选方法对应的选项卡，然后按照以下步骤操作：

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

1. 使用有权使用 Amazon Bedrock 控制台的 IAM 身份登录。 AWS 管理控制台 然后，在 [https://console.aws.amazon.com/](https://console.aws.amazon.com/bedrock)bedrock 上打开 Amazon Bedrock 控制台。

1. 在左侧导航窗格的**调整**下，选择**自定义模型**。

1. 选择要共享的模型旁边的按钮。然后，选择三个点（![\[Vertical ellipsis icon representing a menu or more options.\]](http://docs.aws.amazon.com/zh_cn/bedrock/latest/userguide/images/icons/vertical-ellipsis.png)）并选择**共享**。

1. 在**模型共享详细信息**部分中，执行以下操作：

   1. 在**共享模型名称**字段中，为共享模型提供一个名称。

   1. 在**接收人账户 ID** 字段中，指定将接收模型的账户的 ID。

   1. （可选）要添加标签，请展开**标签**部分。有关更多信息，请参阅 [标记 Amazon Bedrock 资源](tagging.md)。

1. 选择**共享模型**。接收者在 [Resource Access Manager](https://docs.aws.amazon.com/ram/latest/userguide/getting-started-shared.html) 中接受模型后，模型将显示在他们的自定义模型列表中。

------
#### [ API ]

要共享模型，请向[AWS Resource Access Manager 端](https://docs.aws.amazon.com/general/latest/gr/ram.html)点发送[CreateResourceShare](https://docs.aws.amazon.com/ram/latest/APIReference/API_CreateResourceShare.html)请求。至少提供以下字段：


****  

| 字段 | 使用案例 | 
| --- | --- | 
| Name | 提供资源共享的名称。 | 
| resourceArns | 指定要共享 ARNs 的每个模型。 | 
| principals | 指定要与之共享模型的主体。 | 

[CreateResourceShare](https://docs.aws.amazon.com/ram/latest/APIReference/API_CreateResourceShare.html)响应会返回一个`resourceShareArn`，您可以使用它来管理资源共享。

接收模型的账户可以通过向 [Amazon Bedrock 控制平面终端节点](https://docs.aws.amazon.com/general/latest/gr/bedrock.html#br-cp)发送[ListCustomModels](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_ListCustomModels.html)请求来检查模型是否已共享。已共享的模型的 `shared` 状态为 `true`。

------

共享模型后，模型的接收者必须将其复制到某个区域才能使用。有关更多信息，请参阅 [复制要在区域中使用的自定义或共享模型](copy-model.md)。