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 | awscc.redshiftserverless.workgroups |
Fields
- get (all properties)
- list (identifiers only)
| 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. |
price_performance_target | object | A property that represents the price performance target settings for the workgroup. |
snapshot_arn | string | The Amazon Resource Name (ARN) of the snapshot to restore from. |
snapshot_name | string | The snapshot name to restore from. |
snapshot_owner_account | string | The Amazon Web Services account that owns the snapshot. |
recovery_point_id | string | The recovery point id to restore from. |
tags | array | The map of the key-value pairs used to tag the workgroup. |
track_name | string | |
workgroup | object | Definition for workgroup resource |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
workgroup_name | string | The name of the workgroup. |
workgroup | object | Definition for workgroup resource |
region | string | AWS region. |
For more information, see AWS::RedshiftServerless::Workgroup.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | workgroups | INSERT | WorkgroupName, region |
delete_resource | workgroups | DELETE | Identifier, region |
update_resource | workgroups | UPDATE | Identifier, PatchDocument, region |
list_resources | workgroups_list_only | SELECT | region |
get_resource | workgroups | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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,
price_performance_target,
snapshot_arn,
snapshot_name,
snapshot_owner_account,
recovery_point_id,
tags,
track_name,
workgroup
FROM awscc.redshiftserverless.workgroups
WHERE
region = 'us-east-1' AND
Identifier = '{{ workgroup_name }}';
Lists all workgroups in a region.
SELECT
region,
workgroup_name
FROM awscc.redshiftserverless.workgroups_list_only
WHERE
region = 'us-east-1';
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 awscc.redshiftserverless.workgroups (
WorkgroupName,
region
)
SELECT
'{{ workgroup_name }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.redshiftserverless.workgroups (
WorkgroupName,
NamespaceName,
BaseCapacity,
MaxCapacity,
EnhancedVpcRouting,
ConfigParameters,
SecurityGroupIds,
SubnetIds,
PubliclyAccessible,
Port,
PricePerformanceTarget,
SnapshotArn,
SnapshotName,
SnapshotOwnerAccount,
RecoveryPointId,
Tags,
TrackName,
Workgroup,
region
)
SELECT
'{{ workgroup_name }}',
'{{ namespace_name }}',
'{{ base_capacity }}',
'{{ max_capacity }}',
'{{ enhanced_vpc_routing }}',
'{{ config_parameters }}',
'{{ security_group_ids }}',
'{{ subnet_ids }}',
'{{ publicly_accessible }}',
'{{ port }}',
'{{ price_performance_target }}',
'{{ snapshot_arn }}',
'{{ snapshot_name }}',
'{{ snapshot_owner_account }}',
'{{ recovery_point_id }}',
'{{ tags }}',
'{{ track_name }}',
'{{ workgroup }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: workgroup
props:
- name: workgroup_name
value: '{{ workgroup_name }}'
- name: namespace_name
value: '{{ namespace_name }}'
- name: base_capacity
value: '{{ base_capacity }}'
- name: max_capacity
value: '{{ max_capacity }}'
- name: enhanced_vpc_routing
value: '{{ enhanced_vpc_routing }}'
- name: config_parameters
value:
- parameter_key: '{{ parameter_key }}'
parameter_value: '{{ parameter_value }}'
- name: security_group_ids
value:
- '{{ security_group_ids[0] }}'
- name: subnet_ids
value:
- '{{ subnet_ids[0] }}'
- name: publicly_accessible
value: '{{ publicly_accessible }}'
- name: port
value: '{{ port }}'
- name: price_performance_target
value:
status: '{{ status }}'
level: '{{ level }}'
- name: snapshot_arn
value: '{{ snapshot_arn }}'
- name: snapshot_name
value: '{{ snapshot_name }}'
- name: snapshot_owner_account
value: '{{ snapshot_owner_account }}'
- name: recovery_point_id
value: '{{ recovery_point_id }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: track_name
value: '{{ track_name }}'
- name: workgroup
value:
workgroup_name: '{{ workgroup_name }}'
namespace_name: '{{ namespace_name }}'
base_capacity: '{{ base_capacity }}'
max_capacity: '{{ max_capacity }}'
enhanced_vpc_routing: '{{ enhanced_vpc_routing }}'
config_parameters:
- null
security_group_ids:
- '{{ security_group_ids[0] }}'
subnet_ids:
- '{{ subnet_ids[0] }}'
publicly_accessible: '{{ publicly_accessible }}'
port: '{{ port }}'
price_performance_target: null
snapshot_arn: '{{ snapshot_arn }}'
snapshot_name: '{{ snapshot_name }}'
snapshot_owner_account: '{{ snapshot_owner_account }}'
recovery_point_id: '{{ recovery_point_id }}'
tags:
- null
track_name: '{{ track_name }}'
workgroup: null
UPDATE example
Use the following StackQL query and manifest file to update a workgroup resource, using stack-deploy.
/*+ update */
UPDATE awscc.redshiftserverless.workgroups
SET PatchDocument = string('{{ {
"BaseCapacity": base_capacity,
"MaxCapacity": max_capacity,
"EnhancedVpcRouting": enhanced_vpc_routing,
"ConfigParameters": config_parameters,
"SecurityGroupIds": security_group_ids,
"SubnetIds": subnet_ids,
"PubliclyAccessible": publicly_accessible,
"Port": port,
"PricePerformanceTarget": price_performance_target,
"SnapshotArn": snapshot_arn,
"SnapshotName": snapshot_name,
"SnapshotOwnerAccount": snapshot_owner_account,
"RecoveryPointId": recovery_point_id,
"Tags": tags,
"TrackName": track_name
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ workgroup_name }}';
DELETE example
/*+ delete */
DELETE FROM awscc.redshiftserverless.workgroups
WHERE
Identifier = '{{ workgroup_name }}' AND
region = 'us-east-1';
Permissions
To operate on the workgroups resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
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,
redshift-serverless:ListTagsForResource,
redshift-serverless:TagResource,
redshift-serverless:RestoreFromSnapshot,
redshift-serverless:RestoreFromRecoveryPoint
ec2:DescribeVpcAttribute,
ec2:DescribeSecurityGroups,
ec2:DescribeAddresses,
ec2:DescribeInternetGateways,
ec2:DescribeSubnets,
ec2:DescribeAccountAttributes,
ec2:DescribeAvailabilityZones,
redshift-serverless:GetWorkgroup,
redshift-serverless:ListTagsForResource
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,
redshift-serverless:ListTagsForResource,
redshift-serverless:TagResource,
redshift-serverless:UntagResource,
redshift-serverless:RestoreFromSnapshot,
redshift-serverless:RestoreFromRecoveryPoint
ec2:DescribeVpcAttribute,
ec2:DescribeSecurityGroups,
ec2:DescribeAddresses,
ec2:DescribeInternetGateways,
ec2:DescribeSubnets,
ec2:DescribeAccountAttributes,
ec2:DescribeAvailabilityZones,
redshift-serverless:GetWorkgroup,
redshift-serverless:GetNamespace,
redshift-serverless:DeleteWorkgroup,
redshift-serverless:ListTagsForResource,
redshift-serverless:UntagResource
ec2:DescribeVpcAttribute,
ec2:DescribeSecurityGroups,
ec2:DescribeAddresses,
ec2:DescribeInternetGateways,
ec2:DescribeSubnets,
ec2:DescribeAccountAttributes,
ec2:DescribeAvailabilityZones,
redshift-serverless:ListWorkgroups,
redshift-serverless:ListTagsForResource