Skip to main content

workgroups

Creates, updates, deletes, gets or lists a workgroups resource.

Overview

Nameworkgroups
TypeResource
Idaws.redshift_serverless.workgroups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
base_capacityintegerThe base data warehouse capacity of the workgroup in Redshift Processing Units (RPUs).
config_parametersarrayAn array of parameters to set for advanced control over a database. The options are auto_mv, datestyle, enable_case_sensitive_identifier, enable_user_activity_logging, query_group, search_path, require_ssl, use_fips_ssl, and either wlm_json_configuration or query monitoring metrics that let you define performance boundaries. You can either specify individual query monitoring metrics (such as max_scan_row_count, max_query_execution_time) or use wlm_json_configuration to define query queues with rules, but not both. If you're using wlm_json_configuration, the maximum size of parameterValue is 8000 characters. For more information about query monitoring rules and available metrics, see Query monitoring metrics for Amazon Redshift Serverless.
creation_datestring (date-time)The creation date of the workgroup.
cross_account_vpcsarrayA list of VPCs. Each entry is the unique identifier of a virtual private cloud with access to Amazon Redshift Serverless. If all of the VPCs for the grantee are allowed, it shows an asterisk.
custom_domain_certificate_arnstringThe custom domain name’s certificate Amazon resource name (ARN). (pattern: <code>arn:[\w+=/,.@-]+:acm:[\w+=/,.@-]:[0-9]+:[\w+=,.@-]+(/[\w+=,.@-]+)</code>)
custom_domain_certificate_expiry_timestring (date-time)The expiration time for the certificate.
custom_domain_namestringThe custom domain name associated with the workgroup. (pattern: <code>^(((?!-)[A-Za-z0-9-]{0,62}[A-Za-z0-9]).)+((?!-)[A-Za-z0-9-]{1,62}[A-Za-z0-9])$</code>)
endpointobjectThe endpoint that is created from the workgroup.
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.
extra_compute_for_automatic_optimizationbooleanA boolean value that, if true, indicates that the workgroup allocates additional compute resources to run automatic optimization operations. Default: false
ip_address_typestringThe IP address type that the workgroup supports. Possible values are ipv4 and dualstack. (pattern: <code>^(ipv4|dualstack)$</code>)
max_capacityintegerThe maximum data-warehouse capacity Amazon Redshift Serverless uses to serve queries. The max capacity is specified in RPUs.
namespace_namestringThe namespace the workgroup is associated with.
patch_versionstringThe patch version of your Amazon Redshift Serverless workgroup. For more information about patch versions, see Cluster versions for Amazon Redshift.
pending_track_namestringThe name for the track that you want to assign to the workgroup. When the track changes, the workgroup is switched to the latest workgroup release available for the track. At this point, the track name is applied. (pattern: <code>^[a-zA-Z0-9_]+$</code>)
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_targetobjectAn object that represents the price performance target settings for the workgroup.
publicly_accessiblebooleanA value that specifies whether the workgroup can be accessible from a public network.
security_group_idsarrayAn array of security group IDs to associate with the workgroup.
statusstringThe status of the workgroup. (CREATING, AVAILABLE, MODIFYING, DELETING)
subnet_idsarrayAn array of subnet IDs the workgroup is associated with.
track_namestringThe name of the track for the workgroup. (pattern: <code>^[a-zA-Z0-9_]+$</code>)
workgroup_arnstringThe Amazon Resource Name (ARN) that links to the workgroup.
workgroup_idstringThe unique identifier of the workgroup.
workgroup_namestringThe name of the workgroup. (pattern: <code>^[a-z0-9-]+$</code>)
workgroup_versionstringThe Amazon Redshift Serverless version of your workgroup. For more information about Amazon Redshift Serverless versions, seeCluster versions for Amazon Redshift.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_workgroupselectregionReturns information about a specific workgroup.
list_workgroupsselectregionReturns information about a list of specified workgroups.
create_workgroupinsertregion, namespaceName, workgroupNameCreates an workgroup in Amazon Redshift Serverless. VPC Block Public Access (BPA) enables you to block resources in VPCs and subnets that you own in a Region from reaching or being reached from the internet through internet gateways and egress-only internet gateways. If a workgroup is in an account with VPC BPA turned on, the following capabilities are blocked: Creating a public access workgroup Modifying a private workgroup to public Adding a subnet with VPC BPA turned on to the workgroup when the workgroup is public For more information about VPC BPA, see Block public access to VPCs and subnets in the Amazon VPC User Guide.
update_workgroupupdateregion, workgroupNameUpdates a workgroup with the specified configuration settings. You can't update multiple parameters in one request. For example, you can update baseCapacity or port in a single request, but you can't update both in the same request. VPC Block Public Access (BPA) enables you to block resources in VPCs and subnets that you own in a Region from reaching or being reached from the internet through internet gateways and egress-only internet gateways. If a workgroup is in an account with VPC BPA turned on, the following capabilities are blocked: Creating a public access workgroup Modifying a private workgroup to public Adding a subnet with VPC BPA turned on to the workgroup when the workgroup is public For more information about VPC BPA, see Block public access to VPCs and subnets in the Amazon VPC User Guide.
delete_workgroupdeleteregionDeletes a workgroup.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns information about a specific workgroup.

