budgets.d.ts (12435B)
1 import {Request} from '../lib/request'; 2 import {Response} from '../lib/response'; 3 import {AWSError} from '../lib/error'; 4 import {Service} from '../lib/service'; 5 import {ServiceConfigurationOptions} from '../lib/service'; 6 import {ConfigBase as Config} from '../lib/config'; 7 interface Blob {} 8 declare class Budgets extends Service { 9 /** 10 * Constructs a service object. This object has one method for each API operation. 11 */ 12 constructor(options?: Budgets.Types.ClientConfiguration) 13 config: Config & Budgets.Types.ClientConfiguration; 14 /** 15 * Create a new budget 16 */ 17 createBudget(params: Budgets.Types.CreateBudgetRequest, callback?: (err: AWSError, data: Budgets.Types.CreateBudgetResponse) => void): Request<Budgets.Types.CreateBudgetResponse, AWSError>; 18 /** 19 * Create a new budget 20 */ 21 createBudget(callback?: (err: AWSError, data: Budgets.Types.CreateBudgetResponse) => void): Request<Budgets.Types.CreateBudgetResponse, AWSError>; 22 /** 23 * Create a new Notification with subscribers for a budget 24 */ 25 createNotification(params: Budgets.Types.CreateNotificationRequest, callback?: (err: AWSError, data: Budgets.Types.CreateNotificationResponse) => void): Request<Budgets.Types.CreateNotificationResponse, AWSError>; 26 /** 27 * Create a new Notification with subscribers for a budget 28 */ 29 createNotification(callback?: (err: AWSError, data: Budgets.Types.CreateNotificationResponse) => void): Request<Budgets.Types.CreateNotificationResponse, AWSError>; 30 /** 31 * Create a new Subscriber for a notification 32 */ 33 createSubscriber(params: Budgets.Types.CreateSubscriberRequest, callback?: (err: AWSError, data: Budgets.Types.CreateSubscriberResponse) => void): Request<Budgets.Types.CreateSubscriberResponse, AWSError>; 34 /** 35 * Create a new Subscriber for a notification 36 */ 37 createSubscriber(callback?: (err: AWSError, data: Budgets.Types.CreateSubscriberResponse) => void): Request<Budgets.Types.CreateSubscriberResponse, AWSError>; 38 /** 39 * Delete a budget and related notifications 40 */ 41 deleteBudget(params: Budgets.Types.DeleteBudgetRequest, callback?: (err: AWSError, data: Budgets.Types.DeleteBudgetResponse) => void): Request<Budgets.Types.DeleteBudgetResponse, AWSError>; 42 /** 43 * Delete a budget and related notifications 44 */ 45 deleteBudget(callback?: (err: AWSError, data: Budgets.Types.DeleteBudgetResponse) => void): Request<Budgets.Types.DeleteBudgetResponse, AWSError>; 46 /** 47 * Delete a notification and related subscribers 48 */ 49 deleteNotification(params: Budgets.Types.DeleteNotificationRequest, callback?: (err: AWSError, data: Budgets.Types.DeleteNotificationResponse) => void): Request<Budgets.Types.DeleteNotificationResponse, AWSError>; 50 /** 51 * Delete a notification and related subscribers 52 */ 53 deleteNotification(callback?: (err: AWSError, data: Budgets.Types.DeleteNotificationResponse) => void): Request<Budgets.Types.DeleteNotificationResponse, AWSError>; 54 /** 55 * Delete a Subscriber for a notification 56 */ 57 deleteSubscriber(params: Budgets.Types.DeleteSubscriberRequest, callback?: (err: AWSError, data: Budgets.Types.DeleteSubscriberResponse) => void): Request<Budgets.Types.DeleteSubscriberResponse, AWSError>; 58 /** 59 * Delete a Subscriber for a notification 60 */ 61 deleteSubscriber(callback?: (err: AWSError, data: Budgets.Types.DeleteSubscriberResponse) => void): Request<Budgets.Types.DeleteSubscriberResponse, AWSError>; 62 /** 63 * Get a single budget 64 */ 65 describeBudget(params: Budgets.Types.DescribeBudgetRequest, callback?: (err: AWSError, data: Budgets.Types.DescribeBudgetResponse) => void): Request<Budgets.Types.DescribeBudgetResponse, AWSError>; 66 /** 67 * Get a single budget 68 */ 69 describeBudget(callback?: (err: AWSError, data: Budgets.Types.DescribeBudgetResponse) => void): Request<Budgets.Types.DescribeBudgetResponse, AWSError>; 70 /** 71 * Get all budgets for an account 72 */ 73 describeBudgets(params: Budgets.Types.DescribeBudgetsRequest, callback?: (err: AWSError, data: Budgets.Types.DescribeBudgetsResponse) => void): Request<Budgets.Types.DescribeBudgetsResponse, AWSError>; 74 /** 75 * Get all budgets for an account 76 */ 77 describeBudgets(callback?: (err: AWSError, data: Budgets.Types.DescribeBudgetsResponse) => void): Request<Budgets.Types.DescribeBudgetsResponse, AWSError>; 78 /** 79 * Get notifications of a budget 80 */ 81 describeNotificationsForBudget(params: Budgets.Types.DescribeNotificationsForBudgetRequest, callback?: (err: AWSError, data: Budgets.Types.DescribeNotificationsForBudgetResponse) => void): Request<Budgets.Types.DescribeNotificationsForBudgetResponse, AWSError>; 82 /** 83 * Get notifications of a budget 84 */ 85 describeNotificationsForBudget(callback?: (err: AWSError, data: Budgets.Types.DescribeNotificationsForBudgetResponse) => void): Request<Budgets.Types.DescribeNotificationsForBudgetResponse, AWSError>; 86 /** 87 * Get subscribers of a notification 88 */ 89 describeSubscribersForNotification(params: Budgets.Types.DescribeSubscribersForNotificationRequest, callback?: (err: AWSError, data: Budgets.Types.DescribeSubscribersForNotificationResponse) => void): Request<Budgets.Types.DescribeSubscribersForNotificationResponse, AWSError>; 90 /** 91 * Get subscribers of a notification 92 */ 93 describeSubscribersForNotification(callback?: (err: AWSError, data: Budgets.Types.DescribeSubscribersForNotificationResponse) => void): Request<Budgets.Types.DescribeSubscribersForNotificationResponse, AWSError>; 94 /** 95 * Update the information of a budget already created 96 */ 97 updateBudget(params: Budgets.Types.UpdateBudgetRequest, callback?: (err: AWSError, data: Budgets.Types.UpdateBudgetResponse) => void): Request<Budgets.Types.UpdateBudgetResponse, AWSError>; 98 /** 99 * Update the information of a budget already created 100 */ 101 updateBudget(callback?: (err: AWSError, data: Budgets.Types.UpdateBudgetResponse) => void): Request<Budgets.Types.UpdateBudgetResponse, AWSError>; 102 /** 103 * Update the information about a notification already created 104 */ 105 updateNotification(params: Budgets.Types.UpdateNotificationRequest, callback?: (err: AWSError, data: Budgets.Types.UpdateNotificationResponse) => void): Request<Budgets.Types.UpdateNotificationResponse, AWSError>; 106 /** 107 * Update the information about a notification already created 108 */ 109 updateNotification(callback?: (err: AWSError, data: Budgets.Types.UpdateNotificationResponse) => void): Request<Budgets.Types.UpdateNotificationResponse, AWSError>; 110 /** 111 * Update a subscriber 112 */ 113 updateSubscriber(params: Budgets.Types.UpdateSubscriberRequest, callback?: (err: AWSError, data: Budgets.Types.UpdateSubscriberResponse) => void): Request<Budgets.Types.UpdateSubscriberResponse, AWSError>; 114 /** 115 * Update a subscriber 116 */ 117 updateSubscriber(callback?: (err: AWSError, data: Budgets.Types.UpdateSubscriberResponse) => void): Request<Budgets.Types.UpdateSubscriberResponse, AWSError>; 118 } 119 declare namespace Budgets.Types { 120 export type AccountId = string; 121 export interface Budget { 122 BudgetName: BudgetName; 123 BudgetLimit: Spend; 124 CostFilters?: CostFilters; 125 CostTypes: CostTypes; 126 TimeUnit: TimeUnit; 127 TimePeriod: TimePeriod; 128 CalculatedSpend?: CalculatedSpend; 129 BudgetType: BudgetType; 130 } 131 export type BudgetName = string; 132 export type BudgetType = "USAGE"|"COST"|string; 133 export type Budgets = Budget[]; 134 export interface CalculatedSpend { 135 ActualSpend: Spend; 136 ForecastedSpend?: Spend; 137 } 138 export type ComparisonOperator = "GREATER_THAN"|"LESS_THAN"|"EQUAL_TO"|string; 139 export type CostFilters = {[key: string]: DimensionValues}; 140 export interface CostTypes { 141 IncludeTax: GenericBoolean; 142 IncludeSubscription: GenericBoolean; 143 UseBlended: GenericBoolean; 144 } 145 export interface CreateBudgetRequest { 146 AccountId: AccountId; 147 Budget: Budget; 148 NotificationsWithSubscribers?: NotificationWithSubscribersList; 149 } 150 export interface CreateBudgetResponse { 151 } 152 export interface CreateNotificationRequest { 153 AccountId: AccountId; 154 BudgetName: BudgetName; 155 Notification: Notification; 156 Subscribers: Subscribers; 157 } 158 export interface CreateNotificationResponse { 159 } 160 export interface CreateSubscriberRequest { 161 AccountId: AccountId; 162 BudgetName: BudgetName; 163 Notification: Notification; 164 Subscriber: Subscriber; 165 } 166 export interface CreateSubscriberResponse { 167 } 168 export interface DeleteBudgetRequest { 169 AccountId: AccountId; 170 BudgetName: BudgetName; 171 } 172 export interface DeleteBudgetResponse { 173 } 174 export interface DeleteNotificationRequest { 175 AccountId: AccountId; 176 BudgetName: BudgetName; 177 Notification: Notification; 178 } 179 export interface DeleteNotificationResponse { 180 } 181 export interface DeleteSubscriberRequest { 182 AccountId: AccountId; 183 BudgetName: BudgetName; 184 Notification: Notification; 185 Subscriber: Subscriber; 186 } 187 export interface DeleteSubscriberResponse { 188 } 189 export interface DescribeBudgetRequest { 190 AccountId: AccountId; 191 BudgetName: BudgetName; 192 } 193 export interface DescribeBudgetResponse { 194 Budget?: Budget; 195 } 196 export interface DescribeBudgetsRequest { 197 AccountId: AccountId; 198 MaxResults?: MaxResults; 199 NextToken?: GenericString; 200 } 201 export interface DescribeBudgetsResponse { 202 Budgets?: Budgets; 203 NextToken?: GenericString; 204 } 205 export interface DescribeNotificationsForBudgetRequest { 206 AccountId: AccountId; 207 BudgetName: BudgetName; 208 MaxResults?: MaxResults; 209 NextToken?: GenericString; 210 } 211 export interface DescribeNotificationsForBudgetResponse { 212 Notifications?: Notifications; 213 NextToken?: GenericString; 214 } 215 export interface DescribeSubscribersForNotificationRequest { 216 AccountId: AccountId; 217 BudgetName: BudgetName; 218 Notification: Notification; 219 MaxResults?: MaxResults; 220 NextToken?: GenericString; 221 } 222 export interface DescribeSubscribersForNotificationResponse { 223 Subscribers?: Subscribers; 224 NextToken?: GenericString; 225 } 226 export type DimensionValues = GenericString[]; 227 export type GenericBoolean = boolean; 228 export type GenericString = string; 229 export type GenericTimestamp = Date; 230 export type MaxResults = number; 231 export interface Notification { 232 NotificationType: NotificationType; 233 ComparisonOperator: ComparisonOperator; 234 Threshold: NotificationThreshold; 235 } 236 export type NotificationThreshold = number; 237 export type NotificationType = "ACTUAL"|"FORECASTED"|string; 238 export interface NotificationWithSubscribers { 239 Notification: Notification; 240 Subscribers: Subscribers; 241 } 242 export type NotificationWithSubscribersList = NotificationWithSubscribers[]; 243 export type Notifications = Notification[]; 244 export type NumericValue = string; 245 export interface Spend { 246 Amount: NumericValue; 247 Unit: GenericString; 248 } 249 export interface Subscriber { 250 SubscriptionType: SubscriptionType; 251 Address: GenericString; 252 } 253 export type Subscribers = Subscriber[]; 254 export type SubscriptionType = "SNS"|"EMAIL"|string; 255 export interface TimePeriod { 256 Start: GenericTimestamp; 257 End: GenericTimestamp; 258 } 259 export type TimeUnit = "MONTHLY"|"QUARTERLY"|"ANNUALLY"|string; 260 export interface UpdateBudgetRequest { 261 AccountId: AccountId; 262 NewBudget: Budget; 263 } 264 export interface UpdateBudgetResponse { 265 } 266 export interface UpdateNotificationRequest { 267 AccountId: AccountId; 268 BudgetName: BudgetName; 269 OldNotification: Notification; 270 NewNotification: Notification; 271 } 272 export interface UpdateNotificationResponse { 273 } 274 export interface UpdateSubscriberRequest { 275 AccountId: AccountId; 276 BudgetName: BudgetName; 277 Notification: Notification; 278 OldSubscriber: Subscriber; 279 NewSubscriber: Subscriber; 280 } 281 export interface UpdateSubscriberResponse { 282 } 283 export type errorMessage = string; 284 /** 285 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version. 286 */ 287 export type apiVersion = "2016-10-20"|"latest"|string; 288 export interface ClientApiVersions { 289 /** 290 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version. 291 */ 292 apiVersion?: apiVersion; 293 } 294 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions; 295 } 296 export = Budgets;