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.
Parameters:
-
scaling_plan_name
(ScalingPlanName)
–
The name of the scaling plan.
-
scaling_plan_version
(ScalingPlanVersion)
–
The version number of the scaling plan. Currently, the only valid value is 1.
Raises:
Source code in docs_src/capo_auto_scaling_plans/_services/auto_scaling_plans.py
| def delete_scaling_plan(
self,
scaling_plan_name: "capo_auto_scaling_plans.types.scaling_plan_name.ScalingPlanName",
scaling_plan_version: "capo_auto_scaling_plans.types.scaling_plan_version.ScalingPlanVersion",
*,
config_overrides: Optional[AutoScalingPlansClientConfig] = None,
) -> "capo_auto_scaling_plans.types.delete_scaling_plan_response.DeleteScalingPlanResponse":
"""<p>Deletes the specified scaling plan.</p> <p>Deleting a scaling plan deletes the underlying <a>ScalingInstruction</a> for all of the scalable resources that are covered by the plan.</p> <p>If the plan has launched resources or has scaling activities in progress, you must delete those resources separately.</p>
Args:
scaling_plan_name: <p>The name of the scaling plan.</p>
scaling_plan_version: <p>The version number of the scaling plan. Currently, the only valid value is <code>1</code>.</p>
Raises:
capo_auto_scaling_plans.errors.concurrent_update_exception.ConcurrentUpdateException: <p>Concurrent updates caused an exception, for example, if you request an update to a scaling plan that already has a pending update.</p>
capo_auto_scaling_plans.errors.internal_service_exception.InternalServiceException: <p>The service encountered an internal error.</p>
capo_auto_scaling_plans.errors.object_not_found_exception.ObjectNotFoundException: <p>The specified object could not be found.</p>
capo_auto_scaling_plans.errors.validation_exception.ValidationException: <p>An exception was thrown for a validation issue. Review the parameters provided.</p>
capo_auto_scaling_plans.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_auto_scaling_plans.types.delete_scaling_plan_request.DeleteScalingPlanRequest]",
) -> OperationResponse[
"capo_auto_scaling_plans.types.delete_scaling_plan_response.DeleteScalingPlanResponse"
]:
import capo_auto_scaling_plans._operations.any_scale_scaling_planner_frontend_service.delete_scaling_plan
output, http_response = (
capo_auto_scaling_plans._operations.any_scale_scaling_planner_frontend_service.delete_scaling_plan.delete_scaling_plan(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteScalingPlan")
)
input_: capo_auto_scaling_plans.types.delete_scaling_plan_request.DeleteScalingPlanRequest = {
"scaling_plan_name": scaling_plan_name,
"scaling_plan_version": scaling_plan_version,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|