workgroups
Creates, updates, deletes or gets a workgroup
resource or lists workgroups
in a region
Overview
Name | workgroups |
Type | Resource |
Description | Definition of AWS::RedshiftServerless::Workgroup Resource Type |
Id | aws.redshiftserverless.workgroups |
Fields
Name | Datatype | Description |
---|---|---|
workgroup_name | string | The name of the workgroup. |
namespace_name | string | The namespace the workgroup is associated with. |
base_capacity | integer | The base compute capacity of the workgroup in Redshift Processing Units (RPUs). |
max_capacity | integer | The max compute capacity of the workgroup in Redshift Processing Units (RPUs). |
enhanced_vpc_routing | boolean | The value that specifies whether to enable enhanced virtual private cloud (VPC) routing, which forces Amazon Redshift Serverless to route traffic through your VPC. |
config_parameters | array | A 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_ids | array | A list of security group IDs to associate with the workgroup. |
subnet_ids | array | A list of subnet IDs the workgroup is associated with. |
publicly_accessible | boolean | A value that specifies whether the workgroup can be accessible from a public network. |
port | integer | The custom port to use when connecting to a workgroup. Valid port ranges are 5431-5455 and 8191-8215. The default is 5439. |
tags | array | The map of the key-value pairs used to tag the workgroup. |
workgroup | object | Definition for workgroup resource |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | WorkgroupName, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.redshiftserverless.workgroups (
WorkgroupName,
region
)
SELECT
'{{ WorkgroupName }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.redshiftserverless.workgroups (
WorkgroupName,
NamespaceName,
BaseCapacity,
MaxCapacity,
EnhancedVpcRouting,
ConfigParameters,
SecurityGroupIds,
SubnetIds,
PubliclyAccessible,
Port,
Tags,
region
)
SELECT
'{{ WorkgroupName }}',
'{{ NamespaceName }}',
'{{ BaseCapacity }}',
'{{ MaxCapacity }}',
'{{ EnhancedVpcRouting }}',
'{{ ConfigParameters }}',
'{{ SecurityGroupIds }}',
'{{ SubnetIds }}',
'{{ PubliclyAccessible }}',
'{{ Port }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: workgroup
props:
- name: WorkgroupName
value: '{{ WorkgroupName }}'
- name: NamespaceName
value: '{{ NamespaceName }}'
- name: BaseCapacity
value: '{{ BaseCapacity }}'
- name: MaxCapacity
value: '{{ MaxCapacity }}'
- name: EnhancedVpcRouting
value: '{{ EnhancedVpcRouting }}'
- name: ConfigParameters
value:
- ParameterKey: '{{ ParameterKey }}'
ParameterValue: '{{ ParameterValue }}'
- name: SecurityGroupIds
value:
- '{{ SecurityGroupIds[0] }}'
- name: SubnetIds
value:
- '{{ SubnetIds[0] }}'
- name: PubliclyAccessible
value: '{{ PubliclyAccessible }}'
- name: Port
value: '{{ Port }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
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