createCapacityReservation method
Creates a capacity reservation with the specified name and number of requested data processing units.
May throw InternalServerException.
May throw InvalidRequestException.
Parameter name :
The name of the capacity reservation to create.
Parameter targetDpus :
The number of requested data processing units.
Parameter tags :
The tags for the capacity reservation.
Implementation
Future<void> createCapacityReservation({
required String name,
required int targetDpus,
List<Tag>? tags,
}) async {
_s.validateNumRange(
'targetDpus',
targetDpus,
4,
1152921504606846976,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonAthena.CreateCapacityReservation'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Name': name,
'TargetDpus': targetDpus,
if (tags != null) 'Tags': tags,
},
);
}