Skip to main content

work_groups

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

Overview

Namework_groups
TypeResource
Idaws.athena.work_groups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
configurationobjectThe configuration of the workgroup, which includes the location in Amazon S3 where query and calculation results are stored, the encryption configuration, if any, used for query and calculation results; whether the Amazon CloudWatch Metrics are enabled for the workgroup; whether workgroup settings override client-side settings; and the data usage limits for the amount of data scanned per query or per workgroup. The workgroup settings override is specified in EnforceWorkGroupConfiguration (true/false) in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
creation_timestring (date-time)The date and time the workgroup was created.
descriptionstringThe workgroup description.
identity_center_application_arnstringThe ARN of the IAM Identity Center enabled application associated with the workgroup. (pattern: <code>^arn:(aws|aws-us-gov|aws-cn|aws-iso|aws-iso-b):sso::\d{12}:application/(sso)?ins-[a-zA-Z0-9-.]{16}/apl-[a-zA-Z0-9]{16}$</code>)
namestringThe workgroup name. (pattern: <code>[a-zA-Z0-9._-]{1,128}</code>)
statestringThe state of the workgroup: ENABLED or DISABLED. (ENABLED, DISABLED)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_work_groupselectregionReturns information about the workgroup with the specified name.
list_work_groupsselectregionLists available workgroups for the account.
create_work_groupinsertregion, NameCreates a workgroup with the specified name. A workgroup can be an Apache Spark enabled workgroup or an Athena SQL workgroup.
update_work_groupupdateregion, WorkGroupUpdates the workgroup with the specified name. The workgroup's name cannot be changed. Only ConfigurationUpdates can be specified.
delete_work_groupdeleteregionDeletes the workgroup with the specified name. The primary workgroup cannot be deleted.

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
regionstringAWS region (default: us-east-1)

SELECT examples

Returns information about the workgroup with the specified name.

SELECT
configuration,
creation_time,
description,
identity_center_application_arn,
name,
state
FROM aws.athena.work_groups
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a workgroup with the specified name. A workgroup can be an Apache Spark enabled workgroup or an Athena SQL workgroup.

INSERT INTO aws.athena.work_groups (
Name,
Configuration,
Description,
Tags,
region
)
SELECT
'{{ Name }}' /* required */,
'{{ Configuration }}',
'{{ Description }}',
'{{ Tags }}',
'{{ region }}'
;

UPDATE examples

Updates the workgroup with the specified name. The workgroup's name cannot be changed. Only ConfigurationUpdates can be specified.

UPDATE aws.athena.work_groups
SET
WorkGroup = '{{ WorkGroup }}',
Description = '{{ Description }}',
ConfigurationUpdates = '{{ ConfigurationUpdates }}',
State = '{{ State }}'
WHERE
region = '{{ region }}' --required
AND WorkGroup = '{{ WorkGroup }}' --required;

DELETE examples

Deletes the workgroup with the specified name. The primary workgroup cannot be deleted.

DELETE FROM aws.athena.work_groups
WHERE region = '{{ region }}' --required
;