updateScalingPlan method
Updates the specified scaling plan.
You cannot update a scaling plan if it is in the process of being created, updated, or deleted.
May throw ConcurrentUpdateException.
May throw InternalServiceException.
May throw ObjectNotFoundException.
May throw ValidationException.
Parameter scalingPlanName :
The name of the scaling plan.
Parameter scalingPlanVersion :
The version number of the scaling plan. The only valid value is
1. Currently, you cannot have multiple scaling plan versions.
Parameter applicationSource :
A CloudFormation stack or set of tags.
For more information, see ApplicationSource in the AWS Auto Scaling API Reference.
Parameter scalingInstructions :
The scaling instructions.
For more information, see ScalingInstruction in the AWS Auto Scaling API Reference.
Implementation
Future<void> updateScalingPlan({
required String scalingPlanName,
required int scalingPlanVersion,
ApplicationSource? applicationSource,
List<ScalingInstruction>? scalingInstructions,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AnyScaleScalingPlannerFrontendService.UpdateScalingPlan'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ScalingPlanName': scalingPlanName,
'ScalingPlanVersion': scalingPlanVersion,
if (applicationSource != null) 'ApplicationSource': applicationSource,
if (scalingInstructions != null)
'ScalingInstructions': scalingInstructions,
},
);
}