createWorkGroup method
- required String name,
- WorkGroupConfiguration? configuration,
- String? description,
- List<
Tag> ? tags,
Creates a workgroup with the specified name.
May throw InternalServerException. May throw InvalidRequestException.
Parameter name
:
The workgroup name.
Parameter configuration
:
The configuration for the workgroup, which includes the location in Amazon
S3 where query results are stored, the encryption configuration, if any,
used for encrypting query results, whether the Amazon CloudWatch Metrics
are enabled for the workgroup, the limit for the amount of bytes scanned
(cutoff) per query, if it is specified, and whether workgroup's settings
(specified with EnforceWorkGroupConfiguration) in the
WorkGroupConfiguration override client-side settings. See
WorkGroupConfiguration$EnforceWorkGroupConfiguration.
Parameter description
:
The workgroup description.
Parameter tags
:
A list of comma separated tags to add to the workgroup that is created.
Implementation
Future<void> createWorkGroup({
required String name,
WorkGroupConfiguration? configuration,
String? description,
List<Tag>? tags,
}) async {
ArgumentError.checkNotNull(name, 'name');
_s.validateStringLength(
'description',
description,
0,
1024,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonAthena.CreateWorkGroup'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Name': name,
if (configuration != null) 'Configuration': configuration,
if (description != null) 'Description': description,
if (tags != null) 'Tags': tags,
},
);
}