updateWorkgroup method
- required String workgroupName,
- int? baseCapacity,
- List<
ConfigParameter> ? configParameters, - bool? enhancedVpcRouting,
- bool? extraComputeForAutomaticOptimization,
- String? ipAddressType,
- int? maxCapacity,
- int? port,
- PerformanceTarget? pricePerformanceTarget,
- bool? publiclyAccessible,
- List<
String> ? securityGroupIds, - List<
String> ? subnetIds, - String? trackName,
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
May throw ConflictException.
May throw InsufficientCapacityException.
May throw InternalServerException.
May throw Ipv6CidrBlockNotFoundException.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter workgroupName :
The name of the workgroup to update. You can't update the name of a
workgroup once it is created.
Parameter baseCapacity :
The new base data warehouse capacity in Redshift Processing Units (RPUs).
Parameter configParameters :
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.
Parameter enhancedVpcRouting :
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.
Parameter extraComputeForAutomaticOptimization :
If true, allocates additional compute resources for running
automatic optimization operations.
Default: false
Parameter ipAddressType :
The IP address type that the workgroup supports. Possible values are
ipv4 and dualstack.
Parameter maxCapacity :
The maximum data-warehouse capacity Amazon Redshift Serverless uses to
serve queries. The max capacity is specified in RPUs.
Parameter port :
The custom port to use when connecting to a workgroup. Valid port ranges
are 5431-5455 and 8191-8215. The default is 5439.
Parameter pricePerformanceTarget :
An object that represents the price performance target settings for the
workgroup.
Parameter publiclyAccessible :
A value that specifies whether the workgroup can be accessible from a
public network.
Parameter securityGroupIds :
An array of security group IDs to associate with the workgroup.
Parameter subnetIds :
An array of VPC subnet IDs to associate with the workgroup.
Parameter trackName :
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.
Implementation
Future<UpdateWorkgroupResponse> updateWorkgroup({
required String workgroupName,
int? baseCapacity,
List<ConfigParameter>? configParameters,
bool? enhancedVpcRouting,
bool? extraComputeForAutomaticOptimization,
String? ipAddressType,
int? maxCapacity,
int? port,
PerformanceTarget? pricePerformanceTarget,
bool? publiclyAccessible,
List<String>? securityGroupIds,
List<String>? subnetIds,
String? trackName,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'RedshiftServerless.UpdateWorkgroup'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'workgroupName': workgroupName,
if (baseCapacity != null) 'baseCapacity': baseCapacity,
if (configParameters != null) 'configParameters': configParameters,
if (enhancedVpcRouting != null)
'enhancedVpcRouting': enhancedVpcRouting,
if (extraComputeForAutomaticOptimization != null)
'extraComputeForAutomaticOptimization':
extraComputeForAutomaticOptimization,
if (ipAddressType != null) 'ipAddressType': ipAddressType,
if (maxCapacity != null) 'maxCapacity': maxCapacity,
if (port != null) 'port': port,
if (pricePerformanceTarget != null)
'pricePerformanceTarget': pricePerformanceTarget,
if (publiclyAccessible != null)
'publiclyAccessible': publiclyAccessible,
if (securityGroupIds != null) 'securityGroupIds': securityGroupIds,
if (subnetIds != null) 'subnetIds': subnetIds,
if (trackName != null) 'trackName': trackName,
},
);
return UpdateWorkgroupResponse.fromJson(jsonResponse.body);
}