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 ValidationException. May throw ObjectNotFoundException. May throw ConcurrentUpdateException. May throw InternalServiceException.

Parameter scalingPlanName : The name of the scaling plan.

Parameter scalingPlanVersion : The version number of the scaling plan.

Implementation

Future<void> deleteScalingPlan({
  required String scalingPlanName,
  required int scalingPlanVersion,
}) async {
  ArgumentError.checkNotNull(scalingPlanName, 'scalingPlanName');
  _s.validateStringLength(
    'scalingPlanName',
    scalingPlanName,
    1,
    128,
    isRequired: true,
  );
  ArgumentError.checkNotNull(scalingPlanVersion, 'scalingPlanVersion');
  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,
    },
  );
}