← 返回命令列表

Linux command

aws-budgets 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Create a monthly cost budget

aws budgets create-budget --account-id [123456789012] --budget file://[budget.json]

Create a budget with notifications

aws budgets create-budget --account-id [123456789012] --budget file://[budget.json] --notifications-with-subscribers file://[notifications.json]

List all budgets

aws budgets describe-budgets --account-id [123456789012] --max-results [100]

Get details

aws budgets describe-budget --account-id [123456789012] --budget-name "[MyBudget]"

Update a budget

aws budgets update-budget --account-id [123456789012] --new-budget file://[updated-budget.json]

Delete a budget

aws budgets delete-budget --account-id [123456789012] --budget-name "[MyBudget]"

List budget actions

aws budgets describe-budget-actions-for-budget --account-id [123456789012] --budget-name "[MyBudget]"

说明

aws budgets manages AWS Budgets for cost control and monitoring. Budgets track spending or usage against defined limits and send alerts when thresholds are approached or exceeded. Create budgets to monitor overall account costs, specific services, linked accounts, or tagged resources. Notifications alert subscribers via email or SNS when spending reaches specified percentages of the budget limit. Budget actions automate responses to budget alerts, such as applying restrictive IAM policies or stopping EC2 instances when thresholds are exceeded. Time units include DAILY, MONTHLY, QUARTERLY, and ANNUALLY. If no start date is specified, budgets begin at the start of the chosen period.

参数

create-budget
Create a new budget with optional notifications
describe-budgets
List all budgets for an account
describe-budget
Get details of a specific budget
update-budget
Modify an existing budget
delete-budget
Remove a budget
create-budget-action
Create automated actions when thresholds are exceeded
describe-budget-actions-for-budget
List actions associated with a budget
create-notification
Add a notification to an existing budget
--account-id _id_
AWS account ID (12 digits)
--budget _json_
Budget specification (inline JSON or file://path)
--budget-name _name_
Name of the budget
--notifications-with-subscribers _json_
Notification thresholds and subscriber emails/SNS topics
--new-budget _json_
Updated budget specification
--max-results _integer_
Maximum number of results to return (for list operations)

FAQ

What is the aws-budgets command used for?

aws budgets manages AWS Budgets for cost control and monitoring. Budgets track spending or usage against defined limits and send alerts when thresholds are approached or exceeded. Create budgets to monitor overall account costs, specific services, linked accounts, or tagged resources. Notifications alert subscribers via email or SNS when spending reaches specified percentages of the budget limit. Budget actions automate responses to budget alerts, such as applying restrictive IAM policies or stopping EC2 instances when thresholds are exceeded. Time units include DAILY, MONTHLY, QUARTERLY, and ANNUALLY. If no start date is specified, budgets begin at the start of the chosen period.

How do I run a basic aws-budgets example?

Run `aws budgets create-budget --account-id [123456789012] --budget file://[budget.json]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does create-budget do in aws-budgets?

Create a new budget with optional notifications