channel_moderators
Creates, updates, deletes, gets or lists a channel_moderators resource.
Overview
| Name | channel_moderators |
| Type | Resource |
| Id | aws.chime_sdk_messaging.channel_moderators |
Fields
The following fields are returned by SELECT queries:
- describe_channel_moderator
- list_channel_moderators
| Name | Datatype | Description |
|---|---|---|
channel_arn | string | The 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_by | object | The details of a user or bot. |
created_timestamp | string (date-time) | The time at which the moderator was created. |
moderator | object | The details of a user or bot. |
| Name | Datatype | Description |
|---|---|---|
channel_arn | string | The 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>) |
channel_moderators | array | The information about and names of each moderator. |
next_token | string | The token passed by previous API calls until all requested moderators are returned. (pattern: <code>.*</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_channel_moderator | select | channel_arn, channel_moderator_arn, x-amz-chime-bearer, region | 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. | |
list_channel_moderators | select | channel_arn, x-amz-chime-bearer, region | max-results, next-token | Lists 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_moderator | insert | channel_arn, x-amz-chime-bearer, region, ChannelModeratorArn | 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. | |
delete_channel_moderator | delete | channel_arn, channel_moderator_arn, x-amz-chime-bearer, region | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
channel_arn | string | The ARN of the channel. |
channel_moderator_arn | string | The AppInstanceUserArn of the moderator being deleted. |
region | string | AWS region (default: us-east-1) |
x-amz-chime-bearer | string | The ARN of the AppInstanceUser or AppInstanceBot that makes the API call. |
max-results | integer | The maximum number of moderators that you want returned. |
next-token | string | The token passed by previous API calls until all requested moderators are returned. |
SELECT examples
- describe_channel_moderator
- list_channel_moderators
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
;
Lists 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.
SELECT
channel_arn,
channel_moderators,
next_token
FROM aws.chime_sdk_messaging.channel_moderators
WHERE channel_arn = '{{ channel_arn }}' -- required
AND `x-amz-chime-bearer` = '{{ x-amz-chime-bearer }}' -- required
AND region = '{{ region }}' -- required
AND `max-results` = '{{ max-results }}'
AND `next-token` = '{{ next-token }}'
;
INSERT examples
- create_channel_moderator
- Manifest
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
;
# Description fields are for documentation purposes
- name: channel_moderators
props:
- name: channel_arn
value: "{{ channel_arn }}"
description: Required parameter for the channel_moderators resource.
- name: x-amz-chime-bearer
value: "{{ x-amz-chime-bearer }}"
description: Required parameter for the channel_moderators resource.
- name: region
value: "{{ region }}"
description: Required parameter for the channel_moderators resource.
- name: ChannelModeratorArn
value: "{{ ChannelModeratorArn }}"
DELETE examples
- delete_channel_moderator
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
;