Skip to content

execute_budget_action

execute_budget_action(
    account_id: AccountId,
    budget_name: BudgetName,
    action_id: ActionId,
    execution_type: ExecutionType,
    *,
    config_overrides: Optional[BudgetsClientConfig] = None,
) -> ExecuteBudgetActionResponse

Executes a budget action.

Parameters:

  • action_id (ActionId) –

    A system-generated universally unique identifier (UUID) for the action.

  • execution_type (ExecutionType) –

    The type of execution.

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.

  • ResourceLockedException –

    The request was received and recognized by the server, but the server rejected that particular method for the requested resource.

  • 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 execute_budget_action(
    self,
    account_id: "capo_budgets.types.account_id.AccountId",
    budget_name: "capo_budgets.types.budget_name.BudgetName",
    action_id: "capo_budgets.types.action_id.ActionId",
    execution_type: "capo_budgets.types.execution_type.ExecutionType",
    *,
    config_overrides: Optional[BudgetsClientConfig] = None,
) -> (
    "capo_budgets.types.execute_budget_action_response.ExecuteBudgetActionResponse"
):
    """<p> Executes a budget action. </p>

    Args:
        action_id: <p> A system-generated universally unique identifier (UUID) for the action. </p>
        execution_type: <p> The type of execution. </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.resource_locked_exception.ResourceLockedException: <p>The request was received and recognized by the server, but the server rejected that particular method for the requested resource.</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.execute_budget_action_request.ExecuteBudgetActionRequest]",
    ) -> OperationResponse[
        "capo_budgets.types.execute_budget_action_response.ExecuteBudgetActionResponse"
    ]:
        import capo_budgets._operations.aws_budget_service_gateway.execute_budget_action

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ExecuteBudgetAction")
    )
    input_: capo_budgets.types.execute_budget_action_request.ExecuteBudgetActionRequest = {
        "account_id": account_id,
        "budget_name": budget_name,
        "action_id": action_id,
        "execution_type": execution_type,
    }

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