Specifies the parameters of a planned commitment purchase and starts the generation of the analysis. This enables you to estimate the cost, coverage, and utilization impact of your planned commitment purchases.
Parameters:
Raises:
Source code in docs_src/capo_cost_explorer/_services/cost_explorer.py
| def start_commitment_purchase_analysis(
self,
commitment_purchase_analysis_configuration: "capo_cost_explorer.types.commitment_purchase_analysis_configuration.CommitmentPurchaseAnalysisConfiguration",
*,
config_overrides: Optional[CostExplorerClientConfig] = None,
) -> "capo_cost_explorer.types.start_commitment_purchase_analysis_response.StartCommitmentPurchaseAnalysisResponse":
"""<p>Specifies the parameters of a planned commitment purchase and starts the generation of the analysis. This enables you to estimate the cost, coverage, and utilization impact of your planned commitment purchases.</p>
Args:
commitment_purchase_analysis_configuration: <p>The configuration for the commitment purchase analysis.</p>
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_commitment_purchase_analysis_request.StartCommitmentPurchaseAnalysisRequest]",
) -> OperationResponse[
"capo_cost_explorer.types.start_commitment_purchase_analysis_response.StartCommitmentPurchaseAnalysisResponse"
]:
import capo_cost_explorer._operations.aws_insights_index_service.start_commitment_purchase_analysis
output, http_response = (
capo_cost_explorer._operations.aws_insights_index_service.start_commitment_purchase_analysis.start_commitment_purchase_analysis(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("StartCommitmentPurchaseAnalysis")
)
input_: capo_cost_explorer.types.start_commitment_purchase_analysis_request.StartCommitmentPurchaseAnalysisRequest = {
"commitment_purchase_analysis_configuration": commitment_purchase_analysis_configuration
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|