

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

# 为适用于 Amazon 的 Chime 软件 AppInstanceBot 开发工具包消息创建频道成员资格
<a name="channel-membership"></a>

创建后 AppInstanceBot，即可将其作为成员添加到新频道或现有频道。有关更多信息，请参阅 *Amazon Chime 软件开发工具包消息 API* 文档[ CreateChannelMembership](https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_CreateChannelMembership.html)中的[CreateChannel](https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_CreateChannel.html)和。

以下示例说明如何使用 AWS CLI 创建频道并将添加`AppInstanceBot`为成员。

```
aws chime-sdk-messaging create-channel \
--chime-bearer {{caller_app_instance_user_arn}} \
--app-instance-arn {{app_instance_arn}} \
--name {{channel_name}} \
--member-arns '[
   "{{app_instance_bot_arn}}"
]'
```

以下示例说明如何使用 AWS CLI `AppInstanceBot` 向现有频道添加。

```
aws chime-sdk-messaging create-channel-membership \
--chime-bearer {{caller_app_instance_user_arn}} \
--channel-arn {{channel_arn}} \
--member-arn {{app_instance_bot_arn}}
```