Skip to content

delete_notification async

delete_notification(
    account_id: AccountId,
    budget_name: BudgetName,
    notification: Notification,
    *,
    config_overrides: Optional[AsyncBudgetsClientConfig] = None,
) -> DeleteNotificationResponse

Deletes a notification.

Deleting a notification also deletes the subscribers that are associated with the notification.

Parameters:

  • account_id (AccountId) –

    The accountId that is associated with the budget whose notification you want to delete.

  • budget_name (BudgetName) –

    The name of the budget whose notification you want to delete.

  • notification (Notification) –

    The notification that you want to delete.

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/async_budgets.py
async def delete_notification(
    self,
    account_id: "capo_budgets.types.account_id.AccountId",
    budget_name: "capo_budgets.types.budget_name.BudgetName",
    notification: "capo_budgets.types.notification.Notification",
    *,
    config_overrides: Optional[AsyncBudgetsClientConfig] = None,
) -> "capo_budgets.types.delete_notification_response.DeleteNotificationResponse":
    """<p>Deletes a notification.</p> <important> <p>Deleting a notification also deletes the subscribers that are associated with the notification.</p> </important>

    Args:
        account_id: <p>The <code>accountId</code> that is associated with the budget whose notification you want to delete.</p>
        budget_name: <p>The name of the budget whose notification you want to delete.</p>
        notification: <p>The notification that you want to delete.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_budgets.types.delete_notification_request.DeleteNotificationRequest]",
    ) -> AsyncOperationResponse[
        "capo_budgets.types.delete_notification_response.DeleteNotificationResponse"
    ]:
        import capo_budgets._operations.aws_budget_service_gateway.delete_notification

        (
            output,
            http_response,
        ) = await capo_budgets._operations.aws_budget_service_gateway.delete_notification.async_delete_notification(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteNotification")
    )
    input_: capo_budgets.types.delete_notification_request.DeleteNotificationRequest = {
        "account_id": account_id,
        "budget_name": budget_name,
        "notification": notification,
    }

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