mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
Upgrade AWS SDK to the latest version
This commit is contained in:
+190
-170
@@ -1,6 +1,5 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package budgets provides a client for AWS Budgets.
|
||||
package budgets
|
||||
|
||||
import (
|
||||
@@ -16,19 +15,18 @@ const opCreateBudget = "CreateBudget"
|
||||
|
||||
// CreateBudgetRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the CreateBudget operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See CreateBudget for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the CreateBudget method directly
|
||||
// instead.
|
||||
// See CreateBudget for more information on using the CreateBudget
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the CreateBudgetRequest method.
|
||||
// req, resp := client.CreateBudgetRequest(params)
|
||||
@@ -105,19 +103,18 @@ const opCreateNotification = "CreateNotification"
|
||||
|
||||
// CreateNotificationRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the CreateNotification operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See CreateNotification for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the CreateNotification method directly
|
||||
// instead.
|
||||
// See CreateNotification for more information on using the CreateNotification
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the CreateNotificationRequest method.
|
||||
// req, resp := client.CreateNotificationRequest(params)
|
||||
@@ -198,19 +195,18 @@ const opCreateSubscriber = "CreateSubscriber"
|
||||
|
||||
// CreateSubscriberRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the CreateSubscriber operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See CreateSubscriber for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the CreateSubscriber method directly
|
||||
// instead.
|
||||
// See CreateSubscriber for more information on using the CreateSubscriber
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the CreateSubscriberRequest method.
|
||||
// req, resp := client.CreateSubscriberRequest(params)
|
||||
@@ -291,19 +287,18 @@ const opDeleteBudget = "DeleteBudget"
|
||||
|
||||
// DeleteBudgetRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the DeleteBudget operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See DeleteBudget for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the DeleteBudget method directly
|
||||
// instead.
|
||||
// See DeleteBudget for more information on using the DeleteBudget
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the DeleteBudgetRequest method.
|
||||
// req, resp := client.DeleteBudgetRequest(params)
|
||||
@@ -376,19 +371,18 @@ const opDeleteNotification = "DeleteNotification"
|
||||
|
||||
// DeleteNotificationRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the DeleteNotification operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See DeleteNotification for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the DeleteNotification method directly
|
||||
// instead.
|
||||
// See DeleteNotification for more information on using the DeleteNotification
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the DeleteNotificationRequest method.
|
||||
// req, resp := client.DeleteNotificationRequest(params)
|
||||
@@ -461,19 +455,18 @@ const opDeleteSubscriber = "DeleteSubscriber"
|
||||
|
||||
// DeleteSubscriberRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the DeleteSubscriber operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See DeleteSubscriber for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the DeleteSubscriber method directly
|
||||
// instead.
|
||||
// See DeleteSubscriber for more information on using the DeleteSubscriber
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the DeleteSubscriberRequest method.
|
||||
// req, resp := client.DeleteSubscriberRequest(params)
|
||||
@@ -546,19 +539,18 @@ const opDescribeBudget = "DescribeBudget"
|
||||
|
||||
// DescribeBudgetRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the DescribeBudget operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See DescribeBudget for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the DescribeBudget method directly
|
||||
// instead.
|
||||
// See DescribeBudget for more information on using the DescribeBudget
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the DescribeBudgetRequest method.
|
||||
// req, resp := client.DescribeBudgetRequest(params)
|
||||
@@ -631,19 +623,18 @@ const opDescribeBudgets = "DescribeBudgets"
|
||||
|
||||
// DescribeBudgetsRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the DescribeBudgets operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See DescribeBudgets for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the DescribeBudgets method directly
|
||||
// instead.
|
||||
// See DescribeBudgets for more information on using the DescribeBudgets
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the DescribeBudgetsRequest method.
|
||||
// req, resp := client.DescribeBudgetsRequest(params)
|
||||
@@ -723,19 +714,18 @@ const opDescribeNotificationsForBudget = "DescribeNotificationsForBudget"
|
||||
|
||||
// DescribeNotificationsForBudgetRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the DescribeNotificationsForBudget operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See DescribeNotificationsForBudget for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the DescribeNotificationsForBudget method directly
|
||||
// instead.
|
||||
// See DescribeNotificationsForBudget for more information on using the DescribeNotificationsForBudget
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the DescribeNotificationsForBudgetRequest method.
|
||||
// req, resp := client.DescribeNotificationsForBudgetRequest(params)
|
||||
@@ -815,19 +805,18 @@ const opDescribeSubscribersForNotification = "DescribeSubscribersForNotification
|
||||
|
||||
// DescribeSubscribersForNotificationRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the DescribeSubscribersForNotification operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See DescribeSubscribersForNotification for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the DescribeSubscribersForNotification method directly
|
||||
// instead.
|
||||
// See DescribeSubscribersForNotification for more information on using the DescribeSubscribersForNotification
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the DescribeSubscribersForNotificationRequest method.
|
||||
// req, resp := client.DescribeSubscribersForNotificationRequest(params)
|
||||
@@ -907,19 +896,18 @@ const opUpdateBudget = "UpdateBudget"
|
||||
|
||||
// UpdateBudgetRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the UpdateBudget operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See UpdateBudget for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the UpdateBudget method directly
|
||||
// instead.
|
||||
// See UpdateBudget for more information on using the UpdateBudget
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the UpdateBudgetRequest method.
|
||||
// req, resp := client.UpdateBudgetRequest(params)
|
||||
@@ -992,19 +980,18 @@ const opUpdateNotification = "UpdateNotification"
|
||||
|
||||
// UpdateNotificationRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the UpdateNotification operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See UpdateNotification for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the UpdateNotification method directly
|
||||
// instead.
|
||||
// See UpdateNotification for more information on using the UpdateNotification
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the UpdateNotificationRequest method.
|
||||
// req, resp := client.UpdateNotificationRequest(params)
|
||||
@@ -1052,6 +1039,10 @@ func (c *Budgets) UpdateNotificationRequest(input *UpdateNotificationInput) (req
|
||||
// This exception is thrown if a requested entity is not found. E.g., if a budget
|
||||
// id doesn't exist for an account ID.
|
||||
//
|
||||
// * ErrCodeDuplicateRecordException "DuplicateRecordException"
|
||||
// The exception is thrown when customer tries to create a record (e.g. budget)
|
||||
// that already exists.
|
||||
//
|
||||
func (c *Budgets) UpdateNotification(input *UpdateNotificationInput) (*UpdateNotificationOutput, error) {
|
||||
req, out := c.UpdateNotificationRequest(input)
|
||||
return out, req.Send()
|
||||
@@ -1077,19 +1068,18 @@ const opUpdateSubscriber = "UpdateSubscriber"
|
||||
|
||||
// UpdateSubscriberRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the UpdateSubscriber operation. The "output" return
|
||||
// value can be used to capture response data after the request's "Send" method
|
||||
// is called.
|
||||
// value will be populated with the request's response once the request complets
|
||||
// successfuly.
|
||||
//
|
||||
// See UpdateSubscriber for usage and error information.
|
||||
// Use "Send" method on the returned Request to send the API call to the service.
|
||||
// the "output" return value is not valid until after Send returns without error.
|
||||
//
|
||||
// Creating a request object using this method should be used when you want to inject
|
||||
// custom logic into the request's lifecycle using a custom handler, or if you want to
|
||||
// access properties on the request object before or after sending the request. If
|
||||
// you just want the service response, call the UpdateSubscriber method directly
|
||||
// instead.
|
||||
// See UpdateSubscriber for more information on using the UpdateSubscriber
|
||||
// API call, and error handling.
|
||||
//
|
||||
// This method is useful when you want to inject custom logic or configuration
|
||||
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
|
||||
//
|
||||
// Note: You must call the "Send" method on the returned request object in order
|
||||
// to execute the request.
|
||||
//
|
||||
// // Example sending a request using the UpdateSubscriberRequest method.
|
||||
// req, resp := client.UpdateSubscriberRequest(params)
|
||||
@@ -1137,6 +1127,10 @@ func (c *Budgets) UpdateSubscriberRequest(input *UpdateSubscriberInput) (req *re
|
||||
// This exception is thrown if a requested entity is not found. E.g., if a budget
|
||||
// id doesn't exist for an account ID.
|
||||
//
|
||||
// * ErrCodeDuplicateRecordException "DuplicateRecordException"
|
||||
// The exception is thrown when customer tries to create a record (e.g. budget)
|
||||
// that already exists.
|
||||
//
|
||||
func (c *Budgets) UpdateSubscriber(input *UpdateSubscriberInput) (*UpdateSubscriberOutput, error) {
|
||||
req, out := c.UpdateSubscriberRequest(input)
|
||||
return out, req.Send()
|
||||
@@ -1162,26 +1156,26 @@ func (c *Budgets) UpdateSubscriberWithContext(ctx aws.Context, input *UpdateSubs
|
||||
type Budget struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
// A structure represent either a cost spend or usage spend. Contains an amount
|
||||
// and a unit.
|
||||
// A structure that represents either a cost spend or usage spend. Contains
|
||||
// an amount and a unit.
|
||||
//
|
||||
// BudgetLimit is a required field
|
||||
BudgetLimit *Spend `type:"structure" required:"true"`
|
||||
|
||||
// A string represents the budget name. No ":" character is allowed.
|
||||
// A string represents the budget name. No ":" and "\" character is allowed.
|
||||
//
|
||||
// BudgetName is a required field
|
||||
BudgetName *string `type:"string" required:"true"`
|
||||
|
||||
// The type of a budget. Can be COST or USAGE.
|
||||
// The type of a budget. It should be COST, USAGE, or RI_UTILIZATION.
|
||||
//
|
||||
// BudgetType is a required field
|
||||
BudgetType *string `type:"string" required:"true" enum:"BudgetType"`
|
||||
|
||||
// A structure holds the actual and forecasted spend for a budget.
|
||||
// A structure that holds the actual and forecasted spend for a budget.
|
||||
CalculatedSpend *CalculatedSpend `type:"structure"`
|
||||
|
||||
// A map represents the cost filters applied to the budget.
|
||||
// A map that represents the cost filters applied to the budget.
|
||||
CostFilters map[string][]*string `type:"map"`
|
||||
|
||||
// This includes the options for getting the cost of a budget.
|
||||
@@ -1189,12 +1183,12 @@ type Budget struct {
|
||||
// CostTypes is a required field
|
||||
CostTypes *CostTypes `type:"structure" required:"true"`
|
||||
|
||||
// A time period indicated the start date and end date of a budget.
|
||||
// A time period indicating the start date and end date of a budget.
|
||||
//
|
||||
// TimePeriod is a required field
|
||||
TimePeriod *TimePeriod `type:"structure" required:"true"`
|
||||
|
||||
// The time unit of the budget. e.g. weekly, monthly, etc.
|
||||
// The time unit of the budget. e.g. MONTHLY, QUARTERLY, etc.
|
||||
//
|
||||
// TimeUnit is a required field
|
||||
TimeUnit *string `type:"string" required:"true" enum:"TimeUnit"`
|
||||
@@ -1306,18 +1300,18 @@ func (s *Budget) SetTimeUnit(v string) *Budget {
|
||||
return s
|
||||
}
|
||||
|
||||
// A structure holds the actual and forecasted spend for a budget.
|
||||
// A structure that holds the actual and forecasted spend for a budget.
|
||||
type CalculatedSpend struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
// A structure represent either a cost spend or usage spend. Contains an amount
|
||||
// and a unit.
|
||||
// A structure that represents either a cost spend or usage spend. Contains
|
||||
// an amount and a unit.
|
||||
//
|
||||
// ActualSpend is a required field
|
||||
ActualSpend *Spend `type:"structure" required:"true"`
|
||||
|
||||
// A structure represent either a cost spend or usage spend. Contains an amount
|
||||
// and a unit.
|
||||
// A structure that represents either a cost spend or usage spend. Contains
|
||||
// an amount and a unit.
|
||||
ForecastedSpend *Spend `type:"structure"`
|
||||
}
|
||||
|
||||
@@ -1537,7 +1531,7 @@ type CreateNotificationInput struct {
|
||||
// AccountId is a required field
|
||||
AccountId *string `min:"12" type:"string" required:"true"`
|
||||
|
||||
// A string represents the budget name. No ":" character is allowed.
|
||||
// A string represents the budget name. No ":" and "\" character is allowed.
|
||||
//
|
||||
// BudgetName is a required field
|
||||
BudgetName *string `type:"string" required:"true"`
|
||||
@@ -1655,7 +1649,7 @@ type CreateSubscriberInput struct {
|
||||
// AccountId is a required field
|
||||
AccountId *string `min:"12" type:"string" required:"true"`
|
||||
|
||||
// A string represents the budget name. No ":" character is allowed.
|
||||
// A string represents the budget name. No ":" and "\" character is allowed.
|
||||
//
|
||||
// BudgetName is a required field
|
||||
BudgetName *string `type:"string" required:"true"`
|
||||
@@ -1766,7 +1760,7 @@ type DeleteBudgetInput struct {
|
||||
// AccountId is a required field
|
||||
AccountId *string `min:"12" type:"string" required:"true"`
|
||||
|
||||
// A string represents the budget name. No ":" character is allowed.
|
||||
// A string represents the budget name. No ":" and "\" character is allowed.
|
||||
//
|
||||
// BudgetName is a required field
|
||||
BudgetName *string `type:"string" required:"true"`
|
||||
@@ -1837,7 +1831,7 @@ type DeleteNotificationInput struct {
|
||||
// AccountId is a required field
|
||||
AccountId *string `min:"12" type:"string" required:"true"`
|
||||
|
||||
// A string represents the budget name. No ":" character is allowed.
|
||||
// A string represents the budget name. No ":" and "\" character is allowed.
|
||||
//
|
||||
// BudgetName is a required field
|
||||
BudgetName *string `type:"string" required:"true"`
|
||||
@@ -1928,7 +1922,7 @@ type DeleteSubscriberInput struct {
|
||||
// AccountId is a required field
|
||||
AccountId *string `min:"12" type:"string" required:"true"`
|
||||
|
||||
// A string represents the budget name. No ":" character is allowed.
|
||||
// A string represents the budget name. No ":" and "\" character is allowed.
|
||||
//
|
||||
// BudgetName is a required field
|
||||
BudgetName *string `type:"string" required:"true"`
|
||||
@@ -2039,7 +2033,7 @@ type DescribeBudgetInput struct {
|
||||
// AccountId is a required field
|
||||
AccountId *string `min:"12" type:"string" required:"true"`
|
||||
|
||||
// A string represents the budget name. No ":" character is allowed.
|
||||
// A string represents the budget name. No ":" and "\" character is allowed.
|
||||
//
|
||||
// BudgetName is a required field
|
||||
BudgetName *string `type:"string" required:"true"`
|
||||
@@ -2119,8 +2113,8 @@ type DescribeBudgetsInput struct {
|
||||
// AccountId is a required field
|
||||
AccountId *string `min:"12" type:"string" required:"true"`
|
||||
|
||||
// An integer to represent how many entries should a pagianted response contains.
|
||||
// Maxium is set to 100.
|
||||
// An integer to represent how many entries a paginated response contains. Maximum
|
||||
// is set to 100.
|
||||
MaxResults *int64 `min:"1" type:"integer"`
|
||||
|
||||
// A generic String.
|
||||
@@ -2216,13 +2210,13 @@ type DescribeNotificationsForBudgetInput struct {
|
||||
// AccountId is a required field
|
||||
AccountId *string `min:"12" type:"string" required:"true"`
|
||||
|
||||
// A string represents the budget name. No ":" character is allowed.
|
||||
// A string represents the budget name. No ":" and "\" character is allowed.
|
||||
//
|
||||
// BudgetName is a required field
|
||||
BudgetName *string `type:"string" required:"true"`
|
||||
|
||||
// An integer to represent how many entries should a pagianted response contains.
|
||||
// Maxium is set to 100.
|
||||
// An integer to represent how many entries a paginated response contains. Maximum
|
||||
// is set to 100.
|
||||
MaxResults *int64 `min:"1" type:"integer"`
|
||||
|
||||
// A generic String.
|
||||
@@ -2327,13 +2321,13 @@ type DescribeSubscribersForNotificationInput struct {
|
||||
// AccountId is a required field
|
||||
AccountId *string `min:"12" type:"string" required:"true"`
|
||||
|
||||
// A string represents the budget name. No ":" character is allowed.
|
||||
// A string represents the budget name. No ":" and "\" character is allowed.
|
||||
//
|
||||
// BudgetName is a required field
|
||||
BudgetName *string `type:"string" required:"true"`
|
||||
|
||||
// An integer to represent how many entries should a pagianted response contains.
|
||||
// Maxium is set to 100.
|
||||
// An integer to represent how many entries a paginated response contains. Maximum
|
||||
// is set to 100.
|
||||
MaxResults *int64 `min:"1" type:"integer"`
|
||||
|
||||
// A generic String.
|
||||
@@ -2465,11 +2459,13 @@ type Notification struct {
|
||||
// NotificationType is a required field
|
||||
NotificationType *string `type:"string" required:"true" enum:"NotificationType"`
|
||||
|
||||
// The threshold of the a notification. It should be a number between 0 and
|
||||
// 100.
|
||||
// The threshold of a notification. It should be a number between 0 and 1,000,000,000.
|
||||
//
|
||||
// Threshold is a required field
|
||||
Threshold *float64 `min:"0.1" type:"double" required:"true"`
|
||||
|
||||
// The type of threshold for a notification. It can be PERCENTAGE or ABSOLUTE_VALUE.
|
||||
ThresholdType *string `type:"string" enum:"ThresholdType"`
|
||||
}
|
||||
|
||||
// String returns the string representation
|
||||
@@ -2522,6 +2518,12 @@ func (s *Notification) SetThreshold(v float64) *Notification {
|
||||
return s
|
||||
}
|
||||
|
||||
// SetThresholdType sets the ThresholdType field's value.
|
||||
func (s *Notification) SetThresholdType(v string) *Notification {
|
||||
s.ThresholdType = &v
|
||||
return s
|
||||
}
|
||||
|
||||
// A structure to relate notification and a list of subscribers who belong to
|
||||
// the notification.
|
||||
type NotificationWithSubscribers struct {
|
||||
@@ -2595,8 +2597,8 @@ func (s *NotificationWithSubscribers) SetSubscribers(v []*Subscriber) *Notificat
|
||||
return s
|
||||
}
|
||||
|
||||
// A structure represent either a cost spend or usage spend. Contains an amount
|
||||
// and a unit.
|
||||
// A structure that represents either a cost spend or usage spend. Contains
|
||||
// an amount and a unit.
|
||||
type Spend struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
@@ -2605,10 +2607,10 @@ type Spend struct {
|
||||
// Amount is a required field
|
||||
Amount *string `type:"string" required:"true"`
|
||||
|
||||
// A generic String.
|
||||
// A string to represent budget spend unit. It should be not null and not empty.
|
||||
//
|
||||
// Unit is a required field
|
||||
Unit *string `type:"string" required:"true"`
|
||||
Unit *string `min:"1" type:"string" required:"true"`
|
||||
}
|
||||
|
||||
// String returns the string representation
|
||||
@@ -2630,6 +2632,9 @@ func (s *Spend) Validate() error {
|
||||
if s.Unit == nil {
|
||||
invalidParams.Add(request.NewErrParamRequired("Unit"))
|
||||
}
|
||||
if s.Unit != nil && len(*s.Unit) < 1 {
|
||||
invalidParams.Add(request.NewErrParamMinLen("Unit", 1))
|
||||
}
|
||||
|
||||
if invalidParams.Len() > 0 {
|
||||
return invalidParams
|
||||
@@ -2703,7 +2708,7 @@ func (s *Subscriber) SetSubscriptionType(v string) *Subscriber {
|
||||
return s
|
||||
}
|
||||
|
||||
// A time period indicated the start date and end date of a budget.
|
||||
// A time period indicating the start date and end date of a budget.
|
||||
type TimePeriod struct {
|
||||
_ struct{} `type:"structure"`
|
||||
|
||||
@@ -2841,7 +2846,7 @@ type UpdateNotificationInput struct {
|
||||
// AccountId is a required field
|
||||
AccountId *string `min:"12" type:"string" required:"true"`
|
||||
|
||||
// A string represents the budget name. No ":" character is allowed.
|
||||
// A string represents the budget name. No ":" and "\" character is allowed.
|
||||
//
|
||||
// BudgetName is a required field
|
||||
BudgetName *string `type:"string" required:"true"`
|
||||
@@ -2952,7 +2957,7 @@ type UpdateSubscriberInput struct {
|
||||
// AccountId is a required field
|
||||
AccountId *string `min:"12" type:"string" required:"true"`
|
||||
|
||||
// A string represents the budget name. No ":" character is allowed.
|
||||
// A string represents the budget name. No ":" and "\" character is allowed.
|
||||
//
|
||||
// BudgetName is a required field
|
||||
BudgetName *string `type:"string" required:"true"`
|
||||
@@ -3074,13 +3079,16 @@ func (s UpdateSubscriberOutput) GoString() string {
|
||||
return s.String()
|
||||
}
|
||||
|
||||
// The type of a budget. Can be COST or USAGE.
|
||||
// The type of a budget. It should be COST, USAGE, or RI_UTILIZATION.
|
||||
const (
|
||||
// BudgetTypeUsage is a BudgetType enum value
|
||||
BudgetTypeUsage = "USAGE"
|
||||
|
||||
// BudgetTypeCost is a BudgetType enum value
|
||||
BudgetTypeCost = "COST"
|
||||
|
||||
// BudgetTypeRiUtilization is a BudgetType enum value
|
||||
BudgetTypeRiUtilization = "RI_UTILIZATION"
|
||||
)
|
||||
|
||||
// The comparison operator of a notification. Currently we support less than,
|
||||
@@ -3114,8 +3122,20 @@ const (
|
||||
SubscriptionTypeEmail = "EMAIL"
|
||||
)
|
||||
|
||||
// The time unit of the budget. e.g. weekly, monthly, etc.
|
||||
// The type of threshold for a notification. It can be PERCENTAGE or ABSOLUTE_VALUE.
|
||||
const (
|
||||
// ThresholdTypePercentage is a ThresholdType enum value
|
||||
ThresholdTypePercentage = "PERCENTAGE"
|
||||
|
||||
// ThresholdTypeAbsoluteValue is a ThresholdType enum value
|
||||
ThresholdTypeAbsoluteValue = "ABSOLUTE_VALUE"
|
||||
)
|
||||
|
||||
// The time unit of the budget. e.g. MONTHLY, QUARTERLY, etc.
|
||||
const (
|
||||
// TimeUnitDaily is a TimeUnit enum value
|
||||
TimeUnitDaily = "DAILY"
|
||||
|
||||
// TimeUnitMonthly is a TimeUnit enum value
|
||||
TimeUnitMonthly = "MONTHLY"
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package budgetsiface provides an interface to enable mocking the AWS Budgets service client
|
||||
// for testing your code.
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
//
|
||||
// The best way to use this interface is so the SDK's service client's calls
|
||||
// can be stubbed out for unit testing your code with the SDK without needing
|
||||
// to inject custom request handlers into the the SDK's request pipeline.
|
||||
// to inject custom request handlers into the SDK's request pipeline.
|
||||
//
|
||||
// // myFunc uses an SDK service client to make a request to
|
||||
// // AWS Budgets.
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package budgets provides the client and types for making API
|
||||
// requests to AWS Budgets.
|
||||
//
|
||||
// All public APIs for AWS Budgets
|
||||
//
|
||||
// See budgets package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/budgets/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To AWS Budgets with the SDK use the New function to create
|
||||
// a new service client. With that client you can make API requests to the service.
|
||||
// These clients are safe to use concurrently.
|
||||
//
|
||||
// See the SDK's documentation for more information on how to use the SDK.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/
|
||||
//
|
||||
// See aws.Config documentation for more information on configuring SDK clients.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
|
||||
//
|
||||
// See the AWS Budgets client Budgets for more
|
||||
// information on creating client for this service.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/budgets/#New
|
||||
package budgets
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package budgets
|
||||
|
||||
|
||||
-455
@@ -1,455 +0,0 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
|
||||
package budgets_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/session"
|
||||
"github.com/aws/aws-sdk-go/service/budgets"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
|
||||
func ExampleBudgets_CreateBudget() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := budgets.New(sess)
|
||||
|
||||
params := &budgets.CreateBudgetInput{
|
||||
AccountId: aws.String("AccountId"), // Required
|
||||
Budget: &budgets.Budget{ // Required
|
||||
BudgetLimit: &budgets.Spend{ // Required
|
||||
Amount: aws.String("NumericValue"), // Required
|
||||
Unit: aws.String("GenericString"), // Required
|
||||
},
|
||||
BudgetName: aws.String("BudgetName"), // Required
|
||||
BudgetType: aws.String("BudgetType"), // Required
|
||||
CostTypes: &budgets.CostTypes{ // Required
|
||||
IncludeSubscription: aws.Bool(true), // Required
|
||||
IncludeTax: aws.Bool(true), // Required
|
||||
UseBlended: aws.Bool(true), // Required
|
||||
},
|
||||
TimePeriod: &budgets.TimePeriod{ // Required
|
||||
End: aws.Time(time.Now()), // Required
|
||||
Start: aws.Time(time.Now()), // Required
|
||||
},
|
||||
TimeUnit: aws.String("TimeUnit"), // Required
|
||||
CalculatedSpend: &budgets.CalculatedSpend{
|
||||
ActualSpend: &budgets.Spend{ // Required
|
||||
Amount: aws.String("NumericValue"), // Required
|
||||
Unit: aws.String("GenericString"), // Required
|
||||
},
|
||||
ForecastedSpend: &budgets.Spend{
|
||||
Amount: aws.String("NumericValue"), // Required
|
||||
Unit: aws.String("GenericString"), // Required
|
||||
},
|
||||
},
|
||||
CostFilters: map[string][]*string{
|
||||
"Key": { // Required
|
||||
aws.String("GenericString"), // Required
|
||||
// More values...
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
NotificationsWithSubscribers: []*budgets.NotificationWithSubscribers{
|
||||
{ // Required
|
||||
Notification: &budgets.Notification{ // Required
|
||||
ComparisonOperator: aws.String("ComparisonOperator"), // Required
|
||||
NotificationType: aws.String("NotificationType"), // Required
|
||||
Threshold: aws.Float64(1.0), // Required
|
||||
},
|
||||
Subscribers: []*budgets.Subscriber{ // Required
|
||||
{ // Required
|
||||
Address: aws.String("GenericString"), // Required
|
||||
SubscriptionType: aws.String("SubscriptionType"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.CreateBudget(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleBudgets_CreateNotification() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := budgets.New(sess)
|
||||
|
||||
params := &budgets.CreateNotificationInput{
|
||||
AccountId: aws.String("AccountId"), // Required
|
||||
BudgetName: aws.String("BudgetName"), // Required
|
||||
Notification: &budgets.Notification{ // Required
|
||||
ComparisonOperator: aws.String("ComparisonOperator"), // Required
|
||||
NotificationType: aws.String("NotificationType"), // Required
|
||||
Threshold: aws.Float64(1.0), // Required
|
||||
},
|
||||
Subscribers: []*budgets.Subscriber{ // Required
|
||||
{ // Required
|
||||
Address: aws.String("GenericString"), // Required
|
||||
SubscriptionType: aws.String("SubscriptionType"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.CreateNotification(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleBudgets_CreateSubscriber() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := budgets.New(sess)
|
||||
|
||||
params := &budgets.CreateSubscriberInput{
|
||||
AccountId: aws.String("AccountId"), // Required
|
||||
BudgetName: aws.String("BudgetName"), // Required
|
||||
Notification: &budgets.Notification{ // Required
|
||||
ComparisonOperator: aws.String("ComparisonOperator"), // Required
|
||||
NotificationType: aws.String("NotificationType"), // Required
|
||||
Threshold: aws.Float64(1.0), // Required
|
||||
},
|
||||
Subscriber: &budgets.Subscriber{ // Required
|
||||
Address: aws.String("GenericString"), // Required
|
||||
SubscriptionType: aws.String("SubscriptionType"), // Required
|
||||
},
|
||||
}
|
||||
resp, err := svc.CreateSubscriber(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleBudgets_DeleteBudget() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := budgets.New(sess)
|
||||
|
||||
params := &budgets.DeleteBudgetInput{
|
||||
AccountId: aws.String("AccountId"), // Required
|
||||
BudgetName: aws.String("BudgetName"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteBudget(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleBudgets_DeleteNotification() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := budgets.New(sess)
|
||||
|
||||
params := &budgets.DeleteNotificationInput{
|
||||
AccountId: aws.String("AccountId"), // Required
|
||||
BudgetName: aws.String("BudgetName"), // Required
|
||||
Notification: &budgets.Notification{ // Required
|
||||
ComparisonOperator: aws.String("ComparisonOperator"), // Required
|
||||
NotificationType: aws.String("NotificationType"), // Required
|
||||
Threshold: aws.Float64(1.0), // Required
|
||||
},
|
||||
}
|
||||
resp, err := svc.DeleteNotification(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleBudgets_DeleteSubscriber() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := budgets.New(sess)
|
||||
|
||||
params := &budgets.DeleteSubscriberInput{
|
||||
AccountId: aws.String("AccountId"), // Required
|
||||
BudgetName: aws.String("BudgetName"), // Required
|
||||
Notification: &budgets.Notification{ // Required
|
||||
ComparisonOperator: aws.String("ComparisonOperator"), // Required
|
||||
NotificationType: aws.String("NotificationType"), // Required
|
||||
Threshold: aws.Float64(1.0), // Required
|
||||
},
|
||||
Subscriber: &budgets.Subscriber{ // Required
|
||||
Address: aws.String("GenericString"), // Required
|
||||
SubscriptionType: aws.String("SubscriptionType"), // Required
|
||||
},
|
||||
}
|
||||
resp, err := svc.DeleteSubscriber(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleBudgets_DescribeBudget() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := budgets.New(sess)
|
||||
|
||||
params := &budgets.DescribeBudgetInput{
|
||||
AccountId: aws.String("AccountId"), // Required
|
||||
BudgetName: aws.String("BudgetName"), // Required
|
||||
}
|
||||
resp, err := svc.DescribeBudget(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleBudgets_DescribeBudgets() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := budgets.New(sess)
|
||||
|
||||
params := &budgets.DescribeBudgetsInput{
|
||||
AccountId: aws.String("AccountId"), // Required
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("GenericString"),
|
||||
}
|
||||
resp, err := svc.DescribeBudgets(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleBudgets_DescribeNotificationsForBudget() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := budgets.New(sess)
|
||||
|
||||
params := &budgets.DescribeNotificationsForBudgetInput{
|
||||
AccountId: aws.String("AccountId"), // Required
|
||||
BudgetName: aws.String("BudgetName"), // Required
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("GenericString"),
|
||||
}
|
||||
resp, err := svc.DescribeNotificationsForBudget(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleBudgets_DescribeSubscribersForNotification() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := budgets.New(sess)
|
||||
|
||||
params := &budgets.DescribeSubscribersForNotificationInput{
|
||||
AccountId: aws.String("AccountId"), // Required
|
||||
BudgetName: aws.String("BudgetName"), // Required
|
||||
Notification: &budgets.Notification{ // Required
|
||||
ComparisonOperator: aws.String("ComparisonOperator"), // Required
|
||||
NotificationType: aws.String("NotificationType"), // Required
|
||||
Threshold: aws.Float64(1.0), // Required
|
||||
},
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("GenericString"),
|
||||
}
|
||||
resp, err := svc.DescribeSubscribersForNotification(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleBudgets_UpdateBudget() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := budgets.New(sess)
|
||||
|
||||
params := &budgets.UpdateBudgetInput{
|
||||
AccountId: aws.String("AccountId"), // Required
|
||||
NewBudget: &budgets.Budget{ // Required
|
||||
BudgetLimit: &budgets.Spend{ // Required
|
||||
Amount: aws.String("NumericValue"), // Required
|
||||
Unit: aws.String("GenericString"), // Required
|
||||
},
|
||||
BudgetName: aws.String("BudgetName"), // Required
|
||||
BudgetType: aws.String("BudgetType"), // Required
|
||||
CostTypes: &budgets.CostTypes{ // Required
|
||||
IncludeSubscription: aws.Bool(true), // Required
|
||||
IncludeTax: aws.Bool(true), // Required
|
||||
UseBlended: aws.Bool(true), // Required
|
||||
},
|
||||
TimePeriod: &budgets.TimePeriod{ // Required
|
||||
End: aws.Time(time.Now()), // Required
|
||||
Start: aws.Time(time.Now()), // Required
|
||||
},
|
||||
TimeUnit: aws.String("TimeUnit"), // Required
|
||||
CalculatedSpend: &budgets.CalculatedSpend{
|
||||
ActualSpend: &budgets.Spend{ // Required
|
||||
Amount: aws.String("NumericValue"), // Required
|
||||
Unit: aws.String("GenericString"), // Required
|
||||
},
|
||||
ForecastedSpend: &budgets.Spend{
|
||||
Amount: aws.String("NumericValue"), // Required
|
||||
Unit: aws.String("GenericString"), // Required
|
||||
},
|
||||
},
|
||||
CostFilters: map[string][]*string{
|
||||
"Key": { // Required
|
||||
aws.String("GenericString"), // Required
|
||||
// More values...
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
}
|
||||
resp, err := svc.UpdateBudget(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleBudgets_UpdateNotification() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := budgets.New(sess)
|
||||
|
||||
params := &budgets.UpdateNotificationInput{
|
||||
AccountId: aws.String("AccountId"), // Required
|
||||
BudgetName: aws.String("BudgetName"), // Required
|
||||
NewNotification: &budgets.Notification{ // Required
|
||||
ComparisonOperator: aws.String("ComparisonOperator"), // Required
|
||||
NotificationType: aws.String("NotificationType"), // Required
|
||||
Threshold: aws.Float64(1.0), // Required
|
||||
},
|
||||
OldNotification: &budgets.Notification{ // Required
|
||||
ComparisonOperator: aws.String("ComparisonOperator"), // Required
|
||||
NotificationType: aws.String("NotificationType"), // Required
|
||||
Threshold: aws.Float64(1.0), // Required
|
||||
},
|
||||
}
|
||||
resp, err := svc.UpdateNotification(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
|
||||
func ExampleBudgets_UpdateSubscriber() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := budgets.New(sess)
|
||||
|
||||
params := &budgets.UpdateSubscriberInput{
|
||||
AccountId: aws.String("AccountId"), // Required
|
||||
BudgetName: aws.String("BudgetName"), // Required
|
||||
NewSubscriber: &budgets.Subscriber{ // Required
|
||||
Address: aws.String("GenericString"), // Required
|
||||
SubscriptionType: aws.String("SubscriptionType"), // Required
|
||||
},
|
||||
Notification: &budgets.Notification{ // Required
|
||||
ComparisonOperator: aws.String("ComparisonOperator"), // Required
|
||||
NotificationType: aws.String("NotificationType"), // Required
|
||||
Threshold: aws.Float64(1.0), // Required
|
||||
},
|
||||
OldSubscriber: &budgets.Subscriber{ // Required
|
||||
Address: aws.String("GenericString"), // Required
|
||||
SubscriptionType: aws.String("SubscriptionType"), // Required
|
||||
},
|
||||
}
|
||||
resp, err := svc.UpdateSubscriber(params)
|
||||
|
||||
if err != nil {
|
||||
// Print the error, cast err to awserr.Error to get the Code and
|
||||
// Message from an error.
|
||||
fmt.Println(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
// Pretty-print the response data.
|
||||
fmt.Println(resp)
|
||||
}
|
||||
+7
-4
@@ -1,4 +1,4 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package budgets
|
||||
|
||||
@@ -11,9 +11,12 @@ import (
|
||||
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
|
||||
)
|
||||
|
||||
// All public APIs for AWS Budgets
|
||||
// The service client's operations are safe to be used concurrently.
|
||||
// It is not safe to mutate any of the client's properties though.
|
||||
// Budgets provides the API operation methods for making requests to
|
||||
// AWS Budgets. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// Budgets methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type Budgets struct {
|
||||
*client.Client
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user