deleteAutoScalingConfiguration method
Delete an App Runner automatic scaling configuration resource. You can delete a top level auto scaling configuration, a specific revision of one, or all revisions associated with the top level configuration. You can't delete the default auto scaling configuration or a configuration that's used by one or more App Runner services.
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 delete.
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 deleted.
Parameter deleteAllRevisions :
Set to true to delete all of the revisions associated with
the AutoScalingConfigurationArn parameter value.
When DeleteAllRevisions is set to true, the only
valid value for the Amazon Resource Name (ARN) is a partial ARN ending
with: .../name.
Implementation
Future<DeleteAutoScalingConfigurationResponse>
deleteAutoScalingConfiguration({
required String autoScalingConfigurationArn,
bool? deleteAllRevisions,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AppRunner.DeleteAutoScalingConfiguration'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AutoScalingConfigurationArn': autoScalingConfigurationArn,
if (deleteAllRevisions != null)
'DeleteAllRevisions': deleteAllRevisions,
},
);
return DeleteAutoScalingConfigurationResponse.fromJson(jsonResponse.body);
}