libZSservicesZSamazonka-chime-sdk-messagingZSamazonka-chime-sdk-messaging
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.ChimeSDKMessaging.CreateChannelMembership

Description

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

Creating a Request

data CreateChannelMembership Source #

See: newCreateChannelMembership smart constructor.

Constructors

CreateChannelMembership' 

Fields

  • channelArn :: Text

    The ARN of the channel to which you're adding users.

  • memberArn :: Text

    The ARN of the member you want to add to the channel.

  • type' :: ChannelMembershipType

    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.

  • chimeBearer :: Text

    The AppInstanceUserArn of the user that makes the API call.

Instances

Instances details
Eq CreateChannelMembership Source # 
Instance details

Defined in Amazonka.ChimeSDKMessaging.CreateChannelMembership

Read CreateChannelMembership Source # 
Instance details

Defined in Amazonka.ChimeSDKMessaging.CreateChannelMembership

Show CreateChannelMembership Source # 
Instance details

Defined in Amazonka.ChimeSDKMessaging.CreateChannelMembership

Generic CreateChannelMembership Source # 
Instance details

Defined in Amazonka.ChimeSDKMessaging.CreateChannelMembership

Associated Types

type Rep CreateChannelMembership :: Type -> Type #

NFData CreateChannelMembership Source # 
Instance details

Defined in Amazonka.ChimeSDKMessaging.CreateChannelMembership

Methods

rnf :: CreateChannelMembership -> () #

Hashable CreateChannelMembership Source # 
Instance details

Defined in Amazonka.ChimeSDKMessaging.CreateChannelMembership

ToJSON CreateChannelMembership Source # 
Instance details

Defined in Amazonka.ChimeSDKMessaging.CreateChannelMembership

AWSRequest CreateChannelMembership Source # 
Instance details

Defined in Amazonka.ChimeSDKMessaging.CreateChannelMembership

ToHeaders CreateChannelMembership Source # 
Instance details

Defined in Amazonka.ChimeSDKMessaging.CreateChannelMembership

ToPath CreateChannelMembership Source # 
Instance details

Defined in Amazonka.ChimeSDKMessaging.CreateChannelMembership

ToQuery CreateChannelMembership Source # 
Instance details

Defined in Amazonka.ChimeSDKMessaging.CreateChannelMembership

type Rep CreateChannelMembership Source # 
Instance details

Defined in Amazonka.ChimeSDKMessaging.CreateChannelMembership

type Rep CreateChannelMembership = D1 ('MetaData "CreateChannelMembership" "Amazonka.ChimeSDKMessaging.CreateChannelMembership" "libZSservicesZSamazonka-chime-sdk-messagingZSamazonka-chime-sdk-messaging" 'False) (C1 ('MetaCons "CreateChannelMembership'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "channelArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "memberArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "type'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ChannelMembershipType) :*: S1 ('MetaSel ('Just "chimeBearer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))
type AWSResponse CreateChannelMembership Source # 
Instance details

Defined in Amazonka.ChimeSDKMessaging.CreateChannelMembership

newCreateChannelMembership Source #

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.

Constructors

CreateChannelMembershipResponse' 

Fields

Instances

Instances details
Eq CreateChannelMembershipResponse Source # 
Instance details

Defined in Amazonka.ChimeSDKMessaging.CreateChannelMembership

Show CreateChannelMembershipResponse Source # 
Instance details

Defined in Amazonka.ChimeSDKMessaging.CreateChannelMembership

Generic CreateChannelMembershipResponse Source # 
Instance details

Defined in Amazonka.ChimeSDKMessaging.CreateChannelMembership

Associated Types

type Rep CreateChannelMembershipResponse :: Type -> Type #

NFData CreateChannelMembershipResponse Source # 
Instance details

Defined in Amazonka.ChimeSDKMessaging.CreateChannelMembership

type Rep CreateChannelMembershipResponse Source # 
Instance details

Defined in Amazonka.ChimeSDKMessaging.CreateChannelMembership

type Rep CreateChannelMembershipResponse = D1 ('MetaData "CreateChannelMembershipResponse" "Amazonka.ChimeSDKMessaging.CreateChannelMembership" "libZSservicesZSamazonka-chime-sdk-messagingZSamazonka-chime-sdk-messaging" 'False) (C1 ('MetaCons "CreateChannelMembershipResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "channelArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "member") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Identity)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

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