libZSservicesZSamazonka-chimeZSamazonka-chime
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.Chime.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

  • chimeBearer :: Maybe Text

    The AppInstanceUserArn of the user that makes the API call.

  • 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.

Instances

Instances details
Eq CreateChannelMembership Source # 
Instance details

Defined in Amazonka.Chime.CreateChannelMembership

Read CreateChannelMembership Source # 
Instance details

Defined in Amazonka.Chime.CreateChannelMembership

Show CreateChannelMembership Source # 
Instance details

Defined in Amazonka.Chime.CreateChannelMembership

Generic CreateChannelMembership Source # 
Instance details

Defined in Amazonka.Chime.CreateChannelMembership

Associated Types

type Rep CreateChannelMembership :: Type -> Type #

NFData CreateChannelMembership Source # 
Instance details

Defined in Amazonka.Chime.CreateChannelMembership

Methods

rnf :: CreateChannelMembership -> () #

Hashable CreateChannelMembership Source # 
Instance details

Defined in Amazonka.Chime.CreateChannelMembership

ToJSON CreateChannelMembership Source # 
Instance details

Defined in Amazonka.Chime.CreateChannelMembership

AWSRequest CreateChannelMembership Source # 
Instance details

Defined in Amazonka.Chime.CreateChannelMembership

ToHeaders CreateChannelMembership Source # 
Instance details

Defined in Amazonka.Chime.CreateChannelMembership

ToPath CreateChannelMembership Source # 
Instance details

Defined in Amazonka.Chime.CreateChannelMembership

ToQuery CreateChannelMembership Source # 
Instance details

Defined in Amazonka.Chime.CreateChannelMembership

type Rep CreateChannelMembership Source # 
Instance details

Defined in Amazonka.Chime.CreateChannelMembership

type Rep CreateChannelMembership = D1 ('MetaData "CreateChannelMembership" "Amazonka.Chime.CreateChannelMembership" "libZSservicesZSamazonka-chimeZSamazonka-chime" 'False) (C1 ('MetaCons "CreateChannelMembership'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "chimeBearer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: 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))))
type AWSResponse CreateChannelMembership Source # 
Instance details

Defined in Amazonka.Chime.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:chimeBearer:CreateChannelMembership', createChannelMembership_chimeBearer - The AppInstanceUserArn of the user that makes the API call.

$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.

Request Lenses

createChannelMembership_chimeBearer :: Lens' CreateChannelMembership (Maybe Text) Source #

The AppInstanceUserArn of the user that makes the API call.

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.

Destructuring the Response

data CreateChannelMembershipResponse Source #

See: newCreateChannelMembershipResponse smart constructor.

Constructors

CreateChannelMembershipResponse' 

Fields

Instances

Instances details
Eq CreateChannelMembershipResponse Source # 
Instance details

Defined in Amazonka.Chime.CreateChannelMembership

Show CreateChannelMembershipResponse Source # 
Instance details

Defined in Amazonka.Chime.CreateChannelMembership

Generic CreateChannelMembershipResponse Source # 
Instance details

Defined in Amazonka.Chime.CreateChannelMembership

Associated Types

type Rep CreateChannelMembershipResponse :: Type -> Type #

NFData CreateChannelMembershipResponse Source # 
Instance details

Defined in Amazonka.Chime.CreateChannelMembership

type Rep CreateChannelMembershipResponse Source # 
Instance details

Defined in Amazonka.Chime.CreateChannelMembership

type Rep CreateChannelMembershipResponse = D1 ('MetaData "CreateChannelMembershipResponse" "Amazonka.Chime.CreateChannelMembership" "libZSservicesZSamazonka-chimeZSamazonka-chime" '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