| 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.CreateChannelBan
Description
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' {
- channelArn :: Text
- memberArn :: Text
- chimeBearer :: Text
- newCreateChannelBan :: Text -> Text -> Text -> CreateChannelBan
- createChannelBan_channelArn :: Lens' CreateChannelBan Text
- createChannelBan_memberArn :: Lens' CreateChannelBan Text
- createChannelBan_chimeBearer :: 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.
Constructors
| CreateChannelBan' | |
Fields
| |
Instances
Arguments
| :: Text | |
| -> Text | |
| -> Text | |
| -> CreateChannelBan |
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:
CreateChannelBan, createChannelBan_channelArn - The ARN of the ban request.
CreateChannelBan, createChannelBan_memberArn - The AppInstanceUserArn of the member being banned.
$sel:chimeBearer:CreateChannelBan', createChannelBan_chimeBearer - The AppInstanceUserArn of the user that makes the API call.
Request Lenses
createChannelBan_channelArn :: Lens' CreateChannelBan Text Source #
The ARN of the ban request.
createChannelBan_memberArn :: Lens' CreateChannelBan Text Source #
The AppInstanceUserArn of the member being banned.
createChannelBan_chimeBearer :: Lens' CreateChannelBan Text Source #
The AppInstanceUserArn of the user that makes the API call.
Destructuring the Response
data CreateChannelBanResponse Source #
See: newCreateChannelBanResponse smart constructor.
Constructors
| CreateChannelBanResponse' | |
Fields
| |
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:
CreateChannelBan, createChannelBanResponse_channelArn - The ARN of the response to the ban request.
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.