Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Adds a user to a channel. The InvitedBy
response field 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_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
- httpStatus :: Int
- newCreateChannelMembershipResponse :: Int -> CreateChannelMembershipResponse
- createChannelMembershipResponse_channelArn :: Lens' CreateChannelMembershipResponse (Maybe Text)
- createChannelMembershipResponse_member :: Lens' CreateChannelMembershipResponse (Maybe Identity)
- createChannelMembershipResponse_httpStatus :: Lens' CreateChannelMembershipResponse Int
Creating a Request
data CreateChannelMembership Source #
See: newCreateChannelMembership
smart constructor.
CreateChannelMembership' | |
|
Instances
newCreateChannelMembership Source #
:: 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:
$sel:channelArn:CreateChannelMembership'
, createChannelMembership_channelArn
- The ARN of the channel to which you're adding users.
$sel:memberArn:CreateChannelMembership'
, createChannelMembership_memberArn
- The ARN of the member you want to add to the channel.
$sel:type':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_channelArn :: Lens' CreateChannelMembership Text Source #
The ARN of the channel to which you're adding users.
createChannelMembership_memberArn :: Lens' CreateChannelMembership Text Source #
The ARN 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.
CreateChannelMembershipResponse' | |
|
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:
$sel:channelArn:CreateChannelMembership'
, createChannelMembershipResponse_channelArn
- The ARN of the channel.
$sel:member:CreateChannelMembershipResponse'
, createChannelMembershipResponse_member
- The ARN and metadata of the member being added.
$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_httpStatus :: Lens' CreateChannelMembershipResponse Int Source #
The response's http status code.