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/async_cost_explorer.py
| async def get_commitment_purchase_analysis(
self,
analysis_id: "capo_cost_explorer.types.analysis_id.AnalysisId",
*,
config_overrides: Optional[AsyncCostExplorerClientConfig] = 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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_cost_explorer.types.get_commitment_purchase_analysis_request.GetCommitmentPurchaseAnalysisRequest]",
) -> AsyncOperationResponse[
"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,
) = await capo_cost_explorer._operations.aws_insights_index_service.get_commitment_purchase_analysis.async_get_commitment_purchase_analysis(
req.options, req.input
)
return AsyncOperationResponse(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 = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|