channels
Creates, updates, deletes, gets or lists a channels resource.
Overview
| Name | channels |
| Type | Resource |
| Id | aws.repostspace.channels |
Fields
The following fields are returned by SELECT queries:
- get_channel
- list_channels
| Name | Datatype | Description |
|---|---|---|
channel_description | string | A description for the channel. This is used only to help you identify this channel. |
channel_id | string | The unique ID of the private re:Post channel. |
channel_name | string | The name for the channel. This must be unique per private re:Post. |
channel_roles | object | The channel roles associated to the users and groups of the channel. |
channel_status | string | The status pf the channel. (CREATED, CREATING, CREATE_FAILED, DELETED, DELETING, DELETE_FAILED) |
create_date_time | string (date-time) | The date when the channel was created. |
delete_date_time | string (date-time) | The date when the channel was deleted. |
space_id | string | The unique ID of the private re:Post. |
| Name | Datatype | Description |
|---|---|---|
channel_description | string | A description for the channel. This is used only to help you identify this channel. |
channel_id | string | The unique ID of the private re:Post channel. |
channel_name | string | The name for the channel. This must be unique per private re:Post. |
channel_status | string | The status pf the channel. (CREATED, CREATING, CREATE_FAILED, DELETED, DELETING, DELETE_FAILED) |
create_date_time | string (date-time) | The date when the channel was created. |
delete_date_time | string (date-time) | The date when the channel was deleted. |
group_count | integer | The number of groups that are part of the channel. |
space_id | string | The unique ID of the private re:Post. |
user_count | integer | The number of users that are part of the channel. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_channel | select | space_id, channel_id, region | Displays information about a channel in a private re:Post. | |
list_channels | select | space_id, region | nextToken, maxResults | Returns the list of channel within a private re:Post with some information about each channel. |
create_channel | insert | space_id, region, channelName | Creates a channel in an AWS re:Post Private private re:Post. | |
update_channel | update | space_id, channel_id, region, channelName | Modifies an existing channel. | |
batch_add_channel_role_to_accessors | exec | space_id, channel_id, region, accessorIds, channelRole | Add role to multiple users or groups in a private re:Post channel. | |
batch_remove_channel_role_from_accessors | exec | space_id, channel_id, region, accessorIds, channelRole | Remove a role from multiple users or groups in a private re:Post channel. |
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_id | string | The unique ID of the private re:Post channel. |
region | string | AWS region (default: us-east-1) |
space_id | string | The unique ID of the private re:Post. |
maxResults | integer | The maximum number of channels to include in the results. |
nextToken | string | The token for the next set of channel to return. You receive this token from a previous ListChannels operation. |
SELECT examples
- get_channel
- list_channels
Displays information about a channel in a private re:Post.
SELECT
channel_description,
channel_id,
channel_name,
channel_roles,
channel_status,
create_date_time,
delete_date_time,
space_id
FROM aws.repostspace.channels
WHERE space_id = '{{ space_id }}' -- required
AND channel_id = '{{ channel_id }}' -- required
AND region = '{{ region }}' -- required
;
Returns the list of channel within a private re:Post with some information about each channel.
SELECT
channel_description,
channel_id,
channel_name,
channel_status,
create_date_time,
delete_date_time,
group_count,
space_id,
user_count
FROM aws.repostspace.channels
WHERE space_id = '{{ space_id }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_channel
- Manifest
Creates a channel in an AWS re:Post Private private re:Post.
INSERT INTO aws.repostspace.channels (
channelName,
channelDescription,
space_id,
region
)
SELECT
'{{ channelName }}' /* required */,
'{{ channelDescription }}',
'{{ space_id }}',
'{{ region }}'
RETURNING
channel_id
;
# Description fields are for documentation purposes
- name: channels
props:
- name: space_id
value: "{{ space_id }}"
description: Required parameter for the channels resource.
- name: region
value: "{{ region }}"
description: Required parameter for the channels resource.
- name: channelName
value: "{{ channelName }}"
- name: channelDescription
value: "{{ channelDescription }}"
UPDATE examples
- update_channel
Modifies an existing channel.
UPDATE aws.repostspace.channels
SET
channelName = '{{ channelName }}',
channelDescription = '{{ channelDescription }}'
WHERE
space_id = '{{ space_id }}' --required
AND channel_id = '{{ channel_id }}' --required
AND region = '{{ region }}' --required
AND channelName = '{{ channelName }}' --required;
Lifecycle Methods
- batch_add_channel_role_to_accessors
- batch_remove_channel_role_from_accessors
Add role to multiple users or groups in a private re:Post channel.
EXEC aws.repostspace.channels.batch_add_channel_role_to_accessors
@space_id='{{ space_id }}' --required,
@channel_id='{{ channel_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"accessorIds": "{{ accessorIds }}",
"channelRole": "{{ channelRole }}"
}'
;
Remove a role from multiple users or groups in a private re:Post channel.
EXEC aws.repostspace.channels.batch_remove_channel_role_from_accessors
@space_id='{{ space_id }}' --required,
@channel_id='{{ channel_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"accessorIds": "{{ accessorIds }}",
"channelRole": "{{ channelRole }}"
}'
;