Class CfnBudget
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.budgets.CfnBudget
- All Implemented Interfaces:
IInspectable,IBudgetRef,IEnvironmentAware,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)",
date="2025-12-12T17:54:07.974Z")
@Stability(Stable)
public class CfnBudget
extends CfnResource
implements IInspectable, IBudgetRef
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 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;
ExpressionProperty expressionProperty_;
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())
.billingViewArn("billingViewArn")
.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())
.filterExpression(ExpressionProperty.builder()
.and(List.of(expressionProperty_))
.costCategories(CostCategoryValuesProperty.builder()
.key("key")
.matchOptions(List.of("matchOptions"))
.values(List.of("values"))
.build())
.dimensions(ExpressionDimensionValuesProperty.builder()
.key("key")
.matchOptions(List.of("matchOptions"))
.values(List.of("values"))
.build())
.not(expressionProperty_)
.or(List.of(expressionProperty_))
.tags(TagValuesProperty.builder()
.key("key")
.matchOptions(List.of("matchOptions"))
.values(List.of("values"))
.build())
.build())
.metrics(List.of("metrics"))
.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()))
.resourceTags(List.of(ResourceTagProperty.builder()
.key("key")
// the properties below are optional
.value("value")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDetermine the budget amount for an auto-adjusting budget.static interfaceRepresents the output of theCreateBudgetoperation.static final classA fluent builder forCfnBudget.static interfaceThe cost category values used for filtering the costs.static interfaceThe types of cost that are included in aCOSTbudget, such as tax and subscriptions.static interfaceContains the specifications for the filters to use for your request.static interfaceUse Expression to filter in various Budgets APIs.static interfaceThe parameters that define or describe the historical data that your auto-adjusting budget is based on.static interfaceA notification that's associated with a budget.static interfaceA notification with subscribers.static interfaceThe tag structure that contains a tag key and value.static interfaceThe amount of cost or usage that's measured for a budget.static interfaceTheSubscriberproperty type specifies who to notify for a Billing and Cost Management budget notification.static interfaceThe values that are available for a tag.static interfaceThe period of time that is covered by a budget.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.budgets.IBudgetRef
IBudgetRef.Jsii$Default, IBudgetRef.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnBudget(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnBudget(software.amazon.jsii.JsiiObjectRef objRef) CfnBudget(software.constructs.Construct scope, String id, CfnBudgetProps props) Create a newAWS::Budgets::Budget. -
Method Summary
Modifier and TypeMethodDescriptionThe budget object that you want to create.A reference to a Budget resource.A notification that you want to associate with a budget.An optional list of tags to associate with the specified budget.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnBudget.renderProperties(Map<String, Object> props) voidsetBudget(IResolvable value) The budget object that you want to create.voidThe budget object that you want to create.voidA notification that you want to associate with a budget.voidA notification that you want to associate with a budget.voidsetResourceTags(List<Object> value) An optional list of tags to associate with the specified budget.voidsetResourceTags(IResolvable value) An optional list of tags to associate with the specified budget.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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) Create a newAWS::Budgets::Budget.- 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
-
isCfnBudget
Checks whether the given object is a CfnBudget.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrId
-
getBudgetRef
A reference to a Budget resource.- Specified by:
getBudgetRefin interfaceIBudgetRef
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getBudget
The budget object that you want to create.Returns union: either
IResolvableorCfnBudget.BudgetDataProperty -
setBudget
The budget object that you want to create. -
setBudget
The budget object that you want to create. -
getNotificationsWithSubscribers
A notification that you want to associate with a budget.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnBudget.NotificationWithSubscribersProperty> -
setNotificationsWithSubscribers
A notification that you want to associate with a budget. -
setNotificationsWithSubscribers
A notification that you want to associate with a budget. -
getResourceTags
An optional list of tags to associate with the specified budget.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnBudget.ResourceTagProperty> -
setResourceTags
An optional list of tags to associate with the specified budget. -
setResourceTags
An optional list of tags to associate with the specified budget.
-