| Copyright | (c) 2013-2023 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Amazonka.ChimeSDKMessaging.CreateChannelMembership
Description
Adds a user to a channel. The InvitedBy field in ChannelMembership
is derived from the request header. A channel member can:
- List messages
- Send messages
- Receive messages
- Edit their own messages
- Leave the channel
Privacy settings impact this action as follows:
- Public Channels: You do not need to be a member to list messages, but you must be a member to send messages.
- Private Channels: You must be a member to list or send messages.
The x-amz-chime-bearer request header is mandatory. Use the
AppInstanceUserArn of the user that makes the API call as the value in
the header.
Synopsis
- data CreateChannelMembership = CreateChannelMembership' {}
- newCreateChannelMembership :: Text -> Text -> ChannelMembershipType -> Text -> CreateChannelMembership
- createChannelMembership_subChannelId :: Lens' CreateChannelMembership (Maybe Text)
- createChannelMembership_channelArn :: Lens' CreateChannelMembership Text
- createChannelMembership_memberArn :: Lens' CreateChannelMembership Text
- createChannelMembership_type :: Lens' CreateChannelMembership ChannelMembershipType
- createChannelMembership_chimeBearer :: Lens' CreateChannelMembership Text
- data CreateChannelMembershipResponse = CreateChannelMembershipResponse' {
- channelArn :: Maybe Text
- member :: Maybe Identity
- subChannelId :: Maybe Text
- httpStatus :: Int
- newCreateChannelMembershipResponse :: Int -> CreateChannelMembershipResponse
- createChannelMembershipResponse_channelArn :: Lens' CreateChannelMembershipResponse (Maybe Text)
- createChannelMembershipResponse_member :: Lens' CreateChannelMembershipResponse (Maybe Identity)
- createChannelMembershipResponse_subChannelId :: Lens' CreateChannelMembershipResponse (Maybe Text)
- createChannelMembershipResponse_httpStatus :: Lens' CreateChannelMembershipResponse Int
Creating a Request
data CreateChannelMembership Source #
See: newCreateChannelMembership smart constructor.
Constructors
| CreateChannelMembership' | |
Fields
| |
Instances
newCreateChannelMembership Source #
Arguments
| :: Text | |
| -> Text | |
| -> ChannelMembershipType | |
| -> Text | |
| -> CreateChannelMembership |
Create a value of CreateChannelMembership with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
CreateChannelMembership, createChannelMembership_subChannelId - The ID of the SubChannel in the request.
Only required when creating membership in a SubChannel for a moderator in an elastic channel.
CreateChannelMembership, createChannelMembership_channelArn - The ARN of the channel to which you're adding users.
CreateChannelMembership, createChannelMembership_memberArn - The AppInstanceUserArn of the member you want to add to the channel.
CreateChannelMembership, createChannelMembership_type - The membership type of a user, DEFAULT or HIDDEN. Default members
are always returned as part of ListChannelMemberships. Hidden members
are only returned if the type filter in ListChannelMemberships equals
HIDDEN. Otherwise hidden members are not returned. This is only
supported by moderators.
$sel:chimeBearer:CreateChannelMembership', createChannelMembership_chimeBearer - The AppInstanceUserArn of the user that makes the API call.
Request Lenses
createChannelMembership_subChannelId :: Lens' CreateChannelMembership (Maybe Text) Source #
The ID of the SubChannel in the request.
Only required when creating membership in a SubChannel for a moderator in an elastic channel.
createChannelMembership_channelArn :: Lens' CreateChannelMembership Text Source #
The ARN of the channel to which you're adding users.
createChannelMembership_memberArn :: Lens' CreateChannelMembership Text Source #
The AppInstanceUserArn of the member you want to add to the channel.
createChannelMembership_type :: Lens' CreateChannelMembership ChannelMembershipType Source #
The membership type of a user, DEFAULT or HIDDEN. Default members
are always returned as part of ListChannelMemberships. Hidden members
are only returned if the type filter in ListChannelMemberships equals
HIDDEN. Otherwise hidden members are not returned. This is only
supported by moderators.
createChannelMembership_chimeBearer :: Lens' CreateChannelMembership Text Source #
The AppInstanceUserArn of the user that makes the API call.
Destructuring the Response
data CreateChannelMembershipResponse Source #
See: newCreateChannelMembershipResponse smart constructor.
Constructors
| CreateChannelMembershipResponse' | |
Fields
| |
Instances
newCreateChannelMembershipResponse Source #
Create a value of CreateChannelMembershipResponse with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
CreateChannelMembership, createChannelMembershipResponse_channelArn - The ARN of the channel.
CreateChannelMembershipResponse, createChannelMembershipResponse_member - The ARN and metadata of the member being added.
CreateChannelMembership, createChannelMembershipResponse_subChannelId - The ID of the SubChannel in the response.
$sel:httpStatus:CreateChannelMembershipResponse', createChannelMembershipResponse_httpStatus - The response's http status code.
Response Lenses
createChannelMembershipResponse_channelArn :: Lens' CreateChannelMembershipResponse (Maybe Text) Source #
The ARN of the channel.
createChannelMembershipResponse_member :: Lens' CreateChannelMembershipResponse (Maybe Identity) Source #
The ARN and metadata of the member being added.
createChannelMembershipResponse_subChannelId :: Lens' CreateChannelMembershipResponse (Maybe Text) Source #
The ID of the SubChannel in the response.
createChannelMembershipResponse_httpStatus :: Lens' CreateChannelMembershipResponse Int Source #
The response's http status code.