createWorkGroup method
Creates a workgroup with the specified name. A workgroup can be an Apache Spark enabled workgroup or an Athena SQL workgroup.
May throw InternalServerException.
May throw InvalidRequestException.
Parameter name :
The workgroup name.
Parameter configuration :
Contains configuration information for creating an Athena SQL workgroup or
Spark enabled Athena workgroup. Athena SQL workgroup configuration
includes the location in Amazon S3 where query and calculation 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 {
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,
},
);
}