Skip to main content

workgroups

Creates, updates, deletes or gets a workgroup resource or lists workgroups in a region

Overview

Nameworkgroups
TypeResource
DescriptionDefinition of AWS::RedshiftServerless::Workgroup Resource Type
Idaws.redshiftserverless.workgroups

Fields

NameDatatypeDescription
workgroup_namestringThe name of the workgroup.
namespace_namestringThe namespace the workgroup is associated with.
base_capacityintegerThe base compute capacity of the workgroup in Redshift Processing Units (RPUs).
max_capacityintegerThe max compute capacity of the workgroup in Redshift Processing Units (RPUs).
enhanced_vpc_routingbooleanThe value that specifies whether to enable enhanced virtual private cloud (VPC) routing, which forces Amazon Redshift Serverless to route traffic through your VPC.
config_parametersarrayA list of parameters to set for finer control over a database. Available options are datestyle, enable_user_activity_logging, query_group, search_path, max_query_execution_time, and require_ssl.
security_group_idsarrayA list of security group IDs to associate with the workgroup.
subnet_idsarrayA list of subnet IDs the workgroup is associated with.
publicly_accessiblebooleanA value that specifies whether the workgroup can be accessible from a public network.
portintegerThe custom port to use when connecting to a workgroup. Valid port ranges are 5431-5455 and 8191-8215. The default is 5439.
tagsarrayThe map of the key-value pairs used to tag the workgroup.
workgroupobjectDefinition for workgroup resource
regionstringAWS region.

Methods

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

SELECT examples

Gets all workgroups in a region.

SELECT
region,
workgroup_name,
namespace_name,
base_capacity,
max_capacity,
enhanced_vpc_routing,
config_parameters,
security_group_ids,
subnet_ids,
publicly_accessible,
port,
tags,
workgroup
FROM aws.redshiftserverless.workgroups
WHERE region = 'us-east-1';

Gets all properties from an individual workgroup.

SELECT
region,
workgroup_name,
namespace_name,
base_capacity,
max_capacity,
enhanced_vpc_routing,
config_parameters,
security_group_ids,
subnet_ids,
publicly_accessible,
port,
tags,
workgroup
FROM aws.redshiftserverless.workgroups
WHERE region = 'us-east-1' AND data__Identifier = '<WorkgroupName>';

INSERT example

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

/*+ create */
INSERT INTO aws.redshiftserverless.workgroups (
WorkgroupName,
region
)
SELECT
'{{ WorkgroupName }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.redshiftserverless.workgroups
WHERE data__Identifier = '<WorkgroupName>'
AND region = 'us-east-1';

Permissions

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

Create

ec2:DescribeVpcAttribute,
ec2:DescribeSecurityGroups,
ec2:DescribeAddresses,
ec2:DescribeInternetGateways,
ec2:DescribeSubnets,
ec2:DescribeAccountAttributes,
ec2:DescribeAvailabilityZones,
redshift-serverless:CreateNamespace,
redshift-serverless:CreateWorkgroup,
redshift-serverless:GetWorkgroup,
redshift-serverless:GetNamespace

Read

ec2:DescribeVpcAttribute,
ec2:DescribeSecurityGroups,
ec2:DescribeAddresses,
ec2:DescribeInternetGateways,
ec2:DescribeSubnets,
ec2:DescribeAccountAttributes,
ec2:DescribeAvailabilityZones,
redshift-serverless:GetWorkgroup

Update

ec2:DescribeVpcAttribute,
ec2:DescribeSecurityGroups,
ec2:DescribeAddresses,
ec2:DescribeInternetGateways,
ec2:DescribeSubnets,
ec2:DescribeAccountAttributes,
ec2:DescribeAvailabilityZones,
redshift-serverless:ListTagsForResource,
redshift-serverless:TagResource,
redshift-serverless:UntagResource,
redshift-serverless:GetWorkgroup,
redshift-serverless:UpdateWorkgroup

Delete

ec2:DescribeVpcAttribute,
ec2:DescribeSecurityGroups,
ec2:DescribeAddresses,
ec2:DescribeInternetGateways,
ec2:DescribeSubnets,
ec2:DescribeAccountAttributes,
ec2:DescribeAvailabilityZones,
redshift-serverless:GetWorkgroup,
redshift-serverless:GetNamespace,
redshift-serverless:DeleteWorkgroup

List

ec2:DescribeVpcAttribute,
ec2:DescribeSecurityGroups,
ec2:DescribeAddresses,
ec2:DescribeInternetGateways,
ec2:DescribeSubnets,
ec2:DescribeAccountAttributes,
ec2:DescribeAvailabilityZones,
redshift-serverless:ListWorkgroups