Skip to main content

room_memberships

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

Overview​

Nameroom_memberships
TypeResource
Idaws.chime.room_memberships

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
next_tokenstringThe token to use to retrieve the next page of results.
room_membershipsarrayThe room membership details.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_room_membershipsselectaccount_id, room_id, regionmax-results, next-tokenLists the membership details for the specified room in an Amazon Chime Enterprise account, such as the members' IDs, email addresses, and names.
create_room_membershipinsertaccount_id, room_id, region, MemberIdAdds a member to a chat room in an Amazon Chime Enterprise account. A member can be either a user or a bot. The member role designates whether the member is a chat room administrator or a general chat room member.
update_room_membershipupdateaccount_id, room_id, member_id, regionUpdates room membership details, such as the member role, for a room in an Amazon Chime Enterprise account. The member role designates whether the member is a chat room administrator or a general chat room member. The member role can be updated only for user IDs.
delete_room_membershipdeleteaccount_id, room_id, member_id, regionRemoves a member from a chat room in an Amazon Chime Enterprise account.

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
account_idstringThe Amazon Chime account ID.
member_idstringThe member ID (user ID or bot ID).
regionstringAWS region (default: us-east-1)
room_idstringThe room ID.
max-resultsintegerThe maximum number of results to return in a single call.
next-tokenstringThe token to use to retrieve the next page of results.

SELECT examples​

Lists the membership details for the specified room in an Amazon Chime Enterprise account, such as the members' IDs, email addresses, and names.

SELECT
next_token,
room_memberships
FROM aws.chime.room_memberships
WHERE account_id = '{{ account_id }}' -- required
AND room_id = '{{ room_id }}' -- required
AND region = '{{ region }}' -- required
AND `max-results` = '{{ max-results }}'
AND `next-token` = '{{ next-token }}'
;

INSERT examples​

Adds a member to a chat room in an Amazon Chime Enterprise account. A member can be either a user or a bot. The member role designates whether the member is a chat room administrator or a general chat room member.

INSERT INTO aws.chime.room_memberships (
MemberId,
Role,
account_id,
room_id,
region
)
SELECT
'{{ MemberId }}' /* required */,
'{{ Role }}',
'{{ account_id }}',
'{{ room_id }}',
'{{ region }}'
RETURNING
room_membership
;

UPDATE examples​

Updates room membership details, such as the member role, for a room in an Amazon Chime Enterprise account. The member role designates whether the member is a chat room administrator or a general chat room member. The member role can be updated only for user IDs.

UPDATE aws.chime.room_memberships
SET
Role = '{{ Role }}'
WHERE
account_id = '{{ account_id }}' --required
AND room_id = '{{ room_id }}' --required
AND member_id = '{{ member_id }}' --required
AND region = '{{ region }}' --required
RETURNING
room_membership;

DELETE examples​

Removes a member from a chat room in an Amazon Chime Enterprise account.

DELETE FROM aws.chime.room_memberships
WHERE account_id = '{{ account_id }}' --required
AND room_id = '{{ room_id }}' --required
AND member_id = '{{ member_id }}' --required
AND region = '{{ region }}' --required
;