Skip to content

list_commitment_purchase_analyses async

list_commitment_purchase_analyses(
    *,
    config_overrides: Optional[AsyncCostExplorerClientConfig] = None,
    analysis_status: Optional[AnalysisStatus] = None,
    next_page_token: Optional[NextPageToken] = None,
    page_size: Optional[AnalysesPageSize] = None,
    analysis_ids: Optional[AnalysisIds] = None,
) -> ListCommitmentPurchaseAnalysesResponse

Lists the commitment purchase analyses for your account.

Parameters:

  • analysis_status (Optional[AnalysisStatus], default: None ) –

    The status of the analysis.

  • next_page_token (Optional[NextPageToken], default: None ) –

    The token to retrieve the next set of results.

  • page_size (Optional[AnalysesPageSize], default: None ) –

    The number of analyses that you want returned in a single response object.

  • analysis_ids (Optional[AnalysisIds], default: None ) –

    The analysis IDs associated with the commitment purchase analyses.

Raises:

Source code in docs_src/capo_cost_explorer/_services/async_cost_explorer.py
async def list_commitment_purchase_analyses(
    self,
    *,
    config_overrides: Optional[AsyncCostExplorerClientConfig] = None,
    analysis_status: Optional[
        "capo_cost_explorer.types.analysis_status.AnalysisStatus"
    ] = None,
    next_page_token: Optional[
        "capo_cost_explorer.types.next_page_token.NextPageToken"
    ] = None,
    page_size: Optional[
        "capo_cost_explorer.types.analyses_page_size.AnalysesPageSize"
    ] = None,
    analysis_ids: Optional[
        "capo_cost_explorer.types.analysis_ids.AnalysisIds"
    ] = None,
) -> "capo_cost_explorer.types.list_commitment_purchase_analyses_response.ListCommitmentPurchaseAnalysesResponse":
    """<p>Lists the commitment purchase analyses for your account.</p>

    Args:
        analysis_status: <p>The status of the analysis.</p>
        next_page_token: <p>The token to retrieve the next set of results.</p>
        page_size: <p>The number of analyses that you want returned in a single response object.</p>
        analysis_ids: <p>The analysis IDs associated with the commitment purchase analyses.</p>

    Raises:
        capo_cost_explorer.errors.data_unavailable_exception.DataUnavailableException: <p>The requested data is unavailable.</p>
        capo_cost_explorer.errors.invalid_next_token_exception.InvalidNextTokenException: <p>The pagination token is invalid. Try again without a pagination token.</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.list_commitment_purchase_analyses_request.ListCommitmentPurchaseAnalysesRequest]",
    ) -> AsyncOperationResponse[
        "capo_cost_explorer.types.list_commitment_purchase_analyses_response.ListCommitmentPurchaseAnalysesResponse"
    ]:
        import capo_cost_explorer._operations.aws_insights_index_service.list_commitment_purchase_analyses

        (
            output,
            http_response,
        ) = await capo_cost_explorer._operations.aws_insights_index_service.list_commitment_purchase_analyses.async_list_commitment_purchase_analyses(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListCommitmentPurchaseAnalyses")
    )
    input_: capo_cost_explorer.types.list_commitment_purchase_analyses_request.ListCommitmentPurchaseAnalysesRequest = {}
    if analysis_status is not None:
        input_["analysis_status"] = analysis_status
    if next_page_token is not None:
        input_["next_page_token"] = next_page_token
    if page_size is not None:
        input_["page_size"] = page_size
    if analysis_ids is not None:
        input_["analysis_ids"] = analysis_ids

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output