createScalingPlan method
Creates a scaling plan.
May throw ConcurrentUpdateException.
May throw InternalServiceException.
May throw LimitExceededException.
May throw ValidationException.
Parameter applicationSource :
A CloudFormation stack or set of tags. You can create one scaling plan per
application source.
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.
Parameter scalingPlanName :
The name of the scaling plan. Names cannot contain vertical bars, colons,
or forward slashes.
Implementation
Future<CreateScalingPlanResponse> createScalingPlan({
required ApplicationSource applicationSource,
required List<ScalingInstruction> scalingInstructions,
required String scalingPlanName,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AnyScaleScalingPlannerFrontendService.CreateScalingPlan'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ApplicationSource': applicationSource,
'ScalingInstructions': scalingInstructions,
'ScalingPlanName': scalingPlanName,
},
);
return CreateScalingPlanResponse.fromJson(jsonResponse.body);
}