Class CfnBudget

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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:55.837Z") @Stability(Stable) public class CfnBudget extends CfnResource implements IInspectable
A CloudFormation AWS::Budgets::Budget.

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();
 
  • 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 Construct scope, @NotNull String id, @NotNull CfnBudgetProps props)
      Create a new AWS::Budgets::Budget.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      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.
    • 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 CfnBudget.BudgetDataProperty value)
      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.
    • getNotificationsWithSubscribers

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

      A budget can have up to five notifications, and each notification can have one SNS subscriber and up to 10 email subscribers. If you include notifications and subscribers in your CreateBudget call, AWS creates the notifications and subscribers for you.

    • setNotificationsWithSubscribers

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

      A budget can have up to five notifications, and each notification can have one SNS subscriber and up to 10 email subscribers. If you include notifications and subscribers in your CreateBudget call, AWS creates the notifications and subscribers for you.

    • setNotificationsWithSubscribers

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

      A budget can have up to five notifications, and each notification can have one SNS subscriber and up to 10 email subscribers. If you include notifications and subscribers in your CreateBudget call, AWS creates the notifications and subscribers for you.