QBusiness / Client / put_group
put_group#
- QBusiness.Client.put_group(**kwargs)#
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.
See also: AWS API Documentation
Request Syntax
response = client.put_group( applicationId='string', dataSourceId='string', groupMembers={ 'memberGroups': [ { 'groupName': 'string', 'type': 'INDEX'|'DATASOURCE' }, ], 'memberUsers': [ { 'type': 'INDEX'|'DATASOURCE', 'userId': 'string' }, ] }, groupName='string', indexId='string', type='INDEX'|'DATASOURCE' )
- Parameters:
applicationId (string) –
[REQUIRED]
The identifier of the application in which the user and group mapping belongs.
dataSourceId (string) – The identifier of the data source for which you want to map users to their groups. This is useful if a group is tied to multiple data sources, but you only want the group to access documents of 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. However, “Sales and Marketing” team only needs access to customer-related documents stored in Salesforce.
groupMembers (dict) –
[REQUIRED]
A list of users or sub groups that belong to a group. This is for generating Amazon Q Business chat results only from document a user has access to.
memberGroups (list) –
A list of sub groups that belong to a group. For example, the sub groups “Research”, “Engineering”, and “Sales and Marketing” all belong to the group “Company”.
(dict) –
The sub groups that belong to a group.
groupName (string) – [REQUIRED]
The name of the sub group.
type (string) –
The type of the sub group.
memberUsers (list) –
A list of users that belong to a group. For example, a list of interns all belong to the “Interns” group.
(dict) –
The users that belong to a group.
type (string) –
The type of the user.
userId (string) – [REQUIRED]
The identifier of the user you want to map to a group.
groupName (string) –
[REQUIRED]
The list that contains your users or sub groups that belong the same group. For example, the group “Company” includes the user “CEO” and the sub groups “Research”, “Engineering”, and “Sales and Marketing”.
If you have more than 1000 users and/or sub groups for a single group, you need to provide the path to the S3 file that lists your users and sub groups for a group. Your sub groups can contain more than 1000 users, but the list of sub groups that belong to a group (and/or users) must be no more than 1000.
indexId (string) –
[REQUIRED]
The identifier of the index in which you want to map users to their groups.
type (string) –
[REQUIRED]
The type of the group.
- Return type:
dict
- Returns:
Response Syntax
{}
Response Structure
(dict) –
Exceptions
QBusiness.Client.exceptions.ResourceNotFoundException
QBusiness.Client.exceptions.InternalServerException
QBusiness.Client.exceptions.ConflictException
QBusiness.Client.exceptions.ThrottlingException
QBusiness.Client.exceptions.ValidationException
QBusiness.Client.exceptions.AccessDeniedException
QBusiness.Client.exceptions.ServiceQuotaExceededException