Skip to content

delete_queued_savings_plan

delete_queued_savings_plan(
    savings_plan_id: SavingsPlanId,
    *,
    config_overrides: Optional[savingsplansClientConfig] = None,
) -> DeleteQueuedSavingsPlanResponse

Deletes the queued purchase for the specified Savings Plan.

Parameters:

  • savings_plan_id (SavingsPlanId) –

    The ID of the Savings Plan.

Raises:

Source code in docs_src/capo_savingsplans/_services/savingsplans.py
def delete_queued_savings_plan(
    self,
    savings_plan_id: "capo_savingsplans.types.savings_plan_id.SavingsPlanId",
    *,
    config_overrides: Optional[savingsplansClientConfig] = None,
) -> "capo_savingsplans.types.delete_queued_savings_plan_response.DeleteQueuedSavingsPlanResponse":
    """<p>Deletes the queued purchase for the specified Savings Plan.</p>

    Args:
        savings_plan_id: <p>The ID of the Savings Plan.</p>

    Raises:
        capo_savingsplans.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred.</p>
        capo_savingsplans.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_savingsplans.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>A service quota has been exceeded.</p>
        capo_savingsplans.errors.validation_exception.ValidationException: <p>One of the input parameters is not valid.</p>
        capo_savingsplans.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_savingsplans.types.delete_queued_savings_plan_request.DeleteQueuedSavingsPlanRequest]",
    ) -> OperationResponse[
        "capo_savingsplans.types.delete_queued_savings_plan_response.DeleteQueuedSavingsPlanResponse"
    ]:
        import capo_savingsplans._operations.aws_savings_plan.delete_queued_savings_plan

        output, http_response = (
            capo_savingsplans._operations.aws_savings_plan.delete_queued_savings_plan.delete_queued_savings_plan(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteQueuedSavingsPlan")
    )
    input_: capo_savingsplans.types.delete_queued_savings_plan_request.DeleteQueuedSavingsPlanRequest = {
        "savings_plan_id": savings_plan_id
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output