Skip to content

describe_savings_plan_rates async

describe_savings_plan_rates(
    savings_plan_id: SavingsPlanId,
    *,
    config_overrides: Optional[AsyncsavingsplansClientConfig] = None,
    filters: Optional[SavingsPlanRateFilterList] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[MaxResults] = None,
) -> DescribeSavingsPlanRatesResponse

Describes the rates for a specific, existing Savings Plan.

Parameters:

  • savings_plan_id (SavingsPlanId) –

    The ID of the Savings Plan.

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

    The filters.

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

    The token for the next page of results.

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

    The maximum number of results to return with a single call. To retrieve additional results, make another call with the returned token value.

Raises:

Source code in docs_src/capo_savingsplans/_services/async_savingsplans.py
async def describe_savings_plan_rates(
    self,
    savings_plan_id: "capo_savingsplans.types.savings_plan_id.SavingsPlanId",
    *,
    config_overrides: Optional[AsyncsavingsplansClientConfig] = None,
    filters: Optional[
        "capo_savingsplans.types.savings_plan_rate_filter_list.SavingsPlanRateFilterList"
    ] = None,
    next_token: Optional[
        "capo_savingsplans.types.pagination_token.PaginationToken"
    ] = None,
    max_results: Optional["capo_savingsplans.types.max_results.MaxResults"] = None,
) -> "capo_savingsplans.types.describe_savings_plan_rates_response.DescribeSavingsPlanRatesResponse":
    """<p>Describes the rates for a specific, existing Savings Plan.</p>

    Args:
        savings_plan_id: <p>The ID of the Savings Plan.</p>
        filters: <p>The filters.</p>
        next_token: <p>The token for the next page of results.</p>
        max_results: <p>The maximum number of results to return with a single call. To retrieve additional results, make another call with the returned token value.</p>

    Raises:
        capo_savingsplans.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred.</p>
        capo_savingsplans.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_savingsplans.errors.validation_exception.ValidationException: <p>One of the input parameters is not valid.</p>
        capo_savingsplans.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_savingsplans.types.describe_savings_plan_rates_request.DescribeSavingsPlanRatesRequest]",
    ) -> AsyncOperationResponse[
        "capo_savingsplans.types.describe_savings_plan_rates_response.DescribeSavingsPlanRatesResponse"
    ]:
        import capo_savingsplans._operations.aws_savings_plan.describe_savings_plan_rates

        (
            output,
            http_response,
        ) = await capo_savingsplans._operations.aws_savings_plan.describe_savings_plan_rates.async_describe_savings_plan_rates(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeSavingsPlanRates")
    )
    input_: capo_savingsplans.types.describe_savings_plan_rates_request.DescribeSavingsPlanRatesRequest = {
        "savings_plan_id": savings_plan_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