Class Budget
Provides a budgets budget resource. Budgets use the cost visualisation provided by Cost Explorer to show you the status of your budgets, to provide forecasts of your estimated costs, and to track your AWS usage, including your free tier usage.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var ec2 = new Aws.Budgets.Budget("ec2", new Aws.Budgets.BudgetArgs
{
BudgetType = "COST",
CostFilters =
{
{ "Service", "Amazon Elastic Compute Cloud - Compute" },
},
LimitAmount = "1200",
LimitUnit = "USD",
Notifications =
{
new Aws.Budgets.Inputs.BudgetNotificationArgs
{
ComparisonOperator = "GREATER_THAN",
NotificationType = "FORECASTED",
SubscriberEmailAddresses =
{
"test@example.com",
},
Threshold = 100,
ThresholdType = "PERCENTAGE",
},
},
TimePeriodEnd = "2087-06-15_00:00",
TimePeriodStart = "2017-07-01_00:00",
TimeUnit = "MONTHLY",
});
}
}
Inherited Members
Namespace: Pulumi.Aws.Budgets
Assembly: Pulumi.Aws.dll
Syntax
public class Budget : CustomResource
Constructors
View SourceBudget(String, BudgetArgs, CustomResourceOptions)
Create a Budget resource with the given unique name, arguments, and options.
Declaration
public Budget(string name, BudgetArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| BudgetArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAccountId
The ID of the target account for budget. Will use current user's account_id by default if omitted.
Declaration
public Output<string> AccountId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
BudgetType
Whether this budget tracks monetary cost or usage.
Declaration
public Output<string> BudgetType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
CostFilters
Map of CostFilters key/value pairs to apply to the budget.
Declaration
public Output<ImmutableDictionary<string, object>> CostFilters { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
CostTypes
Object containing CostTypes The types of cost included in a budget, such as tax and subscriptions..
Declaration
public Output<BudgetCostTypes> CostTypes { get; }
Property Value
| Type | Description |
|---|---|
| Output<BudgetCostTypes> |
LimitAmount
The amount of cost or usage being measured for a budget.
Declaration
public Output<string> LimitAmount { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
LimitUnit
The unit of measurement used for the budget forecast, actual spend, or budget threshold, such as dollars or GB. See Spend documentation.
Declaration
public Output<string> LimitUnit { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The name of a budget. Unique within accounts.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
NamePrefix
The prefix of the name of a budget. Unique within accounts.
Declaration
public Output<string> NamePrefix { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Notifications
Object containing Budget Notifications. Can be used multiple times to define more than one budget notification
Declaration
public Output<ImmutableArray<BudgetNotification>> Notifications { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<BudgetNotification>> |
TimePeriodEnd
The end of the time period covered by the budget. There are no restrictions on the end date. Format: 2017-01-01_12:00.
Declaration
public Output<string> TimePeriodEnd { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
TimePeriodStart
The start of the time period covered by the budget. The start date must come before the end date. Format: 2017-01-01_12:00.
Declaration
public Output<string> TimePeriodStart { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
TimeUnit
The length of time until a budget resets the actual and forecasted spend. Valid values: MONTHLY, QUARTERLY, ANNUALLY.
Declaration
public Output<string> TimeUnit { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, BudgetState, CustomResourceOptions)
Get an existing Budget resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Budget Get(string name, Input<string> id, BudgetState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| BudgetState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Budget |