Skip to content

list_bill_scenario_usage_modifications async

list_bill_scenario_usage_modifications(
    bill_scenario_id: ResourceId,
    *,
    config_overrides: Optional[AsyncBCMPricingCalculatorClientConfig] = None,
    filters: Optional[ListUsageFilters] = None,
    next_token: Optional[NextPageToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListBillScenarioUsageModificationsResponse

Lists the usage modifications associated with a bill scenario.

Parameters:

  • bill_scenario_id (ResourceId) –

    The unique identifier of the bill scenario to list usage modifications for.

  • filters (Optional[ListUsageFilters], default: None ) –

    Filters to apply to the list of usage modifications.

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

    A token to retrieve the next page of results.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of results to return per page.

Raises:

Source code in docs_src/capo_bcm_pricing_calculator/_services/async_bcm_pricing_calculator.py
async def list_bill_scenario_usage_modifications(
    self,
    bill_scenario_id: "capo_bcm_pricing_calculator.types.resource_id.ResourceId",
    *,
    config_overrides: Optional[AsyncBCMPricingCalculatorClientConfig] = None,
    filters: Optional[
        "capo_bcm_pricing_calculator.types.list_usage_filters.ListUsageFilters"
    ] = None,
    next_token: Optional[
        "capo_bcm_pricing_calculator.types.next_page_token.NextPageToken"
    ] = None,
    max_results: Optional[
        "capo_bcm_pricing_calculator.types.max_results.MaxResults"
    ] = None,
) -> "capo_bcm_pricing_calculator.types.list_bill_scenario_usage_modifications_response.ListBillScenarioUsageModificationsResponse":
    """<p> Lists the usage modifications associated with a bill scenario. </p>

    Args:
        bill_scenario_id: <p> The unique identifier of the bill scenario to list usage modifications for. </p>
        filters: <p> Filters to apply to the list of usage modifications. </p>
        next_token: <p> A token to retrieve the next page of results. </p>
        max_results: <p> The maximum number of results to return per page. </p>

    Raises:
        capo_bcm_pricing_calculator.errors.access_denied_exception.AccessDeniedException: <p> You do not have sufficient access to perform this action. </p>
        capo_bcm_pricing_calculator.errors.internal_server_exception.InternalServerException: <p> An internal error has occurred. Retry your request, but if the problem persists, contact Amazon Web Services support. </p>
        capo_bcm_pricing_calculator.errors.throttling_exception.ThrottlingException: <p> The request was denied due to request throttling. </p>
        capo_bcm_pricing_calculator.errors.validation_exception.ValidationException: <p> The input provided fails to satisfy the constraints specified by an Amazon Web Services service. </p>
        capo_bcm_pricing_calculator.errors.data_unavailable_exception.DataUnavailableException: <p> The requested data is currently unavailable. </p>
        capo_bcm_pricing_calculator.errors.resource_not_found_exception.ResourceNotFoundException: <p> The specified resource was not found. </p>
        capo_bcm_pricing_calculator.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_bcm_pricing_calculator.types.list_bill_scenario_usage_modifications_request.ListBillScenarioUsageModificationsRequest]",
    ) -> AsyncOperationResponse[
        "capo_bcm_pricing_calculator.types.list_bill_scenario_usage_modifications_response.ListBillScenarioUsageModificationsResponse"
    ]:
        import capo_bcm_pricing_calculator._operations.awsbcm_pricing_calculator.list_bill_scenario_usage_modifications

        (
            output,
            http_response,
        ) = await capo_bcm_pricing_calculator._operations.awsbcm_pricing_calculator.list_bill_scenario_usage_modifications.async_list_bill_scenario_usage_modifications(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListBillScenarioUsageModifications")
    )
    input_: capo_bcm_pricing_calculator.types.list_bill_scenario_usage_modifications_request.ListBillScenarioUsageModificationsRequest = {
        "bill_scenario_id": bill_scenario_id
    }
    if filters is not None:
        input_["filters"] = filters
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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