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 |
Permanently bans a member from a channel. Moderators can't add banned
members to a channel. To undo a ban, you first have to
DeleteChannelBan
, and then CreateChannelMembership
. Bans are cleaned
up when you delete users or channels.
If you ban a user who is already part of a channel, that user is automatically kicked from the channel.
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 CreateChannelBan = CreateChannelBan' {
- chimeBearer :: Maybe Text
- channelArn :: Text
- memberArn :: Text
- newCreateChannelBan :: Text -> Text -> CreateChannelBan
- createChannelBan_chimeBearer :: Lens' CreateChannelBan (Maybe Text)
- createChannelBan_channelArn :: Lens' CreateChannelBan Text
- createChannelBan_memberArn :: Lens' CreateChannelBan Text
- data CreateChannelBanResponse = CreateChannelBanResponse' {
- channelArn :: Maybe Text
- member :: Maybe Identity
- httpStatus :: Int
- newCreateChannelBanResponse :: Int -> CreateChannelBanResponse
- createChannelBanResponse_channelArn :: Lens' CreateChannelBanResponse (Maybe Text)
- createChannelBanResponse_member :: Lens' CreateChannelBanResponse (Maybe Identity)
- createChannelBanResponse_httpStatus :: Lens' CreateChannelBanResponse Int
Creating a Request
data CreateChannelBan Source #
See: newCreateChannelBan
smart constructor.
CreateChannelBan' | |
|
Instances
Create a value of CreateChannelBan
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:chimeBearer:CreateChannelBan'
, createChannelBan_chimeBearer
- The AppInstanceUserArn
of the user that makes the API call.
$sel:channelArn:CreateChannelBan'
, createChannelBan_channelArn
- The ARN of the ban request.
$sel:memberArn:CreateChannelBan'
, createChannelBan_memberArn
- The ARN of the member being banned.
Request Lenses
createChannelBan_chimeBearer :: Lens' CreateChannelBan (Maybe Text) Source #
The AppInstanceUserArn
of the user that makes the API call.
createChannelBan_channelArn :: Lens' CreateChannelBan Text Source #
The ARN of the ban request.
createChannelBan_memberArn :: Lens' CreateChannelBan Text Source #
The ARN of the member being banned.
Destructuring the Response
data CreateChannelBanResponse Source #
See: newCreateChannelBanResponse
smart constructor.
CreateChannelBanResponse' | |
|
Instances
newCreateChannelBanResponse Source #
Create a value of CreateChannelBanResponse
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:CreateChannelBan'
, createChannelBanResponse_channelArn
- The ARN of the response to the ban request.
$sel:member:CreateChannelBanResponse'
, createChannelBanResponse_member
- The ChannelArn
and BannedIdentity
of the member in the ban response.
$sel:httpStatus:CreateChannelBanResponse'
, createChannelBanResponse_httpStatus
- The response's http status code.
Response Lenses
createChannelBanResponse_channelArn :: Lens' CreateChannelBanResponse (Maybe Text) Source #
The ARN of the response to the ban request.
createChannelBanResponse_member :: Lens' CreateChannelBanResponse (Maybe Identity) Source #
The ChannelArn
and BannedIdentity
of the member in the ban response.
createChannelBanResponse_httpStatus :: Lens' CreateChannelBanResponse Int Source #
The response's http status code.