github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/budgets/budget.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package budgets
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // 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.
    16  //
    17  // ## Example Usage
    18  //
    19  // <!--Start PulumiCodeChooser -->
    20  // ```go
    21  // package main
    22  //
    23  // import (
    24  //
    25  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/budgets"
    26  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    27  //
    28  // )
    29  //
    30  //	func main() {
    31  //		pulumi.Run(func(ctx *pulumi.Context) error {
    32  //			_, err := budgets.NewBudget(ctx, "ec2", &budgets.BudgetArgs{
    33  //				Name:            pulumi.String("budget-ec2-monthly"),
    34  //				BudgetType:      pulumi.String("COST"),
    35  //				LimitAmount:     pulumi.String("1200"),
    36  //				LimitUnit:       pulumi.String("USD"),
    37  //				TimePeriodEnd:   pulumi.String("2087-06-15_00:00"),
    38  //				TimePeriodStart: pulumi.String("2017-07-01_00:00"),
    39  //				TimeUnit:        pulumi.String("MONTHLY"),
    40  //				CostFilters: budgets.BudgetCostFilterArray{
    41  //					&budgets.BudgetCostFilterArgs{
    42  //						Name: pulumi.String("Service"),
    43  //						Values: pulumi.StringArray{
    44  //							pulumi.String("Amazon Elastic Compute Cloud - Compute"),
    45  //						},
    46  //					},
    47  //				},
    48  //				Notifications: budgets.BudgetNotificationArray{
    49  //					&budgets.BudgetNotificationArgs{
    50  //						ComparisonOperator: pulumi.String("GREATER_THAN"),
    51  //						Threshold:          pulumi.Float64(100),
    52  //						ThresholdType:      pulumi.String("PERCENTAGE"),
    53  //						NotificationType:   pulumi.String("FORECASTED"),
    54  //						SubscriberEmailAddresses: pulumi.StringArray{
    55  //							pulumi.String("test@example.com"),
    56  //						},
    57  //					},
    58  //				},
    59  //			})
    60  //			if err != nil {
    61  //				return err
    62  //			}
    63  //			return nil
    64  //		})
    65  //	}
    66  //
    67  // ```
    68  // <!--End PulumiCodeChooser -->
    69  //
    70  // Create a budget for *$100*.
    71  //
    72  // <!--Start PulumiCodeChooser -->
    73  // ```go
    74  // package main
    75  //
    76  // import (
    77  //
    78  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/budgets"
    79  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    80  //
    81  // )
    82  //
    83  //	func main() {
    84  //		pulumi.Run(func(ctx *pulumi.Context) error {
    85  //			_, err := budgets.NewBudget(ctx, "cost", &budgets.BudgetArgs{
    86  //				BudgetType:  pulumi.String("COST"),
    87  //				LimitAmount: pulumi.String("100"),
    88  //				LimitUnit:   pulumi.String("USD"),
    89  //			})
    90  //			if err != nil {
    91  //				return err
    92  //			}
    93  //			return nil
    94  //		})
    95  //	}
    96  //
    97  // ```
    98  // <!--End PulumiCodeChooser -->
    99  //
   100  // Create a budget with planned budget limits.
   101  //
   102  // <!--Start PulumiCodeChooser -->
   103  // ```go
   104  // package main
   105  //
   106  // import (
   107  //
   108  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/budgets"
   109  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   110  //
   111  // )
   112  //
   113  //	func main() {
   114  //		pulumi.Run(func(ctx *pulumi.Context) error {
   115  //			_, err := budgets.NewBudget(ctx, "cost", &budgets.BudgetArgs{
   116  //				PlannedLimits: budgets.BudgetPlannedLimitArray{
   117  //					&budgets.BudgetPlannedLimitArgs{
   118  //						StartTime: pulumi.String("2017-07-01_00:00"),
   119  //						Amount:    pulumi.String("100"),
   120  //						Unit:      pulumi.String("USD"),
   121  //					},
   122  //					&budgets.BudgetPlannedLimitArgs{
   123  //						StartTime: pulumi.String("2017-08-01_00:00"),
   124  //						Amount:    pulumi.String("200"),
   125  //						Unit:      pulumi.String("USD"),
   126  //					},
   127  //				},
   128  //			})
   129  //			if err != nil {
   130  //				return err
   131  //			}
   132  //			return nil
   133  //		})
   134  //	}
   135  //
   136  // ```
   137  // <!--End PulumiCodeChooser -->
   138  //
   139  // Create a budget for s3 with a limit of *3 GB* of storage.
   140  //
   141  // <!--Start PulumiCodeChooser -->
   142  // ```go
   143  // package main
   144  //
   145  // import (
   146  //
   147  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/budgets"
   148  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   149  //
   150  // )
   151  //
   152  //	func main() {
   153  //		pulumi.Run(func(ctx *pulumi.Context) error {
   154  //			_, err := budgets.NewBudget(ctx, "s3", &budgets.BudgetArgs{
   155  //				BudgetType:  pulumi.String("USAGE"),
   156  //				LimitAmount: pulumi.String("3"),
   157  //				LimitUnit:   pulumi.String("GB"),
   158  //			})
   159  //			if err != nil {
   160  //				return err
   161  //			}
   162  //			return nil
   163  //		})
   164  //	}
   165  //
   166  // ```
   167  // <!--End PulumiCodeChooser -->
   168  //
   169  // # Create a Savings Plan Utilization Budget
   170  //
   171  // <!--Start PulumiCodeChooser -->
   172  // ```go
   173  // package main
   174  //
   175  // import (
   176  //
   177  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/budgets"
   178  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   179  //
   180  // )
   181  //
   182  //	func main() {
   183  //		pulumi.Run(func(ctx *pulumi.Context) error {
   184  //			_, err := budgets.NewBudget(ctx, "savings_plan_utilization", &budgets.BudgetArgs{
   185  //				BudgetType:  pulumi.String("SAVINGS_PLANS_UTILIZATION"),
   186  //				LimitAmount: pulumi.String("100.0"),
   187  //				LimitUnit:   pulumi.String("PERCENTAGE"),
   188  //				CostTypes: &budgets.BudgetCostTypesArgs{
   189  //					IncludeCredit:            pulumi.Bool(false),
   190  //					IncludeDiscount:          pulumi.Bool(false),
   191  //					IncludeOtherSubscription: pulumi.Bool(false),
   192  //					IncludeRecurring:         pulumi.Bool(false),
   193  //					IncludeRefund:            pulumi.Bool(false),
   194  //					IncludeSubscription:      pulumi.Bool(true),
   195  //					IncludeSupport:           pulumi.Bool(false),
   196  //					IncludeTax:               pulumi.Bool(false),
   197  //					IncludeUpfront:           pulumi.Bool(false),
   198  //					UseBlended:               pulumi.Bool(false),
   199  //				},
   200  //			})
   201  //			if err != nil {
   202  //				return err
   203  //			}
   204  //			return nil
   205  //		})
   206  //	}
   207  //
   208  // ```
   209  // <!--End PulumiCodeChooser -->
   210  //
   211  // # Create a RI Utilization Budget
   212  //
   213  // <!--Start PulumiCodeChooser -->
   214  // ```go
   215  // package main
   216  //
   217  // import (
   218  //
   219  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/budgets"
   220  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   221  //
   222  // )
   223  //
   224  //	func main() {
   225  //		pulumi.Run(func(ctx *pulumi.Context) error {
   226  //			_, err := budgets.NewBudget(ctx, "ri_utilization", &budgets.BudgetArgs{
   227  //				BudgetType:  pulumi.String("RI_UTILIZATION"),
   228  //				LimitAmount: pulumi.String("100.0"),
   229  //				LimitUnit:   pulumi.String("PERCENTAGE"),
   230  //				CostTypes: &budgets.BudgetCostTypesArgs{
   231  //					IncludeCredit:            pulumi.Bool(false),
   232  //					IncludeDiscount:          pulumi.Bool(false),
   233  //					IncludeOtherSubscription: pulumi.Bool(false),
   234  //					IncludeRecurring:         pulumi.Bool(false),
   235  //					IncludeRefund:            pulumi.Bool(false),
   236  //					IncludeSubscription:      pulumi.Bool(true),
   237  //					IncludeSupport:           pulumi.Bool(false),
   238  //					IncludeTax:               pulumi.Bool(false),
   239  //					IncludeUpfront:           pulumi.Bool(false),
   240  //					UseBlended:               pulumi.Bool(false),
   241  //				},
   242  //				CostFilters: budgets.BudgetCostFilterArray{
   243  //					&budgets.BudgetCostFilterArgs{
   244  //						Name: pulumi.String("Service"),
   245  //						Values: pulumi.StringArray{
   246  //							pulumi.String("Amazon Relational Database Service"),
   247  //						},
   248  //					},
   249  //				},
   250  //			})
   251  //			if err != nil {
   252  //				return err
   253  //			}
   254  //			return nil
   255  //		})
   256  //	}
   257  //
   258  // ```
   259  // <!--End PulumiCodeChooser -->
   260  //
   261  // # Create a Cost Filter using Resource Tags
   262  //
   263  // <!--Start PulumiCodeChooser -->
   264  // ```go
   265  // package main
   266  //
   267  // import (
   268  //
   269  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/budgets"
   270  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   271  //
   272  // )
   273  //
   274  //	func main() {
   275  //		pulumi.Run(func(ctx *pulumi.Context) error {
   276  //			_, err := budgets.NewBudget(ctx, "cost", &budgets.BudgetArgs{
   277  //				CostFilters: budgets.BudgetCostFilterArray{
   278  //					&budgets.BudgetCostFilterArgs{
   279  //						Name: pulumi.String("TagKeyValue"),
   280  //						Values: pulumi.StringArray{
   281  //							pulumi.String("TagKey$TagValue"),
   282  //						},
   283  //					},
   284  //				},
   285  //			})
   286  //			if err != nil {
   287  //				return err
   288  //			}
   289  //			return nil
   290  //		})
   291  //	}
   292  //
   293  // ```
   294  // <!--End PulumiCodeChooser -->
   295  //
   296  // # Create a costFilter using resource tags, obtaining the tag value from a variable
   297  //
   298  // <!--Start PulumiCodeChooser -->
   299  // ```go
   300  // package main
   301  //
   302  // import (
   303  //
   304  //	"fmt"
   305  //
   306  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/budgets"
   307  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   308  //
   309  // )
   310  //
   311  //	func main() {
   312  //		pulumi.Run(func(ctx *pulumi.Context) error {
   313  //			_, err := budgets.NewBudget(ctx, "cost", &budgets.BudgetArgs{
   314  //				CostFilters: budgets.BudgetCostFilterArray{
   315  //					&budgets.BudgetCostFilterArgs{
   316  //						Name: pulumi.String("TagKeyValue"),
   317  //						Values: pulumi.StringArray{
   318  //							pulumi.String(fmt.Sprintf("TagKey%v%v", "$", tagValue)),
   319  //						},
   320  //					},
   321  //				},
   322  //			})
   323  //			if err != nil {
   324  //				return err
   325  //			}
   326  //			return nil
   327  //		})
   328  //	}
   329  //
   330  // ```
   331  // <!--End PulumiCodeChooser -->
   332  //
   333  // ## Import
   334  //
   335  // Using `pulumi import`, import budgets using `AccountID:BudgetName`. For example:
   336  //
   337  // ```sh
   338  // $ pulumi import aws:budgets/budget:Budget myBudget 123456789012:myBudget
   339  // ```
   340  type Budget struct {
   341  	pulumi.CustomResourceState
   342  
   343  	// The ID of the target account for budget. Will use current user's accountId by default if omitted.
   344  	AccountId pulumi.StringOutput `pulumi:"accountId"`
   345  	// The ARN of the budget.
   346  	Arn pulumi.StringOutput `pulumi:"arn"`
   347  	// Object containing [AutoAdjustData] which determines the budget amount for an auto-adjusting budget.
   348  	AutoAdjustData BudgetAutoAdjustDataPtrOutput `pulumi:"autoAdjustData"`
   349  	// Whether this budget tracks monetary cost or usage.
   350  	BudgetType pulumi.StringOutput `pulumi:"budgetType"`
   351  	// A list of CostFilter name/values pair to apply to budget.
   352  	CostFilters BudgetCostFilterArrayOutput `pulumi:"costFilters"`
   353  	// Object containing CostTypes The types of cost included in a budget, such as tax and subscriptions.
   354  	CostTypes BudgetCostTypesOutput `pulumi:"costTypes"`
   355  	// The amount of cost or usage being measured for a budget.
   356  	LimitAmount pulumi.StringOutput `pulumi:"limitAmount"`
   357  	// The unit of measurement used for the budget forecast, actual spend, or budget threshold, such as dollars or GB. See [Spend](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/data-type-spend.html) documentation.
   358  	LimitUnit pulumi.StringOutput `pulumi:"limitUnit"`
   359  	// The name of a budget. Unique within accounts.
   360  	Name pulumi.StringOutput `pulumi:"name"`
   361  	// The prefix of the name of a budget. Unique within accounts.
   362  	NamePrefix pulumi.StringOutput `pulumi:"namePrefix"`
   363  	// Object containing Budget Notifications. Can be used multiple times to define more than one budget notification.
   364  	Notifications BudgetNotificationArrayOutput `pulumi:"notifications"`
   365  	// Object containing Planned Budget Limits. Can be used multiple times to plan more than one budget limit. See [PlannedBudgetLimits](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_budgets_Budget.html#awscostmanagement-Type-budgets_Budget-PlannedBudgetLimits) documentation.
   366  	PlannedLimits BudgetPlannedLimitArrayOutput `pulumi:"plannedLimits"`
   367  	// The end of the time period covered by the budget. There are no restrictions on the end date. Format: `2017-01-01_12:00`.
   368  	TimePeriodEnd pulumi.StringPtrOutput `pulumi:"timePeriodEnd"`
   369  	// The start of the time period covered by the budget. If you don't specify a start date, AWS defaults to the start of your chosen time period. The start date must come before the end date. Format: `2017-01-01_12:00`.
   370  	TimePeriodStart pulumi.StringOutput `pulumi:"timePeriodStart"`
   371  	// The length of time until a budget resets the actual and forecasted spend. Valid values: `MONTHLY`, `QUARTERLY`, `ANNUALLY`, and `DAILY`.
   372  	TimeUnit pulumi.StringOutput `pulumi:"timeUnit"`
   373  }
   374  
   375  // NewBudget registers a new resource with the given unique name, arguments, and options.
   376  func NewBudget(ctx *pulumi.Context,
   377  	name string, args *BudgetArgs, opts ...pulumi.ResourceOption) (*Budget, error) {
   378  	if args == nil {
   379  		return nil, errors.New("missing one or more required arguments")
   380  	}
   381  
   382  	if args.BudgetType == nil {
   383  		return nil, errors.New("invalid value for required argument 'BudgetType'")
   384  	}
   385  	if args.TimeUnit == nil {
   386  		return nil, errors.New("invalid value for required argument 'TimeUnit'")
   387  	}
   388  	opts = internal.PkgResourceDefaultOpts(opts)
   389  	var resource Budget
   390  	err := ctx.RegisterResource("aws:budgets/budget:Budget", name, args, &resource, opts...)
   391  	if err != nil {
   392  		return nil, err
   393  	}
   394  	return &resource, nil
   395  }
   396  
   397  // GetBudget gets an existing Budget resource's state with the given name, ID, and optional
   398  // state properties that are used to uniquely qualify the lookup (nil if not required).
   399  func GetBudget(ctx *pulumi.Context,
   400  	name string, id pulumi.IDInput, state *BudgetState, opts ...pulumi.ResourceOption) (*Budget, error) {
   401  	var resource Budget
   402  	err := ctx.ReadResource("aws:budgets/budget:Budget", name, id, state, &resource, opts...)
   403  	if err != nil {
   404  		return nil, err
   405  	}
   406  	return &resource, nil
   407  }
   408  
   409  // Input properties used for looking up and filtering Budget resources.
   410  type budgetState struct {
   411  	// The ID of the target account for budget. Will use current user's accountId by default if omitted.
   412  	AccountId *string `pulumi:"accountId"`
   413  	// The ARN of the budget.
   414  	Arn *string `pulumi:"arn"`
   415  	// Object containing [AutoAdjustData] which determines the budget amount for an auto-adjusting budget.
   416  	AutoAdjustData *BudgetAutoAdjustData `pulumi:"autoAdjustData"`
   417  	// Whether this budget tracks monetary cost or usage.
   418  	BudgetType *string `pulumi:"budgetType"`
   419  	// A list of CostFilter name/values pair to apply to budget.
   420  	CostFilters []BudgetCostFilter `pulumi:"costFilters"`
   421  	// Object containing CostTypes The types of cost included in a budget, such as tax and subscriptions.
   422  	CostTypes *BudgetCostTypes `pulumi:"costTypes"`
   423  	// The amount of cost or usage being measured for a budget.
   424  	LimitAmount *string `pulumi:"limitAmount"`
   425  	// The unit of measurement used for the budget forecast, actual spend, or budget threshold, such as dollars or GB. See [Spend](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/data-type-spend.html) documentation.
   426  	LimitUnit *string `pulumi:"limitUnit"`
   427  	// The name of a budget. Unique within accounts.
   428  	Name *string `pulumi:"name"`
   429  	// The prefix of the name of a budget. Unique within accounts.
   430  	NamePrefix *string `pulumi:"namePrefix"`
   431  	// Object containing Budget Notifications. Can be used multiple times to define more than one budget notification.
   432  	Notifications []BudgetNotification `pulumi:"notifications"`
   433  	// Object containing Planned Budget Limits. Can be used multiple times to plan more than one budget limit. See [PlannedBudgetLimits](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_budgets_Budget.html#awscostmanagement-Type-budgets_Budget-PlannedBudgetLimits) documentation.
   434  	PlannedLimits []BudgetPlannedLimit `pulumi:"plannedLimits"`
   435  	// The end of the time period covered by the budget. There are no restrictions on the end date. Format: `2017-01-01_12:00`.
   436  	TimePeriodEnd *string `pulumi:"timePeriodEnd"`
   437  	// The start of the time period covered by the budget. If you don't specify a start date, AWS defaults to the start of your chosen time period. The start date must come before the end date. Format: `2017-01-01_12:00`.
   438  	TimePeriodStart *string `pulumi:"timePeriodStart"`
   439  	// The length of time until a budget resets the actual and forecasted spend. Valid values: `MONTHLY`, `QUARTERLY`, `ANNUALLY`, and `DAILY`.
   440  	TimeUnit *string `pulumi:"timeUnit"`
   441  }
   442  
   443  type BudgetState struct {
   444  	// The ID of the target account for budget. Will use current user's accountId by default if omitted.
   445  	AccountId pulumi.StringPtrInput
   446  	// The ARN of the budget.
   447  	Arn pulumi.StringPtrInput
   448  	// Object containing [AutoAdjustData] which determines the budget amount for an auto-adjusting budget.
   449  	AutoAdjustData BudgetAutoAdjustDataPtrInput
   450  	// Whether this budget tracks monetary cost or usage.
   451  	BudgetType pulumi.StringPtrInput
   452  	// A list of CostFilter name/values pair to apply to budget.
   453  	CostFilters BudgetCostFilterArrayInput
   454  	// Object containing CostTypes The types of cost included in a budget, such as tax and subscriptions.
   455  	CostTypes BudgetCostTypesPtrInput
   456  	// The amount of cost or usage being measured for a budget.
   457  	LimitAmount pulumi.StringPtrInput
   458  	// The unit of measurement used for the budget forecast, actual spend, or budget threshold, such as dollars or GB. See [Spend](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/data-type-spend.html) documentation.
   459  	LimitUnit pulumi.StringPtrInput
   460  	// The name of a budget. Unique within accounts.
   461  	Name pulumi.StringPtrInput
   462  	// The prefix of the name of a budget. Unique within accounts.
   463  	NamePrefix pulumi.StringPtrInput
   464  	// Object containing Budget Notifications. Can be used multiple times to define more than one budget notification.
   465  	Notifications BudgetNotificationArrayInput
   466  	// Object containing Planned Budget Limits. Can be used multiple times to plan more than one budget limit. See [PlannedBudgetLimits](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_budgets_Budget.html#awscostmanagement-Type-budgets_Budget-PlannedBudgetLimits) documentation.
   467  	PlannedLimits BudgetPlannedLimitArrayInput
   468  	// The end of the time period covered by the budget. There are no restrictions on the end date. Format: `2017-01-01_12:00`.
   469  	TimePeriodEnd pulumi.StringPtrInput
   470  	// The start of the time period covered by the budget. If you don't specify a start date, AWS defaults to the start of your chosen time period. The start date must come before the end date. Format: `2017-01-01_12:00`.
   471  	TimePeriodStart pulumi.StringPtrInput
   472  	// The length of time until a budget resets the actual and forecasted spend. Valid values: `MONTHLY`, `QUARTERLY`, `ANNUALLY`, and `DAILY`.
   473  	TimeUnit pulumi.StringPtrInput
   474  }
   475  
   476  func (BudgetState) ElementType() reflect.Type {
   477  	return reflect.TypeOf((*budgetState)(nil)).Elem()
   478  }
   479  
   480  type budgetArgs struct {
   481  	// The ID of the target account for budget. Will use current user's accountId by default if omitted.
   482  	AccountId *string `pulumi:"accountId"`
   483  	// Object containing [AutoAdjustData] which determines the budget amount for an auto-adjusting budget.
   484  	AutoAdjustData *BudgetAutoAdjustData `pulumi:"autoAdjustData"`
   485  	// Whether this budget tracks monetary cost or usage.
   486  	BudgetType string `pulumi:"budgetType"`
   487  	// A list of CostFilter name/values pair to apply to budget.
   488  	CostFilters []BudgetCostFilter `pulumi:"costFilters"`
   489  	// Object containing CostTypes The types of cost included in a budget, such as tax and subscriptions.
   490  	CostTypes *BudgetCostTypes `pulumi:"costTypes"`
   491  	// The amount of cost or usage being measured for a budget.
   492  	LimitAmount *string `pulumi:"limitAmount"`
   493  	// The unit of measurement used for the budget forecast, actual spend, or budget threshold, such as dollars or GB. See [Spend](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/data-type-spend.html) documentation.
   494  	LimitUnit *string `pulumi:"limitUnit"`
   495  	// The name of a budget. Unique within accounts.
   496  	Name *string `pulumi:"name"`
   497  	// The prefix of the name of a budget. Unique within accounts.
   498  	NamePrefix *string `pulumi:"namePrefix"`
   499  	// Object containing Budget Notifications. Can be used multiple times to define more than one budget notification.
   500  	Notifications []BudgetNotification `pulumi:"notifications"`
   501  	// Object containing Planned Budget Limits. Can be used multiple times to plan more than one budget limit. See [PlannedBudgetLimits](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_budgets_Budget.html#awscostmanagement-Type-budgets_Budget-PlannedBudgetLimits) documentation.
   502  	PlannedLimits []BudgetPlannedLimit `pulumi:"plannedLimits"`
   503  	// The end of the time period covered by the budget. There are no restrictions on the end date. Format: `2017-01-01_12:00`.
   504  	TimePeriodEnd *string `pulumi:"timePeriodEnd"`
   505  	// The start of the time period covered by the budget. If you don't specify a start date, AWS defaults to the start of your chosen time period. The start date must come before the end date. Format: `2017-01-01_12:00`.
   506  	TimePeriodStart *string `pulumi:"timePeriodStart"`
   507  	// The length of time until a budget resets the actual and forecasted spend. Valid values: `MONTHLY`, `QUARTERLY`, `ANNUALLY`, and `DAILY`.
   508  	TimeUnit string `pulumi:"timeUnit"`
   509  }
   510  
   511  // The set of arguments for constructing a Budget resource.
   512  type BudgetArgs struct {
   513  	// The ID of the target account for budget. Will use current user's accountId by default if omitted.
   514  	AccountId pulumi.StringPtrInput
   515  	// Object containing [AutoAdjustData] which determines the budget amount for an auto-adjusting budget.
   516  	AutoAdjustData BudgetAutoAdjustDataPtrInput
   517  	// Whether this budget tracks monetary cost or usage.
   518  	BudgetType pulumi.StringInput
   519  	// A list of CostFilter name/values pair to apply to budget.
   520  	CostFilters BudgetCostFilterArrayInput
   521  	// Object containing CostTypes The types of cost included in a budget, such as tax and subscriptions.
   522  	CostTypes BudgetCostTypesPtrInput
   523  	// The amount of cost or usage being measured for a budget.
   524  	LimitAmount pulumi.StringPtrInput
   525  	// The unit of measurement used for the budget forecast, actual spend, or budget threshold, such as dollars or GB. See [Spend](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/data-type-spend.html) documentation.
   526  	LimitUnit pulumi.StringPtrInput
   527  	// The name of a budget. Unique within accounts.
   528  	Name pulumi.StringPtrInput
   529  	// The prefix of the name of a budget. Unique within accounts.
   530  	NamePrefix pulumi.StringPtrInput
   531  	// Object containing Budget Notifications. Can be used multiple times to define more than one budget notification.
   532  	Notifications BudgetNotificationArrayInput
   533  	// Object containing Planned Budget Limits. Can be used multiple times to plan more than one budget limit. See [PlannedBudgetLimits](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_budgets_Budget.html#awscostmanagement-Type-budgets_Budget-PlannedBudgetLimits) documentation.
   534  	PlannedLimits BudgetPlannedLimitArrayInput
   535  	// The end of the time period covered by the budget. There are no restrictions on the end date. Format: `2017-01-01_12:00`.
   536  	TimePeriodEnd pulumi.StringPtrInput
   537  	// The start of the time period covered by the budget. If you don't specify a start date, AWS defaults to the start of your chosen time period. The start date must come before the end date. Format: `2017-01-01_12:00`.
   538  	TimePeriodStart pulumi.StringPtrInput
   539  	// The length of time until a budget resets the actual and forecasted spend. Valid values: `MONTHLY`, `QUARTERLY`, `ANNUALLY`, and `DAILY`.
   540  	TimeUnit pulumi.StringInput
   541  }
   542  
   543  func (BudgetArgs) ElementType() reflect.Type {
   544  	return reflect.TypeOf((*budgetArgs)(nil)).Elem()
   545  }
   546  
   547  type BudgetInput interface {
   548  	pulumi.Input
   549  
   550  	ToBudgetOutput() BudgetOutput
   551  	ToBudgetOutputWithContext(ctx context.Context) BudgetOutput
   552  }
   553  
   554  func (*Budget) ElementType() reflect.Type {
   555  	return reflect.TypeOf((**Budget)(nil)).Elem()
   556  }
   557  
   558  func (i *Budget) ToBudgetOutput() BudgetOutput {
   559  	return i.ToBudgetOutputWithContext(context.Background())
   560  }
   561  
   562  func (i *Budget) ToBudgetOutputWithContext(ctx context.Context) BudgetOutput {
   563  	return pulumi.ToOutputWithContext(ctx, i).(BudgetOutput)
   564  }
   565  
   566  // BudgetArrayInput is an input type that accepts BudgetArray and BudgetArrayOutput values.
   567  // You can construct a concrete instance of `BudgetArrayInput` via:
   568  //
   569  //	BudgetArray{ BudgetArgs{...} }
   570  type BudgetArrayInput interface {
   571  	pulumi.Input
   572  
   573  	ToBudgetArrayOutput() BudgetArrayOutput
   574  	ToBudgetArrayOutputWithContext(context.Context) BudgetArrayOutput
   575  }
   576  
   577  type BudgetArray []BudgetInput
   578  
   579  func (BudgetArray) ElementType() reflect.Type {
   580  	return reflect.TypeOf((*[]*Budget)(nil)).Elem()
   581  }
   582  
   583  func (i BudgetArray) ToBudgetArrayOutput() BudgetArrayOutput {
   584  	return i.ToBudgetArrayOutputWithContext(context.Background())
   585  }
   586  
   587  func (i BudgetArray) ToBudgetArrayOutputWithContext(ctx context.Context) BudgetArrayOutput {
   588  	return pulumi.ToOutputWithContext(ctx, i).(BudgetArrayOutput)
   589  }
   590  
   591  // BudgetMapInput is an input type that accepts BudgetMap and BudgetMapOutput values.
   592  // You can construct a concrete instance of `BudgetMapInput` via:
   593  //
   594  //	BudgetMap{ "key": BudgetArgs{...} }
   595  type BudgetMapInput interface {
   596  	pulumi.Input
   597  
   598  	ToBudgetMapOutput() BudgetMapOutput
   599  	ToBudgetMapOutputWithContext(context.Context) BudgetMapOutput
   600  }
   601  
   602  type BudgetMap map[string]BudgetInput
   603  
   604  func (BudgetMap) ElementType() reflect.Type {
   605  	return reflect.TypeOf((*map[string]*Budget)(nil)).Elem()
   606  }
   607  
   608  func (i BudgetMap) ToBudgetMapOutput() BudgetMapOutput {
   609  	return i.ToBudgetMapOutputWithContext(context.Background())
   610  }
   611  
   612  func (i BudgetMap) ToBudgetMapOutputWithContext(ctx context.Context) BudgetMapOutput {
   613  	return pulumi.ToOutputWithContext(ctx, i).(BudgetMapOutput)
   614  }
   615  
   616  type BudgetOutput struct{ *pulumi.OutputState }
   617  
   618  func (BudgetOutput) ElementType() reflect.Type {
   619  	return reflect.TypeOf((**Budget)(nil)).Elem()
   620  }
   621  
   622  func (o BudgetOutput) ToBudgetOutput() BudgetOutput {
   623  	return o
   624  }
   625  
   626  func (o BudgetOutput) ToBudgetOutputWithContext(ctx context.Context) BudgetOutput {
   627  	return o
   628  }
   629  
   630  // The ID of the target account for budget. Will use current user's accountId by default if omitted.
   631  func (o BudgetOutput) AccountId() pulumi.StringOutput {
   632  	return o.ApplyT(func(v *Budget) pulumi.StringOutput { return v.AccountId }).(pulumi.StringOutput)
   633  }
   634  
   635  // The ARN of the budget.
   636  func (o BudgetOutput) Arn() pulumi.StringOutput {
   637  	return o.ApplyT(func(v *Budget) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   638  }
   639  
   640  // Object containing [AutoAdjustData] which determines the budget amount for an auto-adjusting budget.
   641  func (o BudgetOutput) AutoAdjustData() BudgetAutoAdjustDataPtrOutput {
   642  	return o.ApplyT(func(v *Budget) BudgetAutoAdjustDataPtrOutput { return v.AutoAdjustData }).(BudgetAutoAdjustDataPtrOutput)
   643  }
   644  
   645  // Whether this budget tracks monetary cost or usage.
   646  func (o BudgetOutput) BudgetType() pulumi.StringOutput {
   647  	return o.ApplyT(func(v *Budget) pulumi.StringOutput { return v.BudgetType }).(pulumi.StringOutput)
   648  }
   649  
   650  // A list of CostFilter name/values pair to apply to budget.
   651  func (o BudgetOutput) CostFilters() BudgetCostFilterArrayOutput {
   652  	return o.ApplyT(func(v *Budget) BudgetCostFilterArrayOutput { return v.CostFilters }).(BudgetCostFilterArrayOutput)
   653  }
   654  
   655  // Object containing CostTypes The types of cost included in a budget, such as tax and subscriptions.
   656  func (o BudgetOutput) CostTypes() BudgetCostTypesOutput {
   657  	return o.ApplyT(func(v *Budget) BudgetCostTypesOutput { return v.CostTypes }).(BudgetCostTypesOutput)
   658  }
   659  
   660  // The amount of cost or usage being measured for a budget.
   661  func (o BudgetOutput) LimitAmount() pulumi.StringOutput {
   662  	return o.ApplyT(func(v *Budget) pulumi.StringOutput { return v.LimitAmount }).(pulumi.StringOutput)
   663  }
   664  
   665  // The unit of measurement used for the budget forecast, actual spend, or budget threshold, such as dollars or GB. See [Spend](http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/data-type-spend.html) documentation.
   666  func (o BudgetOutput) LimitUnit() pulumi.StringOutput {
   667  	return o.ApplyT(func(v *Budget) pulumi.StringOutput { return v.LimitUnit }).(pulumi.StringOutput)
   668  }
   669  
   670  // The name of a budget. Unique within accounts.
   671  func (o BudgetOutput) Name() pulumi.StringOutput {
   672  	return o.ApplyT(func(v *Budget) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   673  }
   674  
   675  // The prefix of the name of a budget. Unique within accounts.
   676  func (o BudgetOutput) NamePrefix() pulumi.StringOutput {
   677  	return o.ApplyT(func(v *Budget) pulumi.StringOutput { return v.NamePrefix }).(pulumi.StringOutput)
   678  }
   679  
   680  // Object containing Budget Notifications. Can be used multiple times to define more than one budget notification.
   681  func (o BudgetOutput) Notifications() BudgetNotificationArrayOutput {
   682  	return o.ApplyT(func(v *Budget) BudgetNotificationArrayOutput { return v.Notifications }).(BudgetNotificationArrayOutput)
   683  }
   684  
   685  // Object containing Planned Budget Limits. Can be used multiple times to plan more than one budget limit. See [PlannedBudgetLimits](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_budgets_Budget.html#awscostmanagement-Type-budgets_Budget-PlannedBudgetLimits) documentation.
   686  func (o BudgetOutput) PlannedLimits() BudgetPlannedLimitArrayOutput {
   687  	return o.ApplyT(func(v *Budget) BudgetPlannedLimitArrayOutput { return v.PlannedLimits }).(BudgetPlannedLimitArrayOutput)
   688  }
   689  
   690  // The end of the time period covered by the budget. There are no restrictions on the end date. Format: `2017-01-01_12:00`.
   691  func (o BudgetOutput) TimePeriodEnd() pulumi.StringPtrOutput {
   692  	return o.ApplyT(func(v *Budget) pulumi.StringPtrOutput { return v.TimePeriodEnd }).(pulumi.StringPtrOutput)
   693  }
   694  
   695  // The start of the time period covered by the budget. If you don't specify a start date, AWS defaults to the start of your chosen time period. The start date must come before the end date. Format: `2017-01-01_12:00`.
   696  func (o BudgetOutput) TimePeriodStart() pulumi.StringOutput {
   697  	return o.ApplyT(func(v *Budget) pulumi.StringOutput { return v.TimePeriodStart }).(pulumi.StringOutput)
   698  }
   699  
   700  // The length of time until a budget resets the actual and forecasted spend. Valid values: `MONTHLY`, `QUARTERLY`, `ANNUALLY`, and `DAILY`.
   701  func (o BudgetOutput) TimeUnit() pulumi.StringOutput {
   702  	return o.ApplyT(func(v *Budget) pulumi.StringOutput { return v.TimeUnit }).(pulumi.StringOutput)
   703  }
   704  
   705  type BudgetArrayOutput struct{ *pulumi.OutputState }
   706  
   707  func (BudgetArrayOutput) ElementType() reflect.Type {
   708  	return reflect.TypeOf((*[]*Budget)(nil)).Elem()
   709  }
   710  
   711  func (o BudgetArrayOutput) ToBudgetArrayOutput() BudgetArrayOutput {
   712  	return o
   713  }
   714  
   715  func (o BudgetArrayOutput) ToBudgetArrayOutputWithContext(ctx context.Context) BudgetArrayOutput {
   716  	return o
   717  }
   718  
   719  func (o BudgetArrayOutput) Index(i pulumi.IntInput) BudgetOutput {
   720  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Budget {
   721  		return vs[0].([]*Budget)[vs[1].(int)]
   722  	}).(BudgetOutput)
   723  }
   724  
   725  type BudgetMapOutput struct{ *pulumi.OutputState }
   726  
   727  func (BudgetMapOutput) ElementType() reflect.Type {
   728  	return reflect.TypeOf((*map[string]*Budget)(nil)).Elem()
   729  }
   730  
   731  func (o BudgetMapOutput) ToBudgetMapOutput() BudgetMapOutput {
   732  	return o
   733  }
   734  
   735  func (o BudgetMapOutput) ToBudgetMapOutputWithContext(ctx context.Context) BudgetMapOutput {
   736  	return o
   737  }
   738  
   739  func (o BudgetMapOutput) MapIndex(k pulumi.StringInput) BudgetOutput {
   740  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Budget {
   741  		return vs[0].(map[string]*Budget)[vs[1].(string)]
   742  	}).(BudgetOutput)
   743  }
   744  
   745  func init() {
   746  	pulumi.RegisterInputType(reflect.TypeOf((*BudgetInput)(nil)).Elem(), &Budget{})
   747  	pulumi.RegisterInputType(reflect.TypeOf((*BudgetArrayInput)(nil)).Elem(), BudgetArray{})
   748  	pulumi.RegisterInputType(reflect.TypeOf((*BudgetMapInput)(nil)).Elem(), BudgetMap{})
   749  	pulumi.RegisterOutputType(BudgetOutput{})
   750  	pulumi.RegisterOutputType(BudgetArrayOutput{})
   751  	pulumi.RegisterOutputType(BudgetMapOutput{})
   752  }