Class CfnBudget

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.96.0 (build 921e240)", date="2024-04-10T22:22:24.481Z") @Stability(Stable) public class CfnBudget extends CfnResource implements IInspectable
The AWS::Budgets::Budget resource allows customers to take pre-defined actions that will trigger once a budget threshold has been exceeded.

creates, replaces, or deletes budgets for Billing and Cost Management. For more information, see Managing Your Costs with Budgets in the AWS Billing and Cost Management User Guide .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.budgets.*;
 Object costFilters;
 Object plannedBudgetLimits;
 CfnBudget cfnBudget = CfnBudget.Builder.create(this, "MyCfnBudget")
         .budget(BudgetDataProperty.builder()
                 .budgetType("budgetType")
                 .timeUnit("timeUnit")
                 // the properties below are optional
                 .autoAdjustData(AutoAdjustDataProperty.builder()
                         .autoAdjustType("autoAdjustType")
                         // the properties below are optional
                         .historicalOptions(HistoricalOptionsProperty.builder()
                                 .budgetAdjustmentPeriod(123)
                                 .build())
                         .build())
                 .budgetLimit(SpendProperty.builder()
                         .amount(123)
                         .unit("unit")
                         .build())
                 .budgetName("budgetName")
                 .costFilters(costFilters)
                 .costTypes(CostTypesProperty.builder()
                         .includeCredit(false)
                         .includeDiscount(false)
                         .includeOtherSubscription(false)
                         .includeRecurring(false)
                         .includeRefund(false)
                         .includeSubscription(false)
                         .includeSupport(false)
                         .includeTax(false)
                         .includeUpfront(false)
                         .useAmortized(false)
                         .useBlended(false)
                         .build())
                 .plannedBudgetLimits(plannedBudgetLimits)
                 .timePeriod(TimePeriodProperty.builder()
                         .end("end")
                         .start("start")
                         .build())
                 .build())
         // the properties below are optional
         .notificationsWithSubscribers(List.of(NotificationWithSubscribersProperty.builder()
                 .notification(NotificationProperty.builder()
                         .comparisonOperator("comparisonOperator")
                         .notificationType("notificationType")
                         .threshold(123)
                         // the properties below are optional
                         .thresholdType("thresholdType")
                         .build())
                 .subscribers(List.of(SubscriberProperty.builder()
                         .address("address")
                         .subscriptionType("subscriptionType")
                         .build()))
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnBudget

      protected CfnBudget(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnBudget

      protected CfnBudget(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnBudget

      @Stability(Stable) public CfnBudget(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnBudgetProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getBudget

      @Stability(Stable) @NotNull public Object getBudget()
      The budget object that you want to create.
    • setBudget

      @Stability(Stable) public void setBudget(@NotNull IResolvable value)
      The budget object that you want to create.
    • setBudget

      @Stability(Stable) public void setBudget(@NotNull CfnBudget.BudgetDataProperty value)
      The budget object that you want to create.
    • getNotificationsWithSubscribers

      @Stability(Stable) @Nullable public Object getNotificationsWithSubscribers()
      A notification that you want to associate with a budget.
    • setNotificationsWithSubscribers

      @Stability(Stable) public void setNotificationsWithSubscribers(@Nullable IResolvable value)
      A notification that you want to associate with a budget.
    • setNotificationsWithSubscribers

      @Stability(Stable) public void setNotificationsWithSubscribers(@Nullable List<Object> value)
      A notification that you want to associate with a budget.