groups
Creates, updates, deletes, gets or lists a groups resource.
Overview
| Name | groups |
| Type | Resource |
| Id | aws.qbusiness.groups |
Fields
The following fields are returned by SELECT queries:
- get_group
- list_groups
| Name | Datatype | Description |
|---|---|---|
status | object | The current status of the group. |
status_history | array | The status history of the group. |
| Name | Datatype | Description |
|---|---|---|
group_name | string | The name of the group the summary information is for. (pattern: <code>\P{C}*</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_group | select | application_id, index_id, group_name, region | dataSourceId | Describes a group by group name. |
list_groups | select | application_id, index_id, updatedEarlierThan, region | dataSourceId, nextToken, maxResults | Provides a list of groups that are mapped to users. |
put_group | replace | application_id, index_id, region, groupName, type, groupMembers | 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. | |
delete_group | delete | application_id, index_id, group_name, region | dataSourceId | 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. |
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 |
|---|---|---|
application_id | string | The identifier of the application in which the group mapping belongs. |
group_name | string | The name of the group you want to delete. |
index_id | string | The identifier of the index you want to delete the group from. |
region | string | AWS region (default: us-east-1) |
updatedEarlierThan | string (date-time) | The timestamp identifier used for the latest PUT or DELETE action for mapping users to their groups. |
dataSourceId | string | The 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. |
maxResults | integer | The maximum number of returned groups that are mapped to users. |
nextToken | string | If 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
- get_group
- list_groups
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 }}'
;
Provides a list of groups that are mapped to users.
SELECT
group_name
FROM aws.qbusiness.groups
WHERE application_id = '{{ application_id }}' -- required
AND index_id = '{{ index_id }}' -- required
AND updatedEarlierThan = '{{ updatedEarlierThan }}' -- required
AND region = '{{ region }}' -- required
AND dataSourceId = '{{ dataSourceId }}'
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
REPLACE examples
- put_group
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
- delete_group
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 }}'
;