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
Idawscc.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.
price_performance_targetobjectA property that represents the price performance target settings for the workgroup.
snapshot_arnstringThe Amazon Resource Name (ARN) of the snapshot to restore from.
snapshot_namestringThe snapshot name to restore from.
snapshot_owner_accountstringThe Amazon Web Services account that owns the snapshot.
recovery_point_idstringThe recovery point id to restore from.
tagsarrayThe map of the key-value pairs used to tag the workgroup.
track_namestring
workgroupobjectDefinition for workgroup resource
regionstringAWS region.

For more information, see AWS::RedshiftServerless::Workgroup.

Methods

NameResourceAccessible byRequired Params
create_resourceworkgroupsINSERTWorkgroupName, region
delete_resourceworkgroupsDELETEIdentifier, region
update_resourceworkgroupsUPDATEIdentifier, PatchDocument, region
list_resourcesworkgroups_list_onlySELECTregion
get_resourceworkgroupsSELECTIdentifier, region

SELECT examples

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 = '{{ region }}' AND
Identifier = '{{ workgroup_name }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.redshiftserverless.workgroups (
WorkgroupName,
region
)
SELECT
'{{ workgroup_name }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.redshiftserverless.workgroups
WHERE
Identifier = '{{ workgroup_name }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

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

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