workgroups
Creates, updates, deletes, gets or lists a workgroups resource.
Overview
| Name | workgroups |
| Type | Resource |
| Id | aws.redshift_serverless.workgroups |
Fields
The following fields are returned by SELECT queries:
- get_workgroup
- list_workgroups
| Name | Datatype | Description |
|---|---|---|
base_capacity | integer | The base data warehouse capacity of the workgroup in Redshift Processing Units (RPUs). |
config_parameters | array | An 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_date | string (date-time) | The creation date of the workgroup. |
cross_account_vpcs | array | A 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_arn | string | The custom domain name’s certificate Amazon resource name (ARN). (pattern: <code>arn:[\w+=/,.@-]+:acm:[\w+=/,.@-]:[0-9]+:[\w+=,.@-]+(/[\w+=,.@-]+)</code>) |
custom_domain_certificate_expiry_time | string (date-time) | The expiration time for the certificate. |
custom_domain_name | string | The 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>) |
endpoint | object | The endpoint that is created from the workgroup. |
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. |
extra_compute_for_automatic_optimization | boolean | A boolean value that, if true, indicates that the workgroup allocates additional compute resources to run automatic optimization operations. Default: false |
ip_address_type | string | The IP address type that the workgroup supports. Possible values are ipv4 and dualstack. (pattern: <code>^(ipv4|dualstack)$</code>) |
max_capacity | integer | The maximum data-warehouse capacity Amazon Redshift Serverless uses to serve queries. The max capacity is specified in RPUs. |
namespace_name | string | The namespace the workgroup is associated with. |
patch_version | string | The patch version of your Amazon Redshift Serverless workgroup. For more information about patch versions, see Cluster versions for Amazon Redshift. |
pending_track_name | string | The 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>) |
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 | An object that represents the price performance target settings for the workgroup. |
publicly_accessible | boolean | A value that specifies whether the workgroup can be accessible from a public network. |
security_group_ids | array | An array of security group IDs to associate with the workgroup. |
status | string | The status of the workgroup. (CREATING, AVAILABLE, MODIFYING, DELETING) |
subnet_ids | array | An array of subnet IDs the workgroup is associated with. |
track_name | string | The name of the track for the workgroup. (pattern: <code>^[a-zA-Z0-9_]+$</code>) |
workgroup_arn | string | The Amazon Resource Name (ARN) that links to the workgroup. |
workgroup_id | string | The unique identifier of the workgroup. |
workgroup_name | string | The name of the workgroup. (pattern: <code>^[a-z0-9-]+$</code>) |
workgroup_version | string | The Amazon Redshift Serverless version of your workgroup. For more information about Amazon Redshift Serverless versions, seeCluster versions for Amazon Redshift. |
| Name | Datatype | Description |
|---|---|---|
base_capacity | integer | The base data warehouse capacity of the workgroup in Redshift Processing Units (RPUs). |
config_parameters | array | An 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_date | string (date-time) | The creation date of the workgroup. |
cross_account_vpcs | array | A 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_arn | string | The custom domain name’s certificate Amazon resource name (ARN). (pattern: <code>arn:[\w+=/,.@-]+:acm:[\w+=/,.@-]:[0-9]+:[\w+=,.@-]+(/[\w+=,.@-]+)</code>) |
custom_domain_certificate_expiry_time | string (date-time) | The expiration time for the certificate. |
custom_domain_name | string | The 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>) |
endpoint | object | The endpoint that is created from the workgroup. |
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. |
extra_compute_for_automatic_optimization | boolean | A boolean value that, if true, indicates that the workgroup allocates additional compute resources to run automatic optimization operations. Default: false |
ip_address_type | string | The IP address type that the workgroup supports. Possible values are ipv4 and dualstack. (pattern: <code>^(ipv4|dualstack)$</code>) |
max_capacity | integer | The maximum data-warehouse capacity Amazon Redshift Serverless uses to serve queries. The max capacity is specified in RPUs. |
namespace_name | string | The namespace the workgroup is associated with. |
patch_version | string | The patch version of your Amazon Redshift Serverless workgroup. For more information about patch versions, see Cluster versions for Amazon Redshift. |
pending_track_name | string | The 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>) |
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 | An object that represents the price performance target settings for the workgroup. |
publicly_accessible | boolean | A value that specifies whether the workgroup can be accessible from a public network. |
security_group_ids | array | An array of security group IDs to associate with the workgroup. |
status | string | The status of the workgroup. (CREATING, AVAILABLE, MODIFYING, DELETING) |
subnet_ids | array | An array of subnet IDs the workgroup is associated with. |
track_name | string | The name of the track for the workgroup. (pattern: <code>^[a-zA-Z0-9_]+$</code>) |
workgroup_arn | string | The Amazon Resource Name (ARN) that links to the workgroup. |
workgroup_id | string | The unique identifier of the workgroup. |
workgroup_name | string | The name of the workgroup. (pattern: <code>^[a-z0-9-]+$</code>) |
workgroup_version | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_workgroup | select | region | Returns information about a specific workgroup. | |
list_workgroups | select | region | Returns information about a list of specified workgroups. | |
create_workgroup | insert | region, namespaceName, workgroupName | 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. | |
update_workgroup | update | region, workgroupName | 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. | |
delete_workgroup | delete | region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_workgroup
- list_workgroups
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
;
Returns information about a list of specified workgroups.
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
- create_workgroup
- Manifest
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
;
# Description fields are for documentation purposes
- name: workgroups
props:
- name: region
value: "{{ region }}"
description: Required parameter for the workgroups resource.
- name: baseCapacity
value: {{ baseCapacity }}
description: |
The base data warehouse capacity of the workgroup in Redshift Processing Units (RPUs).
- name: configParameters
description: |
An 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.
value:
- parameterKey: "{{ parameterKey }}"
parameterValue: "{{ parameterValue }}"
- name: enhancedVpcRouting
value: {{ enhancedVpcRouting }}
description: |
The value that specifies whether to turn on enhanced virtual private cloud (VPC) routing, which forces Amazon Redshift Serverless to route traffic through your VPC instead of over the internet.
- name: extraComputeForAutomaticOptimization
value: {{ extraComputeForAutomaticOptimization }}
description: |
If true, allocates additional compute resources for running automatic optimization operations. Default: false
- name: ipAddressType
value: "{{ ipAddressType }}"
description: |
The IP address type that the workgroup supports. Possible values are ipv4 and dualstack.
- name: maxCapacity
value: {{ maxCapacity }}
description: |
The maximum data-warehouse capacity Amazon Redshift Serverless uses to serve queries. The max capacity is specified in RPUs.
- name: namespaceName
value: "{{ namespaceName }}"
description: |
The name of the namespace to associate with the workgroup.
- name: port
value: {{ port }}
description: |
The custom port to use when connecting to a workgroup. Valid port ranges are 5431-5455 and 8191-8215. The default is 5439.
- name: pricePerformanceTarget
description: |
An object that represents the price performance target settings for the workgroup.
value:
level: {{ level }}
status: "{{ status }}"
- name: publiclyAccessible
value: {{ publiclyAccessible }}
description: |
A value that specifies whether the workgroup can be accessed from a public network.
- name: securityGroupIds
value:
- "{{ securityGroupIds }}"
description: |
An array of security group IDs to associate with the workgroup.
- name: subnetIds
value:
- "{{ subnetIds }}"
description: |
An array of VPC subnet IDs to associate with the workgroup.
- name: tags
description: |
A array of tag instances.
value:
- key: "{{ key }}"
value: "{{ value }}"
- name: trackName
value: "{{ trackName }}"
description: |
An optional parameter for the name of the track for the workgroup. If you don't provide a track name, the workgroup is assigned to the current track.
- name: workgroupName
value: "{{ workgroupName }}"
description: |
The name of the created workgroup.
UPDATE examples
- update_workgroup
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
- delete_workgroup
Deletes a workgroup.
DELETE FROM aws.redshift_serverless.workgroups
WHERE region = '{{ region }}' --required
;