Table of Contents
Budgets.Client¶A low-level client representing AWS Budgets:
client = session.create_client('budgets')
These are the available methods:
can_paginate()create_budget()create_notification()create_subscriber()delete_budget()delete_notification()delete_subscriber()describe_budget()describe_budgets()describe_notifications_for_budget()describe_subscribers_for_notification()generate_presigned_url()get_paginator()get_waiter()update_budget()update_notification()update_subscriber()can_paginate(operation_name)¶Check if an operation can be paginated.
| Parameters: | operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo, and you’d normally invoke the
operation as client.create_foo(**kwargs), if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo"). |
|---|---|
| Returns: | True if the operation can be paginated,
False otherwise. |
create_budget(**kwargs)¶Create a new budget
See also: AWS API Documentation
Request Syntax
response = client.create_budget(
AccountId='string',
Budget={
'BudgetName': 'string',
'BudgetLimit': {
'Amount': 'string',
'Unit': 'string'
},
'CostFilters': {
'string': [
'string',
]
},
'CostTypes': {
'IncludeTax': True|False,
'IncludeSubscription': True|False,
'UseBlended': True|False
},
'TimeUnit': 'DAILY'|'MONTHLY'|'QUARTERLY'|'ANNUALLY',
'TimePeriod': {
'Start': datetime(2015, 1, 1),
'End': datetime(2015, 1, 1)
},
'CalculatedSpend': {
'ActualSpend': {
'Amount': 'string',
'Unit': 'string'
},
'ForecastedSpend': {
'Amount': 'string',
'Unit': 'string'
}
},
'BudgetType': 'USAGE'|'COST'|'RI_UTILIZATION'
},
NotificationsWithSubscribers=[
{
'Notification': {
'NotificationType': 'ACTUAL'|'FORECASTED',
'ComparisonOperator': 'GREATER_THAN'|'LESS_THAN'|'EQUAL_TO',
'Threshold': 123.0
},
'Subscribers': [
{
'SubscriptionType': 'SNS'|'EMAIL',
'Address': 'string'
},
]
},
]
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
create_notification(**kwargs)¶Create a new Notification with subscribers for a budget
See also: AWS API Documentation
Request Syntax
response = client.create_notification(
AccountId='string',
BudgetName='string',
Notification={
'NotificationType': 'ACTUAL'|'FORECASTED',
'ComparisonOperator': 'GREATER_THAN'|'LESS_THAN'|'EQUAL_TO',
'Threshold': 123.0
},
Subscribers=[
{
'SubscriptionType': 'SNS'|'EMAIL',
'Address': 'string'
},
]
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
create_subscriber(**kwargs)¶Create a new Subscriber for a notification
See also: AWS API Documentation
Request Syntax
response = client.create_subscriber(
AccountId='string',
BudgetName='string',
Notification={
'NotificationType': 'ACTUAL'|'FORECASTED',
'ComparisonOperator': 'GREATER_THAN'|'LESS_THAN'|'EQUAL_TO',
'Threshold': 123.0
},
Subscriber={
'SubscriptionType': 'SNS'|'EMAIL',
'Address': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
delete_budget(**kwargs)¶Delete a budget and related notifications
See also: AWS API Documentation
Request Syntax
response = client.delete_budget(
AccountId='string',
BudgetName='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
delete_notification(**kwargs)¶Delete a notification and related subscribers
See also: AWS API Documentation
Request Syntax
response = client.delete_notification(
AccountId='string',
BudgetName='string',
Notification={
'NotificationType': 'ACTUAL'|'FORECASTED',
'ComparisonOperator': 'GREATER_THAN'|'LESS_THAN'|'EQUAL_TO',
'Threshold': 123.0
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
delete_subscriber(**kwargs)¶Delete a Subscriber for a notification
See also: AWS API Documentation
Request Syntax
response = client.delete_subscriber(
AccountId='string',
BudgetName='string',
Notification={
'NotificationType': 'ACTUAL'|'FORECASTED',
'ComparisonOperator': 'GREATER_THAN'|'LESS_THAN'|'EQUAL_TO',
'Threshold': 123.0
},
Subscriber={
'SubscriptionType': 'SNS'|'EMAIL',
'Address': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
describe_budget(**kwargs)¶Get a single budget
See also: AWS API Documentation
Request Syntax
response = client.describe_budget(
AccountId='string',
BudgetName='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Budget': {
'BudgetName': 'string',
'BudgetLimit': {
'Amount': 'string',
'Unit': 'string'
},
'CostFilters': {
'string': [
'string',
]
},
'CostTypes': {
'IncludeTax': True|False,
'IncludeSubscription': True|False,
'UseBlended': True|False
},
'TimeUnit': 'DAILY'|'MONTHLY'|'QUARTERLY'|'ANNUALLY',
'TimePeriod': {
'Start': datetime(2015, 1, 1),
'End': datetime(2015, 1, 1)
},
'CalculatedSpend': {
'ActualSpend': {
'Amount': 'string',
'Unit': 'string'
},
'ForecastedSpend': {
'Amount': 'string',
'Unit': 'string'
}
},
'BudgetType': 'USAGE'|'COST'|'RI_UTILIZATION'
}
}
Response Structure
|
describe_budgets(**kwargs)¶Get all budgets for an account
See also: AWS API Documentation
Request Syntax
response = client.describe_budgets(
AccountId='string',
MaxResults=123,
NextToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Budgets': [
{
'BudgetName': 'string',
'BudgetLimit': {
'Amount': 'string',
'Unit': 'string'
},
'CostFilters': {
'string': [
'string',
]
},
'CostTypes': {
'IncludeTax': True|False,
'IncludeSubscription': True|False,
'UseBlended': True|False
},
'TimeUnit': 'DAILY'|'MONTHLY'|'QUARTERLY'|'ANNUALLY',
'TimePeriod': {
'Start': datetime(2015, 1, 1),
'End': datetime(2015, 1, 1)
},
'CalculatedSpend': {
'ActualSpend': {
'Amount': 'string',
'Unit': 'string'
},
'ForecastedSpend': {
'Amount': 'string',
'Unit': 'string'
}
},
'BudgetType': 'USAGE'|'COST'|'RI_UTILIZATION'
},
],
'NextToken': 'string'
}
Response Structure
|
describe_notifications_for_budget(**kwargs)¶Get notifications of a budget
See also: AWS API Documentation
Request Syntax
response = client.describe_notifications_for_budget(
AccountId='string',
BudgetName='string',
MaxResults=123,
NextToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Notifications': [
{
'NotificationType': 'ACTUAL'|'FORECASTED',
'ComparisonOperator': 'GREATER_THAN'|'LESS_THAN'|'EQUAL_TO',
'Threshold': 123.0
},
],
'NextToken': 'string'
}
Response Structure
|
describe_subscribers_for_notification(**kwargs)¶Get subscribers of a notification
See also: AWS API Documentation
Request Syntax
response = client.describe_subscribers_for_notification(
AccountId='string',
BudgetName='string',
Notification={
'NotificationType': 'ACTUAL'|'FORECASTED',
'ComparisonOperator': 'GREATER_THAN'|'LESS_THAN'|'EQUAL_TO',
'Threshold': 123.0
},
MaxResults=123,
NextToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Subscribers': [
{
'SubscriptionType': 'SNS'|'EMAIL',
'Address': 'string'
},
],
'NextToken': 'string'
}
Response Structure
|
generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)¶Generate a presigned url given a client, its method, and arguments
| Parameters: |
|
|---|---|
| Returns: | The presigned url |
get_paginator(operation_name)¶Create a paginator for an operation.
| Parameters: | operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo, and you’d normally invoke the
operation as client.create_foo(**kwargs), if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo"). |
|---|---|
| Raises: | OperationNotPageableError – Raised if the operation is not
pageable. You can use the client.can_paginate method to
check if an operation is pageable. |
| Return type: | L{botocore.paginate.Paginator} |
| Returns: | A paginator object. |
get_waiter(waiter_name)¶update_budget(**kwargs)¶Update the information of a budget already created
See also: AWS API Documentation
Request Syntax
response = client.update_budget(
AccountId='string',
NewBudget={
'BudgetName': 'string',
'BudgetLimit': {
'Amount': 'string',
'Unit': 'string'
},
'CostFilters': {
'string': [
'string',
]
},
'CostTypes': {
'IncludeTax': True|False,
'IncludeSubscription': True|False,
'UseBlended': True|False
},
'TimeUnit': 'DAILY'|'MONTHLY'|'QUARTERLY'|'ANNUALLY',
'TimePeriod': {
'Start': datetime(2015, 1, 1),
'End': datetime(2015, 1, 1)
},
'CalculatedSpend': {
'ActualSpend': {
'Amount': 'string',
'Unit': 'string'
},
'ForecastedSpend': {
'Amount': 'string',
'Unit': 'string'
}
},
'BudgetType': 'USAGE'|'COST'|'RI_UTILIZATION'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
update_notification(**kwargs)¶Update the information about a notification already created
See also: AWS API Documentation
Request Syntax
response = client.update_notification(
AccountId='string',
BudgetName='string',
OldNotification={
'NotificationType': 'ACTUAL'|'FORECASTED',
'ComparisonOperator': 'GREATER_THAN'|'LESS_THAN'|'EQUAL_TO',
'Threshold': 123.0
},
NewNotification={
'NotificationType': 'ACTUAL'|'FORECASTED',
'ComparisonOperator': 'GREATER_THAN'|'LESS_THAN'|'EQUAL_TO',
'Threshold': 123.0
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
update_subscriber(**kwargs)¶Update a subscriber
See also: AWS API Documentation
Request Syntax
response = client.update_subscriber(
AccountId='string',
BudgetName='string',
Notification={
'NotificationType': 'ACTUAL'|'FORECASTED',
'ComparisonOperator': 'GREATER_THAN'|'LESS_THAN'|'EQUAL_TO',
'Threshold': 123.0
},
OldSubscriber={
'SubscriptionType': 'SNS'|'EMAIL',
'Address': 'string'
},
NewSubscriber={
'SubscriptionType': 'SNS'|'EMAIL',
'Address': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
The available paginators are: