Skip to main content

channel_membership_preferences

Creates, updates, deletes, gets or lists a channel_membership_preferences resource.

Overview

Namechannel_membership_preferences
TypeResource
Idaws.chime_sdk_messaging.channel_membership_preferences

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
channel_arnstringThe ARN of the channel. (pattern: <code>arn:[a-z0-9-.]{1,63}:[a-z0-9-.]{0,63}:[a-z0-9-.]{0,63}:[a-z0-9-.]{0,63}:[^/].{0,1023}</code>)
memberobjectThe details of a user or bot.
preferencesobjectThe channel membership preferences for an AppInstanceUser .

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_channel_membership_preferencesselectchannel_arn, member_arn, x-amz-chime-bearer, regionGets the membership preferences of an AppInstanceUser or AppInstanceBot for the specified channel. A user or a bot must be a member of the channel and own the membership in order to retrieve membership preferences. Users or bots in the AppInstanceAdmin and channel moderator roles can't retrieve preferences for other users or bots. Banned users or bots can't retrieve membership preferences for the channel from which they are banned. The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.
put_channel_membership_preferencesreplacechannel_arn, member_arn, x-amz-chime-bearer, regionSets the membership preferences of an AppInstanceUser or AppInstanceBot for the specified channel. The user or bot must be a member of the channel. Only the user or bot who owns the membership can set preferences. Users or bots in the AppInstanceAdmin and channel moderator roles can't set preferences for other users. Banned users or bots can't set membership preferences for the channel from which they are banned. The x-amz-chime-bearer request header is mandatory. Use the ARN of an AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
channel_arnstringThe ARN of the channel.
member_arnstringThe ARN of the member setting the preferences.
regionstringAWS region (default: us-east-1)
x-amz-chime-bearerstringThe ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

SELECT examples

Gets the membership preferences of an AppInstanceUser or AppInstanceBot for the specified channel. A user or a bot must be a member of the channel and own the membership in order to retrieve membership preferences. Users or bots in the AppInstanceAdmin and channel moderator roles can't retrieve preferences for other users or bots. Banned users or bots can't retrieve membership preferences for the channel from which they are banned. The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

SELECT
channel_arn,
member,
preferences
FROM aws.chime_sdk_messaging.channel_membership_preferences
WHERE channel_arn = '{{ channel_arn }}' -- required
AND member_arn = '{{ member_arn }}' -- required
AND `x-amz-chime-bearer` = '{{ x-amz-chime-bearer }}' -- required
AND region = '{{ region }}' -- required
;

REPLACE examples

Sets the membership preferences of an AppInstanceUser or AppInstanceBot for the specified channel. The user or bot must be a member of the channel. Only the user or bot who owns the membership can set preferences. Users or bots in the AppInstanceAdmin and channel moderator roles can't set preferences for other users. Banned users or bots can't set membership preferences for the channel from which they are banned. The x-amz-chime-bearer request header is mandatory. Use the ARN of an AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

REPLACE aws.chime_sdk_messaging.channel_membership_preferences
SET
Preferences = '{{ Preferences }}'
WHERE
channel_arn = '{{ channel_arn }}' --required
AND member_arn = '{{ member_arn }}' --required
AND `x-amz-chime-bearer` = '{{ x-amz-chime-bearer }}' --required
AND region = '{{ region }}' --required
RETURNING
channel_arn,
member,
preferences;