Athena / Client / list_work_groups

list_work_groups#

Athena.Client.list_work_groups(**kwargs)#

Lists available workgroups for the account.

See also: AWS API Documentation

Request Syntax

response = client.list_work_groups(
    NextToken='string',
    MaxResults=123
)
Parameters:
  • NextToken (string) – A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.

  • MaxResults (integer) – The maximum number of workgroups to return in this request.

Return type:

dict

Returns:

Response Syntax

{
    'WorkGroups': [
        {
            'Name': 'string',
            'State': 'ENABLED'|'DISABLED',
            'Description': 'string',
            'CreationTime': datetime(2015, 1, 1),
            'EngineVersion': {
                'SelectedEngineVersion': 'string',
                'EffectiveEngineVersion': 'string'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • WorkGroups (list) –

      A list of WorkGroupSummary objects that include the names, descriptions, creation times, and states for each workgroup.

      • (dict) –

        The summary information for the workgroup, which includes its name, state, description, and the date and time it was created.

        • Name (string) –

          The name of the workgroup.

        • State (string) –

          The state of the workgroup.

        • Description (string) –

          The workgroup description.

        • CreationTime (datetime) –

          The workgroup creation date and time.

        • EngineVersion (dict) –

          The engine version setting for all queries on the workgroup. Queries on the AmazonAthenaPreviewFunctionality workgroup run on the preview engine regardless of this setting.

          • SelectedEngineVersion (string) –

            The engine version requested by the user. Possible values are determined by the output of ListEngineVersions, including AUTO. The default is AUTO.

          • EffectiveEngineVersion (string) –

            Read only. The engine version on which the query runs. If the user requests a valid engine version other than Auto, the effective engine version is the same as the engine version that the user requested. If the user requests Auto, the effective engine version is chosen by Athena. When a request to update the engine version is made by a CreateWorkGroup or UpdateWorkGroup operation, the EffectiveEngineVersion field is ignored.

    • NextToken (string) –

      A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.

Exceptions

  • Athena.Client.exceptions.InternalServerException

  • Athena.Client.exceptions.InvalidRequestException