DescribeNotificationsForBudgetCommand

Lists the notifications that are associated with a budget.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { BudgetsClient, DescribeNotificationsForBudgetCommand } from "@aws-sdk/client-budgets"; // ES Modules import
// const { BudgetsClient, DescribeNotificationsForBudgetCommand } = require("@aws-sdk/client-budgets"); // CommonJS import
const client = new BudgetsClient(config);
const input = { // DescribeNotificationsForBudgetRequest
  AccountId: "STRING_VALUE", // required
  BudgetName: "STRING_VALUE", // required
  MaxResults: Number("int"),
  NextToken: "STRING_VALUE",
};
const command = new DescribeNotificationsForBudgetCommand(input);
const response = await client.send(command);
// { // DescribeNotificationsForBudgetResponse
//   Notifications: [ // Notifications
//     { // Notification
//       NotificationType: "ACTUAL" || "FORECASTED", // required
//       ComparisonOperator: "GREATER_THAN" || "LESS_THAN" || "EQUAL_TO", // required
//       Threshold: Number("double"), // required
//       ThresholdType: "PERCENTAGE" || "ABSOLUTE_VALUE",
//       NotificationState: "OK" || "ALARM",
//     },
//   ],
//   NextToken: "STRING_VALUE",
// };

DescribeNotificationsForBudgetCommand Input

Parameter
Type
Description
AccountId
Required
string | undefined

The accountId that is associated with the budget whose notifications you want descriptions of.

BudgetName
Required
string | undefined

The name of the budget whose notifications you want descriptions of.

MaxResults
number | undefined

An optional integer that represents how many entries a paginated response contains.

NextToken
string | undefined

The pagination token that you include in your request to indicate the next set of results that you want to retrieve.

DescribeNotificationsForBudgetCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
NextToken
string | undefined

The pagination token in the service response that indicates the next set of results that you can retrieve.

Notifications
Notification[] | undefined

A list of notifications that are associated with a budget.

Throws

Name
Fault
Details
AccessDeniedException
client

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

ExpiredNextTokenException
client

The pagination token expired.

InternalErrorException
server

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

InvalidNextTokenException
client

The pagination token is invalid.

InvalidParameterException
client

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

NotFoundException
client

We can’t locate the resource that you specified.

ThrottlingException
client

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

BudgetsServiceException
Base exception class for all service exceptions from Budgets service.