Skip to content

describe_budget

describe_budget(
    account_id: AccountId,
    budget_name: BudgetName,
    *,
    config_overrides: Optional[BudgetsClientConfig] = None,
    show_filter_expression: Optional[NullableBoolean] = None,
) -> DescribeBudgetResponse

Describes a budget.

The Request Syntax section shows the BudgetLimit syntax. For PlannedBudgetLimits, see the Examples section.

Parameters:

  • account_id (AccountId) –

    The accountId that is associated with the budget that you want a description of.

  • budget_name (BudgetName) –

    The name of the budget that you want a description of.

  • show_filter_expression (Optional[NullableBoolean], default: None ) –

    Specifies whether the response includes the filter expression associated with the budget. By showing the filter expression, you can see detailed filtering logic applied to the budget, such as Amazon Web Services services or tags that are being tracked.

Raises:

  • AccessDeniedException –

    You are not authorized to use this operation with the given parameters.

  • InternalErrorException –

    An error on the server occurred during the processing of your request. Try again later.

  • InvalidParameterException –

    An error on the client occurred. Typically, the cause is an invalid input value.

  • NotFoundException –

    We can’t locate the resource that you specified.

  • ThrottlingException –

    The number of API requests has exceeded the maximum allowed API request throttling limit for the account.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_budgets/_services/budgets.py
def describe_budget(
    self,
    account_id: "capo_budgets.types.account_id.AccountId",
    budget_name: "capo_budgets.types.budget_name.BudgetName",
    *,
    config_overrides: Optional[BudgetsClientConfig] = None,
    show_filter_expression: Optional[
        "capo_budgets.types.nullable_boolean.NullableBoolean"
    ] = None,
) -> "capo_budgets.types.describe_budget_response.DescribeBudgetResponse":
    """<p>Describes a budget.</p> <important> <p>The Request Syntax section shows the <code>BudgetLimit</code> syntax. For <code>PlannedBudgetLimits</code>, see the <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_budgets_DescribeBudget.html#API_DescribeBudget_Examples">Examples</a> section.</p> </important>

    Args:
        account_id: <p>The <code>accountId</code> that is associated with the budget that you want a description of.</p>
        budget_name: <p>The name of the budget that you want a description of.</p>
        show_filter_expression: <p>Specifies whether the response includes the filter expression associated with the budget. By showing the filter expression, you can see detailed filtering logic applied to the budget, such as Amazon Web Services services or tags that are being tracked.</p>

    Raises:
        capo_budgets.errors.access_denied_exception.AccessDeniedException: <p>You are not authorized to use this operation with the given parameters.</p>
        capo_budgets.errors.internal_error_exception.InternalErrorException: <p>An error on the server occurred during the processing of your request. Try again later.</p>
        capo_budgets.errors.invalid_parameter_exception.InvalidParameterException: <p>An error on the client occurred. Typically, the cause is an invalid input value.</p>
        capo_budgets.errors.not_found_exception.NotFoundException: <p>We can’t locate the resource that you specified.</p>
        capo_budgets.errors.throttling_exception.ThrottlingException: <p>The number of API requests has exceeded the maximum allowed API request throttling limit for the account.</p>
        capo_budgets.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_budgets.types.describe_budget_request.DescribeBudgetRequest]",
    ) -> OperationResponse[
        "capo_budgets.types.describe_budget_response.DescribeBudgetResponse"
    ]:
        import capo_budgets._operations.aws_budget_service_gateway.describe_budget

        output, http_response = (
            capo_budgets._operations.aws_budget_service_gateway.describe_budget.describe_budget(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeBudget")
    )
    input_: capo_budgets.types.describe_budget_request.DescribeBudgetRequest = {
        "account_id": account_id,
        "budget_name": budget_name,
    }
    if show_filter_expression is not None:
        input_["show_filter_expression"] = show_filter_expression

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output