updateCapacityProvider method
Future<UpdateCapacityProviderResponse>
updateCapacityProvider({
- required AutoScalingGroupProviderUpdate autoScalingGroupProvider,
- required String name,
Modifies the parameters for a capacity provider.
May throw ServerException. May throw ClientException. May throw InvalidParameterException.
Parameter autoScalingGroupProvider
:
The name of the capacity provider to update.
Parameter name
:
An object representing the parameters to update for the Auto Scaling group
capacity provider.
Implementation
Future<UpdateCapacityProviderResponse> updateCapacityProvider({
required AutoScalingGroupProviderUpdate autoScalingGroupProvider,
required String name,
}) async {
ArgumentError.checkNotNull(
autoScalingGroupProvider, 'autoScalingGroupProvider');
ArgumentError.checkNotNull(name, 'name');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target':
'AmazonEC2ContainerServiceV20141113.UpdateCapacityProvider'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'autoScalingGroupProvider': autoScalingGroupProvider,
'name': name,
},
);
return UpdateCapacityProviderResponse.fromJson(jsonResponse.body);
}