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',
    indexId='string',
    groupName='string',
    dataSourceId='string',
    type='INDEX'|'DATASOURCE',
    groupMembers={
        'memberGroups': [
            {
                'groupName': 'string',
                'type': 'INDEX'|'DATASOURCE'
            },
        ],
        'memberUsers': [
            {
                'userId': 'string',
                'type': 'INDEX'|'DATASOURCE'
            },
        ],
        's3PathForGroupMembers': {
            'bucket': 'string',
            'key': 'string'
        }
    },
    roleArn='string'
)
Parameters:
  • applicationId (string) –

    [REQUIRED]

    The identifier of the application in which the user and group mapping belongs.

  • indexId (string) –

    [REQUIRED]

    The identifier of the index in which you want to map users to their groups.

  • 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”.

  • 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.

  • type (string) –

    [REQUIRED]

    The type of the group.

  • 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.

        • userId (string) – [REQUIRED]

          The identifier of the user you want to map to a group.

        • type (string) –

          The type of the user.

    • s3PathForGroupMembers (dict) –

      Information required for Amazon Q Business to find a specific file in an Amazon S3 bucket.

      • bucket (string) – [REQUIRED]

        The name of the S3 bucket that contains the file.

      • key (string) – [REQUIRED]

        The name of the file.

  • roleArn (string) – The Amazon Resource Name (ARN) of an IAM role that has access to the S3 file that contains your list of users that belong to a group.The Amazon Resource Name (ARN) of an IAM role that has access to the S3 file that contains your list of users that belong to a group.

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

Exceptions