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 |
Creates a channel to which you can add users and send messages.
Restriction: You can't change a channel's privacy.
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 CreateChannel = CreateChannel' {
- mode :: Maybe ChannelMode
- privacy :: Maybe ChannelPrivacy
- chimeBearer :: Maybe Text
- metadata :: Maybe (Sensitive Text)
- tags :: Maybe (NonEmpty Tag)
- appInstanceArn :: Text
- name :: Sensitive Text
- clientRequestToken :: Sensitive Text
- newCreateChannel :: Text -> Text -> Text -> CreateChannel
- createChannel_mode :: Lens' CreateChannel (Maybe ChannelMode)
- createChannel_privacy :: Lens' CreateChannel (Maybe ChannelPrivacy)
- createChannel_chimeBearer :: Lens' CreateChannel (Maybe Text)
- createChannel_metadata :: Lens' CreateChannel (Maybe Text)
- createChannel_tags :: Lens' CreateChannel (Maybe (NonEmpty Tag))
- createChannel_appInstanceArn :: Lens' CreateChannel Text
- createChannel_name :: Lens' CreateChannel Text
- createChannel_clientRequestToken :: Lens' CreateChannel Text
- data CreateChannelResponse = CreateChannelResponse' {
- channelArn :: Maybe Text
- httpStatus :: Int
- newCreateChannelResponse :: Int -> CreateChannelResponse
- createChannelResponse_channelArn :: Lens' CreateChannelResponse (Maybe Text)
- createChannelResponse_httpStatus :: Lens' CreateChannelResponse Int
Creating a Request
data CreateChannel Source #
See: newCreateChannel
smart constructor.
CreateChannel' | |
|
Instances
:: Text | |
-> Text | |
-> Text | |
-> CreateChannel |
Create a value of CreateChannel
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:mode:CreateChannel'
, createChannel_mode
- The channel mode: UNRESTRICTED
or RESTRICTED
. Administrators,
moderators, and channel members can add themselves and other members to
unrestricted channels. Only administrators and moderators can add
members to restricted channels.
$sel:privacy:CreateChannel'
, createChannel_privacy
- The channel's privacy level: PUBLIC
or PRIVATE
. Private channels
aren't discoverable by users outside the channel. Public channels are
discoverable by anyone in the AppInstance
.
$sel:chimeBearer:CreateChannel'
, createChannel_chimeBearer
- The AppInstanceUserArn
of the user that makes the API call.
$sel:metadata:CreateChannel'
, createChannel_metadata
- The metadata of the creation request. Limited to 1KB and UTF-8.
$sel:tags:CreateChannel'
, createChannel_tags
- The tags for the creation request.
$sel:appInstanceArn:CreateChannel'
, createChannel_appInstanceArn
- The ARN of the channel request.
$sel:name:CreateChannel'
, createChannel_name
- The name of the channel.
$sel:clientRequestToken:CreateChannel'
, createChannel_clientRequestToken
- The client token for the request. An Idempotency
token.
Request Lenses
createChannel_mode :: Lens' CreateChannel (Maybe ChannelMode) Source #
The channel mode: UNRESTRICTED
or RESTRICTED
. Administrators,
moderators, and channel members can add themselves and other members to
unrestricted channels. Only administrators and moderators can add
members to restricted channels.
createChannel_privacy :: Lens' CreateChannel (Maybe ChannelPrivacy) Source #
The channel's privacy level: PUBLIC
or PRIVATE
. Private channels
aren't discoverable by users outside the channel. Public channels are
discoverable by anyone in the AppInstance
.
createChannel_chimeBearer :: Lens' CreateChannel (Maybe Text) Source #
The AppInstanceUserArn
of the user that makes the API call.
createChannel_metadata :: Lens' CreateChannel (Maybe Text) Source #
The metadata of the creation request. Limited to 1KB and UTF-8.
createChannel_tags :: Lens' CreateChannel (Maybe (NonEmpty Tag)) Source #
The tags for the creation request.
createChannel_appInstanceArn :: Lens' CreateChannel Text Source #
The ARN of the channel request.
createChannel_name :: Lens' CreateChannel Text Source #
The name of the channel.
createChannel_clientRequestToken :: Lens' CreateChannel Text Source #
The client token for the request. An Idempotency
token.
Destructuring the Response
data CreateChannelResponse Source #
See: newCreateChannelResponse
smart constructor.
CreateChannelResponse' | |
|
Instances
newCreateChannelResponse Source #
Create a value of CreateChannelResponse
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:CreateChannelResponse'
, createChannelResponse_channelArn
- The ARN of the channel.
$sel:httpStatus:CreateChannelResponse'
, createChannelResponse_httpStatus
- The response's http status code.
Response Lenses
createChannelResponse_channelArn :: Lens' CreateChannelResponse (Maybe Text) Source #
The ARN of the channel.
createChannelResponse_httpStatus :: Lens' CreateChannelResponse Int Source #
The response's http status code.