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

For more information, see AWS::Athena::WorkGroup.

Methods

NameResourceAccessible byRequired Params
create_resourcework_groupsINSERTName, region
delete_resourcework_groupsDELETEIdentifier, region
update_resourcework_groupsUPDATEIdentifier, PatchDocument, region
list_resourceswork_groups_list_onlySELECTregion
get_resourcework_groupsSELECTIdentifier, region

SELECT examples

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 awscc.athena.work_groups
WHERE
region = 'us-east-1' AND
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 awscc.athena.work_groups (
Name,
region
)
SELECT
'{{ name }}',
'{{ region }}';

UPDATE example

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

/*+ update */
UPDATE awscc.athena.work_groups
SET PatchDocument = string('{{ {
"Description": description,
"Tags": tags,
"State": state,
"RecursiveDeleteOption": recursive_delete_option
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ name }}';

DELETE example

/*+ delete */
DELETE FROM awscc.athena.work_groups
WHERE
Identifier = '{{ name }}' AND
region = 'us-east-1';

Permissions

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

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