Retrieves a commitment purchase analysis result based on the AnalysisId.
Parameters:
-
analysis_id
(AnalysisId)
–
The analysis ID that's associated with the commitment purchase analysis.
Raises:
Source code in docs_src/capo_cost_explorer/_services/cost_explorer.py
| def get_commitment_purchase_analysis(
self,
analysis_id: "capo_cost_explorer.types.analysis_id.AnalysisId",
*,
config_overrides: Optional[CostExplorerClientConfig] = None,
) -> "capo_cost_explorer.types.get_commitment_purchase_analysis_response.GetCommitmentPurchaseAnalysisResponse":
"""<p>Retrieves a commitment purchase analysis result based on the <code>AnalysisId</code>.</p>
Args:
analysis_id: <p>The analysis ID that's associated with the commitment purchase analysis.</p>
Raises:
capo_cost_explorer.errors.analysis_not_found_exception.AnalysisNotFoundException: <p>The requested analysis can't be found.</p>
capo_cost_explorer.errors.data_unavailable_exception.DataUnavailableException: <p>The requested data is unavailable.</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.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_cost_explorer.types.get_commitment_purchase_analysis_request.GetCommitmentPurchaseAnalysisRequest]",
) -> OperationResponse[
"capo_cost_explorer.types.get_commitment_purchase_analysis_response.GetCommitmentPurchaseAnalysisResponse"
]:
import capo_cost_explorer._operations.aws_insights_index_service.get_commitment_purchase_analysis
output, http_response = (
capo_cost_explorer._operations.aws_insights_index_service.get_commitment_purchase_analysis.get_commitment_purchase_analysis(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetCommitmentPurchaseAnalysis")
)
input_: capo_cost_explorer.types.get_commitment_purchase_analysis_request.GetCommitmentPurchaseAnalysisRequest = {
"analysis_id": analysis_id
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|