Skip to main content

channel_moderators

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

Overview

Namechannel_moderators
TypeResource
Idaws.chime_sdk_messaging.channel_moderators

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
channel_arnstringThe ARN of the moderator's 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>)
created_byobjectThe details of a user or bot.
created_timestampstring (date-time)The time at which the moderator was created.
moderatorobjectThe details of a user or bot.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_channel_moderatorselectchannel_arn, channel_moderator_arn, x-amz-chime-bearer, regionReturns the full details of a single ChannelModerator. 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.
list_channel_moderatorsselectchannel_arn, x-amz-chime-bearer, regionmax-results, next-tokenLists all the moderators for a channel. 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.
create_channel_moderatorinsertchannel_arn, x-amz-chime-bearer, region, ChannelModeratorArnCreates a new ChannelModerator. A channel moderator can: Add and remove other members of the channel. Add and remove other moderators of the channel. Add and remove user bans for the channel. Redact messages in the channel. List messages in the channel. The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBotof the user that makes the API call as the value in the header.
delete_channel_moderatordeletechannel_arn, channel_moderator_arn, x-amz-chime-bearer, regionDeletes a channel moderator. 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.

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.
channel_moderator_arnstringThe AppInstanceUserArn of the moderator being deleted.
regionstringAWS region (default: us-east-1)
x-amz-chime-bearerstringThe ARN of the AppInstanceUser or AppInstanceBot that makes the API call.
max-resultsintegerThe maximum number of moderators that you want returned.
next-tokenstringThe token passed by previous API calls until all requested moderators are returned.

SELECT examples

Returns the full details of a single ChannelModerator. 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.

SELECT
channel_arn,
created_by,
created_timestamp,
moderator
FROM aws.chime_sdk_messaging.channel_moderators
WHERE channel_arn = '{{ channel_arn }}' -- required
AND channel_moderator_arn = '{{ channel_moderator_arn }}' -- required
AND `x-amz-chime-bearer` = '{{ x-amz-chime-bearer }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a new ChannelModerator. A channel moderator can: Add and remove other members of the channel. Add and remove other moderators of the channel. Add and remove user bans for the channel. Redact messages in the channel. List messages in the channel. The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBotof the user that makes the API call as the value in the header.

INSERT INTO aws.chime_sdk_messaging.channel_moderators (
ChannelModeratorArn,
channel_arn,
`x-amz-chime-bearer`,
region
)
SELECT
'{{ ChannelModeratorArn }}' /* required */,
'{{ channel_arn }}',
'{{ x-amz-chime-bearer }}',
'{{ region }}'
RETURNING
channel_arn,
channel_moderator
;

DELETE examples

Deletes a channel moderator. 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.

DELETE FROM aws.chime_sdk_messaging.channel_moderators
WHERE channel_arn = '{{ channel_arn }}' --required
AND channel_moderator_arn = '{{ channel_moderator_arn }}' --required
AND `x-amz-chime-bearer` = '{{ x-amz-chime-bearer }}' --required
AND region = '{{ region }}' --required
;