Skip to content

start_savings_plans_purchase_recommendation_generation

start_savings_plans_purchase_recommendation_generation(
    *, config_overrides: Optional[CostExplorerClientConfig] = None
) -> StartSavingsPlansPurchaseRecommendationGenerationResponse

Requests a Savings Plans recommendation generation. This enables you to calculate a fresh set of Savings Plans recommendations that takes your latest usage data and current Savings Plans inventory into account. You can refresh Savings Plans recommendations up to three times daily for a consolidated billing family.

StartSavingsPlansPurchaseRecommendationGeneration has no request syntax because no input parameters are needed to support this operation.

Raises:

Source code in docs_src/capo_cost_explorer/_services/cost_explorer.py
def start_savings_plans_purchase_recommendation_generation(
    self, *, config_overrides: Optional[CostExplorerClientConfig] = None
) -> "capo_cost_explorer.types.start_savings_plans_purchase_recommendation_generation_response.StartSavingsPlansPurchaseRecommendationGenerationResponse":
    """<p>Requests a Savings Plans recommendation generation. This enables you to calculate a fresh set of Savings Plans recommendations that takes your latest usage data and current Savings Plans inventory into account. You can refresh Savings Plans recommendations up to three times daily for a consolidated billing family.</p> <note> <p> <code>StartSavingsPlansPurchaseRecommendationGeneration</code> has no request syntax because no input parameters are needed to support this operation.</p> </note>

    Raises:
        capo_cost_explorer.errors.data_unavailable_exception.DataUnavailableException: <p>The requested data is unavailable.</p>
        capo_cost_explorer.errors.generation_exists_exception.GenerationExistsException: <p>A request to generate a recommendation or analysis is already in progress.</p>
        capo_cost_explorer.errors.limit_exceeded_exception.LimitExceededException: <p>You made too many calls in a short period of time. Try again later.</p>
        capo_cost_explorer.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p> You've reached the limit on the number of resources you can create, or exceeded the size of an individual resource. </p>
        capo_cost_explorer.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_cost_explorer.types.start_savings_plans_purchase_recommendation_generation_request.StartSavingsPlansPurchaseRecommendationGenerationRequest]",
    ) -> OperationResponse[
        "capo_cost_explorer.types.start_savings_plans_purchase_recommendation_generation_response.StartSavingsPlansPurchaseRecommendationGenerationResponse"
    ]:
        import capo_cost_explorer._operations.aws_insights_index_service.start_savings_plans_purchase_recommendation_generation

        output, http_response = (
            capo_cost_explorer._operations.aws_insights_index_service.start_savings_plans_purchase_recommendation_generation.start_savings_plans_purchase_recommendation_generation(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("StartSavingsPlansPurchaseRecommendationGeneration"),
    )
    input_: capo_cost_explorer.types.start_savings_plans_purchase_recommendation_generation_request.StartSavingsPlansPurchaseRecommendationGenerationRequest = {}

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