Skip to main content

groups

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

Overview

Namegroups
TypeResource
Idaws.qbusiness.groups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
statusobjectThe current status of the group.
status_historyarrayThe status history of the group.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_groupselectapplication_id, index_id, group_name, regiondataSourceIdDescribes a group by group name.
list_groupsselectapplication_id, index_id, updatedEarlierThan, regiondataSourceId, nextToken, maxResultsProvides a list of groups that are mapped to users.
put_groupreplaceapplication_id, index_id, region, groupName, type, groupMembersCreate, or updates, a mapping of users—who have access to a document—to groups. You can also map sub groups to groups. For example, the group "Company Intellectual Property Teams" includes sub groups "Research" and "Engineering". These sub groups include their own list of users or people who work in these teams. Only users who work in research and engineering, and therefore belong in the intellectual property group, can see top-secret company documents in their Amazon Q Business chat results. There are two options for creating groups, either passing group members inline or using an S3 file via the S3PathForGroupMembers field. For inline groups, there is a limit of 1000 members per group and for provided S3 files there is a limit of 100 thousand members. When creating a group using an S3 file, you provide both an S3 file and a RoleArn for Amazon Q Buisness to access the file.
delete_groupdeleteapplication_id, index_id, group_name, regiondataSourceIdDeletes a group so that all users and sub groups that belong to the group can no longer access documents only available to that group. For example, after deleting the group "Summer Interns", all interns who belonged to that group no longer see intern-only documents in their chat results. If you want to delete, update, or replace users or sub groups of a group, you need to use the PutGroup operation. For example, if a user in the group "Engineering" leaves the engineering team and another user takes their place, you provide an updated list of users or sub groups that belong to the "Engineering" group when calling PutGroup.

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
application_idstringThe identifier of the application in which the group mapping belongs.
group_namestringThe name of the group you want to delete.
index_idstringThe identifier of the index you want to delete the group from.
regionstringAWS region (default: us-east-1)
updatedEarlierThanstring (date-time)The timestamp identifier used for the latest PUT or DELETE action for mapping users to their groups.
dataSourceIdstringThe identifier of the data source linked to the group A group can be tied to multiple data sources. You can delete a group from accessing documents in a certain data source. For example, the groups "Research", "Engineering", and "Sales and Marketing" are all tied to the company's documents stored in the data sources Confluence and Salesforce. You want to delete "Research" and "Engineering" groups from Salesforce, so that these groups cannot access customer-related documents stored in Salesforce. Only "Sales and Marketing" should access documents in the Salesforce data source.
maxResultsintegerThe maximum number of returned groups that are mapped to users.
nextTokenstringIf the previous response was incomplete (because there is more data to retrieve), Amazon Q Business returns a pagination token in the response. You can use this pagination token to retrieve the next set of groups that are mapped to users.

SELECT examples

Describes a group by group name.

SELECT
status,
status_history
FROM aws.qbusiness.groups
WHERE application_id = '{{ application_id }}' -- required
AND index_id = '{{ index_id }}' -- required
AND group_name = '{{ group_name }}' -- required
AND region = '{{ region }}' -- required
AND dataSourceId = '{{ dataSourceId }}'
;

REPLACE examples

Create, or updates, a mapping of users—who have access to a document—to groups. You can also map sub groups to groups. For example, the group "Company Intellectual Property Teams" includes sub groups "Research" and "Engineering". These sub groups include their own list of users or people who work in these teams. Only users who work in research and engineering, and therefore belong in the intellectual property group, can see top-secret company documents in their Amazon Q Business chat results. There are two options for creating groups, either passing group members inline or using an S3 file via the S3PathForGroupMembers field. For inline groups, there is a limit of 1000 members per group and for provided S3 files there is a limit of 100 thousand members. When creating a group using an S3 file, you provide both an S3 file and a RoleArn for Amazon Q Buisness to access the file.

REPLACE aws.qbusiness.groups
SET
groupName = '{{ groupName }}',
dataSourceId = '{{ dataSourceId }}',
type = '{{ type }}',
groupMembers = '{{ groupMembers }}',
roleArn = '{{ roleArn }}'
WHERE
application_id = '{{ application_id }}' --required
AND index_id = '{{ index_id }}' --required
AND region = '{{ region }}' --required
AND groupName = '{{ groupName }}' --required
AND type = '{{ type }}' --required
AND groupMembers = '{{ groupMembers }}' --required;

DELETE examples

Deletes a group so that all users and sub groups that belong to the group can no longer access documents only available to that group. For example, after deleting the group "Summer Interns", all interns who belonged to that group no longer see intern-only documents in their chat results. If you want to delete, update, or replace users or sub groups of a group, you need to use the PutGroup operation. For example, if a user in the group "Engineering" leaves the engineering team and another user takes their place, you provide an updated list of users or sub groups that belong to the "Engineering" group when calling PutGroup.

DELETE FROM aws.qbusiness.groups
WHERE application_id = '{{ application_id }}' --required
AND index_id = '{{ index_id }}' --required
AND group_name = '{{ group_name }}' --required
AND region = '{{ region }}' --required
AND dataSourceId = '{{ dataSourceId }}'
;