SELECT
base_capacity,
config_parameters,
creation_date,
cross_account_vpcs,
custom_domain_certificate_arn,
custom_domain_certificate_expiry_time,
custom_domain_name,
endpoint,
enhanced_vpc_routing,
extra_compute_for_automatic_optimization,
ip_address_type,
max_capacity,
namespace_name,
patch_version,
pending_track_name,
port,
price_performance_target,
publicly_accessible,
security_group_ids,
status,
subnet_ids,
track_name,
workgroup_arn,
workgroup_id,
workgroup_name,
workgroup_version
FROM aws.redshift_serverless.workgroups
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates an workgroup in Amazon Redshift Serverless. VPC Block Public Access (BPA) enables you to block resources in VPCs and subnets that you own in a Region from reaching or being reached from the internet through internet gateways and egress-only internet gateways. If a workgroup is in an account with VPC BPA turned on, the following capabilities are blocked: Creating a public access workgroup Modifying a private workgroup to public Adding a subnet with VPC BPA turned on to the workgroup when the workgroup is public For more information about VPC BPA, see Block public access to VPCs and subnets in the Amazon VPC User Guide.

INSERT INTO aws.redshift_serverless.workgroups (
baseCapacity,
configParameters,
enhancedVpcRouting,
extraComputeForAutomaticOptimization,
ipAddressType,
maxCapacity,
namespaceName,
port,
pricePerformanceTarget,
publiclyAccessible,
securityGroupIds,
subnetIds,
tags,
trackName,
workgroupName,
region
)
SELECT
{{ baseCapacity }},
'{{ configParameters }}',
{{ enhancedVpcRouting }},
{{ extraComputeForAutomaticOptimization }},
'{{ ipAddressType }}',
{{ maxCapacity }},
'{{ namespaceName }}' /* required */,
{{ port }},
'{{ pricePerformanceTarget }}',
{{ publiclyAccessible }},
'{{ securityGroupIds }}',
'{{ subnetIds }}',
'{{ tags }}',
'{{ trackName }}',
'{{ workgroupName }}' /* required */,
'{{ region }}'
RETURNING
workgroup
;

UPDATE examples

Updates a workgroup with the specified configuration settings. You can't update multiple parameters in one request. For example, you can update baseCapacity or port in a single request, but you can't update both in the same request. VPC Block Public Access (BPA) enables you to block resources in VPCs and subnets that you own in a Region from reaching or being reached from the internet through internet gateways and egress-only internet gateways. If a workgroup is in an account with VPC BPA turned on, the following capabilities are blocked: Creating a public access workgroup Modifying a private workgroup to public Adding a subnet with VPC BPA turned on to the workgroup when the workgroup is public For more information about VPC BPA, see Block public access to VPCs and subnets in the Amazon VPC User Guide.

UPDATE aws.redshift_serverless.workgroups
SET
baseCapacity = {{ baseCapacity }},
configParameters = '{{ configParameters }}',
enhancedVpcRouting = {{ enhancedVpcRouting }},
extraComputeForAutomaticOptimization = {{ extraComputeForAutomaticOptimization }},
ipAddressType = '{{ ipAddressType }}',
maxCapacity = {{ maxCapacity }},
port = {{ port }},
pricePerformanceTarget = '{{ pricePerformanceTarget }}',
publiclyAccessible = {{ publiclyAccessible }},
securityGroupIds = '{{ securityGroupIds }}',
subnetIds = '{{ subnetIds }}',
trackName = '{{ trackName }}',
workgroupName = '{{ workgroupName }}'
WHERE
region = '{{ region }}' --required
AND workgroupName = '{{ workgroupName }}' --required
RETURNING
workgroup;

DELETE examples

Deletes a workgroup.

DELETE FROM aws.redshift_serverless.workgroups
WHERE region = '{{ region }}' --required
;