deleteScalingPlan method

Future<void> deleteScalingPlan({
  1. required String scalingPlanName,
  2. required int scalingPlanVersion,
})

Deletes the specified scaling plan.

Deleting a scaling plan deletes the underlying ScalingInstruction for all of the scalable resources that are covered by the plan.

If the plan has launched resources or has scaling activities in progress, you must delete those resources separately.

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. Currently, the only valid value is 1.

Implementation

Future<void> deleteScalingPlan({
  required String scalingPlanName,
  required int scalingPlanVersion,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AnyScaleScalingPlannerFrontendService.DeleteScalingPlan'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ScalingPlanName': scalingPlanName,
      'ScalingPlanVersion': scalingPlanVersion,
    },
  );
}