Skip to main content

work_groups

Creates, updates, deletes or gets a work_group resource or lists work_groups in a region

Overview

Namework_groups
TypeResource
DescriptionResource schema for AWS::Athena::WorkGroup
Idaws.athena.work_groups

Fields

NameDatatypeDescription
namestringThe workGroup name.
descriptionstringThe workgroup description.
tagsarrayOne or more tags, separated by commas, that you want to attach to the workgroup as you create it
work_group_configurationobjectThe workgroup configuration
work_group_configuration_updatesobjectThe workgroup configuration update object
creation_timestringThe date and time the workgroup was created.
statestringThe state of the workgroup: ENABLED or DISABLED.
recursive_delete_optionbooleanThe option to delete the workgroup and its contents even if the workgroup contains any named queries.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTName, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all work_groups in a region.

SELECT
region,
name,
description,
tags,
work_group_configuration,
work_group_configuration_updates,
creation_time,
state,
recursive_delete_option
FROM aws.athena.work_groups
WHERE region = 'us-east-1';

Gets all properties from an individual work_group.

SELECT
region,
name,
description,
tags,
work_group_configuration,
work_group_configuration_updates,
creation_time,
state,
recursive_delete_option
FROM aws.athena.work_groups
WHERE region = 'us-east-1' AND data__Identifier = '<Name>';

INSERT example

Use the following StackQL query and manifest file to create a new work_group resource, using stack-deploy.

/*+ create */
INSERT INTO aws.athena.work_groups (
Name,
region
)
SELECT
'{{ Name }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.athena.work_groups
WHERE data__Identifier = '<Name>'
AND region = 'us-east-1';

Permissions

To operate on the work_groups resource, the following permissions are required:

Create

athena:CreateWorkGroup,
athena:TagResource,
iam:PassRole,
s3:GetBucketLocation,
s3:GetObject,
s3:ListBucket,
s3:ListBucketMultipartUploads,
s3:AbortMultipartUpload,
s3:PutObject,
s3:ListMultipartUploadParts,
kms:Decrypt,
kms:GenerateDataKey

Read

athena:GetWorkGroup,
athena:ListTagsForResource

List

athena:ListWorkGroups

Delete

athena:DeleteWorkGroup,
athena:GetWorkGroup,
athena:UntagResource

Update

athena:UpdateWorkGroup,
athena:TagResource,
athena:UntagResource,
iam:PassRole,
s3:GetBucketLocation,
s3:GetObject,
s3:ListBucket,
s3:ListBucketMultipartUploads,
s3:AbortMultipartUpload,
s3:PutObject,
s3:ListMultipartUploadParts,
kms:Decrypt,
kms:GenerateDataKey