updateDefaultAutoScalingConfiguration method
Future<UpdateDefaultAutoScalingConfigurationResponse>
updateDefaultAutoScalingConfiguration({
- required String autoScalingConfigurationArn,
Update an auto scaling configuration to be the default. The existing default auto scaling configuration will be set to non-default automatically.
May throw InternalServiceErrorException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
Parameter autoScalingConfigurationArn :
The Amazon Resource Name (ARN) of the App Runner auto scaling
configuration that you want to set as the default.
The ARN can be a full auto scaling configuration ARN, or a partial ARN
ending with either .../name or
.../name/revision . If a revision isn't
specified, the latest active revision is set as the default.
Implementation
Future<UpdateDefaultAutoScalingConfigurationResponse>
updateDefaultAutoScalingConfiguration({
required String autoScalingConfigurationArn,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AppRunner.UpdateDefaultAutoScalingConfiguration'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AutoScalingConfigurationArn': autoScalingConfigurationArn,
},
);
return UpdateDefaultAutoScalingConfigurationResponse.fromJson(
jsonResponse.body);
}